P_MlPrice_By_Periodtype
P_MlPrice_By_Periodtype is a Composite CDS View in SAP S/4HANA. It reads from 9 data sources and exposes 102 fields with key fields CostEstimate, Ledger, CurrencyRole, FiscalYear, FiscalPeriod. It has 4 associations to related views.
Data Sources (9)
| Source | Alias | Join Type |
|---|---|---|
| ckmlhd | hd | inner |
| ckmlhd | hd | inner |
| ckmlhd | hd | inner |
| I_MaterialLedgerPrice | invprice | from |
| I_MaterialLedgerPrice | invprice | union_all |
| I_MaterialLedgerPrice | invprice | union_all |
| I_MatlCtrlRecdLdgrFiscalPeriod | marvld | inner |
| I_MatlCtrlRecdLdgrFiscalPeriod | marvld | inner |
| I_MatlCtrlRecdLdgrFiscalPeriod | marvld | inner |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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.MatlPrcValdtyStrtFsclYearPerd <= marvld.CurrentFiscalYearPeriod and _ActualPrice.MatlPrcValdtyEndFsclYearPeriod >= marvld.CurrentFiscalYearPeriod |
| [0..1] | I_MaterialLedgerPrice | _MvgAvgPrice | _MvgAvgPrice.CostEstimate = invprice.CostEstimate and _MvgAvgPrice.Ledger = invprice.Ledger and _MvgAvgPrice.CurrencyRole = invprice.CurrencyRole and _MvgAvgPrice.MaterialPriceType = 'MAP' and _MvgAvgPrice.MaterialPriceSubtype = ' ' and _MvgAvgPrice.MatlPrcValdtyStrtFsclYearPerd <= marvld.CurrentFiscalYearPeriod and _MvgAvgPrice.MatlPrcValdtyEndFsclYearPeriod >= marvld.CurrentFiscalYearPeriod |
| [0..1] | I_MaterialLedgerPrice | _FuturePrice | _FuturePrice.CostEstimate = invprice.CostEstimate and _FuturePrice.Ledger = invprice.Ledger and _FuturePrice.CurrencyRole = invprice.CurrencyRole and _FuturePrice.MaterialPriceType = 'FUTURE' and _FuturePrice.MaterialPriceSubtype = ' ' and _FuturePrice.MaterialPriceValidityStartDate <= $session.system_date and _FuturePrice.MaterialPriceValidityEndDate >= $session.system_date |
| [0..1] | I_MLPrExtRefCostEstimate | _FutureStdPrice | _FutureStdPrice.CostEstimate = invprice.CostEstimate and _FutureStdPrice.Ledger = invprice.Ledger and _FutureStdPrice.CurrencyRole = invprice.CurrencyRole and _FutureStdPrice.MaterialPriceType = 'FSTDCE' and _FutureStdPrice.MaterialPriceSubtype = ' ' and _FutureStdPrice.MaterialPriceValidityStartDate <= $session.system_date and _FutureStdPrice.MaterialPriceValidityEndDate >= $session.system_date |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PFMLTPRICEPTYPE | 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 | #COMPOSITE | view |
Fields (102)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CostEstimate | I_MaterialLedgerPrice | CostEstimate | Cost EstimateNo |
| KEY | Ledger | I_MaterialLedgerPrice | Ledger | Ledger |
| KEY | CurrencyRole | I_MaterialLedgerPrice | CurrencyRole | Curr./Val. Type |
| KEY | FiscalYear | I_MatlCtrlRecdLdgrFiscalPeriod | CurrentFiscalYear | |
| KEY | FiscalPeriod | I_MatlCtrlRecdLdgrFiscalPeriod | CurrentFiscalPeriod | |
| KEY | PeriodType | |||
| KEY | FiscalPeriodType | |||
| MatlPrcValdtyStrtFsclYearPerd | I_MaterialLedgerPrice | MatlPrcValdtyStrtFsclYearPerd | ||
| Material | I_MaterialLedgerPrice | Material | Vehicle Model | |
| ValuationArea | I_MaterialLedgerPrice | ValuationArea | Valuation Area | |
| InventoryValuationType | I_MaterialLedgerPrice | InventoryValuationType | Valuation Type | |
| SalesOrder | ckmlhd | vbeln | SD Sched. Agmt | |
| SalesOrderItem | ckmlhd | posnr | WBS Element | |
| Supplier | ckmlhd | lifnr | Vendor no. | |
| WBSElementInternalID | ps | WBSElementInternalID | WBS Internal ID | |
| WBSElementExternalID | ps | WBSElementExternalID | WBS Element External ID | |
| InvtryValnSpecialStockType | ckmlhd | sobkz | Special Stock | |
| InventorySpecialStockValnType | ckmlhd | kzbws | Valuation | |
| IsSupplierStockValuation | ckmlhd | xobew | Vendor stk val. | |
| CompanyCode | I_MaterialLedgerPrice | CompanyCode | Receiver Company Code | |
| PriceDeterminationControl | ckmlhd | mlast | Price Determ. | |
| MaterialPriceControl | I_MaterialLedgerPrice | MaterialPriceControl | Price Control | |
| MaterialPriceUnitQty | I_MaterialLedgerPrice | MaterialPriceUnitQty | Price unit | |
| Currency | I_MaterialLedgerPrice | Currency | Valuation Crcy | |
| MaterialPrice0endasMovingAveragePrice | ||||
| InventoryPrice | I_MaterialLedgerPrice | MaterialPrice | Inventory Price | |
| FuturePrice | _FuturePrice | MaterialPrice | Inventory Price | |
| FuturePriceValidityStartDate | _FuturePrice | MaterialPriceValidityStartDate | ||
| PlannedPrice | _FutureStdPrice | MaterialPrice | Inventory Price | |
| FutrCostEstValuationVariant | _FutureStdPrice | ValuationVariant | ||
| FutureCostEstFiscalYear | _FutureStdPrice | MatlPrcValidityStartFiscalYear | ||
| FutureCostEstimateFiscalPeriod | _FutureStdPrice | MatlPrcValdtyStartFiscalPeriod | ||
| FutureCostEstCostingVersion | _FutureStdPrice | CostingVersion | ||
| FixedPortionOfPlannedPrice | _FutureStdPrice | FixedPortionOfMaterialPrice | ||
| CostEstimateasCostEstimate | ||||
| KEY | Ledger | I_MaterialLedgerPrice | Ledger | Ledger |
| KEY | CurrencyRole | I_MaterialLedgerPrice | CurrencyRole | Curr./Val. Type |
| KEY | FiscalYear | I_MatlCtrlRecdLdgrFiscalPeriod | PreviousFiscalPeriodFiscalYear | |
| KEY | FiscalPeriod | I_MatlCtrlRecdLdgrFiscalPeriod | PreviousFiscalPeriod | |
| KEY | PeriodType | |||
| KEY | FiscalPeriodType | |||
| MatlPrcValdtyStrtFsclYearPerd | I_MaterialLedgerPrice | MatlPrcValdtyStrtFsclYearPerd | ||
| Material | I_MaterialLedgerPrice | Material | Vehicle Model | |
| ValuationArea | I_MaterialLedgerPrice | ValuationArea | Valuation Area | |
| InventoryValuationType | I_MaterialLedgerPrice | InventoryValuationType | Valuation Type | |
| SalesOrder | ckmlhd | vbeln | SD Sched. Agmt | |
| SalesOrderItem | ckmlhd | posnr | WBS Element | |
| Supplier | ckmlhd | lifnr | Vendor no. | |
| WBSElementInternalID | ps | WBSElementInternalID | WBS Internal ID | |
| WBSElementExternalID | ps | WBSElementExternalID | WBS Element External ID | |
| InvtryValnSpecialStockType | ckmlhd | sobkz | Special Stock | |
| InventorySpecialStockValnType | ckmlhd | kzbws | Valuation | |
| IsSupplierStockValuation | ckmlhd | xobew | Vendor stk val. | |
| CompanyCode | I_MaterialLedgerPrice | CompanyCode | Receiver Company Code | |
| PriceDeterminationControl | ckmlhd | mlast | Price Determ. | |
| MaterialPriceControl | I_MaterialLedgerPrice | MaterialPriceControl | Price Control | |
| MaterialPriceUnitQty | I_MaterialLedgerPrice | MaterialPriceUnitQty | Price unit | |
| Currency | I_MaterialLedgerPrice | Currency | Valuation Crcy | |
| MaterialPrice0endasMovingAveragePrice | ||||
| InventoryPrice | I_MaterialLedgerPrice | MaterialPrice | Inventory Price | |
| FuturePrice | _FuturePrice | MaterialPrice | Inventory Price | |
| FuturePriceValidityStartDate | _FuturePrice | MaterialPriceValidityStartDate | ||
| PlannedPrice | _FutureStdPrice | MaterialPrice | Inventory Price | |
| FutrCostEstValuationVariant | _FutureStdPrice | ValuationVariant | ||
| FutureCostEstFiscalYear | _FutureStdPrice | MatlPrcValidityStartFiscalYear | ||
| FutureCostEstimateFiscalPeriod | _FutureStdPrice | MatlPrcValdtyStartFiscalPeriod | ||
| FutureCostEstCostingVersion | _FutureStdPrice | CostingVersion | ||
| FixedPortionOfPlannedPrice | _FutureStdPrice | FixedPortionOfMaterialPrice | ||
| CostEstimateasCostEstimate | ||||
| KEY | Ledger | I_MaterialLedgerPrice | Ledger | Ledger |
| KEY | CurrencyRole | I_MaterialLedgerPrice | CurrencyRole | Curr./Val. Type |
| KEY | FiscalYear | I_MatlCtrlRecdLdgrFiscalPeriod | PreviousFiscalYear | |
| KEY | FiscalPeriod | I_MatlCtrlRecdLdgrFiscalPeriod | PrevFiscalYearLastFiscalPeriod | |
| KEY | PeriodType | |||
| KEY | FiscalPeriodType | |||
| MatlPrcValdtyStrtFsclYearPerd | I_MaterialLedgerPrice | MatlPrcValdtyStrtFsclYearPerd | ||
| Material | I_MaterialLedgerPrice | Material | Vehicle Model | |
| ValuationArea | I_MaterialLedgerPrice | ValuationArea | Valuation Area | |
| InventoryValuationType | I_MaterialLedgerPrice | InventoryValuationType | Valuation Type | |
| SalesOrder | ckmlhd | vbeln | SD Sched. Agmt | |
| SalesOrderItem | ckmlhd | posnr | WBS Element | |
| Supplier | ckmlhd | lifnr | Vendor no. | |
| WBSElementInternalID | ps | WBSElementInternalID | WBS Internal ID | |
| WBSElementExternalID | ps | WBSElementExternalID | WBS Element External ID | |
| InvtryValnSpecialStockType | ckmlhd | sobkz | Special Stock | |
| InventorySpecialStockValnType | ckmlhd | kzbws | Valuation | |
| IsSupplierStockValuation | ckmlhd | xobew | Vendor stk val. | |
| CompanyCode | I_MaterialLedgerPrice | CompanyCode | Receiver Company Code | |
| PriceDeterminationControl | ckmlhd | mlast | Price Determ. | |
| MaterialPriceControl | I_MaterialLedgerPrice | MaterialPriceControl | Price Control | |
| MaterialPriceUnitQty | I_MaterialLedgerPrice | MaterialPriceUnitQty | Price unit | |
| Currency | I_MaterialLedgerPrice | Currency | Valuation Crcy | |
| MaterialPrice0endasMovingAveragePrice | ||||
| InventoryPrice | I_MaterialLedgerPrice | MaterialPrice | Inventory Price | |
| FuturePrice | _FuturePrice | MaterialPrice | Inventory Price | |
| FuturePriceValidityStartDate | _FuturePrice | MaterialPriceValidityStartDate | ||
| PlannedPrice | _FutureStdPrice | MaterialPrice | Inventory Price | |
| FutrCostEstValuationVariant | _FutureStdPrice | ValuationVariant | ||
| FutureCostEstFiscalYear | _FutureStdPrice | MatlPrcValidityStartFiscalYear | ||
| FutureCostEstimateFiscalPeriod | _FutureStdPrice | MatlPrcValdtyStartFiscalPeriod | ||
| FutureCostEstCostingVersion | _FutureStdPrice | CostingVersion | ||
| FixedPortionOfPlannedPrice | _FutureStdPrice | FixedPortionOfMaterialPrice |
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_MlPrice_By_Periodtype.
-- 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: PFMLTPRICEPTYPE
CREATE VIEW P_MlPrice_By_Periodtype AS
SELECT
invprice.CostEstimate AS CostEstimate,
invprice.Ledger AS Ledger,
invprice.CurrencyRole AS CurrencyRole,
marvld.CurrentFiscalYear AS FiscalYear,
marvld.CurrentFiscalPeriod AS FiscalPeriod,
'LF' AS PeriodType,
'LF' AS FiscalPeriodType,
invprice.MatlPrcValdtyStrtFsclYearPerd AS MatlPrcValdtyStrtFsclYearPerd,
invprice.Material AS Material,
invprice.ValuationArea AS ValuationArea,
invprice.InventoryValuationType 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,
invprice.CompanyCode AS CompanyCode,
hd.mlast AS PriceDeterminationControl,
invprice.MaterialPriceControl AS MaterialPriceControl,
invprice.MaterialPriceUnitQty AS MaterialPriceUnitQty,
invprice.Currency AS Currency,
case invprice.MaterialPriceControl when 'S' then case hd.mlast when '2' then coalesce(_MvgAvgPrice.MaterialPrice, 0) when '3' then coalesce(_ActualPrice.MaterialPrice, 0) else cast (0 as fml_price ) end else coalesce(invprice.MaterialPrice, 0) end as MovingAveragePrice AS MaterialPrice0endasMovingAveragePrice,
invprice.MaterialPrice AS InventoryPrice,
_FuturePrice.MaterialPrice AS FuturePrice,
_FuturePrice.MaterialPriceValidityStartDate AS FuturePriceValidityStartDate,
_FutureStdPrice.MaterialPrice AS PlannedPrice,
_FutureStdPrice.ValuationVariant AS FutrCostEstValuationVariant,
_FutureStdPrice.MatlPrcValidityStartFiscalYear AS FutureCostEstFiscalYear,
_FutureStdPrice.MatlPrcValdtyStartFiscalPeriod AS FutureCostEstimateFiscalPeriod,
_FutureStdPrice.CostingVersion AS FutureCostEstCostingVersion,
_FutureStdPrice.FixedPortionOfMaterialPrice AS FixedPortionOfPlannedPrice,
hd.price_sdm_yearper AS CostEstimateasCostEstimate
FROM I_MaterialLedgerPrice AS invprice
INNER JOIN ckmlhd AS hd ON /* join condition not captured in parsed metadata */
INNER JOIN I_MatlCtrlRecdLdgrFiscalPeriod AS marvld ON /* join condition not captured in parsed metadata */
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.MatlPrcValdtyStrtFsclYearPerd <= marvld.CurrentFiscalYearPeriod AND _ActualPrice.MatlPrcValdtyEndFsclYearPeriod >= marvld.CurrentFiscalYearPeriod -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _MvgAvgPrice ON _MvgAvgPrice.CostEstimate = invprice.CostEstimate AND _MvgAvgPrice.Ledger = invprice.Ledger AND _MvgAvgPrice.CurrencyRole = invprice.CurrencyRole AND _MvgAvgPrice.MaterialPriceType = 'MAP' AND _MvgAvgPrice.MaterialPriceSubtype = ' ' AND _MvgAvgPrice.MatlPrcValdtyStrtFsclYearPerd <= marvld.CurrentFiscalYearPeriod AND _MvgAvgPrice.MatlPrcValdtyEndFsclYearPeriod >= marvld.CurrentFiscalYearPeriod -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _FuturePrice ON _FuturePrice.CostEstimate = invprice.CostEstimate AND _FuturePrice.Ledger = invprice.Ledger AND _FuturePrice.CurrencyRole = invprice.CurrencyRole AND _FuturePrice.MaterialPriceType = 'FUTURE' AND _FuturePrice.MaterialPriceSubtype = ' ' AND _FuturePrice.MaterialPriceValidityStartDate <= $session.system_date AND _FuturePrice.MaterialPriceValidityEndDate >= $session.system_date -- association [0..1]
LEFT OUTER JOIN I_MLPrExtRefCostEstimate AS _FutureStdPrice ON _FutureStdPrice.CostEstimate = invprice.CostEstimate AND _FutureStdPrice.Ledger = invprice.Ledger AND _FutureStdPrice.CurrencyRole = invprice.CurrencyRole AND _FutureStdPrice.MaterialPriceType = 'FSTDCE' AND _FutureStdPrice.MaterialPriceSubtype = ' ' AND _FutureStdPrice.MaterialPriceValidityStartDate <= $session.system_date AND _FutureStdPrice.MaterialPriceValidityEndDate >= $session.system_date -- association [0..1]
-- UNION ALL with additional select branch(es): I_MaterialLedgerPrice
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA