Deprecated
This CDS view is deprecated in S/4HANA. View all deprecated CDS views →

P_Matval_Manage_Val_Chart

DDL: P_MATVAL_MANAGE_VAL_CHART SQL: PMATVALMGMVCH Type: view COMPOSITE Package: ODATA_MATVAL_MANAGE

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)

Associations (2)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate I_MaterialLedgerPrice CostEstimate Cost EstimateNo
KEY FiscalYear I_FiscalYearPeriodForCmpnyCode FiscalYear G/L Fiscal Year
KEY FiscalPeriod I_FiscalYearPeriodForCmpnyCode FiscalPeriod Tax period
KEY LedgerValuationCurrencyRole I_MatlLedgerValnCrcyRoleName LedgerValuationCurrencyRole
KEY ValuationArea I_MaterialLedgerPrice ValuationArea Valuation Area
KEY CompanyCode I_MaterialLedgerPrice CompanyCode Receiver Company Code
FiscalYearPeriod I_FiscalYearPeriodForCmpnyCode FiscalYearPeriod Period/Year
InventoryPrice I_MaterialLedgerPrice MaterialPrice Inventory Price
CompanyCodeCurrency I_MaterialLedgerPrice Currency Valuation Crcy
MaterialPrice0endasMovingAveragePrice

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_Val_Chart.
-- 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: PMATVALMGMVCH

CREATE VIEW P_Matval_Manage_Val_Chart AS
SELECT
  price.CostEstimate AS CostEstimate,
  fyp.FiscalYear AS FiscalYear,
  fyp.FiscalPeriod AS FiscalPeriod,
  lvcr.LedgerValuationCurrencyRole AS LedgerValuationCurrencyRole,
  price.ValuationArea AS ValuationArea,
  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 AS MaterialPrice0endasMovingAveragePrice
FROM I_MaterialLedgerPrice AS price
INNER JOIN P_MatlCtrlRecdLdgrFiscalPeriod AS marvld ON /* join condition not captured in parsed metadata */
INNER JOIN I_FiscalYearPeriodForCmpnyCode AS fyp ON /* join condition not captured in parsed metadata */
INNER JOIN I_MatlLedgerValnCrcyRoleName AS lvcr ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN 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]
LEFT OUTER JOIN 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  -- association [0..1]
;