P_PhysInvtryDocItem
P_PhysInvtryDocItem is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_PhysInvtryDocItem) and exposes 84 fields with key fields PhysicalInventoryDocument, FiscalYear, PhysicalInventoryDocumentItem. It has 7 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PhysInvtryDocItem | I_PhysInvtryDocItem | from |
Associations (7)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_AdjmtPostingMovementType | _AdjmtPostingMvtType | $projection.PhysicalInventoryStockType = _AdjmtPostingMvtType.PhysicalInventoryStockType and $projection.InventorySpecialStockType = _AdjmtPostingMvtType.InventorySpecialStockType |
| [0..*] | I_PhysInvtryDocSrlNmbr | _PhysInvtryDocSrlNmbr | $projection.PhysicalInventoryDocument = _PhysInvtryDocSrlNmbr.PhysicalInventoryDocument and $projection.FiscalYear = _PhysInvtryDocSrlNmbr.FiscalYear and $projection.PhysicalInventoryDocumentItem = _PhysInvtryDocSrlNmbr.PhysicalInventoryDocumentItem |
| [0..1] | I_GoodsMovementType | _GoodsMovementType | $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType |
| [0..1] | I_PhysInvtryReasonCode | _PhysInvtryReasonCode | $projection.GoodsMovementType = _PhysInvtryReasonCode.GoodsMovementType and $projection.ReasonForPhysInvtryDifference = _PhysInvtryReasonCode.ReasonForPhysInvtryDifference |
| [0..1] | I_CycleCountingSettings | _CycleCounting | _CycleCounting.CycleCountType = $projection.CycleCountType and _CycleCounting .Plant = $projection.Plant |
| [0..1] | I_SitnInstceIndicator | _SitnInstceIndicator | _SitnInstceIndicator.SitnInstceAnchorObjectKey = $projection.PhysInvtrySitnID and _SitnInstceIndicator.SitnDefAnchorObject = 'PhysInvtrySitnID' |
| [1..*] | R_PhysInvtryOutpRequestItem | _PhysInvtryOutpRequestItem | $projection.PhysicalInventoryDocument = _PhysInvtryOutpRequestItem.PhysicalInventoryDocument and $projection.FiscalYear = _PhysInvtryOutpRequestItem.FiscalYear and $projection.PhysicalInventoryDocumentItem = _PhysInvtryOutpRequestItem.PhysicalInventoryDocumentItem |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | PPIDOCITEM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (84)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PhysicalInventoryDocument | PhysicalInventoryDocument | Physical Inventory Document | |
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | PhysicalInventoryDocumentItem | PhysicalInventoryDocumentItem | Physical Inventory Document Item | |
| PhysInvtrySitnID | ||||
| Material | Material | Vehicle Model | ||
| Plant | Plant | Valuation Area | ||
| StorageLocation | StorageLocation | StorageLocation | ||
| RealProductBatch | RealProductBatch | |||
| Batch | Batch | Lot No. | ||
| ValuationType | ValuationType | Valuation Type | ||
| InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | ||
| PhysicalInventoryStockType | PhysicalInventoryStockType | Stock Type | ||
| SalesOrder | SalesOrder | SD Document | ||
| SalesOrderItem | Sales Order Item | |||
| ScheduleLine | ScheduleLine | Schedule Line | ||
| Supplier | Supplier | Supplier | ||
| Customer | Sold-to Party | |||
| StockOwner | StockOwner | Owner of stock | ||
| LastChangeUser | LastChangeUser | User Name | ||
| LastChangeDate | LastChangeDate | Time Stamp | ||
| CountedByUser | CountedByUser | Counted By | ||
| PhysicalInventoryLastCountDate | PhysicalInventoryLastCountDate | Count Date | ||
| AdjustmentPostingMadeByUser | AdjustmentPostingMadeByUser | Adjustment Posting Made By | ||
| PostingDate | PostingDate | Posting Date for GR | ||
| PhysInventoryReferenceNumber | PhysInventoryReferenceNumber | Physical Inventory Reference | ||
| PhysicalInventoryItemIsCounted | PhysicalInventoryItemIsCounted | Is Counted | ||
| PhysInvtryDifferenceIsPosted | PhysInvtryDifferenceIsPosted | Is Difference Posted | ||
| PhysInvtryItemIsRecounted | PhysInvtryItemIsRecounted | Is Recounted | ||
| PhysInvtryItemIsDeleted | PhysInvtryItemIsDeleted | Is Deleted | ||
| IsHandledInAltvUnitOfMsr | IsHandledInAltvUnitOfMsr | Without Unit of Measure Proposal | ||
| PhysicalInventoryItemIsZero | PhysicalInventoryItemIsZero | Zero Counted | ||
| BookQtyBfrCountInMatlBaseUnit | BookQtyBfrCountInMatlBaseUnit | Book Quantity | ||
| Quantity | Quantity | Value | ||
| MaterialBaseUnit | MaterialBaseUnit | Valuation Unit | ||
| QuantityInUnitOfEntry | QuantityInUnitOfEntry | Quantity in UnE | ||
| UnitOfEntry | UnitOfEntry | Unit of Entry | ||
| DifferenceAmountInCoCodeCrcy | DifferenceAmountInCoCodeCrcy | Difference Val. | ||
| Currency | Currency | Valuation Crcy | ||
| EnteredSlsAmtInCoCodeCrcy | EnteredSlsAmtInCoCodeCrcy | Sales Price Counted Value | ||
| SlsPriceAmountInCoCodeCrcy | SlsPriceAmountInCoCodeCrcy | Sales Price Book Value | ||
| PhysInvtryCtAmtInCoCodeCrcy | PhysInvtryCtAmtInCoCodeCrcy | Counted Quantity Value | ||
| BookQtyAmountInCoCodeCrcy | BookQtyAmountInCoCodeCrcy | Book Value | ||
| DifferenceQuantityInBaseUnit | ||||
| DiffSlsPrcAmtInCoCodeCrcy | ||||
| DiffCountedBookAmtInCoCodeCry | ||||
| MaterialDocument | MaterialDocument | Material Doc. | ||
| MaterialDocumentYear | MaterialDocumentYear | Material Document Year | ||
| MaterialDocumentItem | MaterialDocumentItem | Material Document Item | ||
| PhysInvtryRecountDocument | PhysInvtryRecountDocument | Recount Doc. | ||
| CycleCountType | CycleCountType | Cycle Count Type | ||
| NmbrOfPhysInvtryPerFiscalYear | _CycleCounting | NmbrOfPhysInvtryPerFiscalYear | ||
| PhysInvtryIntvlForCycCounting | _CycleCounting | PhysInvtryIntvlForCycCounting | ||
| PhysInvtryFloatTimeCycCounting | _CycleCounting | PhysInvtryFloatTimeCycCounting | ||
| WBSElementInternalID | WBSElementInternalID | WBS Internal ID | ||
| IsValueOnlyMaterial | IsValueOnlyMaterial | Is Value-Only Material | ||
| ProductCategory | ProductCategory | Prod Category | ||
| ReasonForPhysInvtryDifference | ReasonForPhysInvtryDifference | Difference Reason | ||
| CrossPlantConfigurableMaterial | CrossPlantConfigurableMaterial | Cross-Plant Configurable Material | ||
| PhysInvtryDiffIsDistributed | PhysInvtryDiffIsDistributed | Difference Distributed | ||
| _SitnInstceIndicator | _SitnInstceIndicator | |||
| _Material | _Material | |||
| _ProductPlant | _ProductPlant | |||
| _ProductStorageLocation | _ProductStorageLocation | |||
| _CrossPlantConfigurableMatl | _CrossPlantConfigurableMatl | |||
| _LastChangeUser | _LastChangeUser | |||
| _CountedByUser | _CountedByUser | |||
| _AdjustmentPostingMadeByUser | _AdjustmentPostingMadeByUser | |||
| _MaterialBaseUnit | _MaterialBaseUnit | |||
| _Currency | _Currency | |||
| _Supplier | _Supplier | |||
| _Customer | _Customer | |||
| _Plant | _Plant | |||
| _StorageLocation | _StorageLocation | |||
| _UnitOfEntry | _UnitOfEntry | |||
| _PhysInvtryStatusT | _PhysInvtryStatusT | |||
| _PhysInvtryDocHeader | _PhysInvtryDocHeader | |||
| _PhysInvtryDocSrlNmbr | _PhysInvtryDocSrlNmbr | |||
| _PhysicalInventoryStockType | _PhysicalInventoryStockType | |||
| _InventorySpecialStockType | _InventorySpecialStockType | |||
| _PhysInvtryReasonCode | _PhysInvtryReasonCode | |||
| _GoodsMovementType | _GoodsMovementType | |||
| _ProductCategory | _ProductCategory | |||
| _SupplierCompanyByPlant | _SupplierCompanyByPlant | |||
| _CustomerCompanyByPlant | _CustomerCompanyByPlant |
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_PhysInvtryDocItem.
-- 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: PPIDOCITEM
CREATE VIEW P_PhysInvtryDocItem AS
SELECT
PhysicalInventoryDocument,
FiscalYear,
PhysicalInventoryDocumentItem,
cast( concat( FiscalYear, concat( PhysicalInventoryDocument, PhysicalInventoryDocumentItem ) ) as mmim_pi_situation_id) AS PhysInvtrySitnID,
Material,
Plant,
StorageLocation,
RealProductBatch,
Batch,
ValuationType,
InventorySpecialStockType,
PhysicalInventoryStockType,
SalesOrder,
cast(SalesOrderItem as pi_kdpos preserving type) AS SalesOrderItem,
ScheduleLine,
Supplier,
cast(Customer as kunnr preserving type) AS Customer,
StockOwner,
LastChangeUser,
LastChangeDate,
CountedByUser,
PhysicalInventoryLastCountDate,
AdjustmentPostingMadeByUser,
PostingDate,
PhysInventoryReferenceNumber,
PhysicalInventoryItemIsCounted,
PhysInvtryDifferenceIsPosted,
PhysInvtryItemIsRecounted,
PhysInvtryItemIsDeleted,
IsHandledInAltvUnitOfMsr,
PhysicalInventoryItemIsZero,
BookQtyBfrCountInMatlBaseUnit,
Quantity,
MaterialBaseUnit,
QuantityInUnitOfEntry,
UnitOfEntry,
DifferenceAmountInCoCodeCrcy,
Currency,
EnteredSlsAmtInCoCodeCrcy,
SlsPriceAmountInCoCodeCrcy,
PhysInvtryCtAmtInCoCodeCrcy,
BookQtyAmountInCoCodeCrcy,
cast((Quantity - BookQtyBfrCountInMatlBaseUnit) as pi_item_diff_qty_i_base_unit) AS DifferenceQuantityInBaseUnit,
cast((EnteredSlsAmtInCoCodeCrcy - SlsPriceAmountInCoCodeCrcy) as pi_item_diff_sls_prc_co_cry) AS DiffSlsPrcAmtInCoCodeCrcy,
cast((PhysInvtryCtAmtInCoCodeCrcy - BookQtyAmountInCoCodeCrcy) as mmim_pi_dif_count_book_value ) AS DiffCountedBookAmtInCoCodeCry,
MaterialDocument,
MaterialDocumentYear,
MaterialDocumentItem,
PhysInvtryRecountDocument,
CycleCountType,
_CycleCounting.NmbrOfPhysInvtryPerFiscalYear AS NmbrOfPhysInvtryPerFiscalYear,
_CycleCounting.PhysInvtryIntvlForCycCounting AS PhysInvtryIntvlForCycCounting,
_CycleCounting.PhysInvtryFloatTimeCycCounting AS PhysInvtryFloatTimeCycCounting,
WBSElementInternalID,
IsValueOnlyMaterial,
ProductCategory,
ReasonForPhysInvtryDifference,
CrossPlantConfigurableMaterial,
PhysInvtryDiffIsDistributed
FROM I_PhysInvtryDocItem
LEFT OUTER JOIN I_AdjmtPostingMovementType AS _AdjmtPostingMvtType ON PhysicalInventoryStockType = _AdjmtPostingMvtType.PhysicalInventoryStockType AND InventorySpecialStockType = _AdjmtPostingMvtType.InventorySpecialStockType -- association [0..1]
LEFT OUTER JOIN I_PhysInvtryDocSrlNmbr AS _PhysInvtryDocSrlNmbr ON PhysicalInventoryDocument = _PhysInvtryDocSrlNmbr.PhysicalInventoryDocument AND FiscalYear = _PhysInvtryDocSrlNmbr.FiscalYear AND PhysicalInventoryDocumentItem = _PhysInvtryDocSrlNmbr.PhysicalInventoryDocumentItem -- association [0..*]
LEFT OUTER JOIN I_GoodsMovementType AS _GoodsMovementType ON GoodsMovementType = _GoodsMovementType.GoodsMovementType -- association [0..1]
LEFT OUTER JOIN I_PhysInvtryReasonCode AS _PhysInvtryReasonCode ON GoodsMovementType = _PhysInvtryReasonCode.GoodsMovementType AND ReasonForPhysInvtryDifference = _PhysInvtryReasonCode.ReasonForPhysInvtryDifference -- association [0..1]
LEFT OUTER JOIN I_CycleCountingSettings AS _CycleCounting ON _CycleCounting.CycleCountType = CycleCountType AND _CycleCounting .Plant = Plant -- association [0..1]
LEFT OUTER JOIN I_SitnInstceIndicator AS _SitnInstceIndicator ON _SitnInstceIndicator.SitnInstceAnchorObjectKey = PhysInvtrySitnID AND _SitnInstceIndicator.SitnDefAnchorObject = 'PhysInvtrySitnID' -- association [0..1]
LEFT OUTER JOIN R_PhysInvtryOutpRequestItem AS _PhysInvtryOutpRequestItem ON PhysicalInventoryDocument = _PhysInvtryOutpRequestItem.PhysicalInventoryDocument AND FiscalYear = _PhysInvtryOutpRequestItem.FiscalYear AND PhysicalInventoryDocumentItem = _PhysInvtryOutpRequestItem.PhysicalInventoryDocumentItem -- association [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