I_PhysInvtryDocHeader

DDL: I_PHYSINVTRYDOCHEADER Type: view BASIC

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

StateC1
Line of BusinessSupply Chain
Application ComponentMM-IM-VDM-PI
CapabilitiesAssociation Target for Defining CDS Entities, Data Source in SQL Select, Data Source for Defining CDS Entities, Data Source for Data Extraction, Analytical Dimension
PackageSupply 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

Data Sources (1)

SourceAliasJoin Type
ikpf ikpf from

Associations (13)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;