Pir_Keyfigures_Read_For_Sum

DDL: PIR_KEYFIGURES_READ_FOR_SUM SQL: PIR_V_RD_SUM Type: view Package: PPH_FORECAST_DEMAND

Read PIR Keyfigures

Pir_Keyfigures_Read_For_Sum is a CDS View that provides data about "Read PIR Keyfigures" in SAP S/4HANA. It reads from 4 data sources (mara, marc, Pir_All_Attributes, sdm_aor) and exposes 26 fields with key fields uname, matnr, werks, berid, bedae. Part of development package PPH_FORECAST_DEMAND.

Data Sources (4)

SourceAliasJoin Type
mara mara inner
marc marc from
Pir_All_Attributes pir left_outer
sdm_aor sdm_aor inner

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PIR_V_RD_SUM view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #AUTOMATED view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Read PIR Keyfigures view

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY uname sdm_aor uname User Name
KEY matnr marc matnr Vehicle Model
KEY werks marc werks Receiving Plant
KEY berid
KEY bedae
KEY versb
bdzei
perkz_master marc perkz Period Type
perkz_item
per_edat
loevr Pir_All_Attributes loevr Fcst to be Deltd
acc_past Pir_All_Attributes acc_past Accptd Past Demand
draft_qty Pir_All_Attributes draft_qty Draft Quantity
plan_qty Pir_All_Attributes plan_qty Planned Qty
withdr_qty Pir_All_Attributes withdr_qty Withdrawal Qty
open_qty Pir_All_Attributes open_qty Open Qty
item_meins Pir_All_Attributes meins Valuation Unit
pdatu Pir_All_Attributes pdatu Settlement Date
marc_lvorm marc lvorm Stock del. flag
mara_lvorm mara lvorm Stock del. flag
mara_meins mara meins Valuation Unit
marc_dpbed t141_marc dpbed Ind. reqmt msg.
mara_dpbed t141_mara dpbed Ind. reqmt msg.
lastchange 0
aenam Pir_All_Attributes aenam User Name
dispo marc dispo MRP Controller

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 Pir_Keyfigures_Read_For_Sum.
-- 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: PIR_V_RD_SUM

CREATE VIEW Pir_Keyfigures_Read_For_Sum AS
SELECT
  sdm_aor.uname AS uname,
  marc.matnr AS matnr,
  marc.werks AS werks,
  coalesce(pir.berid, cast( marc.werks as berid)) AS berid,
  coalesce(pir.bedae, t461s.bedvp) AS bedae,
  coalesce(pir.versb, '00') AS versb,
  marc.perkz AS perkz_master,
  coalesce(pir.perkz_item,'') AS perkz_item,
  cast(pir.per_edat as pph_per_edat) AS per_edat,
  pir.loevr AS loevr,
  pir.acc_past AS acc_past,
  pir.draft_qty AS draft_qty,
  pir.plan_qty AS plan_qty,
  pir.withdr_qty AS withdr_qty,
  pir.open_qty AS open_qty,
  pir.meins AS item_meins,
  pir.pdatu AS pdatu,
  marc.lvorm AS marc_lvorm,
  mara.lvorm AS mara_lvorm,
  mara.meins AS mara_meins,
  t141_marc.dpbed AS marc_dpbed,
  t141_mara.dpbed AS mara_dpbed,
  0 AS lastchange,
  pir.aenam AS aenam,
  marc.dispo AS dispo
FROM marc
INNER JOIN mara ON /* join condition not captured in parsed metadata */
INNER JOIN sdm_aor ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN Pir_All_Attributes AS pir ON /* join condition not captured in parsed metadata */
;