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 | ||
| KEY | FiscalYear | FiscalYear | ||
| KEY | PhysicalInventoryDocumentItem | PhysicalInventoryDocumentItem | ||
| PhysInvtrySitnID | ||||
| Material | Material | |||
| Plant | Plant | |||
| StorageLocation | StorageLocation | |||
| RealProductBatch | RealProductBatch | |||
| Batch | Batch | |||
| ValuationType | ValuationType | |||
| InventorySpecialStockType | InventorySpecialStockType | |||
| PhysicalInventoryStockType | PhysicalInventoryStockType | |||
| SalesOrder | SalesOrder | |||
| SalesOrderItem | ||||
| ScheduleLine | ScheduleLine | |||
| Supplier | Supplier | |||
| Customer | ||||
| StockOwner | StockOwner | |||
| LastChangeUser | LastChangeUser | |||
| LastChangeDate | LastChangeDate | |||
| CountedByUser | CountedByUser | |||
| PhysicalInventoryLastCountDate | PhysicalInventoryLastCountDate | |||
| AdjustmentPostingMadeByUser | AdjustmentPostingMadeByUser | |||
| PostingDate | PostingDate | |||
| PhysInventoryReferenceNumber | PhysInventoryReferenceNumber | |||
| PhysicalInventoryItemIsCounted | PhysicalInventoryItemIsCounted | |||
| PhysInvtryDifferenceIsPosted | PhysInvtryDifferenceIsPosted | |||
| PhysInvtryItemIsRecounted | PhysInvtryItemIsRecounted | |||
| PhysInvtryItemIsDeleted | PhysInvtryItemIsDeleted | |||
| IsHandledInAltvUnitOfMsr | IsHandledInAltvUnitOfMsr | |||
| PhysicalInventoryItemIsZero | PhysicalInventoryItemIsZero | |||
| BookQtyBfrCountInMatlBaseUnit | BookQtyBfrCountInMatlBaseUnit | |||
| Quantity | Quantity | |||
| MaterialBaseUnit | MaterialBaseUnit | |||
| QuantityInUnitOfEntry | QuantityInUnitOfEntry | |||
| UnitOfEntry | UnitOfEntry | |||
| DifferenceAmountInCoCodeCrcy | DifferenceAmountInCoCodeCrcy | |||
| Currency | Currency | |||
| EnteredSlsAmtInCoCodeCrcy | EnteredSlsAmtInCoCodeCrcy | |||
| SlsPriceAmountInCoCodeCrcy | SlsPriceAmountInCoCodeCrcy | |||
| PhysInvtryCtAmtInCoCodeCrcy | PhysInvtryCtAmtInCoCodeCrcy | |||
| BookQtyAmountInCoCodeCrcy | BookQtyAmountInCoCodeCrcy | |||
| DifferenceQuantityInBaseUnit | ||||
| DiffSlsPrcAmtInCoCodeCrcy | ||||
| DiffCountedBookAmtInCoCodeCry | ||||
| MaterialDocument | MaterialDocument | |||
| MaterialDocumentYear | MaterialDocumentYear | |||
| MaterialDocumentItem | MaterialDocumentItem | |||
| PhysInvtryRecountDocument | PhysInvtryRecountDocument | |||
| CycleCountType | CycleCountType | |||
| NmbrOfPhysInvtryPerFiscalYear | _CycleCounting | NmbrOfPhysInvtryPerFiscalYear | ||
| PhysInvtryIntvlForCycCounting | _CycleCounting | PhysInvtryIntvlForCycCounting | ||
| PhysInvtryFloatTimeCycCounting | _CycleCounting | PhysInvtryFloatTimeCycCounting | ||
| WBSElementInternalID | WBSElementInternalID | |||
| IsValueOnlyMaterial | IsValueOnlyMaterial | |||
| ProductCategory | ProductCategory | |||
| ReasonForPhysInvtryDifference | ReasonForPhysInvtryDifference | |||
| CrossPlantConfigurableMaterial | CrossPlantConfigurableMaterial | |||
| PhysInvtryDiffIsDistributed | PhysInvtryDiffIsDistributed | |||
| _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 |
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PPIDOCITEM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_PhysInvtryDocItem
as select from I_PhysInvtryDocItem
association [0..1] to I_AdjmtPostingMovementType as _AdjmtPostingMvtType on $projection.PhysicalInventoryStockType = _AdjmtPostingMvtType.PhysicalInventoryStockType
and $projection.InventorySpecialStockType = _AdjmtPostingMvtType.InventorySpecialStockType
association [0..*] to I_PhysInvtryDocSrlNmbr as _PhysInvtryDocSrlNmbr on $projection.PhysicalInventoryDocument = _PhysInvtryDocSrlNmbr.PhysicalInventoryDocument
and $projection.FiscalYear = _PhysInvtryDocSrlNmbr.FiscalYear
and $projection.PhysicalInventoryDocumentItem = _PhysInvtryDocSrlNmbr.PhysicalInventoryDocumentItem
association [0..1] to I_GoodsMovementType as _GoodsMovementType on $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType
association [0..1] to I_PhysInvtryReasonCode as _PhysInvtryReasonCode on $projection.GoodsMovementType = _PhysInvtryReasonCode.GoodsMovementType
and $projection.ReasonForPhysInvtryDifference = _PhysInvtryReasonCode.ReasonForPhysInvtryDifference
association [0..1] to I_CycleCountingSettings as _CycleCounting
on _CycleCounting.CycleCountType = $projection.CycleCountType and
_CycleCounting .Plant = $projection.Plant
association [0..1] to I_SitnInstceIndicator as _SitnInstceIndicator on _SitnInstceIndicator.SitnInstceAnchorObjectKey = $projection.PhysInvtrySitnID
and _SitnInstceIndicator.SitnDefAnchorObject = 'PhysInvtrySitnID'
association [1..*] to R_PhysInvtryOutpRequestItem as _PhysInvtryOutpRequestItem on $projection.PhysicalInventoryDocument = _PhysInvtryOutpRequestItem.PhysicalInventoryDocument
and $projection.FiscalYear = _PhysInvtryOutpRequestItem.FiscalYear
and $projection.PhysicalInventoryDocumentItem = _PhysInvtryOutpRequestItem.PhysicalInventoryDocumentItem
{
key PhysicalInventoryDocument,
key FiscalYear,
key PhysicalInventoryDocumentItem,
cast( concat( FiscalYear, concat( PhysicalInventoryDocument, PhysicalInventoryDocumentItem ) ) as mmim_pi_situation_id) as PhysInvtrySitnID,
Material,
Plant,
StorageLocation,
RealProductBatch,
Batch,
ValuationType,
InventorySpecialStockType,
PhysicalInventoryStockType,
@ObjectModel.foreignKey.association: '_GoodsMovementType'
cast((case when Quantity > BookQtyBfrCountInMatlBaseUnit and PhysicalInventoryItemIsCounted = 'X'
then _AdjmtPostingMvtType.PhysInvtryIncreasingQtyMvtType
else case when Quantity < BookQtyBfrCountInMatlBaseUnit and PhysicalInventoryItemIsCounted = 'X'
then _AdjmtPostingMvtType.PhysInvtryDecreasingQtyMvtType
else ''
end
end) as pi_bwart preserving type) as GoodsMovementType,
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,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
@DefaultAggregation: #NONE
BookQtyBfrCountInMatlBaseUnit,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
@DefaultAggregation: #NONE
Quantity,
@Semantics.unitOfMeasure
MaterialBaseUnit,
@Semantics.quantity.unitOfMeasure: 'UnitOfEntry'
@DefaultAggregation: #NONE
QuantityInUnitOfEntry,
@Semantics.unitOfMeasure
UnitOfEntry,
@Semantics.amount.currencyCode: 'Currency'
@DefaultAggregation: #NONE
DifferenceAmountInCoCodeCrcy,
@Semantics.currencyCode: true
Currency,
@Semantics.amount.currencyCode: 'Currency'
@DefaultAggregation: #NONE
EnteredSlsAmtInCoCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
@DefaultAggregation: #NONE
SlsPriceAmountInCoCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
@DefaultAggregation: #NONE
PhysInvtryCtAmtInCoCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
@DefaultAggregation: #NONE
BookQtyAmountInCoCodeCrcy,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
@DefaultAggregation: #NONE
cast((Quantity - BookQtyBfrCountInMatlBaseUnit) as pi_item_diff_qty_i_base_unit) as DifferenceQuantityInBaseUnit,
@Semantics.amount.currencyCode: 'Currency'
@DefaultAggregation: #NONE
cast((EnteredSlsAmtInCoCodeCrcy - SlsPriceAmountInCoCodeCrcy) as pi_item_diff_sls_prc_co_cry) as DiffSlsPrcAmtInCoCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
@DefaultAggregation: #NONE
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,
_SitnInstceIndicator,
_Material,
_ProductPlant,
_ProductStorageLocation,
_CrossPlantConfigurableMatl,
_LastChangeUser,
_CountedByUser,
_AdjustmentPostingMadeByUser,
_MaterialBaseUnit,
_Currency,
_Supplier,
_Customer,
_Plant,
_StorageLocation,
_UnitOfEntry,
_PhysInvtryStatusT,
_PhysInvtryDocHeader,
_PhysInvtryDocSrlNmbr,
_PhysicalInventoryStockType,
_InventorySpecialStockType,
_PhysInvtryReasonCode,
_GoodsMovementType,
_ProductCategory,
@Consumption.hidden: true
_SupplierCompanyByPlant,
@Consumption.hidden: true
_CustomerCompanyByPlant
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADJMTPOSTINGMOVEMENTTYPE",
"I_CYCLECOUNTINGSETTINGS",
"I_PHYSINVTRYDOCITEM"
],
"ASSOCIATED":
[
"I_ADJMTPOSTINGMOVEMENTTYPE",
"I_CURRENCY",
"I_CUSTOMER",
"I_CUSTOMERCOMPANYBYPLANT",
"I_CYCLECOUNTINGSETTINGS",
"I_GOODSMOVEMENTTYPE",
"I_INVENTORYSPECIALSTOCKTYPE",
"I_MATERIAL",
"I_PHYSINVTRYDOCHEADER",
"I_PHYSINVTRYDOCSRLNMBR",
"I_PHYSINVTRYREASONCODE",
"I_PHYSINVTRYSTATUST",
"I_PHYSINVTRYSTOCKTYPE",
"I_PLANT",
"I_PRODUCTCATEGORY",
"I_PRODUCTPLANT",
"I_PRODUCTSTORAGELOCATION",
"I_SITNINSTCEINDICATOR",
"I_STORAGELOCATION",
"I_SUPPLIER",
"I_SUPPLIERCOMPANYBYPLANT",
"I_UNITOFMEASURE",
"I_USER",
"R_PHYSINVTRYOUTPREQUESTITEM"
],
"BASE":
[
"I_PHYSINVTRYDOCITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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