I_PhysInvtryDocHeader
Physical Inventory Document Header
I_PhysInvtryDocHeader (Basic)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.
Physical Inventory Document · Supply Chain
I_PhysInvtryDocHeader is a Basic CDS View (Dimension) that provides data about "Physical Inventory Document Header" in SAP S/4HANA. It reads from 1 data source (ikpf) and exposes 38 fields with key fields PhysicalInventoryDocument, FiscalYear. It has 13 associations to related views.
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Supply Chain |
| Application Component | MM-IM-VDM-PI |
| Capabilities | Association Target for Defining CDS Entities, Data Source in SQL Select, Data Source for Defining CDS Entities, Data Source for Data Extraction, Analytical Dimension |
| Package | Supply Chain for SAP S/4HANA Cloud Private Edition |
| Description | <p>This CDS view provides the prerequisites for answering the following business questions:</p> <ul> <li><p> Which physical inventory documents have been created?</p></li> <li><p> For which date was the physical inventory count planned and when did it actually happen?</p></li> <li><p> What is the status of this physical inventory document?</p></li> <li><p> In which plant and storage location was this physical inventory count done?</p></li> </ul> |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Private Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Private Edition Private Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Private Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP Extensibility Explorer for SAP S/4HANA Cloud Private Edition — Explore SAP S/4HANA Cloud Private Edition Extensibility options by leveraging the sample scenarios from SAP
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Private Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| ikpf | ikpf | from |
Associations (13)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [0..1] | I_StorageLocation | _StorageLocation | $projection.Plant = _StorageLocation.Plant and $projection.StorageLocation = _StorageLocation.StorageLocation |
| [0..1] | I_User | _CreatedByUser | $projection.CreatedByUserName = _CreatedByUser.UserID |
| [0..1] | I_InventorySpecialStockType | _InventorySpecialStockType | $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType |
| [0..*] | I_PhysInvtryDocItem | _PhysInvtryDocItem | $projection.PhysicalInventoryDocument = _PhysInvtryDocItem.PhysicalInventoryDocument and $projection.FiscalYear = _PhysInvtryDocItem.FiscalYear |
| [0..*] | E_PhysInvtryDocumentItem | _ItemExtension | $projection.PhysicalInventoryDocument = _ItemExtension.PhysicalInventoryDocument and $projection.FiscalYear = _ItemExtension.FiscalYear |
| [0..1] | I_PhysInvtryGroupType | _PhysInvtryGroupType | $projection.PhysicalInventoryGroupType = _PhysInvtryGroupType.PhysicalInventoryGroupType |
| [0..1] | I_PhysInvtryType | _PhysInvtryType | $projection.PhysicalInventoryType = _PhysInvtryType.PhysicalInventoryType |
| [0..1] | I_StockTakingTransactionType | _InventoryTransactionType | $projection.InventoryTransactionType = _InventoryTransactionType.InventoryTransactionType |
| [0..1] | I_PhysInvtryCountSts | _PhysInvtryCountSts | $projection.PhysicalInventoryCountStatus = _PhysInvtryCountSts.PhysicalInventoryCountStatus |
| [0..1] | I_PhysInvtryDeletionSts | _PhysInvtryDeletionSts | $projection.PhysInvtryDeletionStatus = _PhysInvtryDeletionSts.PhysInvtryDeletionStatus |
| [0..1] | I_PhysInvtryPostSts | _PhysInvtryPostSts | $projection.PhysInvtryAdjustmentPostingSts = _PhysInvtryPostSts.PhysInvtryAdjustmentPostingSts |
| [1..1] | I_PhysInvtryDocFiscalYear | _PhysInvtryDocFiscalYear | $projection.FiscalYear = _PhysInvtryDocFiscalYear.FiscalYear |
Annotations (18)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IPIDOCHEADER | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| EndUserText.label | Physical Inventory Document Header | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.representativeKey | PhysicalInventoryDocument | view | |
| ObjectModel.sapObjectNodeType.name | PhysicalInventoryDocument | view | |
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| Metadata.allowExtensions | true | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| Analytics.dataExtraction.enabled | true | view |
Fields (38)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PhysicalInventoryDocument | Physical Inventory Document | ||
| KEY | FiscalYear | ikpf | gjahr | Settlement Year |
| InventoryTransactionType | Inventory Transaction Type | |||
| Plant | ikpf | werks | Receiving Plant | |
| StorageLocation | ikpf | lgort | Storage Location | |
| InventorySpecialStockType | ikpf | sobkz | Special Stock Indicator | |
| DocumentDate | ikpf | bldat | Document Date in Document | |
| PhysInventoryPlannedCountDate | ikpf | gidat | Planned Date of Inventory Count | |
| PhysicalInventoryLastCountDate | ikpf | zldat | Date of Last Count | |
| PostingDate | ikpf | budat | Posting Date in the Document | |
| FiscalPeriod | Posting Period | |||
| CreatedByUserName | Physical Inventory Created by User | |||
| PostingIsBlockedForPhysInvtry | ikpf | sperr | Posting Block Due to Physical Inventory | |
| PhysicalInventoryCountStatus | ikpf | zstat | Count Status | |
| PhysInvtryAdjustmentPostingSts | ikpf | dstat | Status of Adjustment Posting (Inventory Differences) | |
| PhysInventoryReferenceNumber | Physical Inventory Reference | |||
| PhysInvtryDeletionStatus | ikpf | lstat | Status of Deletion | |
| PhysInvtryDocHasQtySnapshot | Book Inventory Freeze | |||
| PhysicalInventoryGroupType | ikpf | keord | Type of Grouping Criterion | |
| PhysicalInventoryGroup | ikpf | ordng | Grouping Criterion of Physical Inventory Document Item | |
| PhysicalInventoryNumber | Physical Inventory Number | |||
| PhysicalInventoryDocumentDesc | ikpf | ibltxt | Description of Physical Inventory Document | |
| PhysicalInventoryType | Physical Inventory Type | |||
| LastChangeDateTime | ikpf | lastchange_datetime | Last Change Timestamp | |
| SalesPriceValuationIsActive | Is Sales Price Valuation Active | |||
| ValuationArea | t001k | bwkey | Valuation Area | |
| _Plant | _Plant | |||
| _StorageLocation | _StorageLocation | |||
| _CreatedByUser | _CreatedByUser | |||
| _InventorySpecialStockType | _InventorySpecialStockType | |||
| _PhysInvtryDocItem | _PhysInvtryDocItem | |||
| _PhysInvtryGroupType | _PhysInvtryGroupType | |||
| _PhysInvtryType | _PhysInvtryType | |||
| _InventoryTransactionType | _InventoryTransactionType | |||
| _PhysInvtryCountSts | _PhysInvtryCountSts | |||
| _PhysInvtryDeletionSts | _PhysInvtryDeletionSts | |||
| _PhysInvtryPostSts | _PhysInvtryPostSts | |||
| _PhysInvtryDocFiscalYear | _PhysInvtryDocFiscalYear |
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 I_PhysInvtryDocHeader.
-- 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 I_PhysInvtryDocHeader AS
SELECT
cast(ikpf.iblnr as pi_document preserving type) AS PhysicalInventoryDocument,
ikpf.gjahr AS FiscalYear,
cast(ikpf.vgart as pi_transaction_type preserving type) AS InventoryTransactionType,
ikpf.werks AS Plant,
ikpf.lgort AS StorageLocation,
ikpf.sobkz AS InventorySpecialStockType,
ikpf.bldat AS DocumentDate,
ikpf.gidat AS PhysInventoryPlannedCountDate,
ikpf.zldat AS PhysicalInventoryLastCountDate,
ikpf.budat AS PostingDate,
cast(ikpf.monat as pi_monat preserving type) AS FiscalPeriod,
cast(ikpf.usnam as pi_created_by_user preserving type) AS CreatedByUserName,
ikpf.sperr AS PostingIsBlockedForPhysInvtry,
ikpf.zstat AS PhysicalInventoryCountStatus,
ikpf.dstat AS PhysInvtryAdjustmentPostingSts,
cast(ikpf.xblni as pi_reference preserving type) AS PhysInventoryReferenceNumber,
ikpf.lstat AS PhysInvtryDeletionStatus,
cast(ikpf.xbufi as pi_book_inventory_freeze preserving type) AS PhysInvtryDocHasQtySnapshot,
ikpf.keord AS PhysicalInventoryGroupType,
ikpf.ordng AS PhysicalInventoryGroup,
cast(ikpf.invnu as pi_number preserving type) AS PhysicalInventoryNumber,
ikpf.ibltxt AS PhysicalInventoryDocumentDesc,
cast(ikpf.invart as pi_type preserving type) AS PhysicalInventoryType,
ikpf.lastchange_datetime AS LastChangeDateTime,
cast(t001k.xvkbw as pi_is_sp_valuation_active preserving type) AS SalesPriceValuationIsActive,
t001k.bwkey AS ValuationArea
FROM ikpf
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [0..1]
LEFT OUTER JOIN I_StorageLocation AS _StorageLocation ON Plant = _StorageLocation.Plant AND StorageLocation = _StorageLocation.StorageLocation -- association [0..1]
LEFT OUTER JOIN I_User AS _CreatedByUser ON CreatedByUserName = _CreatedByUser.UserID -- association [0..1]
LEFT OUTER JOIN I_InventorySpecialStockType AS _InventorySpecialStockType ON InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType -- association [0..1]
LEFT OUTER JOIN I_PhysInvtryDocItem AS _PhysInvtryDocItem ON PhysicalInventoryDocument = _PhysInvtryDocItem.PhysicalInventoryDocument AND FiscalYear = _PhysInvtryDocItem.FiscalYear -- association [0..*]
LEFT OUTER JOIN E_PhysInvtryDocumentItem AS _ItemExtension ON PhysicalInventoryDocument = _ItemExtension.PhysicalInventoryDocument AND FiscalYear = _ItemExtension.FiscalYear -- association [0..*]
LEFT OUTER JOIN I_PhysInvtryGroupType AS _PhysInvtryGroupType ON PhysicalInventoryGroupType = _PhysInvtryGroupType.PhysicalInventoryGroupType -- association [0..1]
LEFT OUTER JOIN I_PhysInvtryType AS _PhysInvtryType ON PhysicalInventoryType = _PhysInvtryType.PhysicalInventoryType -- association [0..1]
LEFT OUTER JOIN I_StockTakingTransactionType AS _InventoryTransactionType ON InventoryTransactionType = _InventoryTransactionType.InventoryTransactionType -- association [0..1]
LEFT OUTER JOIN I_PhysInvtryCountSts AS _PhysInvtryCountSts ON PhysicalInventoryCountStatus = _PhysInvtryCountSts.PhysicalInventoryCountStatus -- association [0..1]
LEFT OUTER JOIN I_PhysInvtryDeletionSts AS _PhysInvtryDeletionSts ON PhysInvtryDeletionStatus = _PhysInvtryDeletionSts.PhysInvtryDeletionStatus -- association [0..1]
LEFT OUTER JOIN I_PhysInvtryPostSts AS _PhysInvtryPostSts ON PhysInvtryAdjustmentPostingSts = _PhysInvtryPostSts.PhysInvtryAdjustmentPostingSts -- association [0..1]
LEFT OUTER JOIN I_PhysInvtryDocFiscalYear AS _PhysInvtryDocFiscalYear ON FiscalYear = _PhysInvtryDocFiscalYear.FiscalYear -- association [1..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