pph_ddl_stock_1

DDL: PPH_DDL_STOCK_1 SQL: V_PPH_STOCK_1 Type: view

pph_ddl_stock_1 is a CDS View in SAP S/4HANA. It reads from 1 data source (matdoc_extract) and exposes 14 fields.

Data Sources (1)

SourceAliasJoin Type
matdoc_extract mtdc from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName V_PPH_STOCK_1 view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #AUTOMATED view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view

Fields (14)

KeyFieldSource TableSource FieldDescription
matnr matdoc_extract matbf Stock Mat.
werks matdoc_extract werks Receiving Plant
lgort matdoc_extract lgort_sid Stor. Location SID
sobkz matdoc_extract sobkz Special Stock
lifnr matdoc_extract lifnr_sid Supplier SID
kunnr matdoc_extract kunnr_sid Customer SID
kdauf matdoc_extract mat_kdauf SD Doc of Inv.
kdpos matdoc_extract mat_kdpos SD Item of Inv.
pspnr matdoc_extract mat_pspnr WBSElem of Inv.
mat_kdpos0000Differentinclassiccode
lifnr_sid
mng01
charg matdoc_extract charg_sid Batch SID
sgt_scat

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 pph_ddl_stock_1.
-- 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_PPH_STOCK_1

CREATE VIEW pph_ddl_stock_1 AS
SELECT
  mtdc.matbf AS matnr,
  mtdc.werks AS werks,
  mtdc.lgort_sid AS lgort,
  mtdc.sobkz AS sobkz,
  mtdc.lifnr_sid AS lifnr,
  mtdc.kunnr_sid AS kunnr,
  mtdc.mat_kdauf AS kdauf,
  mtdc.mat_kdpos AS kdpos,
  mtdc.mat_pspnr AS pspnr,
  but how? AS mat_kdpos0000Differentinclassiccode,
  see include DI_PCS_MRP when mtdc.sobkz = 'R' then concat(mtdc.mat_pspnr,mtdc.lifnr_sid) when (mtdc.sobkz = 'I' or mtdc.sobkz = 'J' or mtdc.sobkz = 'O') and mtdc.disub_owner_sid <> '' then '' AS lifnr_sid,
  cast(sum(mtdc.stock_qty_l1) as nsdm_stock_qty) AS mng01,
  mtdc.charg_sid AS charg,
  coalesce(mcha.sgt_scat,'') AS sgt_scat
FROM matdoc_extract AS mtdc
;