P_MfgProcgExecBatchStock
P_MfgProcgExecBatchStock is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_MatlPlntCompAssembleControl, I_MaterialStock_2) and exposes 19 fields with key fields Material, Plant, StorageLocation, Batch, Supplier.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_MatlPlntCompAssembleControl | marc | inner |
| I_MaterialStock_2 | mat | from |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMPEBATCHSTOCK | 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | I_MaterialStock_2 | Material | |
| KEY | Plant | I_MaterialStock_2 | Plant | |
| KEY | StorageLocation | I_MaterialStock_2 | StorageLocation | |
| KEY | Batch | I_MaterialStock_2 | Batch | |
| KEY | Supplier | I_MaterialStock_2 | Supplier | |
| KEY | SalesDocument | I_MaterialStock_2 | SDDocument | |
| KEY | SalesDocumentItem | I_MaterialStock_2 | SDDocumentItem | |
| KEY | WBSElementInternalID | I_MaterialStock_2 | WBSElementInternalID | |
| KEY | Customer | I_MaterialStock_2 | Customer | |
| KEY | InventorySpecialStockType | I_MaterialStock_2 | InventorySpecialStockType | |
| KEY | MaterialBaseUnit | I_MaterialStock_2 | MaterialBaseUnit | |
| VltdUnrestrictedUseStkQty | ||||
| _UnitOfMeasure | I_MaterialStock_2 | _UnitOfMeasure | ||
| _Material | I_MaterialStock_2 | _Material | ||
| _Plant | I_MaterialStock_2 | _Plant | ||
| _StorageLocation | I_MaterialStock_2 | _StorageLocation | ||
| _Supplier | I_MaterialStock_2 | _Supplier | ||
| _Customer | I_MaterialStock_2 | _Customer | ||
| _InventorySpecialStockType | I_MaterialStock_2 | _InventorySpecialStockType |
@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":""
}
}*/
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