P_MaterialLedgerDocAggregation
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)
| Source | Alias | Join Type |
|---|---|---|
| I_CompanyCode | CompanyCode | inner |
| I_PriceChangeDocumentItem | Item | from |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA