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

P_EWM_PINVDOCCNTITEM02

DDL: P_EWM_PINVDOCCNTITEM02 SQL: PEWMPICNTITM02 Type: view COMPOSITE Package: VDM_EWM_CORE_RAP

Helper View for Phys. Inv. Count Item

P_EWM_PINVDOCCNTITEM02 is a Composite CDS View that provides data about "Helper View for Phys. Inv. Count Item" in SAP S/4HANA. It reads from 1 data source (P_EWM_PINVDOCCNTITEM01) and exposes 52 fields with key fields PhysicalInventoryDocumentUUID, PhysicalInventoryItemNumber, LineIndexOfPInvItem, PInvQuantitySequence. It has 6 associations to related views. Part of development package VDM_EWM_CORE_RAP.

Data Sources (1)

SourceAliasJoin Type
P_EWM_PINVDOCCNTITEM01 _item from

Associations (6)

CardinalityTargetAliasCondition
[0..1] I_EWM_SerialNumberHeader _SerialNumberHeader _item.Warehouse = _SerialNumberHeader.Warehouse and _item.ProductUUID = _SerialNumberHeader.ProductUUID and _item.EntitledToDisposeParty = _SerialNumberHeader.EntitledToDisposeParty
[0..1] I_EWM_SerialNumberProfile _SerialNumberProfile _item.SerialNumberProfile = _SerialNumberProfile.SerialNumberProfile
[0..1] I_EWM_WhseSerialNumberProfile _WhseSerialNumberProfile _item.SerialNumberProfile = _WhseSerialNumberProfile.SerialNumberProfile and _item.Warehouse = _WhseSerialNumberProfile.Warehouse
[0..1] I_BatchDistinct _Batch $projection.Product = _Batch.Material and $projection.BatchUUID = _Batch.BatchExtWhseMgmtInternalId
[0..1] I_EWM_MaterialValuation _MaterialValuation $projection.Product = _MaterialValuation.Product and $projection.BatchUUID = _MaterialValuation.BatchUUID and $projection.EntitledToDisposeParty = _MaterialValuation.EntitledToDisposeParty
[0..1] I_WBSElementBasicData _WBSElementBasicData $projection.StockDocumentCategory = 'PJS' and $projection.StockDocumentNumber = _WBSElementBasicData.WBSElementInternalID

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName PEWMPICNTITM02 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK 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_PINVDOCCNTITEM02_2 view

Fields (52)

KeyFieldSource TableSource FieldDescription
KEY PhysicalInventoryDocumentUUID PhysicalInventoryDocumentUUID
KEY PhysicalInventoryItemNumber PhysicalInventoryItemNumber
KEY LineIndexOfPInvItem LineIndexOfPInvItem
KEY PInvQuantitySequence PInvQuantitySequence
PInvDocumentItemType PInvDocumentItemType
PhysicalInventoryStatusText PhysicalInventoryStatusText
PhysicalInventoryStockUUID PhysicalInventoryStockUUID
PInvItemParentUUID PInvItemParentUUID
StorageBin StorageBin Storage Bin
StorageType StorageType Storage Type
ParentHandlingUnitNumber ParentHandlingUnitNumber
ProductUUID ProductUUID UUID
Product P_EWM_PINVDOCCNTITEM01 Product Product Sold
BatchUUID BatchUUID Target Grp GUID
Batch
StockType StockType Stock Type
StockOwner StockOwner Owner of stock
StockOwnerPartnerRole StockOwnerPartnerRole
StockUsage StockUsage
StockDocumentCategory StockDocumentCategory Special Reference Stock Type
StockDocumentNumber StockDocumentNumber
StockItemNumber StockItemNumber
WBSElementExternalID _WBSElementBasicData WBSElementExternalID WBS Element External ID
DocumentReltdStockDocCat DocumentReltdStockDocCat
EntitledToDisposeParty EntitledToDisposeParty Disposal Party
EntitledToDisposePartnerRole EntitledToDisposePartnerRole
PackagingMaterial PackagingMaterial Packaging Materials
HandlingUnitType HandlingUnitType HUTyp
PInvItemParentType PInvItemParentType
PhysicalInventoryItemLevel PhysicalInventoryItemLevel
HandlingUnitNumber HandlingUnitNumber
PhysicalInventoryItemType PhysicalInventoryItemType
Warehouse P_EWM_PINVDOCCNTITEM01 Warehouse Warehouse No.
HndlgUnitItemCountedIsComplete HndlgUnitItemCountedIsComplete
HndlgUnitItemCountedIsEmpty HndlgUnitItemCountedIsEmpty
HndlgUnitItemCountedIsNotExist HndlgUnitItemCountedIsNotExist
StorageBinIsEmpty StorageBinIsEmpty
WhseQualityInspectionType WhseQualityInspectionType
QualityInspectionDocUUID QualityInspectionDocUUID
StockIdentificationNumber StockIdentificationNumber
DocumentReltdStockDocUUID DocumentReltdStockDocUUID
DocumentReltdStockDocItemUUID DocumentReltdStockDocItemUUID
WhseTaskGoodsReceiptDateTime WhseTaskGoodsReceiptDateTime
ShelfLifeExpirationDate ShelfLifeExpirationDate SLED/BBD
CountryOfOrigin P_EWM_PINVDOCCNTITEM01 CountryOfOrigin Country/Region of Origin
MatlBatchIsInRstrcdUseStock MatlBatchIsInRstrcdUseStock Batch restr.
PInvIsZeroCount PInvIsZeroCount
RequestedQuantityUnit RequestedQuantityUnit Requested Quantity Unit
RequestedQuantityISOUnit RequestedQuantityISOUnit
RequestedQuantitySAPUnit RequestedQuantitySAPUnit
RequestedQuantity RequestedQuantity Requested Quantity
PInvItemChgUTCDateTime PInvItemChgUTCDateTime

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_PINVDOCCNTITEM02.
-- 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: PEWMPICNTITM02

CREATE VIEW P_EWM_PINVDOCCNTITEM02 AS
SELECT
  PhysicalInventoryDocumentUUID,
  PhysicalInventoryItemNumber,
  LineIndexOfPInvItem,
  PInvQuantitySequence,
  PInvDocumentItemType,
  PhysicalInventoryStatusText,
  PhysicalInventoryStockUUID,
  PInvItemParentUUID,
  StorageBin,
  StorageType,
  ParentHandlingUnitNumber,
  ProductUUID,
  _item.Product AS Product,
  BatchUUID,
  case when _Batch.Batch is not null then _Batch.Batch else _MaterialValuation.InventoryValuationType end AS Batch,
  StockType,
  StockOwner,
  StockOwnerPartnerRole,
  StockUsage,
  StockDocumentCategory,
  StockDocumentNumber,
  StockItemNumber,
  _WBSElementBasicData.WBSElementExternalID AS WBSElementExternalID,
  DocumentReltdStockDocCat,
  EntitledToDisposeParty,
  EntitledToDisposePartnerRole,
  PackagingMaterial,
  HandlingUnitType,
  PInvItemParentType,
  PhysicalInventoryItemLevel,
  HandlingUnitNumber,
  PhysicalInventoryItemType,
  _item.Warehouse AS Warehouse,
  HndlgUnitItemCountedIsComplete,
  HndlgUnitItemCountedIsEmpty,
  HndlgUnitItemCountedIsNotExist,
  StorageBinIsEmpty,
  WhseQualityInspectionType,
  QualityInspectionDocUUID,
  StockIdentificationNumber,
  DocumentReltdStockDocUUID,
  DocumentReltdStockDocItemUUID,
  WhseTaskGoodsReceiptDateTime,
  ShelfLifeExpirationDate,
  _item.CountryOfOrigin AS CountryOfOrigin,
  MatlBatchIsInRstrcdUseStock,
  PInvIsZeroCount,
  RequestedQuantityUnit,
  RequestedQuantityISOUnit,
  RequestedQuantitySAPUnit,
  RequestedQuantity,
  PInvItemChgUTCDateTime
FROM P_EWM_PINVDOCCNTITEM01 AS _item
LEFT OUTER JOIN I_EWM_SerialNumberHeader AS _SerialNumberHeader ON _item.Warehouse = _SerialNumberHeader.Warehouse AND _item.ProductUUID = _SerialNumberHeader.ProductUUID AND _item.EntitledToDisposeParty = _SerialNumberHeader.EntitledToDisposeParty  -- association [0..1]
LEFT OUTER JOIN I_EWM_SerialNumberProfile AS _SerialNumberProfile ON _item.SerialNumberProfile = _SerialNumberProfile.SerialNumberProfile  -- association [0..1]
LEFT OUTER JOIN I_EWM_WhseSerialNumberProfile AS _WhseSerialNumberProfile ON _item.SerialNumberProfile = _WhseSerialNumberProfile.SerialNumberProfile AND _item.Warehouse = _WhseSerialNumberProfile.Warehouse  -- association [0..1]
LEFT OUTER JOIN I_BatchDistinct AS _Batch ON Product = _Batch.Material AND BatchUUID = _Batch.BatchExtWhseMgmtInternalId  -- association [0..1]
LEFT OUTER JOIN I_EWM_MaterialValuation AS _MaterialValuation ON Product = _MaterialValuation.Product AND BatchUUID = _MaterialValuation.BatchUUID AND EntitledToDisposeParty = _MaterialValuation.EntitledToDisposeParty  -- association [0..1]
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElementBasicData ON StockDocumentCategory = 'PJS' AND StockDocumentNumber = _WBSElementBasicData.WBSElementInternalID  -- association [0..1]
;