C_EWM_PInvCountItem_2
Form Data Provider for PInv Count Items
C_EWM_PInvCountItem_2 is a Consumption CDS View that provides data about "Form Data Provider for PInv Count Items" in SAP S/4HANA. It reads from 1 data source (P_EWM_PINVCOUNTITEM08) and exposes 46 fields with key fields PhysicalInventoryDocumentUUID, PhysicalInventoryItemNumber, LineIndexOfPInvItem, PhysicalInventoryChangeVersion, PInvDocumentItemType. It has 10 associations to related views. Part of development package EWM_ADAPTER_S4_ERP_OM.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_EWM_PINVCOUNTITEM08 | item | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_Language | sylangu |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_EWM_PInvDocHeaderLog | _PInvDoc | $projection.PhysicalInventoryDocumentUUID = _PInvDoc.PhysicalInventoryDocumentUUID |
| [0..1] | I_ProductText | _ProductText | $projection.Product = _ProductText.Product and _ProductText.Language = $parameters.P_Language |
| [0..1] | I_BusinessPartner | _StockOwner | $projection.EWMStockOwner = _StockOwner.BusinessPartner |
| [0..1] | I_BusinessPartner | _Entitled | $projection.EntitledToDisposeParty = _Entitled.BusinessPartner |
| [0..1] | I_EWM_StockTypeText_2 | _StockTypeText | $projection.EWMStockType = _StockTypeText.EWMStockType and $projection.EWMWarehouse = _StockTypeText.EWMWarehouse and _StockTypeText.Language = $parameters.P_Language |
| [0..1] | I_EWM_WhseIndepStockTypeText_2 | _WhseIndepText | $projection.EWMStockType = _WhseIndepText.EWMStockType and _WhseIndepText.Language = $parameters.P_Language |
| [0..1] | I_EWM_StockUsageText_2 | _StockUsageText | $projection.EWMStockUsage = _StockUsageText.EWMStockUsage and _StockUsageText.Language = $parameters.P_Language |
| [0..1] | I_CountryText | _CountryText | $projection.CountryOfOrigin = _CountryText.Country and _CountryText.Language = $parameters.P_Language |
| [0..1] | I_EWM_SpecialStockTypeText | _SpclStkTypeText | $projection.StockDocumentCategory = _SpclStkTypeText.StockDocumentCategory and _SpclStkTypeText.Language = $parameters.P_Language |
| [0..1] | E_EWM_PhysicalInventoryDoc | _Extension | $projection.PhysicalInventoryDocumentUUID = _Extension.PhysicalInventoryDocumentUUID and $projection.PhysicalInventoryItemNumber = _Extension.PhysicalInventoryItemNumber and $projection.LineIndexOfPInvItem = _Extension.LineIndexOfPInvItem and $projection.PhysicalInventoryChangeVersion = _Extension.PhysicalInventoryChangeVersion and $projection.PInvDocumentItemType = _Extension.PInvDocumentItemType |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Form Data Provider for PInv Count Items | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.sizeCategory | #L | view |
Fields (46)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PhysicalInventoryDocumentUUID | P_EWM_PINVCOUNTITEM08 | PhysicalInventoryDocumentUUID | |
| KEY | PhysicalInventoryItemNumber | P_EWM_PINVCOUNTITEM08 | PhysicalInventoryItemNumber | |
| KEY | LineIndexOfPInvItem | P_EWM_PINVCOUNTITEM08 | LineIndexOfPInvItem | |
| KEY | PhysicalInventoryChangeVersion | P_EWM_PINVCOUNTITEM08 | PhysicalInventoryChangeVersion | |
| KEY | PInvDocumentItemType | P_EWM_PINVCOUNTITEM08 | PInvDocumentItemType | |
| PhysicalInventoryDocNumber | _PInvDoc | PhysicalInventoryDocNumber | ||
| PhysicalInventoryDocYear | _PInvDoc | PhysicalInventoryDocYear | ||
| EWMWarehouse | P_EWM_PINVCOUNTITEM08 | EWMWarehouse | Warehouse No. | |
| WarehouseOrder | P_EWM_PINVCOUNTITEM08 | WarehouseOrder | ||
| ActivityArea | P_EWM_PINVCOUNTITEM08 | ActivityArea | ||
| PhysicalInventoryArea | P_EWM_PINVCOUNTITEM08 | PhysicalInventoryArea | ||
| PhysicalInventoryDocumentType | P_EWM_PINVCOUNTITEM08 | PhysicalInventoryDocumentType | ||
| WhseTaskGoodsReceiptDateTime | P_EWM_PINVCOUNTITEM08 | WhseTaskGoodsReceiptDateTime | ||
| ShelfLifeExpirationDate | P_EWM_PINVCOUNTITEM08 | ShelfLifeExpirationDate | SLED/BBD | |
| CountryOfOrigin | P_EWM_PINVCOUNTITEM08 | CountryOfOrigin | Country/Region of Origin | |
| CountryName | _CountryText | CountryName | Country | |
| EntitledToDisposeParty | P_EWM_PINVCOUNTITEM08 | EntitledToDisposeParty | Disposal Party | |
| NameOfEntitledToDisposeParty | _Entitled | BusinessPartnerName | Extracted Customer Name | |
| EWMStockOwner | P_EWM_PINVCOUNTITEM08 | EWMStockOwner | Character Field with Length 10 | |
| StockOwnerName | _StockOwner | BusinessPartnerName | Extracted Customer Name | |
| EWMStockType | P_EWM_PINVCOUNTITEM08 | EWMStockType | Stock Type | |
| EWMStockTypeNameendasEWMStockTypeName | ||||
| EWMStockUsage | P_EWM_PINVCOUNTITEM08 | EWMStockUsage | Usage | |
| StockUsageName | _StockUsageText | StockUsageName | ||
| StockDocumentCategory | P_EWM_PINVCOUNTITEM08 | StockDocumentCategory | Special Reference Stock Type | |
| StockDocCategoryText | _SpclStkTypeText | StockDocCategoryText | ||
| StockItemNumber | P_EWM_PINVCOUNTITEM08 | StockItemNumber | ||
| Product | P_EWM_PINVCOUNTITEM08 | Product | Product Sold | |
| ProductName | _ProductText | ProductName | Description | |
| Batch | P_EWM_PINVCOUNTITEM08 | Batch | Lot No. | |
| EWMStorageBin | P_EWM_PINVCOUNTITEM08 | EWMStorageBin | Storage Bin | |
| HandlingUnitNumber | ||||
| NestedHandingUnitNumber | ||||
| SequenceOfPInvDocumentItems | P_EWM_PINVCOUNTITEM08 | SequenceOfPInvDocumentItems | ||
| BookQuantityUnitOfMeasure | P_EWM_PINVCOUNTITEM08 | BookQuantityUnitOfMeasure | ||
| BookQtyOfPInvItemInBookQtyUoM | P_EWM_PINVCOUNTITEM08 | BookQtyOfPInvItemInBookQtyUoM | ||
| EnteredUoMOfPInv | P_EWM_PINVCOUNTITEM08 | BookQuantityUnitOfMeasure | ||
| EWMStorageBinIsEmpty | ||||
| HandlingUnitIsComplete | ||||
| HandlingUnitIsMissing | ||||
| HandlingUnitIsEmpty | ||||
| NestedHndlgUnitIsComplete | ||||
| NestedHndlgUnitIsMissing | ||||
| NestedHndlgUnitIsEmpty | ||||
| EWMOwnerIsBusPurposeCmpltd | _StockOwner | IsBusinessPurposeCompleted | Purpose Completed | |
| EWMEntitledIsBusPurposeCmpltd | _Entitled | IsBusinessPurposeCompleted | Purpose Completed |
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 C_EWM_PInvCountItem_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.
-- Parameters: P_Language : sylangu
CREATE VIEW C_EWM_PInvCountItem_2 AS
SELECT
item.PhysicalInventoryDocumentUUID AS PhysicalInventoryDocumentUUID,
item.PhysicalInventoryItemNumber AS PhysicalInventoryItemNumber,
item.LineIndexOfPInvItem AS LineIndexOfPInvItem,
item.PhysicalInventoryChangeVersion AS PhysicalInventoryChangeVersion,
item.PInvDocumentItemType AS PInvDocumentItemType,
_PInvDoc.PhysicalInventoryDocNumber AS PhysicalInventoryDocNumber,
_PInvDoc.PhysicalInventoryDocYear AS PhysicalInventoryDocYear,
item.EWMWarehouse AS EWMWarehouse,
item.WarehouseOrder AS WarehouseOrder,
item.ActivityArea AS ActivityArea,
item.PhysicalInventoryArea AS PhysicalInventoryArea,
item.PhysicalInventoryDocumentType AS PhysicalInventoryDocumentType,
item.WhseTaskGoodsReceiptDateTime AS WhseTaskGoodsReceiptDateTime,
item.ShelfLifeExpirationDate AS ShelfLifeExpirationDate,
item.CountryOfOrigin AS CountryOfOrigin,
_CountryText.CountryName AS CountryName,
item.EntitledToDisposeParty AS EntitledToDisposeParty,
_Entitled.BusinessPartnerName AS NameOfEntitledToDisposeParty,
item.EWMStockOwner AS EWMStockOwner,
_StockOwner.BusinessPartnerName AS StockOwnerName,
item.EWMStockType AS EWMStockType,
case when _StockTypeText.EWMStockTypeName is not null then _StockTypeText.EWMStockTypeName else _WhseIndepText.EWMStockTypeName end as EWMStockTypeName AS EWMStockTypeNameendasEWMStockTypeName,
item.EWMStockUsage AS EWMStockUsage,
_StockUsageText.StockUsageName AS StockUsageName,
item.StockDocumentCategory AS StockDocumentCategory,
_SpclStkTypeText.StockDocCategoryText AS StockDocCategoryText,
item.StockItemNumber AS StockItemNumber,
item.Product AS Product,
_ProductText.ProductName AS ProductName,
item.Batch AS Batch,
item.EWMStorageBin AS EWMStorageBin,
cast ( item.HandlingUnitNumber as ewm_de_hu_no_conv ) AS HandlingUnitNumber,
cast ( item.NestedHandingUnitNumber as ewm_de_hu_no_conv ) AS NestedHandingUnitNumber,
item.SequenceOfPInvDocumentItems AS SequenceOfPInvDocumentItems,
item.BookQuantityUnitOfMeasure AS BookQuantityUnitOfMeasure,
item.BookQtyOfPInvItemInBookQtyUoM AS BookQtyOfPInvItemInBookQtyUoM,
item.BookQuantityUnitOfMeasure AS EnteredUoMOfPInv,
'' AS EWMStorageBinIsEmpty,
'' AS HandlingUnitIsComplete,
'' AS HandlingUnitIsMissing,
'' AS HandlingUnitIsEmpty,
'' AS NestedHndlgUnitIsComplete,
'' AS NestedHndlgUnitIsMissing,
'' AS NestedHndlgUnitIsEmpty,
_StockOwner.IsBusinessPurposeCompleted AS EWMOwnerIsBusPurposeCmpltd,
_Entitled.IsBusinessPurposeCompleted AS EWMEntitledIsBusPurposeCmpltd
FROM P_EWM_PINVCOUNTITEM08 AS item
LEFT OUTER JOIN I_EWM_PInvDocHeaderLog AS _PInvDoc ON PhysicalInventoryDocumentUUID = _PInvDoc.PhysicalInventoryDocumentUUID -- association [0..1]
LEFT OUTER JOIN I_ProductText AS _ProductText ON Product = _ProductText.Product AND _ProductText.Language = $parameters.P_Language -- association [0..1]
LEFT OUTER JOIN I_BusinessPartner AS _StockOwner ON EWMStockOwner = _StockOwner.BusinessPartner -- association [0..1]
LEFT OUTER JOIN I_BusinessPartner AS _Entitled ON EntitledToDisposeParty = _Entitled.BusinessPartner -- association [0..1]
LEFT OUTER JOIN I_EWM_StockTypeText_2 AS _StockTypeText ON EWMStockType = _StockTypeText.EWMStockType AND EWMWarehouse = _StockTypeText.EWMWarehouse AND _StockTypeText.Language = $parameters.P_Language -- association [0..1]
LEFT OUTER JOIN I_EWM_WhseIndepStockTypeText_2 AS _WhseIndepText ON EWMStockType = _WhseIndepText.EWMStockType AND _WhseIndepText.Language = $parameters.P_Language -- association [0..1]
LEFT OUTER JOIN I_EWM_StockUsageText_2 AS _StockUsageText ON EWMStockUsage = _StockUsageText.EWMStockUsage AND _StockUsageText.Language = $parameters.P_Language -- association [0..1]
LEFT OUTER JOIN I_CountryText AS _CountryText ON CountryOfOrigin = _CountryText.Country AND _CountryText.Language = $parameters.P_Language -- association [0..1]
LEFT OUTER JOIN I_EWM_SpecialStockTypeText AS _SpclStkTypeText ON StockDocumentCategory = _SpclStkTypeText.StockDocumentCategory AND _SpclStkTypeText.Language = $parameters.P_Language -- association [0..1]
LEFT OUTER JOIN E_EWM_PhysicalInventoryDoc AS _Extension ON PhysicalInventoryDocumentUUID = _Extension.PhysicalInventoryDocumentUUID AND PhysicalInventoryItemNumber = _Extension.PhysicalInventoryItemNumber AND LineIndexOfPInvItem = _Extension.LineIndexOfPInvItem AND PhysicalInventoryChangeVersion = _Extension.PhysicalInventoryChangeVersion AND PInvDocumentItemType = _Extension.PInvDocumentItemType -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA