I_StockLevelProposalZones

DDL: I_STOCKLEVELPROPOSALZONES SQL: IDDSTKLVLPRPSLZN Type: view COMPOSITE Package: PPH_DD_VDM_STLM

Demand Driven Stock Level Proposal Zones

I_StockLevelProposalZones is a Composite CDS View that provides data about "Demand Driven Stock Level Proposal Zones" in SAP S/4HANA. It reads from 1 data source (I_ProdBufLvlPrpslData) and exposes 70 fields with key fields Material, Plant, MRPArea, ProposalStartDate, ProposalVersion. It has 11 associations to related views. Part of development package PPH_DD_VDM_STLM.

Data Sources (1)

SourceAliasJoin Type
I_ProdBufLvlPrpslData _prpsl_hdr from

Associations (11)

CardinalityTargetAliasCondition
[1..1] I_BufferedMaterialPlant _BufMatPlant $projection.Material = _BufMatPlant.Material and $projection.Plant = _BufMatPlant.Plant
[1..1] I_MaterialMRPArea _MatMRPArea $projection.Material = _MatMRPArea.Material and $projection.Plant = _MatMRPArea.Plant and $projection.MRPArea = _MatMRPArea.MRPArea
[1..1] I_StockLevelPrpslDets _StockProposalDets $projection.Material = _StockProposalDets.Material and $projection.Plant = _StockProposalDets.Plant and $projection.MRPArea = _StockProposalDets.MRPArea and $projection.ProposalStartDate = _StockProposalDets.ProposalStartDate and $projection.ProposalVersion = _StockProposalDets.ProposalVersion and $projection.ProposalStartDate = _StockProposalDets.AvgDailyUsageCalcdForDate
[0..1] I_ProposalStatusText _StatusText $projection.StockLevelProposalStatus = _StatusText.StockLevelProposalStatus and _StatusText.Language = $session.system_language
[0..1] I_MinOrdQtyConsideredText _MinOrdQtyConsText $projection.IsMinOrderQtyConsidered = _MinOrdQtyConsText.IsMinOrderQtyConsidered and _MinOrdQtyConsText.Language = $session.system_language
[0..1] I_ConsumptionText _ConsumptionText $projection.ConsumptionCode = _ConsumptionText.ConsumptionCode and _ConsumptionText.Language = $session.system_language
[0..1] I_VariabilityText _VarText $projection.VariabilityCode = _VarText.VariabilityCode and _VarText.Language = $session.system_language
[0..1] I_ReplenishmentLeadTimeText _ReplnmtText $projection.ReplenishmentLeadTimeCode = _ReplnmtText.ReplenishmentLeadTimeCode and _ReplnmtText.Language = $session.system_language
[0..1] I_ProcurementTypeText _ProcmtText $projection.ProcurementType = _ProcmtText.ProcurementType and _ProcmtText.Language = $session.system_language
[0..1] I_BOMUsageText _BOMUsgText $projection.BOMUsageCode = _BOMUsgText.BOMUsageCode and _BOMUsgText.Language = $session.system_language
[0..1] I_SOSTypeText _SOSText $projection.SOSType = _SOSText.SOSType and _SOSText.Language = $session.system_language

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName IDDSTKLVLPRPSLZN view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Demand Driven Stock Level Proposal Zones view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view

Fields (70)

KeyFieldSource TableSource FieldDescription
KEY Material I_ProdBufLvlPrpslData Material Vehicle Model
KEY Plant I_ProdBufLvlPrpslData Plant Valuation Area
KEY MRPArea MRPArea MRP Area
KEY ProposalStartDate ProposalStartDate Proposal Valid From
KEY ProposalVersion ProposalVersion Proposal Version
ProposalEndDate ProposalEndDate Proposal Valid To
MaterialGroup
PurchasingGroup _BufMatPlant PurchasingGroup Purchasing Group
StockLevelProposalID StockLevelProposalID Proposal ID
ConsumptionCode ConsumptionCode Value Indicator
ConsumptionValue ConsumptionValue
Currency Currency Valuation Crcy
VariabilityCode VariabilityCode Variability Indicator
VariabilityQuantity VariabilityQuantity Value from XYZ Analysis
VariabilityUnit VariabilityUnit Base Unit
ReplenishmentLeadTimeCode ReplenishmentLeadTimeCode DLT Indicator
ProcurementType ProcurementType Procurement
ReplenishmentLeadTimeValue ReplenishmentLeadTimeValue Value from EFG Analysis
BOMUsageCode BOMUsageCode BOM Usage Indicator
BOMUsageValue BOMUsageValue Value from PQR Analysis
IndividualLeadTime IndividualLeadTime Individual Lead Time
DecoupledLeadTime DecoupledLeadTime Decoupled Lead Time
SourceOfSupply SourceOfSupply Supply source
SOSType SOSType SRVC Source Type
LeadTimeFactor LeadTimeFactor DLT Factor
VariabilityFactor VariabilityFactor Variabilty Factor
StockLevelProposalStatus StockLevelProposalStatus
ProposalStatusChangeDate ProposalStatusChangeDate Time Stamp
IsMinOrderQtyConsidered IsMinOrderQtyConsidered Is MOQ Considered
MinimumOrderQuantity MinimumOrderQuantity Minimum Order Quantity
MinOrderQtyUnit MinOrderQtyUnit Base Unit
PrevRedZoneAdjustmentFctr PrevRedZoneAdjustmentFctr Adj. Factor Red Zone
PrevYellowZoneAdjustmentFctr PrevYellowZoneAdjustmentFctr Adj Fctr Yellow Zone
PrevGreenZoneAdjustmentFctr PrevGreenZoneAdjustmentFctr Adj. Fctr Green Zone
CurRedZoneAdjustmentFctr CurRedZoneAdjustmentFctr Adj. Factor Red Zone
CurYellowZoneAdjustmentFctr CurYellowZoneAdjustmentFctr Adj. Factor Yel Zone
CurGreenZoneAdjustmentFctr CurGreenZoneAdjustmentFctr Adj. Fctr. Gree Zone
OrderCycle OrderCycle Order Cycle
BillOfMaterialUUID BillOfMaterialUUID Character Field of Length 12
BOMExplosionDate BOMExplosionDate Explosion Date
CreatedByUser CreatedByUser User Name
LastChangedByUser LastChangedByUser User Name
CreationDateTime CreationDateTime Timestamp
LastChangeDateTime LastChangeDateTime Timestamp
VariabilityFactorasProposedRedZone
ProposedYellowZone
ProposedGreenZone
ProposedGreenZoneMinOrdQty I_ProdBufLvlPrpslData MinimumOrderQuantity Minimum Order Quantity
ProposedGreenZoneOrdCycle
VariabilityFactorasOriglProposedRedZone
OriglProposedYellowZone
OriglProposedGreenZone
OriglGreenZoneMinOrdQty I_ProdBufLvlPrpslData MinimumOrderQuantity Minimum Order Quantity
OriglGreenZoneOrdCycle
AverageDailyUsage _StockProposalDets AverageDailyUsage
AvgDailyUsageUnit _StockProposalDets AvgDailyUsageUnit
MaterialBaseUnit
MRPGroupendasMRPGroup
MRPControllerendasMRPController
UnitOfMeasureNumberOfDecimals
_StatusText _StatusText
_MinOrdQtyConsText _MinOrdQtyConsText
_ConsumptionText _ConsumptionText
_VarText _VarText
_ReplnmtText _ReplnmtText
_ProcmtText _ProcmtText
_BOMUsgText _BOMUsgText
_SOSText _SOSText
_BufMatPlant _BufMatPlant
_MatMRPArea _MatMRPArea

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 I_StockLevelProposalZones.
-- 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: IDDSTKLVLPRPSLZN

CREATE VIEW I_StockLevelProposalZones AS
SELECT
  _prpsl_hdr.Material AS Material,
  _prpsl_hdr.Plant AS Plant,
  MRPArea,
  ProposalStartDate,
  ProposalVersion,
  ProposalEndDate,
  _BufMatPlant._Material.ProductGroup AS MaterialGroup,
  _BufMatPlant.PurchasingGroup AS PurchasingGroup,
  StockLevelProposalID,
  ConsumptionCode,
  ConsumptionValue,
  Currency,
  VariabilityCode,
  VariabilityQuantity,
  VariabilityUnit,
  ReplenishmentLeadTimeCode,
  ProcurementType,
  ReplenishmentLeadTimeValue,
  BOMUsageCode,
  BOMUsageValue,
  IndividualLeadTime,
  DecoupledLeadTime,
  SourceOfSupply,
  SOSType,
  LeadTimeFactor,
  VariabilityFactor,
  StockLevelProposalStatus,
  ProposalStatusChangeDate,
  IsMinOrderQtyConsidered,
  MinimumOrderQuantity,
  MinOrderQtyUnit,
  PrevRedZoneAdjustmentFctr,
  PrevYellowZoneAdjustmentFctr,
  PrevGreenZoneAdjustmentFctr,
  CurRedZoneAdjustmentFctr,
  CurYellowZoneAdjustmentFctr,
  CurGreenZoneAdjustmentFctr,
  OrderCycle,
  BillOfMaterialUUID,
  BOMExplosionDate,
  CreatedByUser,
  LastChangedByUser,
  CreationDateTime,
  LastChangeDateTime,
  (_prpsl_hdr.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * _prpsl_hdr.LeadTimeFactor) + (_prpsl_hdr.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * _prpsl_hdr.LeadTimeFactor) * _prpsl_hdr.VariabilityFactor as ProposedRedZone AS VariabilityFactorasProposedRedZone,
  _prpsl_hdr.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage AS ProposedYellowZone,
  _prpsl_hdr.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * _prpsl_hdr.LeadTimeFactor AS ProposedGreenZone,
  _prpsl_hdr.MinimumOrderQuantity AS ProposedGreenZoneMinOrdQty,
  _StockProposalDets.AverageDailyUsage * _prpsl_hdr.OrderCycle AS ProposedGreenZoneOrdCycle,
  (_prpsl_hdr.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * _prpsl_hdr.LeadTimeFactor) + (_prpsl_hdr.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * _prpsl_hdr.LeadTimeFactor) * _prpsl_hdr.VariabilityFactor as OriglProposedRedZone AS VariabilityFactorasOriglProposedRedZone,
  _prpsl_hdr.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage AS OriglProposedYellowZone,
  _prpsl_hdr.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * _prpsl_hdr.LeadTimeFactor AS OriglProposedGreenZone,
  _prpsl_hdr.MinimumOrderQuantity AS OriglGreenZoneMinOrdQty,
  _StockProposalDets.AverageDailyUsage * _prpsl_hdr.OrderCycle AS OriglGreenZoneOrdCycle,
  _StockProposalDets.AverageDailyUsage AS AverageDailyUsage,
  _StockProposalDets.AvgDailyUsageUnit AS AvgDailyUsageUnit,
  _BufMatPlant._Material.BaseUnit AS MaterialBaseUnit,
  case _BufMatPlant.IsMRPAreaExisting when 'X' then case when _BufMatPlant.Plant <> _MatMRPArea.MRPArea then _MatMRPArea.MRPGroup else _BufMatPlant.MRPGroup end else _BufMatPlant.MRPGroup end as MRPGroup AS MRPGroupendasMRPGroup,
  case _BufMatPlant.IsMRPAreaExisting when 'X' then case when _BufMatPlant.Plant <> _MatMRPArea.MRPArea then _MatMRPArea.MRPController else _BufMatPlant.MRPController end else _BufMatPlant.MRPController end as MRPController AS MRPControllerendasMRPController,
  _BufMatPlant._Material._BaseUnitOfMeasure.UnitOfMeasureNumberOfDecimals AS UnitOfMeasureNumberOfDecimals
FROM I_ProdBufLvlPrpslData AS _prpsl_hdr
LEFT OUTER JOIN I_BufferedMaterialPlant AS _BufMatPlant ON Material = _BufMatPlant.Material AND Plant = _BufMatPlant.Plant  -- association [1..1]
LEFT OUTER JOIN I_MaterialMRPArea AS _MatMRPArea ON Material = _MatMRPArea.Material AND Plant = _MatMRPArea.Plant AND MRPArea = _MatMRPArea.MRPArea  -- association [1..1]
LEFT OUTER JOIN I_StockLevelPrpslDets AS _StockProposalDets ON Material = _StockProposalDets.Material AND Plant = _StockProposalDets.Plant AND MRPArea = _StockProposalDets.MRPArea AND ProposalStartDate = _StockProposalDets.ProposalStartDate AND ProposalVersion = _StockProposalDets.ProposalVersion AND ProposalStartDate = _StockProposalDets.AvgDailyUsageCalcdForDate  -- association [1..1]
LEFT OUTER JOIN I_ProposalStatusText AS _StatusText ON StockLevelProposalStatus = _StatusText.StockLevelProposalStatus AND _StatusText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_MinOrdQtyConsideredText AS _MinOrdQtyConsText ON IsMinOrderQtyConsidered = _MinOrdQtyConsText.IsMinOrderQtyConsidered AND _MinOrdQtyConsText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_ConsumptionText AS _ConsumptionText ON ConsumptionCode = _ConsumptionText.ConsumptionCode AND _ConsumptionText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_VariabilityText AS _VarText ON VariabilityCode = _VarText.VariabilityCode AND _VarText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_ReplenishmentLeadTimeText AS _ReplnmtText ON ReplenishmentLeadTimeCode = _ReplnmtText.ReplenishmentLeadTimeCode AND _ReplnmtText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_ProcurementTypeText AS _ProcmtText ON ProcurementType = _ProcmtText.ProcurementType AND _ProcmtText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_BOMUsageText AS _BOMUsgText ON BOMUsageCode = _BOMUsgText.BOMUsageCode AND _BOMUsgText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_SOSTypeText AS _SOSText ON SOSType = _SOSText.SOSType AND _SOSText.Language = $session.system_language  -- association [0..1]
;