P_BufferedProdChartDspHrzn

DDL: P_BUFFEREDPRODCHARTDSPHRZN SQL: PBUFRPRODDSPHRZ Type: view COMPOSITE

P_BufferedProdChartDspHrzn is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_ProdBufLvlPrpslData) and exposes 9 fields. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_ProdBufLvlPrpslData I_ProdBufLvlPrpslData from

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_ProfileAssgmtToPlant _ProfileAssign $projection.Plant = _ProfileAssign.Plant
[1..1] I_ProfileAssgmtToPlant _PlantDefaultThreshold _PlantDefaultThreshold.Plant = ''

Annotations (5)

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

Fields (9)

KeyFieldSource TableSource FieldDescription
Material Material Vehicle Model
Plant Plant Valuation Area
MRPArea MRPArea MRP Area
ProposalEndDate ProposalEndDate Proposal Valid To
HorizonDaysInPast Horizon for past
HorizonDaysInFuture Horizon for future
DecoupledLeadTime DecoupledLeadTime Decoupled Lead Time
HorizonConstant
SpikeHorizonMultiplierendasSpikeHorizon

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_BufferedProdChartDspHrzn.
-- 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: PBUFRPRODDSPHRZ

CREATE VIEW P_BufferedProdChartDspHrzn AS
SELECT
  Material,
  Plant,
  MRPArea,
  ProposalEndDate,
  cast(HorizonDaysInPast as abap.dec(7,2)) AS HorizonDaysInPast,
  cast(HorizonDaysInFuture as abap.dec(7,2)) AS HorizonDaysInFuture,
  DecoupledLeadTime,
  cast(cast( 180 as abap.int4) as abap.dec(7,2)) AS HorizonConstant,
  case when _ProfileAssign.Plant = Plant then _ProfileAssign.SpikeHorizonConstant + DecoupledLeadTime * _ProfileAssign.SpikeHorizonMultiplier else _PlantDefaultThreshold.SpikeHorizonConstant + DecoupledLeadTime * _PlantDefaultThreshold.SpikeHorizonMultiplier end as SpikeHorizon AS SpikeHorizonMultiplierendasSpikeHorizon
FROM I_ProdBufLvlPrpslData
LEFT OUTER JOIN I_ProfileAssgmtToPlant AS _ProfileAssign ON Plant = _ProfileAssign.Plant  -- association [1..1]
LEFT OUTER JOIN I_ProfileAssgmtToPlant AS _PlantDefaultThreshold ON _PlantDefaultThreshold.Plant = ''  -- association [1..1]
;