P_EWM_PINVDOCCNTITEM01_2

DDL: P_EWM_PINVDOCCNTITEM01_2 Type: view_entity COMPOSITE

P_EWM_PINVDOCCNTITEM01_2 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_ewm_physInventorydoccntitem) and exposes 54 fields with key fields PhysicalInventoryDocumentUUID, PhysicalInventoryItemNumber, LineIndexOfPInvItem, PInvQuantitySequence. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_ewm_physInventorydoccntitem _item from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_EWM_StorageBin_2 _StorageBin_2 $projection.EWMWarehouse = _StorageBin_2.EWMWarehouse and $projection.EWMStorageBin = _StorageBin_2.EWMStorageBin
[0..1] I_Product _Product $projection.EWMStockType <> '' and $projection.ProductUUID = _Product.ProductUUID
[0..1] I_UnitOfMeasure _UnitOfMeasure $projection.RequestedQuantityUnit = _UnitOfMeasure.UnitOfMeasure

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view

Fields (54)

KeyFieldSource TableSource FieldDescription
KEY PhysicalInventoryDocumentUUID P_ewm_physInventorydoccntitem PhysicalInventoryDocumentUUID
KEY PhysicalInventoryItemNumber P_ewm_physInventorydoccntitem PhysicalInventoryItemNumber
KEY LineIndexOfPInvItem P_ewm_physInventorydoccntitem LineIndexOfPInvItem
KEY PInvQuantitySequence P_ewm_physInventorydoccntitem PInvQuantitySequence
PInvDocumentItemType P_ewm_physInventorydoccntitem PInvDocumentItemType
PhysicalInventoryStatusText P_ewm_physInventorydoccntitem PhysicalInventoryStatusText
PhysicalInventoryDocumentType P_ewm_physInventorydoccntitem PhysicalInventoryDocumentType
PhysicalInventoryStockUUID P_ewm_physInventorydoccntitem PhysicalInventoryStockUUID
PInvItemParentUUID P_ewm_physInventorydoccntitem PInvItemParentUUID
EWMStorageBin P_ewm_physInventorydoccntitem EWMStorageBin Storage Bin
EWMStorageType _StorageBin_2 EWMStorageType Storage Type
ParentHandlingUnitNumber P_ewm_physInventorydoccntitem ParentHandlingUnitNumber
ProductUUID P_ewm_physInventorydoccntitem ProductUUID UUID
Product _Product Product Product Sold
SerialNumberProfile _Product SerialNumberProfile SerialNoProfile
HarmonizedSerializationIsActv _ActiveHarmonizeSrlNmbr HarmonizedSerializationIsActv
BatchUUID P_ewm_physInventorydoccntitem BatchUUID Target Grp GUID
EWMStockType P_ewm_physInventorydoccntitem EWMStockType Stock Type
EWMStockOwner P_ewm_physInventorydoccntitem EWMStockOwner Character Field with Length 10
StockOwnerPartnerRole P_ewm_physInventorydoccntitem StockOwnerPartnerRole
EWMStockUsage P_ewm_physInventorydoccntitem EWMStockUsage Usage
StockDocumentCategory P_ewm_physInventorydoccntitem StockDocumentCategory Special Reference Stock Type
StockDocumentNumber P_ewm_physInventorydoccntitem StockDocumentNumber
StockItemNumber P_ewm_physInventorydoccntitem StockItemNumber
DocumentReltdStockDocCat P_ewm_physInventorydoccntitem DocumentReltdStockDocCat
EntitledToDisposeParty P_ewm_physInventorydoccntitem EntitledToDisposeParty Disposal Party
EntitledToDisposePartnerRole P_ewm_physInventorydoccntitem EntitledToDisposePartnerRole
PackagingMaterial P_ewm_physInventorydoccntitem PackagingMaterial Packaging Materials
HandlingUnitType P_ewm_physInventorydoccntitem HandlingUnitType HUTyp
HandlingUnitNumber
PhysicalInventoryItemType
EWMWarehouse P_ewm_physInventorydoccntitem EWMWarehouse Warehouse No.
HndlgUnitItemCountedIsComplete
HndlgUnitItemCountedIsEmpty
HndlgUnitItemCountedIsNotExist
EWMStorageBinIsEmpty
WhseQualityInspectionType P_ewm_physInventorydoccntitem WhseQualityInspectionType
QualityInspectionDocUUID P_ewm_physInventorydoccntitem QualityInspectionDocUUID
StockIdentificationNumber P_ewm_physInventorydoccntitem StockIdentificationNumber
DocumentReltdStockDocUUID P_ewm_physInventorydoccntitem DocumentReltdStockDocUUID
DocumentReltdStockDocItemUUID P_ewm_physInventorydoccntitem DocumentReltdStockDocItemUUID
WhseTaskGoodsReceiptDateTime P_ewm_physInventorydoccntitem WhseTaskGoodsReceiptDateTime
ShelfLifeExpirationDate P_ewm_physInventorydoccntitem ShelfLifeExpirationDate SLED/BBD
CountryOfOrigin P_ewm_physInventorydoccntitem CountryOfOrigin Country/Region of Origin
MatlBatchIsInRstrcdUseStock P_ewm_physInventorydoccntitem MatlBatchIsInRstrcdUseStock Batch restr.
PInvIsZeroCount
RequestedQuantityUnit P_ewm_physInventorydoccntitem RequestedQuantityUnit Requested Quantity Unit
RequestedQuantityISOUnit _UnitOfMeasure UnitOfMeasureISOCode
RequestedQuantitySAPUnit _UnitOfMeasure UnitOfMeasureSAPCode
RequestedQuantity P_ewm_physInventorydoccntitem RequestedQuantity Requested Quantity
PInvItemChgUTCDateTime P_ewm_physInventorydoccntitem PInvItemChgUTCDateTime
_ISOCode _UnitOfMeasure _ISOCode
_StorageBin_2 _StorageBin_2
_Product _Product

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_EWM_PINVDOCCNTITEM01_2.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW P_EWM_PINVDOCCNTITEM01_2 AS
SELECT
  _item.PhysicalInventoryDocumentUUID AS PhysicalInventoryDocumentUUID,
  _item.PhysicalInventoryItemNumber AS PhysicalInventoryItemNumber,
  _item.LineIndexOfPInvItem AS LineIndexOfPInvItem,
  _item.PInvQuantitySequence AS PInvQuantitySequence,
  _item.PInvDocumentItemType AS PInvDocumentItemType,
  _item.PhysicalInventoryStatusText AS PhysicalInventoryStatusText,
  _item.PhysicalInventoryDocumentType AS PhysicalInventoryDocumentType,
  _item.PhysicalInventoryStockUUID AS PhysicalInventoryStockUUID,
  _item.PInvItemParentUUID AS PInvItemParentUUID,
  _item.EWMStorageBin AS EWMStorageBin,
  _StorageBin_2.EWMStorageType AS EWMStorageType,
  _item.ParentHandlingUnitNumber AS ParentHandlingUnitNumber,
  _item.ProductUUID AS ProductUUID,
  _Product.Product AS Product,
  _Product.SerialNumberProfile AS SerialNumberProfile,
  _ActiveHarmonizeSrlNmbr.HarmonizedSerializationIsActv AS HarmonizedSerializationIsActv,
  _item.BatchUUID AS BatchUUID,
  _item.EWMStockType AS EWMStockType,
  _item.EWMStockOwner AS EWMStockOwner,
  _item.StockOwnerPartnerRole AS StockOwnerPartnerRole,
  _item.EWMStockUsage AS EWMStockUsage,
  _item.StockDocumentCategory AS StockDocumentCategory,
  _item.StockDocumentNumber AS StockDocumentNumber,
  _item.StockItemNumber AS StockItemNumber,
  _item.DocumentReltdStockDocCat AS DocumentReltdStockDocCat,
  _item.EntitledToDisposeParty AS EntitledToDisposeParty,
  _item.EntitledToDisposePartnerRole AS EntitledToDisposePartnerRole,
  _item.PackagingMaterial AS PackagingMaterial,
  _item.HandlingUnitType AS HandlingUnitType,
  case when _item.HandlingUnitVirtual = 'A' then '' else _item.HandlingUnitNumber end AS HandlingUnitNumber,
  case when _item.HandlingUnitVirtual = 'A' then 'L' else _item.PhysicalInventoryItemType end AS PhysicalInventoryItemType,
  _item.EWMWarehouse AS EWMWarehouse,
  cast ( _item.HndlgUnitItemCountedIsComplete as boole_d ) AS HndlgUnitItemCountedIsComplete,
  cast ( case when _item.HandlingUnitVirtual = 'A' then '' else _item.HndlgUnitItemCountedIsEmpty end as boole_d ) AS HndlgUnitItemCountedIsEmpty,
  cast ( _item.HndlgUnitItemCountedIsNotExist as boole_d ) AS HndlgUnitItemCountedIsNotExist,
  cast ( case when _item.HandlingUnitVirtual = 'A' and _item.HndlgUnitItemCountedIsEmpty = 'X' then 'X' else _item.EWMStorageBinIsEmpty end as boole_d ) AS EWMStorageBinIsEmpty,
  _item.WhseQualityInspectionType AS WhseQualityInspectionType,
  _item.QualityInspectionDocUUID AS QualityInspectionDocUUID,
  _item.StockIdentificationNumber AS StockIdentificationNumber,
  _item.DocumentReltdStockDocUUID AS DocumentReltdStockDocUUID,
  _item.DocumentReltdStockDocItemUUID AS DocumentReltdStockDocItemUUID,
  _item.WhseTaskGoodsReceiptDateTime AS WhseTaskGoodsReceiptDateTime,
  _item.ShelfLifeExpirationDate AS ShelfLifeExpirationDate,
  _item.CountryOfOrigin AS CountryOfOrigin,
  _item.MatlBatchIsInRstrcdUseStock AS MatlBatchIsInRstrcdUseStock,
  cast ( _item.PInvIsZeroCount as boole_d ) AS PInvIsZeroCount,
  _item.RequestedQuantityUnit AS RequestedQuantityUnit,
  _UnitOfMeasure.UnitOfMeasureISOCode AS RequestedQuantityISOUnit,
  _UnitOfMeasure.UnitOfMeasureSAPCode AS RequestedQuantitySAPUnit,
  _item.RequestedQuantity AS RequestedQuantity,
  _item.PInvItemChgUTCDateTime AS PInvItemChgUTCDateTime,
  _UnitOfMeasure._ISOCode AS _ISOCode
FROM P_ewm_physInventorydoccntitem AS _item
LEFT OUTER JOIN I_EWM_StorageBin_2 AS _StorageBin_2 ON EWMWarehouse = _StorageBin_2.EWMWarehouse AND EWMStorageBin = _StorageBin_2.EWMStorageBin  -- association [0..1]
LEFT OUTER JOIN I_Product AS _Product ON EWMStockType <> '' AND ProductUUID = _Product.ProductUUID  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _UnitOfMeasure ON RequestedQuantityUnit = _UnitOfMeasure.UnitOfMeasure  -- association [0..1]
;