ML4H_CDS_CONSUMP

DDL: ML4H_CDS_CONSUMP SQL: V_CONSUMP_DOC Type: view

Sum of consumption with WIP Reduction

ML4H_CDS_CONSUMP is a CDS View that provides data about "Sum of consumption with WIP Reduction" in SAP S/4HANA. It reads from 1 data source (mldoc) and exposes 13 fields with key fields kalnr, curtp, CATEG, PTYP, process.

Data Sources (1)

SourceAliasJoin Type
mldoc mldoc from

Parameters (7)

NameTypeDefault
P_kalnr ck_kalnr
p_curtp curtp
p_jahrper_low ml4h_jahrper
p_jahrper_high ml4h_jahrper
p_runref ml4h_runref
p_xabr ml4h_xabr
P_timestamp ml4h_timestamp

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName V_CONSUMP_DOC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.serviceQuality D view
ObjectModel.usageType.sizeCategory L view
ObjectModel.usageType.dataClass TRANSACTIONAL view
ClientDependent true view
EndUserText.label Sum of consumption with WIP Reduction view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY kalnr kalnr ProdCostEst.No.
KEY curtp curtp Valuation Area
KEY CATEG categ Category
KEY PTYP ptyp Visibility (I/E/V/C)
KEY process process Trans.
KEY waers waers Transaction Currency
KEY meins meins Valuation Unit
quant
stval
prd
kdm
altval
markup

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 ML4H_CDS_CONSUMP.
-- 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: V_CONSUMP_DOC
-- Parameters: P_kalnr : ck_kalnr, p_curtp : curtp, p_jahrper_low : ml4h_jahrper, p_jahrper_high : ml4h_jahrper, p_runref : ml4h_runref, p_xabr : ml4h_xabr, P_timestamp : ml4h_timestamp

CREATE VIEW ML4H_CDS_CONSUMP AS
SELECT
  kalnr,
  curtp,
  CATEG,
  PTYP,
  process,
  waers,
  meins,
  0 - cast (sum (quant) as ml4h_quantity ) AS quant,
  0 - cast (sum (stval) as ml4h_stval ) AS stval,
  0 - cast ( sum ( prd ) as ml4h_prd ) AS prd,
  0 - cast ( sum (kdm) as ml4h_kdm ) AS kdm,
  0 - cast ( sum (stval) as ml4h_altval ) - cast ( sum ( prd ) as ml4h_prd ) - cast ( sum (kdm) as ml4h_kdm ) AS altval,
  0 - cast ( sum (markup) as ml4h_markup ) AS markup
FROM mldoc
;