P_MaterialLedgerDocAggregation

DDL: P_MATERIALLEDGERDOCAGGREGATION Type: view_entity COMPOSITE

Aggregated data for the ML document

P_MaterialLedgerDocAggregation is a Composite CDS View that provides data about "Aggregated data for the ML document" in SAP S/4HANA. It reads from 2 data sources (I_CompanyCode, I_PriceChangeDocumentItem) and exposes 7 fields with key fields MaterialLedgerDocument, MaterialLedgerDocumentYear.

Data Sources (2)

SourceAliasJoin Type
I_CompanyCode CompanyCode inner
I_PriceChangeDocumentItem Item from

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view
EndUserText.label Aggregated data for the ML document view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY MaterialLedgerDocument I_PriceChangeDocumentItem MaterialLedgerDocument
KEY MaterialLedgerDocumentYear I_PriceChangeDocumentItem MaterialLedgerDocumentYear
CompanyCode
CompanyCodeName
PostingDate
FiscalYear
FiscalPeriod

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_MaterialLedgerDocAggregation.
-- 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.

CREATE VIEW P_MaterialLedgerDocAggregation AS
SELECT
  Item.MaterialLedgerDocument AS MaterialLedgerDocument,
  Item.MaterialLedgerDocumentYear AS MaterialLedgerDocumentYear,
  max(Item.CompanyCode) AS CompanyCode,
  max(CompanyCode.CompanyCodeName) AS CompanyCodeName,
  min(Item.PostingDate) AS PostingDate,
  min(Item.FiscalYear) AS FiscalYear,
  min(Item.FiscalPeriod) AS FiscalPeriod
FROM I_PriceChangeDocumentItem AS Item
INNER JOIN I_CompanyCode AS CompanyCode ON /* join condition not captured in parsed metadata */
;