I_MatlLdgrPriceByTwoValuations

DDL: I_MATLLDGRPRICEBYTWOVALUATIONS Type: view_entity COMPOSITE Package: ODATA_ML_MNTRMATLPRICES

Compare two valuations

I_MatlLdgrPriceByTwoValuations is a Composite CDS View that provides data about "Compare two valuations" in SAP S/4HANA. It reads from 1 data source (R_MatlLdgrPriceByTwoValuations) and exposes 52 fields with key fields CostEstimate, MaterialPriceType, MaterialPriceSubtype, MaterialPriceValuation1StrtDt, MaterialPriceValuation1EndDate. Part of development package ODATA_ML_MNTRMATLPRICES.

Data Sources (1)

SourceAliasJoin Type
R_MatlLdgrPriceByTwoValuations R_MatlLdgrPriceByTwoValuations from

Parameters (5)

NameTypeDefault
P_MaterialLedgerLedger1 fins_ledger
P_MaterialLedgerCurrencyRole1 fins_ext_curtype
P_MaterialLedgerLedger2 fins_ledger
P_MaterialLedgerCurrencyRole2 fins_ext_curtype
P_ValidOnDate fml_date_valid_on

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Compare two valuations view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view

Fields (52)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate CostEstimate Cost EstimateNo
KEY MaterialPriceType MaterialPriceType Price Type
KEY MaterialPriceSubtype MaterialPriceSubtype
KEY MaterialPriceValuation1StrtDt MaterialPriceValuation1StrtDt
KEY MaterialPriceValuation1EndDate MaterialPriceValuation1EndDate
MaterialPriceValuation2StrtDt MaterialPriceValuation2StrtDt
MaterialPriceValuation2EndDate MaterialPriceValuation2EndDate
MaterialPriceControl MaterialPriceControl Price Control
CurPlanProjSlsOrdValnStrategy CurPlanProjSlsOrdValnStrategy
MaterialPriceCostEstimateStage MaterialPriceCostEstimateStage
Material Material Vehicle Model
ValuationArea ValuationArea Valuation Area
InventoryValuationType InventoryValuationType Valuation Type
CompanyCode CompanyCode Receiver Company Code
InvtryValnSpecialStockType InvtryValnSpecialStockType
SalesOrder SalesOrder SD Document
SalesOrderItem SalesOrderItem Sales Order Item
WBSElementInternalID WBSElementInternalID WBS Internal ID
Supplier Supplier Supplier
StkMaterialPriceValuationType StkMaterialPriceValuationType
MaterialPriceExtRefCategory MaterialPriceExtRefCategory
MaterialPriceExtReference MaterialPriceExtReference
SlsOrdProjValnStrgyName SlsOrdProjValnStrgyName
AmountInFreeDefinedCurrency1 AmountInFreeDefinedCurrency1 Amount in Freely Defined Currency 1
AmountInFreeDefinedCurrency2 AmountInFreeDefinedCurrency2 Amount in Freely Defined Currency 2
FreeDefinedCurrency1 FreeDefinedCurrency1 Freely Defined Currency 1
FreeDefinedCurrency2 FreeDefinedCurrency2 Freely Defined Currency 2
MatPriceUnitInFreeDefinedCrcy1 MatPriceUnitInFreeDefinedCrcy1
AdditionalQuantity1Unit AdditionalQuantity1Unit Add Unit Meas 1
MatPriceUnitInFreeDefinedCrcy2 MatPriceUnitInFreeDefinedCrcy2
AdditionalQuantity2Unit AdditionalQuantity2Unit Add Unit Meas 2
TotalValuatedStockAmount
TotalValuatedStockAmount2
FreeDefinedCurrency3
FreeDefinedCurrency4
FreeDefinedQuantity1
FreeDefinedQuantity1Unit
FreeDefinedQuantity2
FreeDefinedQuantity2Unit
MatlLdgrPrThresholdInPercent MatlLdgrPrThresholdInPercent
MatlLdgrPriceDifferenceAmount MatlLdgrPriceDifferenceAmount
Currency Currency Valuation Crcy
ValidOnDate
_CompanyCode _CompanyCode
_InvtryValnSpecialStockType _InvtryValnSpecialStockType
_Product _Product
_MaterialPriceControl _MaterialPriceControl
_MatlPriceCostEstimateStage _MatlPriceCostEstimateStage
_Plant _Plant
_PriceType _PriceType
_StkMatlPriceValuationType _StkMatlPriceValuationType
_WBSElementBasicData _WBSElementBasicData

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 I_MatlLdgrPriceByTwoValuations.
-- 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_MaterialLedgerLedger1 : fins_ledger, P_MaterialLedgerCurrencyRole1 : fins_ext_curtype, P_MaterialLedgerLedger2 : fins_ledger, P_MaterialLedgerCurrencyRole2 : fins_ext_curtype, P_ValidOnDate : fml_date_valid_on

CREATE VIEW I_MatlLdgrPriceByTwoValuations AS
SELECT
  CostEstimate,
  MaterialPriceType,
  MaterialPriceSubtype,
  MaterialPriceValuation1StrtDt,
  MaterialPriceValuation1EndDate,
  MaterialPriceValuation2StrtDt,
  MaterialPriceValuation2EndDate,
  MaterialPriceControl,
  CurPlanProjSlsOrdValnStrategy,
  MaterialPriceCostEstimateStage,
  Material,
  ValuationArea,
  InventoryValuationType,
  CompanyCode,
  InvtryValnSpecialStockType,
  SalesOrder,
  SalesOrderItem,
  WBSElementInternalID,
  Supplier,
  StkMaterialPriceValuationType,
  MaterialPriceExtRefCategory,
  MaterialPriceExtReference,
  SlsOrdProjValnStrgyName,
  AmountInFreeDefinedCurrency1,
  AmountInFreeDefinedCurrency2,
  FreeDefinedCurrency1,
  FreeDefinedCurrency2,
  MatPriceUnitInFreeDefinedCrcy1,
  AdditionalQuantity1Unit,
  MatPriceUnitInFreeDefinedCrcy2,
  AdditionalQuantity2Unit,
  _TotalValuatedStockAmount1(P_ValidOnDate: $parameters.P_ValidOnDate).TotalValuatedStockAmount AS TotalValuatedStockAmount,
  _TotalValuatedStockAmount2(P_ValidOnDate: $parameters.P_ValidOnDate).TotalValuatedStockAmount AS TotalValuatedStockAmount2,
  _TotalValuatedStockAmount1(P_ValidOnDate: $parameters.P_ValidOnDate).Currency AS FreeDefinedCurrency3,
  _TotalValuatedStockAmount2(P_ValidOnDate: $parameters.P_ValidOnDate).Currency AS FreeDefinedCurrency4,
  cast(_TotalValuatedStockAmount1(P_ValidOnDate: $parameters.P_ValidOnDate).ValuationQuantity as fin_qtyval) AS FreeDefinedQuantity1,
  _TotalValuatedStockAmount1(P_ValidOnDate: $parameters.P_ValidOnDate).UnitOfMeasure AS FreeDefinedQuantity1Unit,
  cast(_TotalValuatedStockAmount2(P_ValidOnDate: $parameters.P_ValidOnDate).ValuationQuantity as fin_qtyval) AS FreeDefinedQuantity2,
  _TotalValuatedStockAmount2(P_ValidOnDate: $parameters.P_ValidOnDate).UnitOfMeasure AS FreeDefinedQuantity2Unit,
  MatlLdgrPrThresholdInPercent,
  MatlLdgrPriceDifferenceAmount,
  Currency,
  $parameters.P_ValidOnDate AS ValidOnDate
FROM R_MatlLdgrPriceByTwoValuations
;