P_ProductBatchByInvStockType
P_ProductBatchByInvStockType is a Composite CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 13 fields with key fields Material, Plant, StorageLocation, Batch, Plant.
Data Sources (6)
| Source | Alias | Join Type |
|---|---|---|
| I_PhysInvtryIndBatchStorLoc | batch | from |
| I_PhysInvtryIndBatchStorLoc | batch | union |
| I_PhysInvtryIndBatchStorLoc | batch | union |
| I_ProductPlantBasic | product | inner |
| I_ProductPlantBasic | product | inner |
| I_ProductPlantBasic | product | inner |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | I_PhysInvtryIndBatchStorLoc | Material | |
| KEY | Plant | I_PhysInvtryIndBatchStorLoc | Plant | |
| KEY | StorageLocation | I_PhysInvtryIndBatchStorLoc | StorageLocation | |
| KEY | Batch | I_PhysInvtryIndBatchStorLoc | Batch | |
| Material | ||||
| KEY | Plant | I_PhysInvtryIndBatchStorLoc | Plant | |
| KEY | StorageLocation | I_PhysInvtryIndBatchStorLoc | StorageLocation | |
| KEY | Batch | I_PhysInvtryIndBatchStorLoc | Batch | |
| Material | ||||
| KEY | Plant | I_PhysInvtryIndBatchStorLoc | Plant | |
| KEY | StorageLocation | I_PhysInvtryIndBatchStorLoc | StorageLocation | |
| KEY | Batch | I_PhysInvtryIndBatchStorLoc | Batch | |
| InventoryStockType |
@Metadata.ignorePropagatedAnnotations: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view entity P_ProductBatchByInvStockType
as select from I_PhysInvtryIndBatchStorLoc as batch
inner join I_ProductPlantBasic as product on batch.Material = product.Product
and batch.Plant = product.Plant
{
key batch.Material,
key batch.Plant,
key batch.StorageLocation,
key batch.Batch,
cast( '01' as nsdm_lbbsa ) as InventoryStockType
}
where product.ValuationCategory <> 'X' //Automatic(Batch)
union select from I_PhysInvtryIndBatchStorLoc as batch
inner join I_ProductPlantBasic as product on batch.Material = product.Product
and batch.Plant = product.Plant
{
key batch.Material,
key batch.Plant,
key batch.StorageLocation,
key batch.Batch,
cast( '02' as nsdm_lbbsa ) as InventoryStockType
}
where product.ValuationCategory <> 'X' //Automatic(Batch)
union select from I_PhysInvtryIndBatchStorLoc as batch
inner join I_ProductPlantBasic as product on batch.Material = product.Product
and batch.Plant = product.Plant
{
key batch.Material,
key batch.Plant,
key batch.StorageLocation,
key batch.Batch,
cast( '07' as nsdm_lbbsa ) as InventoryStockType
}
where product.ValuationCategory <> 'X' //Automatic(Batch)
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PHYSINVTRYINDBATCHSTORLOC",
"I_PRODUCTPLANTBASIC"
],
"ASSOCIATED":
[],
"BASE":
[],
"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