P_CURRENTMATLVALNPRICEDEX
Material Valuation Prices - Current/Previous/PrevYear Period
P_CURRENTMATLVALNPRICEDEX is a Composite CDS View that provides data about "Material Valuation Prices - Current/Previous/PrevYear Period" in SAP S/4HANA. It reads from 2 data sources (I_MatlValnSemKeyMappg, I_MaterialLedgerPrice) and exposes 25 fields with key fields CostEstimate, Ledger, CurrencyRole. It has 2 associations to related views. Part of development package FINS_ML_VDM.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_MatlValnSemKeyMappg | hd | inner |
| I_MaterialLedgerPrice | invprice | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | R_MatlLedgerValnCrcyRole | _MLCurrencyInfo | _MLCurrencyInfo.CurrencyRole = invprice.CurrencyRole and _MLCurrencyInfo.Ledger = invprice.Ledger and _MLCurrencyInfo.CompanyCode = invprice.CompanyCode |
| [0..1] | I_MaterialLedgerPrice | _StandardPrice | _StandardPrice.CostEstimate = invprice.CostEstimate and _StandardPrice.Ledger = invprice.Ledger and _StandardPrice.CurrencyRole = invprice.CurrencyRole and _StandardPrice.MaterialPriceType = 'STDPR' and _StandardPrice.MaterialPriceSubtype = ' ' and _StandardPrice.MaterialPriceValidityEndDate = '99991231' |
Annotations (3)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (25)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CostEstimate | I_MaterialLedgerPrice | CostEstimate | |
| KEY | Ledger | I_MaterialLedgerPrice | Ledger | |
| KEY | CurrencyRole | I_MaterialLedgerPrice | CurrencyRole | |
| Material | I_MatlValnSemKeyMappg | Material | ||
| ValuationArea | I_MatlValnSemKeyMappg | ValuationArea | ||
| InventoryValuationType | I_MatlValnSemKeyMappg | InventoryValuationType | ||
| SalesOrder | I_MatlValnSemKeyMappg | SalesOrder | ||
| SalesOrderItem | I_MatlValnSemKeyMappg | SalesOrderItem | ||
| Supplier | I_MatlValnSemKeyMappg | Supplier | ||
| WBSElementInternalID | ps | WBSElementInternalID | ||
| WBSElementExternalID | ps | WBSElementExternalID | ||
| InvtryValnSpecialStockType | I_MatlValnSemKeyMappg | InventorySpecialStockType | ||
| InventorySpecialStockValnType | I_MatlValnSemKeyMappg | InventorySpecialStockValnType | ||
| IsSupplierStockValuation | I_MatlValnSemKeyMappg | IsSupplierStockValuation | ||
| PriceDeterminationControl | I_MatlValnSemKeyMappg | PriceDeterminationControl | ||
| CompanyCode | I_MaterialLedgerPrice | CompanyCode | ||
| MaterialPriceControl | I_MaterialLedgerPrice | MaterialPriceControl | ||
| MaterialPriceUnitQty | I_MaterialLedgerPrice | MaterialPriceUnitQty | ||
| Currency | I_MaterialLedgerPrice | Currency | ||
| MaterialPriceendasStandardPrice | ||||
| InventoryPrice | I_MaterialLedgerPrice | MaterialPrice | ||
| BaseUnit | I_MaterialLedgerPrice | ValuationQuantityUnit | ||
| LedgerName | _MLCurrencyInfo | LedgerName | ||
| CurrencyRoleName | _MLCurrencyInfo | CurrencyRoleName | ||
| LedgerValnCrcyRoleIsUsedInLogs | _MLCurrencyInfo | LedgerValnCrcyRoleIsUsedInLogs |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view entity P_CURRENTMATLVALNPRICEDEX
as select from I_MaterialLedgerPrice as invprice
inner join I_MatlValnSemKeyMappg as hd on hd.CostEstimate = invprice.CostEstimate
left outer to one join I_WBSElementBasicData as ps on ps.WBSElementInternalID = hd.WBSElementInternalID
association [0..1] to R_MatlLedgerValnCrcyRole as _MLCurrencyInfo on _MLCurrencyInfo.CurrencyRole = invprice.CurrencyRole
and _MLCurrencyInfo.Ledger = invprice.Ledger
and _MLCurrencyInfo.CompanyCode = invprice.CompanyCode
association [0..1] to I_MaterialLedgerPrice as _StandardPrice on _StandardPrice.CostEstimate = invprice.CostEstimate
and _StandardPrice.Ledger = invprice.Ledger
and _StandardPrice.CurrencyRole = invprice.CurrencyRole
and _StandardPrice.MaterialPriceType = 'STDPR'
and _StandardPrice.MaterialPriceSubtype = ' '
and _StandardPrice.MaterialPriceValidityEndDate = '99991231'
{
key invprice.CostEstimate,
key invprice.Ledger,
key invprice.CurrencyRole,
hd.Material,
hd.ValuationArea,
hd.InventoryValuationType,
hd.SalesOrder,
hd.SalesOrderItem,
hd.Supplier,
ps.WBSElementInternalID,
ps.WBSElementExternalID,
hd.InventorySpecialStockType as InvtryValnSpecialStockType,
hd.InventorySpecialStockValnType,
hd.IsSupplierStockValuation,
hd.PriceDeterminationControl,
invprice.CompanyCode as CompanyCode,
invprice.MaterialPriceControl as MaterialPriceControl,
invprice.MaterialPriceUnitQty as MaterialPriceUnitQty,
invprice.Currency as Currency,
@Semantics.amount.currencyCode: 'Currency'
case invprice.MaterialPriceControl
when 'V' then invprice.MaterialPrice
else cast ( 0 as fml_price )
end as MovingAveragePrice,
@Semantics.amount.currencyCode: 'Currency'
case invprice.MaterialPriceControl
when 'S' then invprice.MaterialPrice
else _StandardPrice.MaterialPrice
end as StandardPrice,
@Semantics.amount.currencyCode: 'Currency'
invprice.MaterialPrice as InventoryPrice,
invprice.ValuationQuantityUnit as BaseUnit,
_MLCurrencyInfo.LedgerName as LedgerName,
_MLCurrencyInfo.CurrencyRoleName as CurrencyRoleName,
_MLCurrencyInfo.LedgerValnCrcyRoleIsUsedInLogs as LedgerValnCrcyRoleIsUsedInLogs
}
where
invprice.MaterialPriceType = 'INVPR'
and invprice.MaterialPriceSubtype = ' '
and invprice.MaterialPriceValidityEndDate = '99991231'
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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