P_TimeDependentBufferLevels

DDL: P_TIMEDEPENDENTBUFFERLEVELS SQL: PDDBUFLVLS Type: view CONSUMPTION

P_TimeDependentBufferLevels is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_TimeDependentStockBuffer) and exposes 45 fields with key fields Material, Plant, MRPArea, BufferLevelStartDate. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_TimeDependentStockBuffer _StockActual from

Associations (1)

CardinalityTargetAliasCondition
[1..*] I_ProdBufLvlPrpslData _ProposedValues $projection.Material = _ProposedValues.Material and $projection.Plant = _ProposedValues.Plant and $projection.MRPArea = _ProposedValues.MRPArea and $projection.StockLevelProposalID = _ProposedValues.StockLevelProposalID

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PDDBUFLVLS view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (45)

KeyFieldSource TableSource FieldDescription
KEY Material I_TimeDependentStockBuffer Material Vehicle Model
KEY Plant I_TimeDependentStockBuffer Plant Valuation Area
KEY MRPArea I_TimeDependentStockBuffer MRPArea MRP Area
KEY BufferLevelStartDate I_TimeDependentStockBuffer BufferLevelStartDate Validity Start Date
MaterialSafetyStockQty I_TimeDependentStockBuffer MaterialSafetyStockQty Safety Stock
ReorderThresholdQuantity I_TimeDependentStockBuffer ReorderThresholdQuantity Reorder Point
BufferLevelEndDate I_TimeDependentStockBuffer BufferLevelEndDate Validity End Date
CurrentRedZone I_TimeDependentStockBuffer MaterialSafetyStockQty Safety Stock
StockLevelProposalID I_TimeDependentStockBuffer StockLevelProposalID Proposal ID
ProposalStartDate I_TimeDependentStockBuffer ProposalStartDate Proposal Valid From
ProposalVersion I_TimeDependentStockBuffer ProposalVersion Proposal Version
CurrentLeadTime _ProposedValues DecoupledLeadTime
CurrentIndividualLeadTime _ProposedValues IndividualLeadTime
CurrentAvgDailyUsage
CurrentVariabilityFactor _ProposedValues VariabilityFactor
CurrentLeadTimeFactor _ProposedValues LeadTimeFactor
MinimumOrderQuantity _ProposedValues MinimumOrderQuantity Minimum Order Quantity
BaseUnit I_TimeDependentStockBuffer BaseUnit Unit of Measure
ChangeMode I_TimeDependentStockBuffer ChangeMode Mode of Change
MinOrdQtyIsConsideredGreenZone
MaterialMaxStockLevelQuantity I_TimeDependentStockBuffer MaterialMaxStockLevelQuantity
CurrentYellowZone
CurrentGreenZone
BOMUsageCode _ProposedValues BOMUsageCode
LeadTimeCalculationMethod _ProposedValues LeadTimeCalculationMethod
BOMUsageValue
ConsumptionCode _ProposedValues ConsumptionCode
ConsumptionValue _ProposedValues ConsumptionValue
Currency _ProposedValues Currency Valuation Crcy
VariabilityCode _ProposedValues VariabilityCode
VariabilityQuantity _ProposedValues VariabilityQuantity
VariabilityUnit _ProposedValues VariabilityUnit
ReplenishmentLeadTimeCode _ProposedValues ReplenishmentLeadTimeCode
ReplenishmentLeadTimeValue _ProposedValues ReplenishmentLeadTimeValue
ProcurementType _ProposedValues ProcurementType Procurement
BillOfMaterialUUID _ProposedValues BillOfMaterialUUID Character Field of Length 12
SourceOfSupply _ProposedValues SourceOfSupply Supply source
UnitOfMeasure
MatlPrpslAdjmtFctrIsApplied
_ProposedValues _ProposedValues
_ProcmtText _ProposedValues _ProcmtText
_ReplnmtText _ProposedValues _ReplnmtText
_ConsumptionText _ProposedValues _ConsumptionText
_BOMUsgText _ProposedValues _BOMUsgText
_VarText _ProposedValues _VarText

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_TimeDependentBufferLevels.
-- 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: PDDBUFLVLS

CREATE VIEW P_TimeDependentBufferLevels AS
SELECT
  _StockActual.Material AS Material,
  _StockActual.Plant AS Plant,
  _StockActual.MRPArea AS MRPArea,
  _StockActual.BufferLevelStartDate AS BufferLevelStartDate,
  _StockActual.MaterialSafetyStockQty AS MaterialSafetyStockQty,
  _StockActual.ReorderThresholdQuantity AS ReorderThresholdQuantity,
  _StockActual.BufferLevelEndDate AS BufferLevelEndDate,
  _StockActual.MaterialSafetyStockQty AS CurrentRedZone,
  _StockActual.StockLevelProposalID AS StockLevelProposalID,
  _StockActual.ProposalStartDate AS ProposalStartDate,
  _StockActual.ProposalVersion AS ProposalVersion,
  _ProposedValues.DecoupledLeadTime AS CurrentLeadTime,
  _ProposedValues.IndividualLeadTime AS CurrentIndividualLeadTime,
  _ProposedValues._ProposalDets.AdjustedAverageDailyUsage AS CurrentAvgDailyUsage,
  _ProposedValues.VariabilityFactor AS CurrentVariabilityFactor,
  _ProposedValues.LeadTimeFactor AS CurrentLeadTimeFactor,
  _ProposedValues.MinimumOrderQuantity AS MinimumOrderQuantity,
  _StockActual.BaseUnit AS BaseUnit,
  _StockActual.ChangeMode AS ChangeMode,
  '' AS MinOrdQtyIsConsideredGreenZone,
  _StockActual.MaterialMaxStockLevelQuantity AS MaterialMaxStockLevelQuantity,
  _StockActual.ReorderThresholdQuantity - _StockActual.MaterialSafetyStockQty AS CurrentYellowZone,
  _StockActual.MaterialMaxStockLevelQuantity - ReorderThresholdQuantity AS CurrentGreenZone,
  _ProposedValues.BOMUsageCode AS BOMUsageCode,
  _ProposedValues.LeadTimeCalculationMethod AS LeadTimeCalculationMethod,
  cast(_ProposedValues.BOMUsageValue as abap.int4) AS BOMUsageValue,
  _ProposedValues.ConsumptionCode AS ConsumptionCode,
  _ProposedValues.ConsumptionValue AS ConsumptionValue,
  _ProposedValues.Currency AS Currency,
  _ProposedValues.VariabilityCode AS VariabilityCode,
  _ProposedValues.VariabilityQuantity AS VariabilityQuantity,
  _ProposedValues.VariabilityUnit AS VariabilityUnit,
  _ProposedValues.ReplenishmentLeadTimeCode AS ReplenishmentLeadTimeCode,
  _ProposedValues.ReplenishmentLeadTimeValue AS ReplenishmentLeadTimeValue,
  _ProposedValues.ProcurementType AS ProcurementType,
  _ProposedValues.BillOfMaterialUUID AS BillOfMaterialUUID,
  _ProposedValues.SourceOfSupply AS SourceOfSupply,
  cast('%' as meins) AS UnitOfMeasure,
  cast(' ' as xfeld ) AS MatlPrpslAdjmtFctrIsApplied,
  _ProposedValues._ProcmtText AS _ProcmtText,
  _ProposedValues._ReplnmtText AS _ReplnmtText,
  _ProposedValues._ConsumptionText AS _ConsumptionText,
  _ProposedValues._BOMUsgText AS _BOMUsgText,
  _ProposedValues._VarText AS _VarText
FROM I_TimeDependentStockBuffer AS _StockActual
LEFT OUTER JOIN I_ProdBufLvlPrpslData AS _ProposedValues ON Material = _ProposedValues.Material AND Plant = _ProposedValues.Plant AND MRPArea = _ProposedValues.MRPArea AND StockLevelProposalID = _ProposedValues.StockLevelProposalID  -- association [1..*]
;