P_MFGPROCGEXECBATCHSTOCK

CDS View

P_MFGPROCGEXECBATCHSTOCK is a CDS View in S/4HANA. It contains 12 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_MfgProcgExecBatchStock view from COMPOSITE Batch Stock in Manufacturing Processing Execution

Fields (12)

KeyField CDS FieldsUsed in Views
KEY InventorySpecialStockType InventorySpecialStockType 1
KEY Material Material 1
KEY MaterialBaseUnit MaterialBaseUnit 1
KEY Plant Plant 1
KEY StorageLocation StorageLocation 1
_Customer _Customer 1
_InventorySpecialStockType _InventorySpecialStockType 1
_Material _Material 1
_Plant _Plant 1
_StorageLocation _StorageLocation 1
_Supplier _Supplier 1
_UnitOfMeasure _UnitOfMeasure 1
@AbapCatalog.sqlViewName: 'PMPEBATCHSTOCK'
@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

define view P_MfgProcgExecBatchStock
  as select from I_MaterialStock_2             as mat
    inner join   I_MatlPlntCompAssembleControl as marc on  marc.Product                   = mat.Material
                                                       and marc.Plant                     = mat.Plant
                                                       and marc.IsBatchManagementRequired = 'X'
{
  key mat.Material,
  key mat.Plant,
  key mat.StorageLocation,
  key mat.Batch,
  key mat.Supplier,
  key mat.SDDocument                        as SalesDocument,
  key mat.SDDocumentItem                    as SalesDocumentItem,
  key mat.WBSElementInternalID,
  key mat.Customer,
  key mat.InventorySpecialStockType,
      @Semantics.unitOfMeasure
  key mat.MaterialBaseUnit,
      @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
      @Aggregation.default: #SUM
      sum(mat.MatlWrhsStkQtyInMatlBaseUnit) as VltdUnrestrictedUseStkQty,

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

group by
  mat.Material,
  mat.Plant,
  mat.StorageLocation,
  mat.Batch,
  mat.Supplier,
  mat.SDDocument,
  mat.SDDocumentItem,
  mat.WBSElementInternalID,
  mat.Customer,
  mat.InventorySpecialStockType,
  mat.MaterialBaseUnit;
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIALSTOCK_2",
"I_MATLPLNTCOMPASSEMBLECONTROL"
],
"ASSOCIATED":
[
"I_CUSTOMER",
"I_INVENTORYSPECIALSTOCKTYPE",
"I_PLANT",
"I_PRODUCT",
"I_STORAGELOCATION",
"I_SUPPLIER",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_MATERIALSTOCK_2"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/