P_CurPerdMatlMovingAvgPrice

DDL: P_CURPERDMATLMOVINGAVGPRICE SQL: PCRMATLMOVAVGPRC Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

Current Period Moving Average Price for Material

P_CurPerdMatlMovingAvgPrice is a Consumption CDS View that provides data about "Current Period Moving Average Price for Material" in SAP S/4HANA. It reads from 1 data source (I_MaterialValuationPrices) and exposes 7 fields. Part of development package ODATA_MM_ANALYTICS.

Data Sources (1)

SourceAliasJoin Type
I_MaterialValuationPrices CurrMovingAvg from

Parameters (1)

NameTypeDefault
P_Material matnr

Annotations (8)

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

Fields (7)

KeyFieldSource TableSource FieldDescription
Material Material Vehicle Model
ValuationArea ValuationArea Valuation Area
MovingAveragePrice Per. Unit Price
Currency Currency Valuation Crcy
CompanyCode CompanyCode Receiver Company Code
MaterialPriceUnitQty MaterialPriceUnitQty Price unit
CreationDate

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_CurPerdMatlMovingAvgPrice.
-- 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: PCRMATLMOVAVGPRC
-- Parameters: P_Material : matnr

CREATE VIEW P_CurPerdMatlMovingAvgPrice AS
SELECT
  Material,
  ValuationArea,
  cast ( MovingAveragePrice as mm_pur_ana_mat_avg_price ) AS MovingAveragePrice,
  Currency,
  CompanyCode,
  MaterialPriceUnitQty,
  cast ( concat( FiscalYear , concat( substring(FiscalPeriod,2,3) , '01' ) ) as erdat ) AS CreationDate
FROM I_MaterialValuationPrices AS CurrMovingAvg
;