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
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType:{
    serviceQuality: #B,
    sizeCategory: #XXL,
    dataClass: #MIXED
}
@VDM: {
  viewType: #COMPOSITE,
  private:true
}
@EndUserText.label: 'Aggregated data for the ML document'
define view entity P_MaterialLedgerDocAggregation
  as select from I_PriceChangeDocumentItem as Item
    inner join   I_CompanyCode           as CompanyCode on Item.CompanyCode = CompanyCode.CompanyCode
{
  key Item.MaterialLedgerDocument,
  key Item.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
}
where
      Item.FiscalYear   <> '0000'
  and Item.FiscalPeriod <> '000'
group by
  Item.MaterialLedgerDocument,
  Item.MaterialLedgerDocumentYear