A_MatlStkByKeyDteInAcctMod

DDL: A_MATLSTKBYKEYDTEINACCTMOD Type: view COMPOSITE

API view by directly consuming I_MaterialStock

A_MatlStkByKeyDteInAcctMod is a Composite CDS View that provides data about "API view by directly consuming I_MaterialStock" in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 13 fields with key fields Material, Plant, StorageLocation, Batch, Supplier.

Data Sources (1)

SourceAliasJoin Type
I_MaterialStock_2 I_MaterialStock_2 from

Parameters (1)

NameTypeDefault
P_KeyDate sydate

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName AMATSTKBKDTINACT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
EndUserText.label API view by directly consuming I_MaterialStock view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY Material Material
KEY Plant Plant
KEY StorageLocation StorageLocation
KEY Batch Batch
KEY Supplier Supplier
KEY Customer Customer
KEY WBSElementInternalID
KEY SDDocumentItem SDDocumentItem
KEY InventorySpecialStockType InventorySpecialStockType
KEY InventoryStockType InventoryStockType
MaterialBaseUnit MaterialBaseUnit
MatlWrhsStkQtyInMatlBaseUnit
_MaterialStock _MaterialStock
@AbapCatalog: {
                sqlViewName: 'AMATSTKBKDTINACT',
                compiler.compareFilter: true,
                preserveKey: true
              }
@EndUserText.label: 'API view by directly consuming I_MaterialStock'
@AccessControl: {
                  authorizationCheck: #CHECK,
                  personalData.blocking: #NOT_REQUIRED
                }
@ObjectModel: {
                usageType: {
                             sizeCategory: #XXL,
                             serviceQuality: #D,
                             dataClass: #TRANSACTIONAL
                           }
              }
@VDM: {
        viewType: #COMPOSITE,
        lifecycle.contract.type: #PUBLIC_REMOTE_API
      }
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true

define view A_MatlStkByKeyDteInAcctMod
       with parameters
            P_KeyDate : sydate 

 as select from I_MaterialStock_2
 
 association[1..1] to A_MaterialStock as _MaterialStock on $projection.Material =  _MaterialStock.Material   
{
  key Material,
  key Plant,
  @ObjectModel.sapObjectNodeTypeReference: 'StorageLocation'
  key StorageLocation,
  key Batch,
  key Supplier,
  key Customer,
  key cast( WBSElementInternalID as mat_pspnr preserving type ) as WBSElementInternalID,   --I_MaterailStock_2 does a cast to a DE w/o conversion exit, for compatibility reason: cast back
  key SDDocument,
  key SDDocumentItem,
  @ObjectModel.sapObjectNodeTypeReference: 'InventorySpecialStockType'
  key InventorySpecialStockType,
  @ObjectModel.sapObjectNodeTypeReference: 'InventoryStockType'
  key InventoryStockType,
@Semantics.unitOfMeasure: true  
      MaterialBaseUnit,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'  
      sum(MatlWrhsStkQtyInMatlBaseUnit) as MatlWrhsStkQtyInMatlBaseUnit,
      
      _MaterialStock
}
where
  MatlDocLatestPostgDate <= $parameters.P_KeyDate
group by
  Material,
  Plant,
  StorageLocation,
  Batch,
  Supplier,
  Customer,
  WBSElementInternalID,
  SDDocument,
  SDDocumentItem,
  InventorySpecialStockType,
  InventoryStockType,
  MaterialBaseUnit