P_MaterialDemandForecast

DDL: P_MATERIALDEMANDFORECAST SQL: PMATLDMNDFCST Type: view COMPOSITE Package: PPH_DD_VDM_STLM

Private view for material demand forecast

P_MaterialDemandForecast is a Composite CDS View that provides data about "Private view for material demand forecast" in SAP S/4HANA. It reads from 3 data sources (P_DailyPlndIndepRqmt, P_MonthlyPlndIndepRqmtByDate, P_WeeklyPlndIndepRqmtByDate) and exposes 40 fields with key fields Product, Plant, MRPArea, Plant, MRPArea. It has 2 associations to related views. Part of development package PPH_DD_VDM_STLM.

Data Sources (3)

SourceAliasJoin Type
P_DailyPlndIndepRqmt _DPIR from
P_MonthlyPlndIndepRqmtByDate P_MonthlyPlndIndepRqmtByDate union
P_WeeklyPlndIndepRqmtByDate P_WeeklyPlndIndepRqmtByDate union

Associations (2)

CardinalityTargetAliasCondition
[1..1] P_DDProductCalcFields _DDProdCF $projection.Product = _DDProdCF.Material and $projection.Plant = _DDProdCF.Plant and $projection.MRPArea = _DDProdCF.MRPArea
[1..1] I_Material _Material $projection.Product = _Material.Material

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PMATLDMNDFCST view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (40)

KeyFieldSource TableSource FieldDescription
KEY Product Product Product Sold
KEY Plant Plant Valuation Area
KEY MRPArea MRPArea MRP Area
MaterialDocumentYear
MaterialDocument
MaterialDocumentItem
MaterialDocumentRecordType
PostingDate WorkingDayDate Posting Date for GR
QuantityInBaseUnit PlannedQuantity Quantity
MaterialBaseUnit _Material MaterialBaseUnit Valuation Unit
StorageLocation
Supplier
MRPAreaCategory
MaterialkeyProduct
KEY Plant Plant Valuation Area
KEY MRPArea MRPArea MRP Area
MaterialDocumentYear
MaterialDocument
MaterialDocumentItem
MaterialDocumentRecordType
PostingDate PostingDate Posting Date for GR
QuantityInBaseUnit QuantityInBaseUnit Quantity
MaterialBaseUnit _Material MaterialBaseUnit Valuation Unit
StorageLocation
Supplier
MRPAreaCategory
MaterialkeyProduct
KEY Plant Plant Valuation Area
KEY MRPArea MRPArea MRP Area
MaterialDocumentYear
MaterialDocument
MaterialDocumentItem
MaterialDocumentRecordType
PostingDate PostingDate Posting Date for GR
QuantityInBaseUnit QuantityInBaseUnit Quantity
MaterialBaseUnit _Material MaterialBaseUnit Valuation Unit
StorageLocation
Supplier
MRPAreaCategory
TotalNoOfDays _DDProdCF TotalNoOfDays

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 P_MaterialDemandForecast.
-- 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: PMATLDMNDFCST

CREATE VIEW P_MaterialDemandForecast AS
SELECT
  Product,
  Plant,
  MRPArea,
  cast('' as abap.char(10)) AS MaterialDocumentYear,
  cast('' as abap.char(10)) AS MaterialDocument,
  cast('' as abap.char(10)) AS MaterialDocumentItem,
  cast('' as abap.char(10)) AS MaterialDocumentRecordType,
  WorkingDayDate AS PostingDate,
  PlannedQuantity AS QuantityInBaseUnit,
  _Material.MaterialBaseUnit AS MaterialBaseUnit,
  cast('' as abap.char(10)) AS StorageLocation,
  cast('' as abap.char(10)) AS Supplier,
  cast('' as abap.char(10)) AS MRPAreaCategory,
  _DDProdCF.TotalNoOfDays AS MaterialkeyProduct,
  _DDProdCF.TotalNoOfDays AS TotalNoOfDays
FROM P_DailyPlndIndepRqmt AS _DPIR
LEFT OUTER JOIN P_DDProductCalcFields AS _DDProdCF ON Product = _DDProdCF.Material AND Plant = _DDProdCF.Plant AND MRPArea = _DDProdCF.MRPArea  -- association [1..1]
LEFT OUTER JOIN I_Material AS _Material ON Product = _Material.Material  -- association [1..1]
-- UNION with additional select branch(es): P_WeeklyPlndIndepRqmtByDate, P_MonthlyPlndIndepRqmtByDate
;