Nsdm_e_Mscdh

DDL: NSDM_DDL_MSCDH SQL: NSDM_V_MSCDH Type: view

MSCDH Compatibility View

Nsdm_e_Mscdh is a CDS View that provides data about "MSCDH Compatibility View" in SAP S/4HANA. It reads from 2 data sources (nsdm_e_mscdh_agg, Nsdm_e_Mscdh_Per) and exposes 12 fields with key fields mandt, matnr, werks, charg, sobkz.

Data Sources (2)

SourceAliasJoin Type
nsdm_e_mscdh_agg a left_outer
Nsdm_e_Mscdh_Per p from

Annotations (10)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName NSDM_V_MSCDH view
AbapCatalog.compiler.compareFilter true view
EndUserText.label MSCDH Compatibility View 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 (12)

KeyFieldSource TableSource FieldDescription
KEY mandt Nsdm_e_Mscdh_Per mandt Editing Client
KEY matnr Nsdm_e_Mscdh_Per matnr Vehicle Model
KEY werks Nsdm_e_Mscdh_Per werks Receiving Plant
KEY charg Nsdm_e_Mscdh_Per charg Chargeable Proc.
KEY sobkz Nsdm_e_Mscdh_Per sobkz Special Stock
KEY lifnr Nsdm_e_Mscdh_Per lifnr Vendor no.
KEY kunnr Nsdm_e_Mscdh_Per kunnr Stock customer
KEY lfgja
KEY lfmon
cdlab
cdins
cdein

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_Mscdh.
-- 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_MSCDH

CREATE VIEW Nsdm_e_Mscdh AS
SELECT
  p.mandt AS mandt,
  p.matnr AS matnr,
  p.werks AS werks,
  p.charg AS charg,
  p.sobkz AS sobkz,
  p.lifnr AS lifnr,
  p.kunnr AS kunnr,
  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 cdlab,
  sum(case a.lbbsa when '02' then a.stock_qty else 0 end ) AS cdins,
  sum(case a.lbbsa when '08' then a.stock_qty else 0 end ) AS cdein
FROM Nsdm_e_Mscdh_Per AS p
LEFT OUTER JOIN nsdm_e_mscdh_agg AS a ON /* join condition not captured in parsed metadata */
;