P_MfgProcgExecBatchPlant
P_MfgProcgExecBatchPlant is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_Plant) and exposes 12 fields with key fields ShopFloorItem, Material, Batch, Plant, SerialNumber. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_Plant | Plant | cross |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_ProductPlant | _ProductPlant | $projection.Material = _ProductPlant.Product and $projection.Plant = _ProductPlant.Plant |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMPEBATCHPLANT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (12)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ShopFloorItem | |||
| KEY | Material | BatchDistinct | Material | |
| KEY | Batch | BatchDistinct | Batch | |
| KEY | Plant | I_Plant | Plant | |
| KEY | SerialNumber | |||
| _Material | _Material | |||
| KEY | Material | BatchDistinct | Material | |
| KEY | Batch | BatchDistinct | Batch | |
| KEY | Plant | BatchDistinct | Plant | |
| KEY | SerialNumber | |||
| _Material | _Material | |||
| _ProductPlant | _ProductPlant |
@AbapCatalog.sqlViewName: 'PMPEBATCHPLANT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@VDM.private: true
define view P_MfgProcgExecBatchPlant
as
-- Plant-independent Batches (enhanced for all plants)
select distinct from I_BatchDistinct as BatchDistinct
cross join I_Plant as Plant
association [0..1] to I_ProductPlant as _ProductPlant on $projection.Material = _ProductPlant.Product
and $projection.Plant = _ProductPlant.Plant
{
key cast(0 as mpe_sfi_id) as ShopFloorItem,
@ObjectModel.foreignKey.association: '_Material'
key BatchDistinct.Material,
key BatchDistinct.Batch,
key Plant.Plant,
key cast(' ' as gernr preserving type) as SerialNumber,
_Material,
_ProductPlant
}
where
BatchIsMarkedForDeletion = ' '
and MatlBatchIsInRstrcdUseStock = ' '
and BatchDistinct.Plant = ' '
union all
-- Plant-dependent Batches
select distinct from I_BatchDistinct as BatchDistinct
association [0..1] to I_ProductPlant as _ProductPlant on $projection.Material = _ProductPlant.Product
and $projection.Plant = _ProductPlant.Plant
{
key cast(0 as mpe_sfi_id) as ShopFloorItem,
@ObjectModel.foreignKey.association: '_Material'
key BatchDistinct.Material,
key BatchDistinct.Batch,
key BatchDistinct.Plant,
key cast(' ' as gernr preserving type) as SerialNumber,
_Material,
_ProductPlant
}
where
BatchIsMarkedForDeletion = ' '
and MatlBatchIsInRstrcdUseStock = ' '
and BatchDistinct.Plant <> ' '
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BATCHDISTINCT",
"I_PLANT"
],
"ASSOCIATED":
[
"I_MATERIAL",
"I_PRODUCTPLANT"
],
"BASE":
[
"I_BATCHDISTINCT"
],
"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