C_PhysInvtryProposal

DDL: C_PHYSINVTRYPROPOSAL Type: view_entity CONSUMPTION Package: ODATA_MM_IM_PI_MASS_CREATE

Proposals for new PI counts

C_PhysInvtryProposal is a Consumption CDS View that provides data about "Proposals for new PI counts" in SAP S/4HANA. It reads from 2 data sources (I_Plant, P_EnhPhysInvtryActvStkSepVal) and exposes 64 fields with key fields Plant, StorageLocation, Material, Batch, ValuationType. It has 22 associations to related views. Part of development package ODATA_MM_IM_PI_MASS_CREATE.

Data Sources (2)

SourceAliasJoin Type
I_Plant I_Plant inner
P_EnhPhysInvtryActvStkSepVal sep from

Associations (22)

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_Material _Material $projection.Material = _Material.Material
[0..1] I_Product _Product $projection.Material = _Product.Product
[0..1] I_Producttype _ProductType $projection.ProductType = _ProductType.ProductType
[0..1] I_ProductGroup _ProductGroup $projection.ProductGroup = _ProductGroup.MaterialGroup
[0..1] I_ProductStorageLocation _ProductStorageLocation $projection.Material = _ProductStorageLocation.Product and $projection.Plant = _ProductStorageLocation.Plant and $projection.StorageLocation = _ProductStorageLocation.StorageLocation
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[1..1] I_SupplierCompanyByPlant _SupplierCompanyByPlant $projection.Supplier = _SupplierCompanyByPlant.Supplier and $projection.Plant = _SupplierCompanyByPlant.Plant
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[1..1] I_CustomerCompanyByPlant _CustomerCompanyByPlant $projection.Customer = _CustomerCompanyByPlant.Customer and $projection.Plant = _CustomerCompanyByPlant.Plant
[0..1] I_InventoryStockType _InventoryStockType $projection.InventoryStockType = _InventoryStockType.InventoryStockType
[0..1] I_PhysInvtrySpecialStockTypeVH _PhysInvtrySpecialStockTypeVH $projection.InventorySpecialStockType = _PhysInvtrySpecialStockTypeVH.InventorySpecialStockType
[0..1] I_SalesOrder _SalesOrder $projection.SalesOrder = _SalesOrder.SalesOrder
[0..1] I_UnitOfMeasure _MaterialBaseUnit $projection.MaterialBaseUnit = _MaterialBaseUnit.UnitOfMeasure
[0..1] I_Currency _Currency $projection.CompanyCodeCurrency = _Currency.Currency
[0..1] I_WBSElementByInternalKey _WBSElement $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
[0..1] I_CurrentMatlValnPrice _Price _Price.Material = $projection.Material and I_Plant.ValuationArea = _Price.ValuationArea and sep.InventoryValuationType = _Price.InventoryValuationType and sep.InventorySpecialStockTypeVal = _Price.InvtryValnSpecialStockType and sep.SalesOrderVal = _Price.SalesOrder and sep.SalesOrderItemVal = _Price.SalesOrderItem and sep.WBSElementInternalIDVal = _Price.WBSElementInternalID and sep.Supplier = '' and _Price.CurrencyRole = '10' and -- _Price.PeriodType = 'LF' and ( sep.InventorySpecialStockType = '' or sep.InventorySpecialStockType = 'V' or sep.InventorySpecialStockType = 'W' or sep.InventorySpecialStockType = 'O' or sep.InventorySpecialStockValnType <> '' ) and _Price.LedgerValnCrcyRoleIsUsedInLogs = 'X'
[0..1] I_CycleCountingSettings _CycleCounting _CycleCounting.CycleCountType = $projection.CycleCountType and _CycleCounting.Plant = $projection.Plant
[1..1] I_Product _ProductExt $projection.Material = _ProductExt.Product
[1..1] I_ProductPlant _ProductPlant $projection.Material = _ProductPlant.Product and $projection.Plant = _ProductPlant.Plant
[1..1] I_Batch _Batch $projection.Material = _Batch.Material and $projection.Plant = _Batch.Plant and $projection.Batch = _Batch.Batch

Annotations (11)

NameValueLevelField
EndUserText.label Proposals for new PI counts view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.createEnabled false view
ObjectModel.updateEnabled false view
ObjectModel.deleteEnabled false view
VDM.private false view
VDM.viewType #CONSUMPTION view
Search.searchable true view

Fields (64)

KeyFieldSource TableSource FieldDescription
KEY Plant P_EnhPhysInvtryActvStkSepVal Plant Valuation Area
KEY StorageLocation P_EnhPhysInvtryActvStkSepVal StorageLocation StorageLocation
KEY Material P_EnhPhysInvtryActvStkSepVal Material Vehicle Model
KEY Batch P_EnhPhysInvtryActvStkSepVal RealProductBatch
KEY ValuationType
KEY Supplier P_EnhPhysInvtryActvStkSepVal Supplier Supplier
KEY SalesOrder P_EnhPhysInvtryActvStkSepVal SalesOrder SD Document
KEY SalesOrderItem P_EnhPhysInvtryActvStkSepVal SalesOrderItem Sales Order Item
KEY WBSElement P_EnhPhysInvtryActvStkSepVal WBSElement WBS Internal ID
KEY Customer P_EnhPhysInvtryActvStkSepVal Customer Sold-to Party
KEY StockOwner P_EnhPhysInvtryActvStkSepVal StockOwner Owner of stock
KEY InventoryStockType P_EnhPhysInvtryActvStkSepVal InventoryStockType Stock Type
KEY InventorySpecialStockType P_EnhPhysInvtryActvStkSepVal InventorySpecialStockType Special Stock Type
KEY MaterialIsPostedToStock P_EnhPhysInvtryActvStkSepVal MaterialIsPostedToStock
SearchForBatch P_EnhPhysInvtryActvStkSepVal Batch Lot No.
SearchForValuationType P_EnhPhysInvtryActvStkSepVal SearchForValuationType Valuation Type
MaterialBaseUnit P_EnhPhysInvtryActvStkSepVal MaterialBaseUnit Valuation Unit
CycleCountType P_EnhPhysInvtryActvStkSepVal CycleCountType Cycle Count Type
NmbrOfPhysInvtryPerFiscalYear P_EnhPhysInvtryActvStkSepVal NmbrOfPhysInvtryPerFiscalYear
PhysInvtryIntvlForCycCounting P_EnhPhysInvtryActvStkSepVal PhysInvtryIntvlForCycCounting
PhysInvtryFloatTimeCycCounting P_EnhPhysInvtryActvStkSepVal PhysInvtryFloatTimeCycCounting
WBSElementInternalID P_EnhPhysInvtryActvStkSepVal WBSElementInternalID WBS Internal ID
WBSDescription _WBSElement WBSDescription WBS Element Name
ProductType P_EnhPhysInvtryActvStkSepVal ProductType Material Type
ProductGroup P_EnhPhysInvtryActvStkSepVal ProductGroup Material Group
SerialIdentifierAssgmtProfile _ProductPlant SerialNumberProfile SerialNoProfile
WarehouseStorageBin _ProductStorageLocation WarehouseStorageBin Storage Bin
IsMarkedForDeletion _Product IsMarkedForDeletion Purch.org. data
MatlWrhsStkQtyInMatlBaseUnit
InventoryPrice
MaterialPriceUnitQty _Price MaterialPriceUnitQty Price unit
CompanyCodeCurrency P_EnhPhysInvtryActvStkSepVal CompanyCodeCurrency Local Currency
NumberOfPhysInventoryCounts P_EnhPhysInvtryActvStkSepVal NumberOfPhysInventoryCounts
NumberOfPInvAdjustmentsPerYear P_EnhPhysInvtryActvStkSepVal NumberOfPInvAdjustmentsPerYear
PInvDiffQtyPerYearInBaseUnit P_EnhPhysInvtryActvStkSepVal PInvDiffQtyPerYearInBaseUnit
PhysicalInventoryLastCountDate P_EnhPhysInvtryActvStkSepVal PhysicalInventoryLastCountDate Count Date
NmbrOfDaysSinceLastPInvCount P_EnhPhysInvtryActvStkSepVal NmbrOfDaysSinceLastPInvCount
PhysicalInventoryItemIsCounted P_EnhPhysInvtryActvStkSepVal PhysicalInventoryItemIsCounted Is Counted
NrOfGdsRcptSinceLastPInvCount P_EnhPhysInvtryActvStkSepVal NrOfGdsRcptSinceLastPInvCount
GdsRcptQtySinceLastCtInBsUnt P_EnhPhysInvtryActvStkSepVal GdsRcptQtySinceLastCtInBsUnt Received Quantity Since Last Count
AvgStkQtySinceLastCountInBsUnt
NrOfGoodsIssSinceLastPInvCount P_EnhPhysInvtryActvStkSepVal NrOfGoodsIssSinceLastPInvCount
GdsIssQtySinceLastCountInBsUnt P_EnhPhysInvtryActvStkSepVal GdsIssQtySinceLastCountInBsUnt Issued Quantity Since Last Count
UnitOfMeasure
_Plant _Plant
_StorageLocation _StorageLocation
_Supplier _Supplier
_Material _Material
_SupplierCompanyByPlant _SupplierCompanyByPlant
_Customer _Customer
_CustomerCompanyByPlant _CustomerCompanyByPlant
_PhysInvtrySpecialStockTypeVH _PhysInvtrySpecialStockTypeVH
_SalesOrder _SalesOrder
_MaterialBaseUnit _MaterialBaseUnit
_Currency _Currency
_WBSElement _WBSElement
_Product _Product
_ProductType _ProductType
_ProductGroup _ProductGroup
_InventoryStockType _InventoryStockType
_CycleCounting _CycleCounting
_ProductExt _ProductExt
_ProductPlant _ProductPlant
_Batch _Batch

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 C_PhysInvtryProposal.
-- 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 C_PhysInvtryProposal AS
SELECT
  sep.Plant AS Plant,
  sep.StorageLocation AS StorageLocation,
  sep.Material AS Material,
  sep.RealProductBatch AS Batch,
  cast(sep.InventoryValuationType as bwtar_d) AS ValuationType,
  sep.Supplier AS Supplier,
  sep.SalesOrder AS SalesOrder,
  sep.SalesOrderItem AS SalesOrderItem,
  sep.WBSElement AS WBSElement,
  sep.Customer AS Customer,
  sep.StockOwner AS StockOwner,
  sep.InventoryStockType AS InventoryStockType,
  sep.InventorySpecialStockType AS InventorySpecialStockType,
  sep.MaterialIsPostedToStock AS MaterialIsPostedToStock,
  sep.Batch AS SearchForBatch,
  sep.SearchForValuationType AS SearchForValuationType,
  sep.MaterialBaseUnit AS MaterialBaseUnit,
  sep.CycleCountType AS CycleCountType,
  sep.NmbrOfPhysInvtryPerFiscalYear AS NmbrOfPhysInvtryPerFiscalYear,
  sep.PhysInvtryIntvlForCycCounting AS PhysInvtryIntvlForCycCounting,
  sep.PhysInvtryFloatTimeCycCounting AS PhysInvtryFloatTimeCycCounting,
  sep.WBSElementInternalID AS WBSElementInternalID,
  _WBSElement.WBSDescription AS WBSDescription,
  sep.ProductType AS ProductType,
  sep.ProductGroup AS ProductGroup,
  _ProductPlant.SerialNumberProfile AS SerialIdentifierAssgmtProfile,
  _ProductStorageLocation.WarehouseStorageBin AS WarehouseStorageBin,
  _Product.IsMarkedForDeletion AS IsMarkedForDeletion,
  cast(sep.MatlWrhsStkQtyInMatlBaseUnit as pi_current_quantity) AS MatlWrhsStkQtyInMatlBaseUnit,
  cast(cast(_Price.InventoryPrice as abap.curr( 11, 2 )) as pi_inventory_price preserving type) AS InventoryPrice,
  _Price.MaterialPriceUnitQty AS MaterialPriceUnitQty,
  sep.CompanyCodeCurrency AS CompanyCodeCurrency,
  sep.NumberOfPhysInventoryCounts AS NumberOfPhysInventoryCounts,
  sep.NumberOfPInvAdjustmentsPerYear AS NumberOfPInvAdjustmentsPerYear,
  sep.PInvDiffQtyPerYearInBaseUnit AS PInvDiffQtyPerYearInBaseUnit,
  sep.PhysicalInventoryLastCountDate AS PhysicalInventoryLastCountDate,
  sep.NmbrOfDaysSinceLastPInvCount AS NmbrOfDaysSinceLastPInvCount,
  sep.PhysicalInventoryItemIsCounted AS PhysicalInventoryItemIsCounted,
  sep.NrOfGdsRcptSinceLastPInvCount AS NrOfGdsRcptSinceLastPInvCount,
  sep.GdsRcptQtySinceLastCtInBsUnt AS GdsRcptQtySinceLastCtInBsUnt,
  cast(round(sep.MatlWrhsStkQtyInMatlBaseUnit - cast( sep.AvgStkQtySinceLastCountCorrect as nsdm_stock_qty ), 3) as pi_average_book_quantity) AS AvgStkQtySinceLastCountInBsUnt,
  sep.NrOfGoodsIssSinceLastPInvCount AS NrOfGoodsIssSinceLastPInvCount,
  sep.GdsIssQtySinceLastCountInBsUnt AS GdsIssQtySinceLastCountInBsUnt,
  cast( cast( '10' as char3) as msehi) AS UnitOfMeasure
FROM P_EnhPhysInvtryActvStkSepVal AS sep
INNER JOIN I_Plant ON /* join condition not captured in parsed metadata */
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_Material AS _Material ON Material = _Material.Material  -- association [0..1]
LEFT OUTER JOIN I_Product AS _Product ON Material = _Product.Product  -- association [0..1]
LEFT OUTER JOIN I_Producttype AS _ProductType ON ProductType = _ProductType.ProductType  -- association [0..1]
LEFT OUTER JOIN I_ProductGroup AS _ProductGroup ON ProductGroup = _ProductGroup.MaterialGroup  -- association [0..1]
LEFT OUTER JOIN I_ProductStorageLocation AS _ProductStorageLocation ON Material = _ProductStorageLocation.Product AND Plant = _ProductStorageLocation.Plant AND StorageLocation = _ProductStorageLocation.StorageLocation  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_SupplierCompanyByPlant AS _SupplierCompanyByPlant ON Supplier = _SupplierCompanyByPlant.Supplier AND Plant = _SupplierCompanyByPlant.Plant  -- association [1..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_CustomerCompanyByPlant AS _CustomerCompanyByPlant ON Customer = _CustomerCompanyByPlant.Customer AND Plant = _CustomerCompanyByPlant.Plant  -- association [1..1]
LEFT OUTER JOIN I_InventoryStockType AS _InventoryStockType ON InventoryStockType = _InventoryStockType.InventoryStockType  -- association [0..1]
LEFT OUTER JOIN I_PhysInvtrySpecialStockTypeVH AS _PhysInvtrySpecialStockTypeVH ON InventorySpecialStockType = _PhysInvtrySpecialStockTypeVH.InventorySpecialStockType  -- association [0..1]
LEFT OUTER JOIN I_SalesOrder AS _SalesOrder ON SalesOrder = _SalesOrder.SalesOrder  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _MaterialBaseUnit ON MaterialBaseUnit = _MaterialBaseUnit.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _Currency ON CompanyCodeCurrency = _Currency.Currency  -- association [0..1]
LEFT OUTER JOIN I_WBSElementByInternalKey AS _WBSElement ON WBSElementInternalID = _WBSElement.WBSElementInternalID  -- association [0..1]
LEFT OUTER JOIN I_CurrentMatlValnPrice AS _Price ON _Price.Material = Material AND I_Plant.ValuationArea = _Price.ValuationArea AND sep.InventoryValuationType = _Price.InventoryValuationType AND sep.InventorySpecialStockTypeVal = _Price.InvtryValnSpecialStockType AND sep.SalesOrderVal = _Price.SalesOrder AND sep.SalesOrderItemVal = _Price.SalesOrderItem AND sep.WBSElementInternalIDVal = _Price.WBSElementInternalID AND sep.Supplier = '' AND _Price.CurrencyRole = '10' AND  -- association [0..1]
LEFT OUTER JOIN I_CycleCountingSettings AS _CycleCounting ON _CycleCounting.CycleCountType = CycleCountType AND _CycleCounting.Plant = Plant  -- association [0..1]
LEFT OUTER JOIN I_Product AS _ProductExt ON Material = _ProductExt.Product  -- association [1..1]
LEFT OUTER JOIN I_ProductPlant AS _ProductPlant ON Material = _ProductPlant.Product AND Plant = _ProductPlant.Plant  -- association [1..1]
LEFT OUTER JOIN I_Batch AS _Batch ON Material = _Batch.Material AND Plant = _Batch.Plant AND Batch = _Batch.Batch  -- association [1..1]
;