I_AugmentedPhysInvtryDocItem
Augmented Physical Inventory Doc Item
I_AugmentedPhysInvtryDocItem is a Composite CDS View that provides data about "Augmented Physical Inventory Doc Item" in SAP S/4HANA. It reads from 1 data source (I_PhysInvtryDocItem) and exposes 74 fields with key fields FiscalYear, PhysicalInventoryDocument, PhysicalInventoryDocumentItem. It has 2 associations to related views. Part of development package MM_IM_VDM_PI.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PhysInvtryDocItem | I_PhysInvtryDocItem | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_AdjmtPostingMovementType | _AdjmtPostingMovementType | $projection.PhysicalInventoryStockType = _AdjmtPostingMovementType.PhysicalInventoryStockType and $projection.InventorySpecialStockType = _AdjmtPostingMovementType.InventorySpecialStockType |
| [0..1] | I_GoodsMovementType | _GoodsMovementType | $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| EndUserText.label | Augmented Physical Inventory Doc Item | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.private | false | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (74)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | FiscalYear | FiscalYear | ||
| KEY | PhysicalInventoryDocument | PhysicalInventoryDocument | ||
| KEY | PhysicalInventoryDocumentItem | PhysicalInventoryDocumentItem | ||
| Plant | Plant | |||
| StorageLocation | StorageLocation | |||
| Material | Material | |||
| RealProductBatch | RealProductBatch | |||
| Batch | Batch | |||
| ValuationType | ValuationType | |||
| InventorySpecialStockType | InventorySpecialStockType | |||
| PhysicalInventoryStockType | PhysicalInventoryStockType | |||
| SalesOrder | SalesOrder | |||
| SalesOrderItem | SalesOrderItem | |||
| ScheduleLine | ScheduleLine | |||
| Supplier | Supplier | |||
| Customer | Customer | |||
| WBSElementInternalID | WBSElementInternalID | |||
| PhysicalInventoryItemIsCounted | PhysicalInventoryItemIsCounted | |||
| PhysInvtryDifferenceIsPosted | PhysInvtryDifferenceIsPosted | |||
| PhysInvtryItemIsRecounted | PhysInvtryItemIsRecounted | |||
| PhysInvtryItemIsDeleted | PhysInvtryItemIsDeleted | |||
| CycleCountType | CycleCountType | |||
| PhysicalInventoryLastCountDate | PhysicalInventoryLastCountDate | |||
| PostingDate | PostingDate | |||
| ReasonForPhysInvtryDifference | ReasonForPhysInvtryDifference | |||
| LastChangeDate | LastChangeDate | |||
| PhysInvtryDiffIsDistributed | PhysInvtryDiffIsDistributed | |||
| Currency | Currency | |||
| MaterialDocumentYear | MaterialDocumentYear | |||
| MaterialDocument | MaterialDocument | |||
| MaterialDocumentItem | MaterialDocumentItem | |||
| PhysInvtryRecountDocument | PhysInvtryRecountDocument | |||
| IsValueOnlyMaterial | IsValueOnlyMaterial | |||
| IsHandledInAltvUnitOfMsr | IsHandledInAltvUnitOfMsr | |||
| ProductCategory | ProductCategory | |||
| CrossPlantConfigurableMaterial | CrossPlantConfigurableMaterial | |||
| BookQtyBfrCountInMatlBaseUnit | BookQtyBfrCountInMatlBaseUnit | |||
| PhysicalInventoryItemIsZero | PhysicalInventoryItemIsZero | |||
| Quantity | Quantity | |||
| MaterialBaseUnit | MaterialBaseUnit | |||
| QuantityInUnitOfEntry | QuantityInUnitOfEntry | |||
| DifferenceQuantityInBaseUnit | ||||
| UnitOfEntry | UnitOfEntry | |||
| EnteredSlsAmtInCoCodeCrcy | EnteredSlsAmtInCoCodeCrcy | |||
| SlsPriceAmountInCoCodeCrcy | SlsPriceAmountInCoCodeCrcy | |||
| PhysInvtryCtAmtInCoCodeCrcy | PhysInvtryCtAmtInCoCodeCrcy | |||
| BookQtyAmountInCoCodeCrcy | BookQtyAmountInCoCodeCrcy | |||
| MaxAbsDiffAmountInCoCodeCrcy | ||||
| MinAbsDiffAmountInCoCodeCrcy | ||||
| DiffSlsPrcAmtInCoCodeCrcy | ||||
| NumberOfPhysInvtryItems | ||||
| _WBSElement | _WBSElement | |||
| _AdjmtPostingMovementType | _AdjmtPostingMovementType | |||
| _Material | _Material | |||
| _ProductPlant | _ProductPlant | |||
| _ProductStorageLocation | _ProductStorageLocation | |||
| _CrossPlantConfigurableMatl | _CrossPlantConfigurableMatl | |||
| _MaterialBaseUnit | _MaterialBaseUnit | |||
| _UnitOfEntry | _UnitOfEntry | |||
| _Currency | _Currency | |||
| _Supplier | _Supplier | |||
| _Customer | _Customer | |||
| _SalesOrder | _SalesOrder | |||
| _SalesOrderItem | _SalesOrderItem | |||
| _SalesOrderScheduleLine | _SalesOrderScheduleLine | |||
| _Plant | _Plant | |||
| _StorageLocation | _StorageLocation | |||
| _PhysInvtryDocHeader | _PhysInvtryDocHeader | |||
| _PhysicalInventoryStockType | _PhysicalInventoryStockType | |||
| _InventorySpecialStockType | _InventorySpecialStockType | |||
| _ProductCategory | _ProductCategory | |||
| _GoodsMovementType | _GoodsMovementType | |||
| _SupplierCompanyByPlant | _SupplierCompanyByPlant | |||
| _CustomerCompanyByPlant | _CustomerCompanyByPlant |
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@EndUserText.label: 'Augmented Physical Inventory Doc Item'
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass:#TRANSACTIONAL
@VDM.private: false
@VDM.viewType: #COMPOSITE
define view entity I_AugmentedPhysInvtryDocItem
as select from I_PhysInvtryDocItem
association [0..1] to I_AdjmtPostingMovementType as _AdjmtPostingMovementType on $projection.PhysicalInventoryStockType = _AdjmtPostingMovementType.PhysicalInventoryStockType
and $projection.InventorySpecialStockType = _AdjmtPostingMovementType.InventorySpecialStockType
association [0..1] to I_GoodsMovementType as _GoodsMovementType on $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType
{
//Key
@Semantics.calendar.year: true
key FiscalYear,
key PhysicalInventoryDocument,
key PhysicalInventoryDocumentItem,
@ObjectModel.foreignKey.association: '_Plant'
Plant,
@ObjectModel.foreignKey.association: '_StorageLocation'
StorageLocation,
@ObjectModel.foreignKey.association: '_Material'
Material,
RealProductBatch,
Batch,
ValuationType,
@ObjectModel.foreignKey.association: '_InventorySpecialStockType'
InventorySpecialStockType,
@ObjectModel.foreignKey.association: '_PhysicalInventoryStockType'
PhysicalInventoryStockType,
@ObjectModel.foreignKey.association: '_SalesOrder'
SalesOrder,
@ObjectModel.foreignKey.association: '_SalesOrderItem'
SalesOrderItem,
@ObjectModel.foreignKey.association: '_SalesOrderScheduleLine'
ScheduleLine,
@ObjectModel.foreignKey.association: '_Supplier'
Supplier,
@ObjectModel.foreignKey.association: '_Customer'
Customer,
WBSElementInternalID,
//Status
PhysicalInventoryItemIsCounted,
PhysInvtryDifferenceIsPosted,
PhysInvtryItemIsRecounted,
PhysInvtryItemIsDeleted,
// Process Types
CycleCountType,
@ObjectModel.foreignKey.association: '_GoodsMovementType'
cast((case when Quantity > BookQtyBfrCountInMatlBaseUnit and PhysicalInventoryItemIsCounted = 'X'
then _AdjmtPostingMovementType.PhysInvtryIncreasingQtyMvtType
else case when Quantity < BookQtyBfrCountInMatlBaseUnit and PhysicalInventoryItemIsCounted = 'X'
then _AdjmtPostingMovementType.PhysInvtryDecreasingQtyMvtType
else ''
end
end) as pi_bwart preserving type) as GoodsMovementType,
// Processing Data
PhysicalInventoryLastCountDate,
PostingDate,
ReasonForPhysInvtryDifference,
LastChangeDate,
PhysInvtryDiffIsDistributed,
Currency,
// References
case when PhysInventoryReferenceNumber = ''
then
I_PhysInvtryDocItem._PhysInvtryDocHeader.PhysInventoryReferenceNumber
else
PhysInventoryReferenceNumber
end as PhysInventoryReferenceNumber,
MaterialDocumentYear,
MaterialDocument,
MaterialDocumentItem,
PhysInvtryRecountDocument,
// Material Types
IsValueOnlyMaterial,
IsHandledInAltvUnitOfMsr,
@ObjectModel.foreignKey.association: '_ProductCategory'
ProductCategory,
@ObjectModel.foreignKey.association: '_CrossPlantConfigurableMatl'
CrossPlantConfigurableMaterial,
//Quantities
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
@DefaultAggregation: #NONE
BookQtyBfrCountInMatlBaseUnit,
PhysicalInventoryItemIsZero,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
@DefaultAggregation: #NONE
Quantity,
@ObjectModel.foreignKey.association: '_MaterialBaseUnit'
MaterialBaseUnit,
@Semantics.quantity.unitOfMeasure: 'UnitOfEntry'
@DefaultAggregation: #NONE
QuantityInUnitOfEntry,
@Semantics.quantity.unitOfMeasure: 'UnitOfEntry'
cast ((Quantity - BookQtyBfrCountInMatlBaseUnit) as pi_item_diff_qty_i_base_unit preserving type ) as DifferenceQuantityInBaseUnit,
@ObjectModel.foreignKey.association: '_UnitOfEntry'
UnitOfEntry,
//Amounts
@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.amount.currencyCode: 'Currency'
@DefaultAggregation: #NONE
cast(( case when IsValueOnlyMaterial = ''
then case when Quantity < BookQtyBfrCountInMatlBaseUnit
then cast( -DifferenceAmountInCoCodeCrcy as pi_item_diff_value )
else cast( DifferenceAmountInCoCodeCrcy as pi_item_diff_value )
end
else case when EnteredSlsAmtInCoCodeCrcy < SlsPriceAmountInCoCodeCrcy
then cast( -DifferenceAmountInCoCodeCrcy as pi_item_diff_value )
else cast( DifferenceAmountInCoCodeCrcy as pi_item_diff_value )
end
end) as pi_item_diff_value preserving type ) as DifferenceAmountInCoCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
@DefaultAggregation: #MAX
cast(DifferenceAmountInCoCodeCrcy as pi_item_max_diff_value preserving type ) as MaxAbsDiffAmountInCoCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
@DefaultAggregation: #MIN
cast(DifferenceAmountInCoCodeCrcy as pi_item_min_diff_value preserving type ) as MinAbsDiffAmountInCoCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
cast((EnteredSlsAmtInCoCodeCrcy - SlsPriceAmountInCoCodeCrcy) as pi_item_diff_sls_prc_co_cry2 preserving type ) as DiffSlsPrcAmtInCoCodeCrcy,
@DefaultAggregation: #SUM
cast( 1 as pi_number_of_items) as NumberOfPhysInvtryItems,
_WBSElement,
_AdjmtPostingMovementType,
_Material,
_ProductPlant,
_ProductStorageLocation,
_CrossPlantConfigurableMatl,
_MaterialBaseUnit,
_UnitOfEntry,
_Currency,
_Supplier,
_Customer,
_SalesOrder,
_SalesOrderItem,
_SalesOrderScheduleLine,
_Plant,
_StorageLocation,
_PhysInvtryDocHeader,
_PhysicalInventoryStockType,
_InventorySpecialStockType,
_ProductCategory,
_GoodsMovementType,
@Consumption.hidden: true
_SupplierCompanyByPlant,
@Consumption.hidden: true
_CustomerCompanyByPlant
}
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