nsdm_e_mardh

DDL: NSDM_DDL_MARDH SQL: NSDM_V_MARDH Type: view

CDS View for MARDH on NSDM_T_MTDCSA

nsdm_e_mardh is a CDS View that provides data about "CDS View for MARDH on NSDM_T_MTDCSA" in SAP S/4HANA. It reads from 2 data sources (nsdm_e_mardh_agg, nsdm_e_mardh_per) and exposes 20 fields with key fields mandt, matnr, werks, lgort, lfgja.

Data Sources (2)

SourceAliasJoin Type
nsdm_e_mardh_agg a left_outer
nsdm_e_mardh_per p from

Annotations (11)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName NSDM_V_MARDH view
EndUserText.label CDS View for MARDH on NSDM_T_MTDCSA view
DataAging.noAgingRestriction false view
ObjectModel.usageType.sizeCategory L view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #AUTOMATED view
AccessControl.authorizationCheck #NOT_ALLOWED view
AbapCatalog.viewEnhancementCategory #PROJECTION_LIST view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY mandt nsdm_e_mardh_per mandt Editing Client
KEY matnr nsdm_e_mardh_per matnr Vehicle Model
KEY werks nsdm_e_mardh_per werks Receiving Plant
KEY lgort nsdm_e_mardh_per lgort Sublocation
KEY lfgja
KEY lfmon
labst
umlme
insme
einme
speme
retme
vklab
vkuml
/cwm/labst
/cwm/umlme
/cwm/insme
/cwm/einme
/cwm/speme
/cwm/retme

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 nsdm_e_mardh.
-- 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: NSDM_V_MARDH

CREATE VIEW nsdm_e_mardh AS
SELECT
  p.mandt AS mandt,
  p.matnr AS matnr,
  p.werks AS werks,
  p.lgort AS lgort,
  cast(substring(p.gjper, 1, 4) as abap.numc(4)) AS lfgja,
  cast(substring(p.gjper, 6, 2) as abap.numc(2)) AS lfmon,
  sum(case a.lbbsa when '01' then a.stock_qty else 0 end) AS labst,
  sum(case a.lbbsa when '04' then a.stock_qty else 0 end) AS umlme,
  sum(case a.lbbsa when '02' then a.stock_qty else 0 end) AS insme,
  sum(case a.lbbsa when '08' then a.stock_qty else 0 end) AS einme,
  sum(case a.lbbsa when '07' then a.stock_qty else 0 end) AS speme,
  sum(case a.lbbsa when '03' then a.stock_qty else 0 end) AS retme,
  sum(case a.lbbsa when '01' then a.stock_vkwrt else 0 end) AS vklab,
  sum(case a.lbbsa when '04' then a.stock_vkwrt else 0 end) AS vkuml,
  sum(case a.lbbsa when '01' then a./cwm/stock_qty else 0 end) AS /cwm/labst,
  sum(case a.lbbsa when '04' then a./cwm/stock_qty else 0 end) AS /cwm/umlme,
  sum(case a.lbbsa when '02' then a./cwm/stock_qty else 0 end) AS /cwm/insme,
  sum(case a.lbbsa when '08' then a./cwm/stock_qty else 0 end) AS /cwm/einme,
  sum(case a.lbbsa when '07' then a./cwm/stock_qty else 0 end) AS /cwm/speme,
  sum(case a.lbbsa when '03' then a./cwm/stock_qty else 0 end) AS /cwm/retme
FROM nsdm_e_mardh_per AS p
LEFT OUTER JOIN nsdm_e_mardh_agg AS a ON /* join condition not captured in parsed metadata */
;