R_InventoryPriceByKeyDateWide

DDL: R_INVENTORYPRICEBYKEYDATEWIDE Type: view_entity COMPOSITE Package: ODATA_ML_ACR_DISP

Inventory Price by key date

R_InventoryPriceByKeyDateWide is a Composite CDS View that provides data about "Inventory Price by key date" in SAP S/4HANA. It reads from 2 data sources (I_MatlValnSemKeyMappg, I_MaterialLedgerPrice) and exposes 34 fields with key fields CostEstimate, Ledger, CurrencyRole. It has 5 associations to related views. Part of development package ODATA_ML_ACR_DISP.

Data Sources (2)

SourceAliasJoin Type
I_MatlValnSemKeyMappg hd inner
I_MaterialLedgerPrice invprice from

Parameters (1)

NameTypeDefault
P_CalendarDate calendardate

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_MaterialLedgerPrice _StandardPrice _StandardPrice.CostEstimate = invprice.CostEstimate and _StandardPrice.Ledger = invprice.Ledger and _StandardPrice.CurrencyRole = invprice.CurrencyRole and _StandardPrice.MaterialPriceType = 'STDPR' and _StandardPrice.MaterialPriceSubtype = ' ' and _StandardPrice.MaterialPriceValidityStartDate <= $parameters.P_CalendarDate and _StandardPrice.MaterialPriceValidityEndDate >= $parameters.P_CalendarDate
[0..1] I_MaterialLedgerPrice _ActualPrice _ActualPrice.CostEstimate = invprice.CostEstimate and _ActualPrice.Ledger = invprice.Ledger and _ActualPrice.CurrencyRole = invprice.CurrencyRole and _ActualPrice.MaterialPriceType = 'ACT' and _ActualPrice.MaterialPriceSubtype = 'ACT' and _ActualPrice.MaterialPriceValidityStartDate <= $parameters.P_CalendarDate and _ActualPrice.MaterialPriceValidityEndDate >= $parameters.P_CalendarDate
[0..1] R_MatlLedgerValnCrcyRole _MLCurrencyInfo _MLCurrencyInfo.CompanyCode = invprice.CompanyCode and _MLCurrencyInfo.CurrencyRole = invprice.CurrencyRole and _MLCurrencyInfo.Ledger = invprice.Ledger
[0..1] I_CurrencyRole _CurrencyRole $projection.CurrencyRole = _CurrencyRole.CurrencyRole
[0..1] I_Ledger _Ledger $projection.Ledger = _Ledger.Ledger

Annotations (8)

NameValueLevelField
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Inventory Price by key date view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view

Fields (34)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate I_MaterialLedgerPrice CostEstimate Cost EstimateNo
KEY Ledger I_MaterialLedgerPrice Ledger Ledger
KEY CurrencyRole I_MaterialLedgerPrice CurrencyRole Curr./Val. Type
FiscalPeriod calendar FiscalPeriod Tax period
FiscalYear calendar FiscalYear G/L Fiscal Year
FiscalYearPeriod calendar FiscalYearPeriod Period/Year
Material I_MatlValnSemKeyMappg Material Vehicle Model
ValuationArea I_MatlValnSemKeyMappg ValuationArea Valuation Area
InventoryValuationType I_MatlValnSemKeyMappg InventoryValuationType Valuation Type
SalesOrder I_MatlValnSemKeyMappg SalesOrder SD Document
SalesOrderItem I_MatlValnSemKeyMappg SalesOrderItem Sales Order Item
Supplier I_MatlValnSemKeyMappg Supplier Supplier
WBSElementInternalID I_MatlValnSemKeyMappg WBSElementInternalID WBS Internal ID
CompanyCode I_MaterialLedgerPrice CompanyCode Receiver Company Code
ValuationQuantityUnit I_MaterialLedgerPrice ValuationQuantityUnit
BaseUnit I_MaterialLedgerPrice ValuationQuantityUnit
InventorySpecialStockType I_MatlValnSemKeyMappg InventorySpecialStockType Special Stock Type
InventorySpecialStockValnType I_MatlValnSemKeyMappg InventorySpecialStockValnType Valuation
IsSupplierStockValuation I_MatlValnSemKeyMappg IsSupplierStockValuation Vendor stk val.
PriceDeterminationControl I_MatlValnSemKeyMappg PriceDeterminationControl Price Determ.
MaterialPriceControl I_MaterialLedgerPrice MaterialPriceControl Price Control
MaterialPriceUnitQty I_MaterialLedgerPrice MaterialPriceUnitQty Price unit
Currency I_MaterialLedgerPrice Currency Valuation Crcy
InventoryPrice I_MaterialLedgerPrice MaterialPrice Inventory Price
ActualPrice _ActualPrice MaterialPrice Inventory Price
LedgerName _MLCurrencyInfo LedgerName Ledger Name
CurrencyRoleName _MLCurrencyInfo CurrencyRoleName
LegalCurrencyRole _MLCurrencyInfo LegalCurrencyRole
LegalCurrencyRoleName _MLCurrencyInfo LegalCurrencyRoleName
AccountingValuationView _MLCurrencyInfo AccountingValuationView
AcctgValnVwSubviewCombinedName _MLCurrencyInfo AcctgValnVwSubviewCombinedName
LedgerValnCrcyRoleIsUsedInLogs _MLCurrencyInfo LedgerValnCrcyRoleIsUsedInLogs Is Log. Curr. Type
_CurrencyRole _CurrencyRole
_Ledger _Ledger

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 R_InventoryPriceByKeyDateWide.
-- 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.
-- Parameters: P_CalendarDate : calendardate

CREATE VIEW R_InventoryPriceByKeyDateWide AS
SELECT
  invprice.CostEstimate AS CostEstimate,
  invprice.Ledger AS Ledger,
  invprice.CurrencyRole AS CurrencyRole,
  calendar.FiscalPeriod AS FiscalPeriod,
  calendar.FiscalYear AS FiscalYear,
  calendar.FiscalYearPeriod AS FiscalYearPeriod,
  hd.Material AS Material,
  hd.ValuationArea AS ValuationArea,
  hd.InventoryValuationType AS InventoryValuationType,
  hd.SalesOrder AS SalesOrder,
  hd.SalesOrderItem AS SalesOrderItem,
  hd.Supplier AS Supplier,
  hd.WBSElementInternalID AS WBSElementInternalID,
  invprice.CompanyCode AS CompanyCode,
  invprice.ValuationQuantityUnit AS ValuationQuantityUnit,
  invprice.ValuationQuantityUnit AS BaseUnit,
  hd.InventorySpecialStockType AS InventorySpecialStockType,
  hd.InventorySpecialStockValnType AS InventorySpecialStockValnType,
  hd.IsSupplierStockValuation AS IsSupplierStockValuation,
  hd.PriceDeterminationControl AS PriceDeterminationControl,
  invprice.MaterialPriceControl AS MaterialPriceControl,
  invprice.MaterialPriceUnitQty AS MaterialPriceUnitQty,
  invprice.Currency AS Currency,
  invprice.MaterialPrice AS InventoryPrice,
  _ActualPrice.MaterialPrice AS ActualPrice,
  _MLCurrencyInfo.LedgerName AS LedgerName,
  _MLCurrencyInfo.CurrencyRoleName AS CurrencyRoleName,
  _MLCurrencyInfo.LegalCurrencyRole AS LegalCurrencyRole,
  _MLCurrencyInfo.LegalCurrencyRoleName AS LegalCurrencyRoleName,
  _MLCurrencyInfo.AccountingValuationView AS AccountingValuationView,
  _MLCurrencyInfo.AcctgValnVwSubviewCombinedName AS AcctgValnVwSubviewCombinedName,
  _MLCurrencyInfo.LedgerValnCrcyRoleIsUsedInLogs AS LedgerValnCrcyRoleIsUsedInLogs
FROM I_MaterialLedgerPrice AS invprice
INNER JOIN I_MatlValnSemKeyMappg AS hd ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_MaterialLedgerPrice AS _StandardPrice ON _StandardPrice.CostEstimate = invprice.CostEstimate AND _StandardPrice.Ledger = invprice.Ledger AND _StandardPrice.CurrencyRole = invprice.CurrencyRole AND _StandardPrice.MaterialPriceType = 'STDPR' AND _StandardPrice.MaterialPriceSubtype = ' ' AND _StandardPrice.MaterialPriceValidityStartDate <= $parameters.P_CalendarDate AND _StandardPrice.MaterialPriceValidityEndDate >= $parameters.P_CalendarDate  -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _ActualPrice ON _ActualPrice.CostEstimate = invprice.CostEstimate AND _ActualPrice.Ledger = invprice.Ledger AND _ActualPrice.CurrencyRole = invprice.CurrencyRole AND _ActualPrice.MaterialPriceType = 'ACT' AND _ActualPrice.MaterialPriceSubtype = 'ACT' AND _ActualPrice.MaterialPriceValidityStartDate <= $parameters.P_CalendarDate AND _ActualPrice.MaterialPriceValidityEndDate >= $parameters.P_CalendarDate  -- association [0..1]
LEFT OUTER JOIN R_MatlLedgerValnCrcyRole AS _MLCurrencyInfo ON _MLCurrencyInfo.CompanyCode = invprice.CompanyCode AND _MLCurrencyInfo.CurrencyRole = invprice.CurrencyRole AND _MLCurrencyInfo.Ledger = invprice.Ledger  -- association [0..1]
LEFT OUTER JOIN I_CurrencyRole AS _CurrencyRole ON CurrencyRole = _CurrencyRole.CurrencyRole  -- association [0..1]
LEFT OUTER JOIN I_Ledger AS _Ledger ON Ledger = _Ledger.Ledger  -- association [0..1]
;