P_MatVal_By_Periods
Prices and values for app Mat. Val. Manage
P_MatVal_By_Periods is a Composite CDS View that provides data about "Prices and values for app Mat. Val. Manage" in SAP S/4HANA. It reads from 1 data source (I_MaterialLedgerPrice) and exposes 26 fields with key fields CostEstimate, FiscalYear, FiscalPeriod, LedgerValuationCurrencyRole, ValuationArea. It has 4 associations to related views. Part of development package ODATA_MATVAL_MANAGE.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialLedgerPrice | future | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_MaterialLedgerPrice | _STDPR | _STDPR.CostEstimate = per.CostEstimate and _STDPR.Ledger = per.Ledger and _STDPR.CurrencyRole = per.CurrencyRole and _STDPR.CompanyCode = per.CompanyCode and _STDPR.ValuationArea = per.ValuationArea and _STDPR.Material = per.Material and _STDPR.MaterialPriceType = 'STDPR' and _STDPR.MaterialPriceSubtype = '' and _STDPR.MatlPrcValdtyStrtFsclYearPerd <= per.FiscalYearPer and _STDPR.MatlPrcValdtyEndFsclYearPeriod >= per.FiscalYearPer |
| [0..1] | I_MaterialLedgerPrice | _ACT | _ACT.CostEstimate = per.CostEstimate and _ACT.CurrencyRole = per.CurrencyRole and _ACT.Ledger = per.Ledger and _ACT.CompanyCode = per.CompanyCode and _ACT.ValuationArea = per.ValuationArea and _ACT.Material = per.Material and _ACT.MaterialPriceType = 'ACT' and _ACT.MaterialPriceSubtype = 'ACT' and _ACT.MatlPrcValdtyStrtFsclYearPerd <= per.FiscalYearPer and _ACT.MatlPrcValdtyEndFsclYearPeriod >= per.FiscalYearPer |
| [0..1] | I_MaterialLedgerPrice | _MAP | _MAP.CostEstimate = per.CostEstimate and _MAP.CurrencyRole = per.CurrencyRole and _MAP.Ledger = per.Ledger and _MAP.CompanyCode = per.CompanyCode and _MAP.ValuationArea = per.ValuationArea and _MAP.Material = per.Material and _MAP.MaterialPriceType = 'MAP' and _MAP.MaterialPriceSubtype = '' and _MAP.MatlPrcValdtyStrtFsclYearPerd <= per.FiscalYearPer and _MAP.MatlPrcValdtyEndFsclYearPeriod >= per.FiscalYearPer |
| [0..1] | I_MaterialLedgerPrice | _FSTDCE | _FSTDCE.CostEstimate = per.CostEstimate and _FSTDCE.CurrencyRole = per.CurrencyRole and _FSTDCE.Ledger = per.Ledger and _FSTDCE.MaterialPriceType = 'FSTDCE' and _FSTDCE.MaterialPriceSubtype = '' and _FSTDCE.Material = per.Material and _FSTDCE.CompanyCode = per.CompanyCode and _FSTDCE.ValuationArea = per.ValuationArea and _FSTDCE.MatlPrcValdtyStrtFsclYearPerd <= per.FiscalYearPer and _FSTDCE.MaterialPriceValidityEndDate >= $session.system_date |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMTVLPERIODS | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| AbapCatalog.compiler.compareFilter | true | view |
Fields (26)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CostEstimate | per | CostEstimate | Cost EstimateNo |
| KEY | FiscalYear | per | FiscalYear | G/L Fiscal Year |
| KEY | FiscalPeriod | per | FiscalPeriod | Tax period |
| KEY | LedgerValuationCurrencyRole | per | LedgerValuationCurrencyRole | |
| KEY | ValuationArea | per | ValuationArea | Valuation Area |
| Ledger | per | Ledger | Ledger | |
| CurrencyRole | per | CurrencyRole | Curr./Val. Type | |
| MaterialPriceUnitQty | per | MaterialPriceUnitQty | Price unit | |
| InvtryValnSpecialStockType | ckml | InventorySpecialStockType | Special Stock Type | |
| InventorySpecialStockValnType | ckml | InventorySpecialStockValnType | Valuation | |
| MaterialPriceControl | per | MaterialPriceControl | Price Control | |
| MaterialPrice0endasStandardPrice | ||||
| PriceDeterminationControl | ckml | PriceDeterminationControl | Price Determ. | |
| MaterialPrice | per | MaterialPrice | Inventory Price | |
| FuturePrice | I_MaterialLedgerPrice | MaterialPrice | Inventory Price | |
| FuturePlannedPrice | _FSTDCE | MaterialPrice | Inventory Price | |
| FuturePriceValidityStartDate | I_MaterialLedgerPrice | MaterialPriceValidityStartDate | ||
| TotalVltdStockQuantity | bal | TotalVltdStockQuantity | ||
| BaseUnit | per | BaseUnit | Unit of Measure | |
| ValuationQuantityUnit | I_MaterialLedgerPrice | ValuationQuantityUnit | ||
| CompanyCode | I_MaterialLedgerPrice | CompanyCode | Receiver Company Code | |
| Material | I_MaterialLedgerPrice | Material | Vehicle Model | |
| InventoryValuationType | per | InventoryValuationType | Valuation Type | |
| InventoryValuationCategory | ||||
| Plant | I_MaterialLedgerPrice | ValuationArea | Valuation Area | |
| period_type | per | period_type | Repeat Appmt Type |
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_By_Periods.
-- 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: PMTVLPERIODS
CREATE VIEW P_MatVal_By_Periods AS
SELECT
per.CostEstimate AS CostEstimate,
per.FiscalYear AS FiscalYear,
per.FiscalPeriod AS FiscalPeriod,
per.LedgerValuationCurrencyRole AS LedgerValuationCurrencyRole,
per.ValuationArea AS ValuationArea,
per.Ledger AS Ledger,
per.CurrencyRole AS CurrencyRole,
per.MaterialPriceUnitQty AS MaterialPriceUnitQty,
ckml.InventorySpecialStockType AS InvtryValnSpecialStockType,
ckml.InventorySpecialStockValnType AS InventorySpecialStockValnType,
per.MaterialPriceControl AS MaterialPriceControl,
case per.MaterialPriceControl when 'S' then coalesce(per.MaterialPrice,0) else coalesce(_STDPR.MaterialPrice,0) end as StandardPrice AS MaterialPrice0endasStandardPrice,
ckml.PriceDeterminationControl AS PriceDeterminationControl,
per.MaterialPrice AS MaterialPrice,
future.MaterialPrice AS FuturePrice,
_FSTDCE.MaterialPrice AS FuturePlannedPrice,
future.MaterialPriceValidityStartDate AS FuturePriceValidityStartDate,
bal.TotalVltdStockQuantity AS TotalVltdStockQuantity,
per.BaseUnit AS BaseUnit,
future.ValuationQuantityUnit AS ValuationQuantityUnit,
future.CompanyCode AS CompanyCode,
future.Material AS Material,
per.InventoryValuationType AS InventoryValuationType,
'' AS InventoryValuationCategory,
future.ValuationArea AS Plant,
per.period_type AS period_type
FROM I_MaterialLedgerPrice AS future
LEFT OUTER JOIN I_MaterialLedgerPrice AS _STDPR ON _STDPR.CostEstimate = per.CostEstimate AND _STDPR.Ledger = per.Ledger AND _STDPR.CurrencyRole = per.CurrencyRole AND _STDPR.CompanyCode = per.CompanyCode AND _STDPR.ValuationArea = per.ValuationArea AND _STDPR.Material = per.Material AND _STDPR.MaterialPriceType = 'STDPR' AND _STDPR.MaterialPriceSubtype = '' AND _STDPR.MatlPrcValdtyStrtFsclYearPerd <= per.FiscalYearPer AND _STDPR.MatlPrcValdtyEndFsclYearPeriod >= per.FiscalYearPer -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _ACT ON _ACT.CostEstimate = per.CostEstimate AND _ACT.CurrencyRole = per.CurrencyRole AND _ACT.Ledger = per.Ledger AND _ACT.CompanyCode = per.CompanyCode AND _ACT.ValuationArea = per.ValuationArea AND _ACT.Material = per.Material AND _ACT.MaterialPriceType = 'ACT' AND _ACT.MaterialPriceSubtype = 'ACT' AND _ACT.MatlPrcValdtyStrtFsclYearPerd <= per.FiscalYearPer AND _ACT.MatlPrcValdtyEndFsclYearPeriod >= per.FiscalYearPer -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _MAP ON _MAP.CostEstimate = per.CostEstimate AND _MAP.CurrencyRole = per.CurrencyRole AND _MAP.Ledger = per.Ledger AND _MAP.CompanyCode = per.CompanyCode AND _MAP.ValuationArea = per.ValuationArea AND _MAP.Material = per.Material AND _MAP.MaterialPriceType = 'MAP' AND _MAP.MaterialPriceSubtype = '' AND _MAP.MatlPrcValdtyStrtFsclYearPerd <= per.FiscalYearPer AND _MAP.MatlPrcValdtyEndFsclYearPeriod >= per.FiscalYearPer -- association [0..1]
LEFT OUTER JOIN I_MaterialLedgerPrice AS _FSTDCE ON _FSTDCE.CostEstimate = per.CostEstimate AND _FSTDCE.CurrencyRole = per.CurrencyRole AND _FSTDCE.Ledger = per.Ledger AND _FSTDCE.MaterialPriceType = 'FSTDCE' AND _FSTDCE.MaterialPriceSubtype = '' AND _FSTDCE.Material = per.Material AND _FSTDCE.CompanyCode = per.CompanyCode AND _FSTDCE.ValuationArea = per.ValuationArea AND _FSTDCE.MatlPrcValdtyStrtFsclYearPerd <= per.FiscalYearPer AND _FSTDCE.MaterialPriceValidityEndDate >= $session.system_date -- association [0..1]
;
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