P_ProdBufLvlMgmtCalcFields

DDL: P_PRODBUFLVLMGMTCALCFIELDS SQL: PBUFLVLMNGCF Type: view CONSUMPTION

P_ProdBufLvlMgmtCalcFields is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (P_ProdBufLvlMgmtCalcFields1) and exposes 43 fields with key fields Material, Plant, MRPArea, ProposalStartDate, ProposalVersion. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_ProdBufLvlMgmtCalcFields1 _CalFields from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_HasMinOrderQtyChangedText _MinOrdQtyText _MinOrdQtyText.MinOrderQuantityHasChanged = _CalFields.MinOrderQuantityHasChanged and _MinOrdQtyText.Language = $session.system_language
[1..1] I_ProductProfileChangeCatText _ProductProfileChangeCatText $projection.ProductProfileChangeCategory = _ProductProfileChangeCatText.ProductProfileChangeCategory and _ProductProfileChangeCatText.Language = $session.system_language
[1..1] I_ProductProfileHasChangedText _HasProfileChangedT $projection.ProductProfileHasChanged = _HasProfileChangedT.ProductProfileHasChanged and _HasProfileChangedT.Language = $session.system_language

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PBUFLVLMNGCF view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (43)

KeyFieldSource TableSource FieldDescription
KEY Material Material Vehicle Model
KEY Plant Plant Valuation Area
KEY MRPArea MRPArea MRP Area
KEY ProposalStartDate ProposalStartDate
KEY ProposalVersion ProposalVersion
ProposalStatusChangeDate ProposalStatusChangeDate
ProposalMode ProposalMode
ProposalModeDescription ProposalModeDescription
IsMinOrderQtyConsidered IsMinOrderQtyConsidered
AverageDailyUsage AverageDailyUsage
AverageDailyUsageMode AverageDailyUsageMode
AverageDailyUsageModeDesc AverageDailyUsageModeDesc
VariabilityFactor VariabilityFactor
DecoupledLeadTime DecoupledLeadTime
PurchasingGroup PurchasingGroup Purchasing Group
MRPGroup MRPGroup MRP Group
HorizonDaysInPast HorizonDaysInPast
HorizonDaysInFuture HorizonDaysInFuture
ConsumptionCode ConsumptionCode
ReplenishmentLeadTimeCode ReplenishmentLeadTimeCode
ReplenishmentLeadTimeValue ReplenishmentLeadTimeValue
BOMUsageCode BOMUsageCode
VariabilityCode VariabilityCode
VariabilityQuantity VariabilityQuantity
ProcurementType ProcurementType Procurement
BOMExplosionDate BOMExplosionDate
MaxStockDifference
MatlProposedMaxStock
MaterialMaxStockLevelQuantity MaterialMaxStockLevelQuantity
MinOrderQuantityHasChanged P_ProdBufLvlMgmtCalcFields1 MinOrderQuantityHasChanged
ProductProfileChangeCategory P_ProdBufLvlMgmtCalcFields1 ProductProfileChangeCategory
ProductProfileHasChanged P_ProdBufLvlMgmtCalcFields1 ProductProfileHasChanged
AdjustmentType P_ProdBufLvlMgmtCalcFields1 AdjustmentType
DifferenceInDays
LeadTimeDifference
VariabilityFactorDifference
VariabilityFactorDeviationRate
LeadTimeDeviationRate
AvgDailyUsageDeviationRate
_StockActual _StockActual
_MinOrdQtyText _MinOrdQtyText
_ProductProfileChangeCatText _ProductProfileChangeCatText
_HasProfileChangedT _HasProfileChangedT

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_ProdBufLvlMgmtCalcFields.
-- 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: PBUFLVLMNGCF

CREATE VIEW P_ProdBufLvlMgmtCalcFields AS
SELECT
  Material,
  Plant,
  MRPArea,
  ProposalStartDate,
  ProposalVersion,
  ProposalStatusChangeDate,
  ProposalMode,
  ProposalModeDescription,
  IsMinOrderQtyConsidered,
  AverageDailyUsage,
  AverageDailyUsageMode,
  AverageDailyUsageModeDesc,
  VariabilityFactor,
  DecoupledLeadTime,
  PurchasingGroup,
  MRPGroup,
  HorizonDaysInPast,
  HorizonDaysInFuture,
  ConsumptionCode,
  ReplenishmentLeadTimeCode,
  ReplenishmentLeadTimeValue,
  BOMUsageCode,
  VariabilityCode,
  VariabilityQuantity,
  ProcurementType,
  BOMExplosionDate,
  cast(cast(MaxStockDifference as abap.quan(13,3)) as pph_maxstockdifference preserving type) AS MaxStockDifference,
  cast(cast(MatlProposedMaxStock as abap.quan(13,3)) as pph_proposedmaxstock preserving type) AS MatlProposedMaxStock,
  MaterialMaxStockLevelQuantity,
  _CalFields.MinOrderQuantityHasChanged AS MinOrderQuantityHasChanged,
  _CalFields.ProductProfileChangeCategory AS ProductProfileChangeCategory,
  _CalFields.ProductProfileHasChanged AS ProductProfileHasChanged,
  _CalFields.AdjustmentType AS AdjustmentType,
  cast(_CalFields.DifferenceInDays as val_text) AS DifferenceInDays,
  cast(cast(division(LeadTimeDifference, 1, 2) as abap.dec(7,2)) as pph_leadtimedifference preserving type ) AS LeadTimeDifference,
  division(VariabilityFactorDifference, 1, 2) AS VariabilityFactorDifference,
  fltp_to_dec(VariabilityFactorDeviationRate as abap.dec( 12, 2 )) AS VariabilityFactorDeviationRate,
  cast(fltp_to_dec(LeadTimeDeviationRate as abap.dec( 7, 2 )) as pph_leadtimedifference preserving type ) AS LeadTimeDeviationRate,
  cast(cast(0 as abap.quan(13,3)) as pph_avgdailyusagedifference preserving type) AS AvgDailyUsageDeviationRate
FROM P_ProdBufLvlMgmtCalcFields1 AS _CalFields
LEFT OUTER JOIN I_HasMinOrderQtyChangedText AS _MinOrdQtyText ON _MinOrdQtyText.MinOrderQuantityHasChanged = _CalFields.MinOrderQuantityHasChanged AND _MinOrdQtyText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_ProductProfileChangeCatText AS _ProductProfileChangeCatText ON ProductProfileChangeCategory = _ProductProfileChangeCatText.ProductProfileChangeCategory AND _ProductProfileChangeCatText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_ProductProfileHasChangedText AS _HasProfileChangedT ON ProductProfileHasChanged = _HasProfileChangedT.ProductProfileHasChanged AND _HasProfileChangedT.Language = $session.system_language  -- association [1..1]
;