Deprecated
This CDS view is deprecated in S/4HANA. View all deprecated CDS views →

P_Ml_Prices_Ckml

DDL: P_ML_PRICES_CKML SQL: PMLPRICESCKML Type: view BASIC

P_Ml_Prices_Ckml is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (ckmlcr, ckmlhd, ckmlpr, prps) and exposes 33 fields with key fields CostEstimate, CurrencyRole, FiscalYear, FiscalPeriod.

Data Sources (4)

SourceAliasJoin Type
ckmlcr cr left_outer
ckmlhd hd left_outer
ckmlpr pr from
prps ps left_outer

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PMLPRICESCKML view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #BASIC view
VDM.lifecycle.status #DEPRECATED view

Fields (33)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate ckmlpr kalnr ProdCostEst.No.
KEY CurrencyRole ckmlpr curtp Valuation Area
KEY FiscalYear ckmlcr bdatj Year
KEY FiscalPeriod ckmlcr poper Posting periods
Material ckmlhd matnr Vehicle Model
ValuationArea ckmlhd bwkey Valuation Area
InventoryValuationType ckmlhd bwtar Valuation Type
SalesOrder ckmlhd vbeln SD Sched. Agmt
SalesOrderItem ckmlhd posnr WBS Element
Supplier ckmlhd lifnr Vendor no.
WBSElementInternalID ckmlhd pspnr WBS Element
WBSElement prps posid WBS Element
InvtryValnSpecialStockType ckmlhd sobkz Special Stock
InventorySpecialStockValnType ckmlhd kzbws Valuation
IsSupplierStockValuation ckmlhd xobew Vendor stk val.
FiscalYearPeriod
PriceDeterminationControl ckmlhd mlast Price Determ.
MaterialPriceControl ckmlcr vprsv Price control
MaterialPriceUnitQty ckmlcr peinh Unit of measure
Currency ckmlcr waers Transaction Currency
MovingAveragePrice ckmlcr pvprs Per. Unit Price
StandardPrice ckmlcr 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_Ml_Prices_Ckml.
-- 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: PMLPRICESCKML

CREATE VIEW P_Ml_Prices_Ckml 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,
  hd.pspnr AS WBSElementInternalID,
  ps.posid AS WBSElement,
  hd.sobkz AS InvtryValnSpecialStockType,
  hd.kzbws AS InventorySpecialStockValnType,
  hd.xobew AS IsSupplierStockValuation,
  concat(cr.bdatj, cr.poper) 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
LEFT OUTER JOIN ckmlhd AS hd ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN ckmlcr AS cr ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN prps AS ps ON /* join condition not captured in parsed metadata */
;