P_MatlMovingAvgPrice

DDL: P_MATLMOVINGAVGPRICE SQL: PMATLMOVAVGPRC Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

Moving Average Price for Material

P_MatlMovingAvgPrice is a Consumption CDS View that provides data about "Moving Average Price for Material" in SAP S/4HANA. It reads from 2 data sources (I_MaterialValuationHist, P_CurPerdMatlMovingAvgPrice) and exposes 13 fields with key fields Material, ValuationArea, ValuationArea. Part of development package ODATA_MM_ANALYTICS.

Data Sources (2)

SourceAliasJoin Type
I_MaterialValuationHist MovingAvg from
P_CurPerdMatlMovingAvgPrice P_CurPerdMatlMovingAvgPrice union_all

Parameters (3)

NameTypeDefault
P_Material matnr
P_StartDate vdm_validitystart
P_EndDate vdm_validityend

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PMATLMOVAVGPRC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Moving Average Price for Material view
VDM.viewType #CONSUMPTION view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.preserveKey true view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY Material I_MaterialValuationHist Material Vehicle Model
KEY ValuationArea ValuationArea Valuation Area
MovingPrice Per. Unit Price
CreationDate CreationDate Time Stamp
Currency Currency Valuation Crcy
CompanyCode CompanyCode Receiver Company Code
MaterialasMaterial
KEY ValuationArea ValuationArea Valuation Area
MovingPrice Per. Unit Price
CreationDate Time Stamp
Currency Currency Valuation Crcy
CompanyCode CompanyCode Receiver Company Code
MaterialPriceUnitQty MaterialPriceUnitQty Price unit

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_MatlMovingAvgPrice.
-- 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: PMATLMOVAVGPRC
-- Parameters: P_Material : matnr, P_StartDate : vdm_validitystart, P_EndDate : vdm_validityend

CREATE VIEW P_MatlMovingAvgPrice AS
SELECT
  MovingAvg.Material AS Material,
  ValuationArea,
  cast ( MovingAveragePrice as mm_pur_ana_mat_avg_price ) AS MovingPrice,
  CreationDate,
  Currency,
  CompanyCode,
  MaterialPriceUnitQty AS MaterialasMaterial,
  MaterialPriceUnitQty
FROM I_MaterialValuationHist AS MovingAvg
-- UNION ALL with additional select branch(es): P_CurPerdMatlMovingAvgPrice
;