P_Matval_Manage_Val_Chart
Base View for Mat.Val., Balances
P_Matval_Manage_Val_Chart is a Composite CDS View that provides data about "Base View for Mat.Val., Balances" in SAP S/4HANA. It reads from 4 data sources (I_FiscalYearPeriodForCmpnyCode, I_MatlLedgerValnCrcyRoleName, P_MatlCtrlRecdLdgrFiscalPeriod, I_MaterialLedgerPrice) and exposes 10 fields with key fields CostEstimate, FiscalYear, FiscalPeriod, LedgerValuationCurrencyRole, ValuationArea. It has 2 associations to related views. Part of development package ODATA_MATVAL_MANAGE.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_FiscalYearPeriodForCmpnyCode | fyp | inner |
| I_MatlLedgerValnCrcyRoleName | lvcr | inner |
| P_MatlCtrlRecdLdgrFiscalPeriod | marvld | inner |
| I_MaterialLedgerPrice | price | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_MaterialLedgerPrice | _ACT | _ACT.CostEstimate = price.CostEstimate and _ACT.CurrencyRole = price.CurrencyRole and _ACT.Ledger = price.Ledger and _ACT.MaterialPriceType = 'ACT' and _ACT.MaterialPriceSubtype = 'ACT' and _ACT.MatlPrcValdtyStrtFsclYearPerd <= price.MatlPrcValdtyStrtFsclYearPerd and _ACT.MatlPrcValdtyEndFsclYearPeriod >= price.MatlPrcValdtyEndFsclYearPeriod |
| [0..1] | I_MaterialLedgerPrice | _MAP | _MAP.CostEstimate = price.CostEstimate and _MAP.CurrencyRole = price.CurrencyRole and _MAP.Ledger = price.Ledger and _MAP.MaterialPriceType = 'MAP' and _MAP.MaterialPriceSubtype = '' and _MAP.MatlPrcValdtyStrtFsclYearPerd <= price.MatlPrcValdtyStrtFsclYearPerd and _MAP.MatlPrcValdtyEndFsclYearPeriod >= price.MatlPrcValdtyEndFsclYearPeriod |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.sqlViewName | PMATVALMGMVCH | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.status | #DEPRECATED | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CostEstimate | I_MaterialLedgerPrice | CostEstimate | |
| KEY | FiscalYear | I_FiscalYearPeriodForCmpnyCode | FiscalYear | |
| KEY | FiscalPeriod | I_FiscalYearPeriodForCmpnyCode | FiscalPeriod | |
| KEY | LedgerValuationCurrencyRole | I_MatlLedgerValnCrcyRoleName | LedgerValuationCurrencyRole | |
| KEY | ValuationArea | I_MaterialLedgerPrice | ValuationArea | |
| KEY | CompanyCode | I_MaterialLedgerPrice | CompanyCode | |
| FiscalYearPeriod | I_FiscalYearPeriodForCmpnyCode | FiscalYearPeriod | ||
| InventoryPrice | I_MaterialLedgerPrice | MaterialPrice | ||
| CompanyCodeCurrency | I_MaterialLedgerPrice | Currency | ||
| MaterialPrice0endasMovingAveragePrice |
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'PMATVALMGMVCH'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@VDM.viewType: #COMPOSITE
@VDM.lifecycle.status: #DEPRECATED
define view P_Matval_Manage_Val_Chart
as select from I_MaterialLedgerPrice as price
// inner join marv as mv on mv.bukrs = price.CompanyCode
inner join P_MatlCtrlRecdLdgrFiscalPeriod as marvld
on marvld.CompanyCode = price.CompanyCode
and marvld.Ledger = price.Ledger
inner join I_FiscalYearPeriodForCmpnyCode as fyp
on fyp.CompanyCode = price.CompanyCode
and price.MatlPrcValdtyStrtFsclYearPerd <= fyp.FiscalYearPeriod
and price.MatlPrcValdtyEndFsclYearPeriod >= fyp.FiscalYearPeriod
and fyp.FiscalYearPeriod <= marvld.CurrentFiscalYearPeriod
and fyp.FiscalYearPeriod >= concat(marvld.PreviousFiscalYear, marvld.CurrentFiscalPeriod)
and fyp.IsSpecialPeriod = ''
inner join I_MatlLedgerValnCrcyRoleName as lvcr
on lvcr.CompanyCode = price.CompanyCode
and lvcr.Ledger = price.Ledger
and lvcr.CurrencyRole = price.CurrencyRole
left outer to one join I_MatlValnSemKeyMappg as hd
on price.CostEstimate = hd.CostEstimate
association [0..1] to I_MaterialLedgerPrice as _ACT
on _ACT.CostEstimate = price.CostEstimate
and _ACT.CurrencyRole = price.CurrencyRole
and _ACT.Ledger = price.Ledger
and _ACT.MaterialPriceType = 'ACT'
and _ACT.MaterialPriceSubtype = 'ACT'
and _ACT.MatlPrcValdtyStrtFsclYearPerd <= price.MatlPrcValdtyStrtFsclYearPerd
and _ACT.MatlPrcValdtyEndFsclYearPeriod >= price.MatlPrcValdtyEndFsclYearPeriod
association [0..1] to I_MaterialLedgerPrice as _MAP
on _MAP.CostEstimate = price.CostEstimate
and _MAP.CurrencyRole = price.CurrencyRole
and _MAP.Ledger = price.Ledger
and _MAP.MaterialPriceType = 'MAP'
and _MAP.MaterialPriceSubtype = ''
and _MAP.MatlPrcValdtyStrtFsclYearPerd <= price.MatlPrcValdtyStrtFsclYearPerd
and _MAP.MatlPrcValdtyEndFsclYearPeriod >= price.MatlPrcValdtyEndFsclYearPeriod
{
key price.CostEstimate,
key fyp.FiscalYear as FiscalYear,
key fyp.FiscalPeriod as FiscalPeriod,
key lvcr.LedgerValuationCurrencyRole as LedgerValuationCurrencyRole,
key price.ValuationArea,
key price.CompanyCode as CompanyCode,
fyp.FiscalYearPeriod as FiscalYearPeriod,
price.MaterialPrice as InventoryPrice,
price.Currency as CompanyCodeCurrency,
case price.MaterialPriceControl
when 'S'
then case hd.PriceDeterminationControl
when '2' then coalesce(_MAP.MaterialPrice, 0)
when '3' then coalesce(_ACT.MaterialPrice, 0)
end
when 'V'
then coalesce(price.MaterialPrice, 0)
end as MovingAveragePrice
}
where price.MaterialPriceType = 'INVPR'
and price.MaterialPriceSubtype = ' '
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