P_TOTALCONSUMPTION

DDL: P_TOTALCONSUMPTION SQL: PTOTCONSUMP Type: view COMPOSITE

P_TOTALCONSUMPTION is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_MatlAvgDailyUsge1) and exposes 5 fields with key fields Material, Plant, MRPArea.

Data Sources (1)

SourceAliasJoin Type
I_MatlAvgDailyUsge1 I_MatlAvgDailyUsge1 from

Parameters (2)

NameTypeDefault
P_StartDate sydatum
P_EndDate sydatum

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PTOTCONSUMP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY Material Material Vehicle Model
KEY Plant Plant Valuation Area
KEY MRPArea MRPArea MRP Area
QuantityInBaseUnit
MaterialBaseUnit MaterialBaseUnit Valuation 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_TOTALCONSUMPTION.
-- 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: PTOTCONSUMP
-- Parameters: P_StartDate : sydatum, P_EndDate : sydatum

CREATE VIEW P_TOTALCONSUMPTION AS
SELECT
  Material,
  Plant,
  MRPArea,
  sum(QuantityInBaseUnit) AS QuantityInBaseUnit,
  MaterialBaseUnit
FROM I_MatlAvgDailyUsge1
;