P_MaterialLedgerPriceCmptblty

DDL: P_MATERIALLEDGERPRICECMPTBLTY SQL: PMLPRICECMP Type: view BASIC

P_MaterialLedgerPriceCmptblty is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (ckmlpr) and exposes 33 fields with key fields CostEstimate, CurrencyRole, FiscalYear, FiscalPeriod.

Data Sources (1)

SourceAliasJoin Type
ckmlpr pr from

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PMLPRICECMP view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #BASIC view

Fields (33)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate ckmlpr kalnr ProdCostEst.No.
KEY CurrencyRole ckmlpr curtp Valuation Area
KEY FiscalYear cr bdatj Year
KEY FiscalPeriod cr poper Posting periods
Material hd matnr Vehicle Model
ValuationArea hd bwkey Valuation Area
InventoryValuationType hd bwtar Valuation Type
SalesOrder hd vbeln SD Sched. Agmt
SalesOrderItem hd posnr WBS Element
Supplier hd lifnr Vendor no.
WBSElementInternalID ps WBSElementInternalID WBS Internal ID
WBSElementExternalID ps WBSElementExternalID WBS Element External ID
InvtryValnSpecialStockType hd sobkz Special Stock
InventorySpecialStockValnType hd kzbws Valuation
IsSupplierStockValuation hd xobew Vendor stk val.
FiscalYearPeriod
PriceDeterminationControl hd mlast Price Determ.
MaterialPriceControl cr vprsv Price control
MaterialPriceUnitQty cr peinh Unit of measure
Currency cr waers Transaction Currency
MovingAveragePrice cr pvprs Per. Unit Price
StandardPrice cr stprs Standard price
stprs0endasInventoryPrice
CurrentPlanPrice ckmlpr lplpr Curr.Plnd Price
FuturePrice ckmlpr zkprs Future Price
FuturePriceValidityStartDate ckmlpr zprsdat Fut. Price From
PlannedPrice
FutrCostEstValuationVariant ckmlpr bwva1 Valuation Var.
FutureCostEstFiscalYear ckmlpr pdatz Fut. FYyear
FutureCostEstimateFiscalPeriod ckmlpr pprdz Posting Period
FutureCostEstCostingVersion ckmlpr vers1 Late Completion
FutrPlanProjSlsOrdValnStrategy ckmlpr zbwst Fut. Valn Strat.
FixedPortionOfPlannedPrice

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_MaterialLedgerPriceCmptblty.
-- 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.
-- SQL view name: PMLPRICECMP

CREATE VIEW P_MaterialLedgerPriceCmptblty AS
SELECT
  pr.kalnr AS CostEstimate,
  pr.curtp AS CurrencyRole,
  cr.bdatj AS FiscalYear,
  cr.poper AS FiscalPeriod,
  hd.matnr AS Material,
  hd.bwkey AS ValuationArea,
  hd.bwtar AS InventoryValuationType,
  hd.vbeln AS SalesOrder,
  hd.posnr AS SalesOrderItem,
  hd.lifnr AS Supplier,
  ps.WBSElementInternalID AS WBSElementInternalID,
  ps.WBSElementExternalID AS WBSElementExternalID,
  hd.sobkz AS InvtryValnSpecialStockType,
  hd.kzbws AS InventorySpecialStockValnType,
  hd.xobew AS IsSupplierStockValuation,
  cast(concat(cr.bdatj, cr.poper) as fis_jahrper_conv) AS FiscalYearPeriod,
  hd.mlast AS PriceDeterminationControl,
  cr.vprsv AS MaterialPriceControl,
  cr.peinh AS MaterialPriceUnitQty,
  cr.waers AS Currency,
  cr.pvprs AS MovingAveragePrice,
  cr.stprs AS StandardPrice,
  case cr.vprsv when 'S' then COALESCE(cr.stprs, 0) when 'V' then COALESCE(cr.pvprs, 0) else COALESCE(cr.stprs, 0) end as InventoryPrice AS stprs0endasInventoryPrice,
  pr.lplpr AS CurrentPlanPrice,
  pr.zkprs AS FuturePrice,
  pr.zprsdat AS FuturePriceValidityStartDate,
  cast(pr.zplpr as fml_plpr) AS PlannedPrice,
  pr.bwva1 AS FutrCostEstValuationVariant,
  pr.pdatz AS FutureCostEstFiscalYear,
  pr.pprdz AS FutureCostEstimateFiscalPeriod,
  pr.vers1 AS FutureCostEstCostingVersion,
  pr.zbwst AS FutrPlanProjSlsOrdValnStrategy,
  cast(pr.fplpx as fml_plpx) AS FixedPortionOfPlannedPrice
FROM ckmlpr AS pr
;