P_MfgProcgExecMaterialStock

DDL: P_MFGPROCGEXECMATERIALSTOCK SQL: PMPEMATLTOCK Type: view COMPOSITE Package: MPE_EXEC_SFO

Material Stock in Manufacturing Processing Execution

P_MfgProcgExecMaterialStock is a Composite CDS View that provides data about "Material Stock in Manufacturing Processing Execution" in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 19 fields with key fields Material, Plant, StorageLocation, Batch, Supplier. Part of development package MPE_EXEC_SFO.

Data Sources (1)

SourceAliasJoin Type
I_MaterialStock_2 I_MaterialStock_2 from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PMPEMATLTOCK view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY Material Material
KEY Plant Plant
KEY StorageLocation StorageLocation
KEY Batch Batch
KEY Supplier Supplier
KEY SalesDocument SDDocument
KEY SalesDocumentItem SDDocumentItem
KEY WBSElementInternalID WBSElementInternalID
KEY Customer Customer
KEY InventorySpecialStockType InventorySpecialStockType
KEY MaterialBaseUnit MaterialBaseUnit
VltdUnrestrictedUseStkQty
_UnitOfMeasure _UnitOfMeasure
_Material _Material
_Plant _Plant
_StorageLocation _StorageLocation
_Supplier _Supplier
_Customer _Customer
_InventorySpecialStockType _InventorySpecialStockType
@AbapCatalog.sqlViewName: 'PMPEMATLTOCK'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XXL, dataClass: #TRANSACTIONAL}
@VDM.viewType: #COMPOSITE
@VDM.private: true
// Aggregation of free available material stock, ignoring different MDOC dates


define view P_MfgProcgExecMaterialStock
  as select from I_MaterialStock_2
{
      @ObjectModel.foreignKey.association: '_Material'
  key Material,
      @ObjectModel.foreignKey.association: '_Plant'
  key Plant,
      @ObjectModel.foreignKey.association: '_StorageLocation'
  key StorageLocation,
  key Batch,
      @ObjectModel.foreignKey.association: '_Supplier'
  key Supplier,
  key SDDocument     as SalesDocument,
  key SDDocumentItem as SalesDocumentItem,
  key WBSElementInternalID,
      @ObjectModel.foreignKey.association: '_Customer'
  key Customer,
      @ObjectModel.foreignKey.association: '_InventorySpecialStockType'
  key InventorySpecialStockType,
      @Semantics.unitOfMeasure
  key MaterialBaseUnit,

      @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
      @Aggregation.default: #SUM
      sum(MatlWrhsStkQtyInMatlBaseUnit) as VltdUnrestrictedUseStkQty,

      _UnitOfMeasure,
      _Material,
      _Plant,
      _StorageLocation,
      _Supplier,
      _Customer,
      _InventorySpecialStockType
} 
where
  InventoryStockType = '01' //only free available stock

group by
  Material,
  Plant,
  StorageLocation,
  Batch,
  Supplier,
  SDDocument,
  SDDocumentItem,
  WBSElementInternalID,
  Customer,
  InventorySpecialStockType,
  MaterialBaseUnit;