Deprecated
This CDS view is deprecated in S/4HANA. Use P_EWM_PINVDOCCNTITEM01_2 instead. View all deprecated CDS views →

P_EWM_PINVDOCCNTITEM01

DDL: P_EWM_PINVDOCCNTITEM01 SQL: PEWMPICNTITM01 Type: view COMPOSITE

P_EWM_PINVDOCCNTITEM01 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_EWM_ActiveHarmonizeSrlNmbr, P_ewm_physInventorydoccntitem) and exposes 61 fields with key fields PhysicalInventoryDocumentUUID, PhysicalInventoryItemNumber, LineIndexOfPInvItem, PInvQuantitySequence. It has 4 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_EWM_ActiveHarmonizeSrlNmbr _ActiveHarmonizeSrlNmbr left_outer
P_ewm_physInventorydoccntitem _item from

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_EWM_StorageBin _StorageBin $projection.Warehouse = _StorageBin.Warehouse and $projection.StorageBin = _StorageBin.StorageBin
[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.StockType <> '' and $projection.ProductUUID = _Product.ProductUUID
[0..1] I_UnitOfMeasure _UnitOfMeasure $projection.RequestedQuantityUnit = _UnitOfMeasure.UnitOfMeasure

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName PEWMPICNTITM01 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.type #INHERITED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor P_EWM_PINVDOCCNTITEM01_2 view

Fields (61)

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
StorageBin P_ewm_physInventorydoccntitem StorageBin Storage Bin
EWMStorageBin P_ewm_physInventorydoccntitem EWMStorageBin Storage Bin
StorageType _StorageBin StorageType Storage Type
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 I_EWM_ActiveHarmonizeSrlNmbr HarmonizedSerializationIsActv Harmonized
BatchUUID P_ewm_physInventorydoccntitem BatchUUID Target Grp GUID
StockType P_ewm_physInventorydoccntitem StockType Stock Type
EWMStockType P_ewm_physInventorydoccntitem EWMStockType Stock Type
StockOwner P_ewm_physInventorydoccntitem StockOwner Owner of stock
EWMStockOwner P_ewm_physInventorydoccntitem EWMStockOwner Character Field with Length 10
StockOwnerPartnerRole P_ewm_physInventorydoccntitem StockOwnerPartnerRole
StockUsage P_ewm_physInventorydoccntitem StockUsage
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
Warehouse P_ewm_physInventorydoccntitem Warehouse Warehouse No.
EWMWarehouse P_ewm_physInventorydoccntitem EWMWarehouse Warehouse No.
HndlgUnitItemCountedIsComplete
HndlgUnitItemCountedIsEmpty
HndlgUnitItemCountedIsNotExist
StorageBinIsEmpty
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 _StorageBin
_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.
-- 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.
-- SQL view name: PEWMPICNTITM01

CREATE VIEW P_EWM_PINVDOCCNTITEM01 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.StorageBin AS StorageBin,
  _item.EWMStorageBin AS EWMStorageBin,
  _StorageBin.StorageType AS StorageType,
  _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.StockType AS StockType,
  _item.EWMStockType AS EWMStockType,
  _item.StockOwner AS StockOwner,
  _item.EWMStockOwner AS EWMStockOwner,
  _item.StockOwnerPartnerRole AS StockOwnerPartnerRole,
  _item.StockUsage AS StockUsage,
  _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.Warehouse AS Warehouse,
  _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 StorageBinIsEmpty end as boole_d ) AS StorageBinIsEmpty,
  cast ( case when _item.HandlingUnitVirtual = 'A' and _item.HndlgUnitItemCountedIsEmpty = 'X' then 'X' else 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_ActiveHarmonizeSrlNmbr AS _ActiveHarmonizeSrlNmbr ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_EWM_StorageBin AS _StorageBin ON Warehouse = _StorageBin.Warehouse AND StorageBin = _StorageBin.StorageBin  -- association [0..1]
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 StockType <> '' AND ProductUUID = _Product.ProductUUID  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _UnitOfMeasure ON RequestedQuantityUnit = _UnitOfMeasure.UnitOfMeasure  -- association [0..1]
;