P_MatlStkCsgnmtDocumentItem

DDL: P_MATLSTKCSGNMTDOCUMENTITEM Type: view_entity COMPOSITE Package: ODATA_MM_IM_STOCKOUTPUT

Consignment Stock Quantity

P_MatlStkCsgnmtDocumentItem is a Composite CDS View that provides data about "Consignment Stock Quantity" in SAP S/4HANA. It reads from 2 data sources (I_MaterialDocumentRecord, I_MatlStkSubscrpnConsignment) and exposes 15 fields with key fields MaterialDocument, MaterialDocumentYear, MaterialDocumentItem. Part of development package ODATA_MM_IM_STOCKOUTPUT.

Data Sources (2)

SourceAliasJoin Type
I_MaterialDocumentRecord _Record from
I_MatlStkSubscrpnConsignment _Subs inner

Annotations (7)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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