A_PhysInventoryDocItem
Document Items
A_PhysInventoryDocItem is a Basic CDS View that provides data about "Document Items" in SAP S/4HANA. It reads from 1 data source (I_PhysInvtryDocItem) and exposes 52 fields with key fields FiscalYear, PhysicalInventoryDocument, PhysicalInventoryDocumentItem. It has 6 associations to related views. Part of development package ODATA_MM_IM_API_PI_DOC.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PhysInvtryDocItem | I_PhysInvtryDocItem | from |
Associations (6)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | A_PhysInventoryDocHeader | _PhysicalInventoryDocument | $projection.PhysicalInventoryDocument = _PhysicalInventoryDocument.PhysicalInventoryDocument and $projection.FiscalYear = _PhysicalInventoryDocument.FiscalYear |
| [0..*] | A_SerialNumberPhysInventoryDoc | _SerialNumbers | $projection.FiscalYear = _SerialNumbers.FiscalYear and $projection.PhysicalInventoryDocument = _SerialNumbers.PhysicalInventoryDocument and $projection.PhysicalInventoryDocumentItem = _SerialNumbers.PhysicalInventoryDocumentItem |
| [0..1] | A_Supplier | _AuthSupplier | $projection.Supplier = _AuthSupplier.Supplier |
| [0..1] | A_Customer | _AuthCustomer | $projection.Customer = _AuthCustomer.Customer |
| [0..1] | I_SupplierCompanyByPlant | _SupplierCompanyByPlant | $projection.Supplier = _SupplierCompanyByPlant.Supplier and $projection.Plant = _SupplierCompanyByPlant.Plant |
| [0..1] | I_CustomerCompanyByPlant | _CustomerCompanyByPlant | $projection.Customer = _CustomerCompanyByPlant.Customer and $projection.Plant = _CustomerCompanyByPlant.Plant |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| EndUserText.label | Document Items | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| ObjectModel.createEnabled | false | view | |
| ObjectModel.updateEnabled | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| VDM.viewType | #BASIC | view |
Fields (52)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | PhysicalInventoryDocument | PhysicalInventoryDocument | Physical Inventory Document | |
| KEY | PhysicalInventoryDocumentItem | PhysicalInventoryDocumentItem | Physical Inventory Document Item | |
| Plant | Plant | Valuation Area | ||
| StorageLocation | StorageLocation | StorageLocation | ||
| Material | Material | Vehicle Model | ||
| Batch | Batch | Lot No. | ||
| InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | ||
| PhysicalInventoryStockType | PhysicalInventoryStockType | Stock Type | ||
| SalesOrder | SalesOrder | SD Document | ||
| SalesOrderItem | SalesOrderItem | Sales Order Item | ||
| Supplier | Supplier | Supplier | ||
| Customer | Customer | Sold-to Party | ||
| WBSElement | ||||
| 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 | ||
| PhysicalInventoryItemIsCounted | PhysicalInventoryItemIsCounted | Is Counted | ||
| PhysInvtryDifferenceIsPosted | PhysInvtryDifferenceIsPosted | Is Difference Posted | ||
| PhysInvtryItemIsRecounted | PhysInvtryItemIsRecounted | Is Recounted | ||
| PhysInvtryItemIsDeleted | PhysInvtryItemIsDeleted | Is Deleted | ||
| IsHandledInAltvUnitOfMsr | IsHandledInAltvUnitOfMsr | Without Unit of Measure Proposal | ||
| CycleCountType | CycleCountType | Cycle Count Type | ||
| IsValueOnlyMaterial | IsValueOnlyMaterial | Is Value-Only Material | ||
| PhysInventoryReferenceNumber | PhysInventoryReferenceNumber | Physical Inventory Reference | ||
| MaterialDocument | MaterialDocument | Material Doc. | ||
| MaterialDocumentYear | MaterialDocumentYear | Material Document Year | ||
| MaterialDocumentItem | MaterialDocumentItem | Material Document Item | ||
| PhysInvtryRecountDocument | PhysInvtryRecountDocument | Recount Doc. | ||
| PhysicalInventoryItemIsZero | PhysicalInventoryItemIsZero | Zero Counted | ||
| ReasonForPhysInvtryDifference | ReasonForPhysInvtryDifference | Difference Reason | ||
| MaterialBaseUnit | MaterialBaseUnit | Valuation Unit | ||
| BookQtyBfrCountInMatlBaseUnit | BookQtyBfrCountInMatlBaseUnit | Book Quantity | ||
| Quantity | Quantity | Value | ||
| UnitOfEntry | UnitOfEntry | Unit of Entry | ||
| QuantityInUnitOfEntry | QuantityInUnitOfEntry | Quantity in UnE | ||
| Currency | Currency | Valuation Crcy | ||
| DifferenceAmountInCoCodeCrcy | DifferenceAmountInCoCodeCrcy | Difference Val. | ||
| EnteredSlsAmtInCoCodeCrcy | EnteredSlsAmtInCoCodeCrcy | Sales Price Counted Value | ||
| SlsPriceAmountInCoCodeCrcy | SlsPriceAmountInCoCodeCrcy | Sales Price Book Value | ||
| PhysInvtryCtAmtInCoCodeCrcy | PhysInvtryCtAmtInCoCodeCrcy | Counted Quantity Value | ||
| BookQtyAmountInCoCodeCrcy | BookQtyAmountInCoCodeCrcy | Book Value | ||
| LastChangeDateTime | _PhysicalInventoryDocument | LastChangeDateTime | Timestamp | |
| _PhysicalInventoryDocument | _PhysicalInventoryDocument | |||
| _SerialNumbers | _SerialNumbers | |||
| _AuthSupplier | _AuthSupplier | |||
| _AuthCustomer | _AuthCustomer | |||
| _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 A_PhysInventoryDocItem.
-- 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 A_PhysInventoryDocItem AS
SELECT
FiscalYear,
PhysicalInventoryDocument,
PhysicalInventoryDocumentItem,
Plant,
StorageLocation,
Material,
Batch,
InventorySpecialStockType,
PhysicalInventoryStockType,
SalesOrder,
SalesOrderItem,
Supplier,
Customer,
I_PhysInvtryDocItem._WBSElement.WBSElement AS WBSElement,
LastChangeUser,
LastChangeDate,
CountedByUser,
PhysicalInventoryLastCountDate,
AdjustmentPostingMadeByUser,
PostingDate,
PhysicalInventoryItemIsCounted,
PhysInvtryDifferenceIsPosted,
PhysInvtryItemIsRecounted,
PhysInvtryItemIsDeleted,
IsHandledInAltvUnitOfMsr,
CycleCountType,
IsValueOnlyMaterial,
PhysInventoryReferenceNumber,
MaterialDocument,
MaterialDocumentYear,
MaterialDocumentItem,
PhysInvtryRecountDocument,
PhysicalInventoryItemIsZero,
ReasonForPhysInvtryDifference,
MaterialBaseUnit,
BookQtyBfrCountInMatlBaseUnit,
Quantity,
UnitOfEntry,
QuantityInUnitOfEntry,
Currency,
DifferenceAmountInCoCodeCrcy,
EnteredSlsAmtInCoCodeCrcy,
SlsPriceAmountInCoCodeCrcy,
PhysInvtryCtAmtInCoCodeCrcy,
BookQtyAmountInCoCodeCrcy,
_PhysicalInventoryDocument.LastChangeDateTime AS LastChangeDateTime
FROM I_PhysInvtryDocItem
LEFT OUTER JOIN A_PhysInventoryDocHeader AS _PhysicalInventoryDocument ON PhysicalInventoryDocument = _PhysicalInventoryDocument.PhysicalInventoryDocument AND FiscalYear = _PhysicalInventoryDocument.FiscalYear -- association [1..1]
LEFT OUTER JOIN A_SerialNumberPhysInventoryDoc AS _SerialNumbers ON FiscalYear = _SerialNumbers.FiscalYear AND PhysicalInventoryDocument = _SerialNumbers.PhysicalInventoryDocument AND PhysicalInventoryDocumentItem = _SerialNumbers.PhysicalInventoryDocumentItem -- association [0..*]
LEFT OUTER JOIN A_Supplier AS _AuthSupplier ON Supplier = _AuthSupplier.Supplier -- association [0..1]
LEFT OUTER JOIN A_Customer AS _AuthCustomer ON Customer = _AuthCustomer.Customer -- association [0..1]
LEFT OUTER JOIN I_SupplierCompanyByPlant AS _SupplierCompanyByPlant ON Supplier = _SupplierCompanyByPlant.Supplier AND Plant = _SupplierCompanyByPlant.Plant -- association [0..1]
LEFT OUTER JOIN I_CustomerCompanyByPlant AS _CustomerCompanyByPlant ON Customer = _CustomerCompanyByPlant.Customer AND Plant = _CustomerCompanyByPlant.Plant -- 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