P_MatlStkCsgnmtDocumentItem
P_MatlStkCsgnmtDocumentItem is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_MaterialDocumentRecord, I_MatlStkSubscrpnConsignment) and exposes 15 fields with key fields MaterialDocument, MaterialDocumentYear, MaterialDocumentItem.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialDocumentRecord | _Record | from |
| I_MatlStkSubscrpnConsignment | _Subs | inner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (15)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialDocument | I_MaterialDocumentRecord | MaterialDocument | |
| KEY | MaterialDocumentYear | I_MaterialDocumentRecord | MaterialDocumentYear | |
| KEY | MaterialDocumentItem | I_MaterialDocumentRecord | MaterialDocumentItem | |
| Material | I_MaterialDocumentRecord | Material | ||
| CompanyCode | I_MaterialDocumentRecord | CompanyCode | ||
| Plant | I_MaterialDocumentRecord | Plant | ||
| Supplier | I_MaterialDocumentRecord | SpecialStockIdfgSupplier | ||
| StorageLocation | I_MaterialDocumentRecord | StorageLocation | ||
| InventoryStockType | I_MaterialDocumentRecord | InventoryStockType | ||
| MatlStkChangeQtyInBaseUnit | I_MaterialDocumentRecord | MatlStkChangeQtyInBaseUnit | ||
| MaterialBaseUnit | ||||
| PostingDate | I_MaterialDocumentRecord | PostingDate | ||
| CreationDateTime | ||||
| MaterialStockSubscriptionUUID | I_MatlStkSubscrpnConsignment | MaterialStockSubscriptionUUID | ||
| MaterialStockSubscriptionItem | I_MatlStkSubscrpnConsignment | MaterialStockSubscriptionItem |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view entity P_MatlStkCsgnmtDocumentItem
as select from I_MaterialDocumentRecord as _Record
inner join I_MatlStkSubscrpnConsignment as _Subs
on _Record.CompanyCode = _Subs.CompanyCode
and _Record.Plant = _Subs.Plant
and _Record.SpecialStockIdfgSupplier = _Subs.Supplier
{
key _Record.MaterialDocument,
key _Record.MaterialDocumentYear,
key _Record.MaterialDocumentItem,
_Record.Material,
_Record.CompanyCode,
_Record.Plant,
_Record.SpecialStockIdfgSupplier as Supplier,
_Record.StorageLocation,
_Record.InventoryStockType,
@Semantics.quantity.unitOfMeasure : 'MaterialBaseUnit'
_Record.MatlStkChangeQtyInBaseUnit,
_Record._Material.MaterialBaseUnit as MaterialBaseUnit,
_Record.PostingDate,
dats_tims_to_tstmp( _Record.CreationDate, _Record.CreationTime, abap_system_timezone( $session.client,'NULL' ), $session.client,'NULL' ) as CreationDateTime,
_Subs.MaterialStockSubscriptionUUID,
_Subs.MaterialStockSubscriptionItem
}
where _Record.MaterialBaseUnit <> '' // value only material does not have meins
and _Record.InventoryStockType <> ''
and _Record.InventorySpecialStockType = 'K'
and _Record.Material <> ''
and _Subs.MatlStkRptOnboardingDate <= _Record.PostingDate
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIAL",
"I_MATERIALDOCUMENTRECORD",
"I_MATLSTKSUBSCRPNCONSIGNMENT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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