P_AllocationDocument

DDL: P_ALLOCATIONDOCUMENT SQL: PALLOCDOC Type: view CONSUMPTION Package: ODATA_RUN_ALLOCATION

Allocation Document

P_AllocationDocument is a Consumption CDS View that provides data about "Allocation Document" in SAP S/4HANA. It reads from 1 data source (I_AllocationDocument) and exposes 16 fields with key fields AllocationType, AllocationCycle, AllocationCycleStartDate, FiscalYear, FiscalPeriod. It has 1 association to related views. Part of development package ODATA_RUN_ALLOCATION.

Data Sources (1)

SourceAliasJoin Type
I_AllocationDocument Document from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_AllocationRunDocument _RunDocument Document.AllocationType = _RunDocument.AllocationType and Document.AllocationCycle = _RunDocument.AllocationCycle and Document.AllocationCycleStartDate = _RunDocument.AllocationCycleStartDate and Document.FiscalYear = _RunDocument.FiscalYear and Document.FiscalPeriod = _RunDocument.FiscalPeriod and Document.AllocDocumentSequenceNumber = _RunDocument.AllocDocumentSequenceNumber

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PALLOCDOC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Allocation Document view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY AllocationType I_AllocationDocument AllocationType Table
KEY AllocationCycle I_AllocationDocument AllocationCycle Cycle
KEY AllocationCycleStartDate I_AllocationDocument AllocationCycleStartDate Valid From
KEY FiscalYear I_AllocationDocument FiscalYear G/L Fiscal Year
KEY FiscalPeriod I_AllocationDocument FiscalPeriod Tax period
KEY AllocDocumentSequenceNumber I_AllocationDocument AllocDocumentSequenceNumber Seq. Number
ReferenceDocumentNumber I_AllocationDocument ReferenceDocumentNumber Well doc.no.
PostingDate I_AllocationDocument PostingDate Posting Date for GR
AllocationCycleIsReversed I_AllocationDocument AllocationCycleIsReversed Reversal Status
AllocationCycleName I_AllocationDocument AllocationCycleName Allocation Cycle
Ledger I_AllocationDocument Ledger Ledger
AllocationCycleVersionValue I_AllocationDocument AllocationCycleVersionValue WorklistID
UniversalAllocationRun _RunDocument UniversalAllocationRun
AllocationRunStartDate
AllocationRunStartTime
AllocationRunType

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_AllocationDocument.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PALLOCDOC

CREATE VIEW P_AllocationDocument AS
SELECT
  Document.AllocationType AS AllocationType,
  Document.AllocationCycle AS AllocationCycle,
  Document.AllocationCycleStartDate AS AllocationCycleStartDate,
  Document.FiscalYear AS FiscalYear,
  Document.FiscalPeriod AS FiscalPeriod,
  Document.AllocDocumentSequenceNumber AS AllocDocumentSequenceNumber,
  Document.ReferenceDocumentNumber AS ReferenceDocumentNumber,
  Document.PostingDate AS PostingDate,
  Document.AllocationCycleIsReversed AS AllocationCycleIsReversed,
  Document.AllocationCycleName AS AllocationCycleName,
  Document.Ledger AS Ledger,
  Document.AllocationCycleVersionValue AS AllocationCycleVersionValue,
  _RunDocument.UniversalAllocationRun AS UniversalAllocationRun,
  _RunDocument._AllocationRun.AllocationRunStartDate AS AllocationRunStartDate,
  _RunDocument._AllocationRun.AllocationRunStartTime AS AllocationRunStartTime,
  _RunDocument._AllocationRun.AllocationRunType AS AllocationRunType
FROM I_AllocationDocument AS Document
LEFT OUTER JOIN I_AllocationRunDocument AS _RunDocument ON Document.AllocationType = _RunDocument.AllocationType AND Document.AllocationCycle = _RunDocument.AllocationCycle AND Document.AllocationCycleStartDate = _RunDocument.AllocationCycleStartDate AND Document.FiscalYear = _RunDocument.FiscalYear AND Document.FiscalPeriod = _RunDocument.FiscalPeriod AND Document.AllocDocumentSequenceNumber = _RunDocument.AllocDocumentSequenceNumber  -- association [0..1]
;