P_Matval_Manage_Ckml
Base View for Mat.Val., CKML* tables
P_Matval_Manage_Ckml is a Composite CDS View that provides data about "Base View for Mat.Val., CKML* tables" in SAP S/4HANA. It reads from 4 data sources (I_MatlValnSemKeyMappg, I_MaterialLedgerPrice, R_MatlLedgerValnCrcyRole, I_MaterialLedgerPrice) and exposes 25 fields with key fields CostEstimate, LedgerValuationCurrencyRole, FiscalYear, FiscalPeriod, ValuationArea. It has 5 associations to related views. Part of development package ODATA_MATVAL_MANAGE.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_MatlValnSemKeyMappg | hd | left_outer |
| I_MaterialLedgerPrice | INVPR | left_outer |
| R_MatlLedgerValnCrcyRole | lvcr | inner |
| I_MaterialLedgerPrice | price | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_WBSElementBasicData | _WBSElementBasicData | hd.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID |
| [0..1] | I_MaterialLedgerPrice | _STDPR | price.CostEstimate = _STDPR.CostEstimate and price.Ledger = _STDPR.Ledger and price.CurrencyRole = _STDPR.CurrencyRole and price.CompanyCode = _STDPR.CompanyCode and price.ValuationArea = _STDPR.ValuationArea and _STDPR.MaterialPriceType = 'STDPR' and _STDPR.MaterialPriceSubtype = '' and _STDPR.MatlPrcValdtyStrtFsclYearPerd <= INVPR.MatlPrcValdtyStrtFsclYearPerd and _STDPR.MatlPrcValdtyEndFsclYearPeriod >= INVPR.MatlPrcValdtyEndFsclYearPeriod |
| [0..1] | I_MaterialLedgerPrice | _ACT | _ACT.CostEstimate = INVPR.CostEstimate and _ACT.CurrencyRole = INVPR.CurrencyRole and _ACT.Ledger = INVPR.Ledger and _ACT.CompanyCode = INVPR.CompanyCode and _ACT.ValuationArea = INVPR.ValuationArea and _ACT.MaterialPriceType = 'ACT' and _ACT.MaterialPriceSubtype = 'ACT' and _ACT.MatlPrcValdtyStrtFsclYearPerd <= INVPR.MatlPrcValdtyStrtFsclYearPerd and _ACT.MatlPrcValdtyEndFsclYearPeriod >= INVPR.MatlPrcValdtyEndFsclYearPeriod |
| [0..1] | I_MaterialLedgerPrice | _MAP | _MAP.CostEstimate = INVPR.CostEstimate and _MAP.CurrencyRole = INVPR.CurrencyRole and _MAP.Ledger = INVPR.Ledger and _MAP.CompanyCode = INVPR.CompanyCode and _MAP.ValuationArea = INVPR.ValuationArea and _MAP.MaterialPriceType = 'MAP' and _MAP.MaterialPriceSubtype = '' and _MAP.MatlPrcValdtyStrtFsclYearPerd <= INVPR.MatlPrcValdtyStrtFsclYearPerd and _MAP.MatlPrcValdtyEndFsclYearPeriod >= INVPR.MatlPrcValdtyEndFsclYearPeriod |
| [0..1] | I_MaterialLedgerPrice | _FSTDCE | _FSTDCE.CostEstimate = INVPR.CostEstimate and _FSTDCE.CurrencyRole = INVPR.CurrencyRole and _FSTDCE.Ledger = INVPR.Ledger and _FSTDCE.CompanyCode = INVPR.CompanyCode and _FSTDCE.ValuationArea = INVPR.ValuationArea and _FSTDCE.MaterialPriceType = 'FSTDCE' and _FSTDCE.MaterialPriceSubtype = '' and _FSTDCE.MatlPrcValdtyStrtFsclYearPerd = INVPR.MatlPrcValdtyStrtFsclYearPerd |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.lifecycle.status | #DEPRECATED | view |
Fields (25)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CostEstimate | I_MaterialLedgerPrice | CostEstimate | Cost EstimateNo |
| KEY | LedgerValuationCurrencyRole | R_MatlLedgerValnCrcyRole | LedgerValuationCurrencyRole | |
| KEY | FiscalYear | I_MaterialLedgerPrice | MatlPrcValidityStartFiscalYear | |
| KEY | FiscalPeriod | I_MaterialLedgerPrice | MatlPrcValdtyStartFiscalPeriod | |
| KEY | ValuationArea | I_MaterialLedgerPrice | ValuationArea | Valuation Area |
| KEY | Material | I_MaterialLedgerPrice | Material | Vehicle Model |
| KEY | InventoryValuationType | I_MaterialLedgerPrice | InventoryValuationType | Valuation Type |
| InvtryValnSpecialStockType | I_MaterialLedgerPrice | InvtryValnSpecialStockType | ||
| SalesOrder | I_MatlValnSemKeyMappg | SalesOrder | SD Document | |
| SalesOrderItem | I_MatlValnSemKeyMappg | SalesOrderItem | Sales Order Item | |
| Supplier | I_MatlValnSemKeyMappg | Supplier | Supplier | |
| WBSElementInternalID | I_MatlValnSemKeyMappg | WBSElementInternalID | WBS Internal ID | |
| WBSElementExternalID | _WBSElementBasicData | WBSElementExternalID | WBS Element External ID | |
| FiscalYearPeriod | I_MaterialLedgerPrice | MatlPrcValdtyStrtFsclYearPerd | ||
| InventorySpecialStockValnType | I_MatlValnSemKeyMappg | InventorySpecialStockValnType | Valuation | |
| PriceDeterminationControl | I_MatlValnSemKeyMappg | PriceDeterminationControl | Price Determ. | |
| FuturePrice | I_MaterialLedgerPrice | MaterialPrice | Inventory Price | |
| FuturePriceValidityStartDate | I_MaterialLedgerPrice | MaterialPriceValidityStartDate | ||
| FuturePlannedPrice | _FSTDCE | MaterialPrice | Inventory Price | |
| MaterialPriceControl | I_MaterialLedgerPrice | MaterialPriceControl | Price Control | |
| MaterialPriceUnitQty | I_MaterialLedgerPrice | MaterialPriceUnitQty | Price unit | |
| 00endasMovingAveragePrice | ||||
| 00endasStandardPrice | ||||
| Currency | I_MaterialLedgerPrice | Currency | Valuation Crcy | |
| _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 P_Matval_Manage_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.
CREATE VIEW P_Matval_Manage_Ckml AS
SELECT
price.CostEstimate AS CostEstimate,
lvcr.LedgerValuationCurrencyRole AS LedgerValuationCurrencyRole,
INVPR.MatlPrcValidityStartFiscalYear AS FiscalYear,
INVPR.MatlPrcValdtyStartFiscalPeriod AS FiscalPeriod,
price.ValuationArea AS ValuationArea,
price.Material AS Material,
price.InventoryValuationType AS InventoryValuationType,
price.InvtryValnSpecialStockType AS InvtryValnSpecialStockType,
hd.SalesOrder AS SalesOrder,
hd.SalesOrderItem AS SalesOrderItem,
hd.Supplier AS Supplier,
hd.WBSElementInternalID AS WBSElementInternalID,
_WBSElementBasicData.WBSElementExternalID AS WBSElementExternalID,
INVPR.MatlPrcValdtyStrtFsclYearPerd AS FiscalYearPeriod,
hd.InventorySpecialStockValnType AS InventorySpecialStockValnType,
hd.PriceDeterminationControl AS PriceDeterminationControl,
price.MaterialPrice AS FuturePrice,
price.MaterialPriceValidityStartDate AS FuturePriceValidityStartDate,
_FSTDCE.MaterialPrice AS FuturePlannedPrice,
INVPR.MaterialPriceControl AS MaterialPriceControl,
price.MaterialPriceUnitQty AS MaterialPriceUnitQty,
case INVPR.MaterialPriceControl when 'S' then case hd.PriceDeterminationControl when '2' then coalesce(_MAP.MaterialPrice,abap.curr'0.00') when '3' then coalesce(_ACT.MaterialPrice,abap.curr'0.00') end when 'V' then coalesce(INVPR.MaterialPrice,abap.curr'0.00') end as MovingAveragePrice AS 00endasMovingAveragePrice,
case INVPR.MaterialPriceControl when 'S' then coalesce(INVPR.MaterialPrice,abap.curr'0.00') else coalesce(_STDPR.MaterialPrice,abap.curr'0.00') end as StandardPrice AS 00endasStandardPrice,
price.Currency AS Currency
FROM I_MaterialLedgerPrice AS price
INNER JOIN R_MatlLedgerValnCrcyRole AS lvcr ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_MaterialLedgerPrice AS INVPR ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_MatlValnSemKeyMappg AS hd ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElementBasicData ON hd.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _STDPR ON price.CostEstimate = _STDPR.CostEstimate AND price.Ledger = _STDPR.Ledger AND price.CurrencyRole = _STDPR.CurrencyRole AND price.CompanyCode = _STDPR.CompanyCode AND price.ValuationArea = _STDPR.ValuationArea AND _STDPR.MaterialPriceType = 'STDPR' AND _STDPR.MaterialPriceSubtype = '' AND _STDPR.MatlPrcValdtyStrtFsclYearPerd <= INVPR.MatlPrcValdtyStrtFsclYearPerd AND _STDPR.MatlPrcValdtyEndFsclYearPeriod >= INVPR.MatlPrcValdtyEndFsclYearPeriod -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _ACT ON _ACT.CostEstimate = INVPR.CostEstimate AND _ACT.CurrencyRole = INVPR.CurrencyRole AND _ACT.Ledger = INVPR.Ledger AND _ACT.CompanyCode = INVPR.CompanyCode AND _ACT.ValuationArea = INVPR.ValuationArea AND _ACT.MaterialPriceType = 'ACT' AND _ACT.MaterialPriceSubtype = 'ACT' AND _ACT.MatlPrcValdtyStrtFsclYearPerd <= INVPR.MatlPrcValdtyStrtFsclYearPerd AND _ACT.MatlPrcValdtyEndFsclYearPeriod >= INVPR.MatlPrcValdtyEndFsclYearPeriod -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _MAP ON _MAP.CostEstimate = INVPR.CostEstimate AND _MAP.CurrencyRole = INVPR.CurrencyRole AND _MAP.Ledger = INVPR.Ledger AND _MAP.CompanyCode = INVPR.CompanyCode AND _MAP.ValuationArea = INVPR.ValuationArea AND _MAP.MaterialPriceType = 'MAP' AND _MAP.MaterialPriceSubtype = '' AND _MAP.MatlPrcValdtyStrtFsclYearPerd <= INVPR.MatlPrcValdtyStrtFsclYearPerd AND _MAP.MatlPrcValdtyEndFsclYearPeriod >= INVPR.MatlPrcValdtyEndFsclYearPeriod -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _FSTDCE ON _FSTDCE.CostEstimate = INVPR.CostEstimate AND _FSTDCE.CurrencyRole = INVPR.CurrencyRole AND _FSTDCE.Ledger = INVPR.Ledger AND _FSTDCE.CompanyCode = INVPR.CompanyCode AND _FSTDCE.ValuationArea = INVPR.ValuationArea AND _FSTDCE.MaterialPriceType = 'FSTDCE' AND _FSTDCE.MaterialPriceSubtype = '' AND _FSTDCE.MatlPrcValdtyStrtFsclYearPerd = INVPR.MatlPrcValdtyStrtFsclYearPerd -- association [0..1]
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- 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
- 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