P_MatlLdgrPrByPrTypeNoTblFunc

DDL: P_MATLLDGRPRBYPRTYPENOTBLFUNC Type: view_entity COMPOSITE Package: ODATA_ML_MNTRMATLPRICES

Material Ledger Price by Price Type

P_MatlLdgrPrByPrTypeNoTblFunc is a Composite CDS View that provides data about "Material Ledger Price by Price Type" in SAP S/4HANA. It reads from 1 data source (P_MntrMatlPrWthoutTblFunc) and exposes 44 fields with key fields CostEstimate, MaterialPriceType, MaterialPriceSubtype, MaterialPriceValidityEndDate. It has 10 associations to related views. Part of development package ODATA_ML_MNTRMATLPRICES.

Data Sources (1)

SourceAliasJoin Type
P_MntrMatlPrWthoutTblFunc P_MntrMatlPrWthoutTblFunc from

Parameters (1)

NameTypeDefault
P_ValidOnDate fml_date_valid_on

Associations (10)

CardinalityTargetAliasCondition
[0..1] I_Plant _Plant $projection.ValuationArea = _Plant.Plant
[1..1] I_Product _Product $projection.Material = _Product.Product
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_MaterialPriceControl _MaterialPriceControl $projection.MaterialPriceControl = _MaterialPriceControl.MaterialPriceControl
[1..1] I_MaterialLedgerPriceType _PriceType $projection.MaterialPriceType = _PriceType.MaterialPriceType
[0..1] I_WBSElementBasicData _WBSElementBasicData $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
[0..1] I_InvtryValnSpecialStockType _InvtryValnSpecialStockType $projection.InvtryValnSpecialStockType = _InvtryValnSpecialStockType.InvtryValnSpecialStockType
[0..1] I_MatlPriceCostEstimateStage _MatlPriceCostEstimateStage $projection.MaterialPriceCostEstimateStage = _MatlPriceCostEstimateStage.MaterialPriceCostEstimateStage
[0..1] I_StkMatlPriceValuationType _StkMatlPriceValuationType $projection.StkMaterialPriceValuationType = _StkMatlPriceValuationType.StkMaterialPriceValuationType
[0..1] I_SlsOrdProjValnStrategyStdVH _SlsOrdProjValnStrategy $projection.CurPlanProjSlsOrdValnStrategy = _SlsOrdProjValnStrategy.SlsOrdProjValnStrategy

Annotations (7)

NameValueLevelField
EndUserText.label Material Ledger Price by Price Type view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (44)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate Cost EstimateNo
KEY MaterialPriceType MaterialPriceType Price Type
KEY MaterialPriceSubtype MaterialPriceSubtype
KEY MaterialPriceValidityEndDate
MatlPrcValdtyStrtFsclYearPerd
MatlPrcValdtyEndFsclYearPeriod
MatlPrcValidityStartFiscalYear MatlPrcValidityStartFiscalYear
MatlPrcValdtyStartFiscalPeriod MatlPrcValdtyStartFiscalPeriod
MatlPrcValidityEndFiscalYear MatlPrcValidityEndFiscalYear
MatlPrcValdtyEndFiscalPeriod MatlPrcValdtyEndFiscalPeriod
MaterialPriceControl Price Control
CurPlanProjSlsOrdValnStrategy
SlsOrdProjValnStrgyName _SlsOrdProjValnStrategy SlsOrdProjValnStrgyName
MaterialPriceCostEstimateStage MaterialPriceCostEstimateStage
Material Material Vehicle Model
ValuationArea ValuationArea Valuation Area
InventoryValuationType Valuation Type
CompanyCode CompanyCode Receiver Company Code
InvtryValnSpecialStockType InvtryValnSpecialStockType
SalesOrder SD Document
SalesOrderItem Sales Order Item
WBSElementInternalID WBS Internal ID
Supplier Supplier
StkMaterialPriceValuationType StkMaterialPriceValuationType
MaterialPriceExtRefCategory MaterialPriceExtRefCategory
MaterialPriceExtReference MaterialPriceExtReference
AmountInFreeDefinedCurrency1
AmountInFreeDefinedCurrency2
FreeDefinedCurrency1
FreeDefinedCurrency2
MatlLdgrPriceDifferenceAmount
Currency
MatlLdgrPrThresholdInPercent
ValidOnDate
_Plant _Plant
_Product _Product
_CompanyCode _CompanyCode
_MaterialPriceControl _MaterialPriceControl
_PriceType _PriceType
_WBSElementBasicData _WBSElementBasicData
_InvtryValnSpecialStockType _InvtryValnSpecialStockType
_MatlPriceCostEstimateStage _MatlPriceCostEstimateStage
_StkMatlPriceValuationType _StkMatlPriceValuationType
_SlsOrdProjValnStrategy _SlsOrdProjValnStrategy

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 P_MatlLdgrPrByPrTypeNoTblFunc.
-- 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_ValidOnDate : fml_date_valid_on

CREATE VIEW P_MatlLdgrPrByPrTypeNoTblFunc AS
SELECT
  cast(CostEstimate as fml_chmp_cost_estimate_number preserving type ) AS CostEstimate,
  MaterialPriceType,
  MaterialPriceSubtype,
  cast(MaterialPriceValidityEndDate as fml_date_to preserving type ) AS MaterialPriceValidityEndDate,
  cast( MatlPrcValdtyStrtFsclYearPerd as fml_from_period_year preserving type ) AS MatlPrcValdtyStrtFsclYearPerd,
  cast( MatlPrcValdtyEndFsclYearPeriod as fml_to_period_year preserving type ) AS MatlPrcValdtyEndFsclYearPeriod,
  MatlPrcValidityStartFiscalYear,
  MatlPrcValdtyStartFiscalPeriod,
  MatlPrcValidityEndFiscalYear,
  MatlPrcValdtyEndFiscalPeriod,
  cast(MaterialPriceControl as fml_mpchd_price_control preserving type ) AS MaterialPriceControl,
  cast(CurPlanProjSlsOrdValnStrategy as fml_chmp_lbwst preserving type ) AS CurPlanProjSlsOrdValnStrategy,
  _SlsOrdProjValnStrategy.SlsOrdProjValnStrgyName AS SlsOrdProjValnStrgyName,
  MaterialPriceCostEstimateStage,
  Material,
  ValuationArea,
  cast(InventoryValuationType as fml_mpchd_valuation_type preserving type ) AS InventoryValuationType,
  CompanyCode,
  InvtryValnSpecialStockType,
  cast(SalesOrder as vbeln preserving type ) AS SalesOrder,
  cast(SalesOrderItem as posnr preserving type ) AS SalesOrderItem,
  cast(WBSElementInternalID as ps_s4_pspnr preserving type ) AS WBSElementInternalID,
  cast(Supplier as lifnr preserving type ) AS Supplier,
  StkMaterialPriceValuationType,
  MaterialPriceExtRefCategory,
  MaterialPriceExtReference,
  cast(0 as fis_osl) AS AmountInFreeDefinedCurrency1,
  cast(0 as fis_vsl) AS AmountInFreeDefinedCurrency2,
  cast('' as fis_rocur) AS FreeDefinedCurrency1,
  cast('' as fis_rvcur) AS FreeDefinedCurrency2,
  cast(0 as fml_difference_price) AS MatlLdgrPriceDifferenceAmount,
  cast('' as waers) AS Currency,
  cast(0 as fml_threshold_in_percent) AS MatlLdgrPrThresholdInPercent,
  $parameters.P_ValidOnDate AS ValidOnDate
FROM P_MntrMatlPrWthoutTblFunc
LEFT OUTER JOIN I_Plant AS _Plant ON ValuationArea = _Plant.Plant  -- association [0..1]
LEFT OUTER JOIN I_Product AS _Product ON Material = _Product.Product  -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [1..1]
LEFT OUTER JOIN I_MaterialPriceControl AS _MaterialPriceControl ON MaterialPriceControl = _MaterialPriceControl.MaterialPriceControl  -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPriceType AS _PriceType ON MaterialPriceType = _PriceType.MaterialPriceType  -- association [1..1]
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElementBasicData ON WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID  -- association [0..1]
LEFT OUTER JOIN I_InvtryValnSpecialStockType AS _InvtryValnSpecialStockType ON InvtryValnSpecialStockType = _InvtryValnSpecialStockType.InvtryValnSpecialStockType  -- association [0..1]
LEFT OUTER JOIN I_MatlPriceCostEstimateStage AS _MatlPriceCostEstimateStage ON MaterialPriceCostEstimateStage = _MatlPriceCostEstimateStage.MaterialPriceCostEstimateStage  -- association [0..1]
LEFT OUTER JOIN I_StkMatlPriceValuationType AS _StkMatlPriceValuationType ON StkMaterialPriceValuationType = _StkMatlPriceValuationType.StkMaterialPriceValuationType  -- association [0..1]
LEFT OUTER JOIN I_SlsOrdProjValnStrategyStdVH AS _SlsOrdProjValnStrategy ON CurPlanProjSlsOrdValnStrategy = _SlsOrdProjValnStrategy.SlsOrdProjValnStrategy  -- association [0..1]
;