P_ProductBatchByInvStockType

DDL: P_PRODUCTBATCHBYINVSTOCKTYPE Type: view_entity COMPOSITE

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)

SourceAliasJoin 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)

NameValueLevelField
Metadata.ignorePropagatedAnnotations true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (13)

KeyFieldSource TableSource FieldDescription
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":""
}
}*/