P_MAPPEDPHYSINVTRYITEM
PI Items with mapped stock type
P_MAPPEDPHYSINVTRYITEM is a CDS View in S/4HANA. PI Items with mapped stock type. It contains 13 fields. 3 CDS views read from this table.
CDS Views using this table (3)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_PhysInvtryActvStkSeparator | view_entity | left_outer | COMPOSITE | Active stock separators for which a PI count can be done |
| P_PhysInvtryDocItemPerYear | view_entity | from | COMPOSITE | PI Difference per year |
| P_PhysInvtryKeyFiguresBase | view_entity | from | COMPOSITE | Basis for the calc. of PI Key Figures for a Stock Sep. Comb. |
Fields (13)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | Batch | Batch | 1 |
| KEY | Customer | Customer | 1 |
| KEY | InventorySpecialStockType | InventorySpecialStockType | 1 |
| KEY | InventoryStockType | InventoryStockType | 1 |
| KEY | Material | Material | 1 |
| KEY | MaterialBaseUnit | MaterialBaseUnit | 1 |
| KEY | Plant | Plant | 1 |
| KEY | SalesOrder | SalesOrder | 1 |
| KEY | SalesOrderItem | SalesOrderItem | 1 |
| KEY | StockOwner | StockOwner | 1 |
| KEY | StorageLocation | StorageLocation | 1 |
| KEY | Supplier | Supplier | 1 |
| KEY | WBSElementInternalID | WBSElementInternalID | 1 |
@AccessControl.authorizationCheck: #NOT_ALLOWED
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view entity P_MappedPhysInvtryItem as select from P_PhysInvtryDocItem {
key PhysicalInventoryDocument,
key FiscalYear,
key PhysicalInventoryDocumentItem,
Material,
Plant,
StorageLocation,
Batch,
InventorySpecialStockType,
cast(case when PhysicalInventoryStockType = '1' then '01'
when PhysicalInventoryStockType = '2' then '02'
when PhysicalInventoryStockType = '4' then '07'
when PhysicalInventoryStockType = '' then ( case when IsValueOnlyMaterial = 'X' then '01' else cast( '' as nsdm_lbbsa ) end )
else cast( '' as nsdm_lbbsa ) end as nsdm_lbbsa ) as InventoryStockType,
SalesOrder,
SalesOrderItem,
ScheduleLine,
Supplier,
Customer,
StockOwner,
WBSElementInternalID,
MaterialBaseUnit,
PhysicalInventoryLastCountDate,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
Quantity,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
BookQtyBfrCountInMatlBaseUnit,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
DifferenceQuantityInBaseUnit,
@Semantics.amount.currencyCode: 'Currency'
DifferenceAmountInCoCodeCrcy,
Currency,
PhysicalInventoryItemIsCounted,
PhysInvtryDifferenceIsPosted,
PhysInvtryItemIsRecounted,
PhysInvtryItemIsDeleted
} where PhysicalInventoryStockType <> '3'