I_MfgProcgExecBatchStock
Batch Stock in Manufacturing Processing Execution
I_MfgProcgExecBatchStock is a Composite CDS View that provides data about "Batch Stock in Manufacturing Processing Execution" in SAP S/4HANA. It reads from 3 data sources (I_MfgProcgExecBatch, I_BatchDistinct, P_MfgProcgExecBatchStock) and exposes 21 fields with key fields Material, Plant, StorageLocation, Supplier, SalesDocument. It has 3 associations to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_MfgProcgExecBatch | batch | inner |
| I_BatchDistinct | batch | inner |
| P_MfgProcgExecBatchStock | stock | from |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_SalesDocument | _SalesDocument | $projection.SalesDocument = _SalesDocument.SalesDocument |
| [0..1] | I_SalesDocumentItem | _SalesDocumentItem | $projection.SalesDocument = _SalesDocumentItem.SalesDocument and $projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem |
| [0..1] | I_WBSElementByInternalKey | _WBSElement | $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IMPEBATCHSTOCK | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| EndUserText.label | Batch Stock in Manufacturing Processing Execution | view |
Fields (21)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | P_MfgProcgExecBatchStock | Material | |
| KEY | Plant | P_MfgProcgExecBatchStock | Plant | |
| KEY | StorageLocation | P_MfgProcgExecBatchStock | StorageLocation | |
| KEY | Supplier | |||
| KEY | SalesDocument | |||
| KEY | SalesDocumentItem | |||
| KEY | WBSElementInternalID | |||
| KEY | Customer | |||
| KEY | InventorySpecialStockType | P_MfgProcgExecBatchStock | InventorySpecialStockType | |
| KEY | MaterialBaseUnit | P_MfgProcgExecBatchStock | MaterialBaseUnit | |
| VltdUnrestrictedUseStkQty | ||||
| _UnitOfMeasure | P_MfgProcgExecBatchStock | _UnitOfMeasure | ||
| _Material | P_MfgProcgExecBatchStock | _Material | ||
| _Plant | P_MfgProcgExecBatchStock | _Plant | ||
| _StorageLocation | P_MfgProcgExecBatchStock | _StorageLocation | ||
| _Supplier | P_MfgProcgExecBatchStock | _Supplier | ||
| _SalesDocument | _SalesDocument | |||
| _SalesDocumentItem | _SalesDocumentItem | |||
| _WBSElement | _WBSElement | |||
| _Customer | P_MfgProcgExecBatchStock | _Customer | ||
| _InventorySpecialStockType | P_MfgProcgExecBatchStock | _InventorySpecialStockType |
@AbapCatalog.sqlViewName: 'IMPEBATCHSTOCK'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XXL, dataClass: #MIXED}
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Batch Stock in Manufacturing Processing Execution'
define view I_MfgProcgExecBatchStock
as select from P_MfgProcgExecBatchStock as stock
-- inner join I_MfgProcgExecBatch as batch on batch.Material = stock.Material
-- and batch.Batch = stock.Batch
inner join I_BatchDistinct as batch on batch.Material = stock.Material
and batch.Batch = stock.Batch
and batch.BatchIsMarkedForDeletion = ' '
and batch.MatlBatchIsInRstrcdUseStock = ' '
association [0..1] to I_SalesDocument as _SalesDocument on $projection.SalesDocument = _SalesDocument.SalesDocument
association [0..1] to I_SalesDocumentItem as _SalesDocumentItem on $projection.SalesDocument = _SalesDocumentItem.SalesDocument
and $projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem
association [0..1] to I_WBSElementByInternalKey as _WBSElement on $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
{
// Stock Identifier
@ObjectModel.foreignKey.association: '_Material'
key stock.Material,
@ObjectModel.foreignKey.association: '_Plant'
key stock.Plant,
@ObjectModel.foreignKey.association: '_StorageLocation'
key stock.StorageLocation,
-- @ObjectModel.foreignKey.association: '_Batch'
key cast(stock.Batch as charg_d preserving type) as Batch,
@ObjectModel.foreignKey.association: '_Supplier'
key cast(stock.Supplier as lifnr preserving type) as Supplier,
@ObjectModel.foreignKey.association: '_SalesDocument'
key cast(stock.SalesDocument as co_kdauf preserving type) as SalesDocument,
@ObjectModel.foreignKey.association: '_SalesDocumentItem'
key cast(stock.SalesDocumentItem as co_kdpos preserving type) as SalesDocumentItem,
@ObjectModel.foreignKey.association: '_WBSElement'
key cast(stock.WBSElementInternalID as ps_s4_pspnr preserving type) as WBSElementInternalID,
@ObjectModel.foreignKey.association: '_Customer'
key cast(stock.Customer as kunnr preserving type) as Customer,
@ObjectModel.foreignKey.association: '_InventorySpecialStockType'
key stock.InventorySpecialStockType,
// Unit of measure
@Semantics.unitOfMeasure
key stock.MaterialBaseUnit,
// Quantity
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
-- @DefaultAggregation : #SUM
stock.VltdUnrestrictedUseStkQty,
// Associations
stock._UnitOfMeasure,
stock._Material,
stock._Plant,
stock._StorageLocation,
stock._Supplier,
_SalesDocument,
_SalesDocumentItem,
_WBSElement,
stock._Customer,
stock._InventorySpecialStockType
};
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BATCHDISTINCT",
"P_MFGPROCGEXECBATCHSTOCK"
],
"ASSOCIATED":
[
"I_CUSTOMER",
"I_INVENTORYSPECIALSTOCKTYPE",
"I_PLANT",
"I_PRODUCT",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTITEM",
"I_STORAGELOCATION",
"I_SUPPLIER",
"I_UNITOFMEASURE",
"I_WBSELEMENTBYINTERNALKEY"
],
"BASE":
[
"P_MFGPROCGEXECBATCHSTOCK"
],
"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