P_TimeDependentStockBuffer

DDL: P_TIMEDEPENDENTSTOCKBUFFER SQL: PDDSTBUFTP Type: view CONSUMPTION Package: ODATA_PP_DD_STLM

Private View for Demand driven Adopted Stock Levels

P_TimeDependentStockBuffer is a Consumption CDS View that provides data about "Private View for Demand driven Adopted Stock Levels" in SAP S/4HANA. It reads from 1 data source (I_TimeDependentStockBuffer) and exposes 44 fields with key fields Material, Plant, MRPArea, BufferLevelStartDate. It has 1 association to related views. Part of development package ODATA_PP_DD_STLM.

Data Sources (1)

SourceAliasJoin Type
I_TimeDependentStockBuffer _StockActual from

Associations (1)

CardinalityTargetAliasCondition
[1..*] I_StockLevelProposal _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 PDDSTBUFTP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (44)

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
ProposalStartDate I_TimeDependentStockBuffer ProposalStartDate Proposal Valid From
ProposalVersion I_TimeDependentStockBuffer ProposalVersion Proposal Version
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
IsMinOrderQtyConsidered _ProposedValues IsMinOrderQtyConsidered
CurrentLeadTime _ProposedValues DecoupledLeadTime
CurrentIndividualLeadTime _ProposedValues IndividualLeadTime
CurrentAvgDailyUsage _ProposedValues AverageDailyUsage
CurrentVariabilityFactor _ProposedValues VariabilityFactor
CurrentLeadTimeFactor _ProposedValues LeadTimeFactor
BaseUnit I_TimeDependentStockBuffer BaseUnit Unit of Measure
MaterialMaxStockLevelQuantity I_TimeDependentStockBuffer MaterialMaxStockLevelQuantity
MaterialSafetyStockQty MaterialSafetyStockQty Safety Stock
CurrentYellowZone
CurrentGreenZone
BOMUsageCode _ProposedValues BOMUsageCode
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
CurRedZoneAdjustmentFctr _ProposedValues CurRedZoneAdjustmentFctr
CurYellowZoneAdjustmentFctr _ProposedValues CurYellowZoneAdjustmentFctr
CurGreenZoneAdjustmentFctr _ProposedValues CurGreenZoneAdjustmentFctr
_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_TimeDependentStockBuffer.
-- 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: PDDSTBUFTP

CREATE VIEW P_TimeDependentStockBuffer AS
SELECT
  _StockActual.Material AS Material,
  _StockActual.Plant AS Plant,
  _StockActual.MRPArea AS MRPArea,
  _StockActual.BufferLevelStartDate AS BufferLevelStartDate,
  _StockActual.ProposalStartDate AS ProposalStartDate,
  _StockActual.ProposalVersion AS ProposalVersion,
  _StockActual.ReorderThresholdQuantity AS ReorderThresholdQuantity,
  _StockActual.BufferLevelEndDate AS BufferLevelEndDate,
  _StockActual.MaterialSafetyStockQty AS CurrentRedZone,
  _StockActual.StockLevelProposalID AS StockLevelProposalID,
  _ProposedValues.IsMinOrderQtyConsidered AS IsMinOrderQtyConsidered,
  _ProposedValues.DecoupledLeadTime AS CurrentLeadTime,
  _ProposedValues.IndividualLeadTime AS CurrentIndividualLeadTime,
  _ProposedValues.AverageDailyUsage AS CurrentAvgDailyUsage,
  _ProposedValues.VariabilityFactor AS CurrentVariabilityFactor,
  _ProposedValues.LeadTimeFactor AS CurrentLeadTimeFactor,
  _StockActual.BaseUnit AS BaseUnit,
  _StockActual.MaterialMaxStockLevelQuantity AS MaterialMaxStockLevelQuantity,
  MaterialSafetyStockQty,
  _StockActual.ReorderThresholdQuantity - _StockActual.MaterialSafetyStockQty AS CurrentYellowZone,
  _StockActual.MaterialMaxStockLevelQuantity - ReorderThresholdQuantity AS CurrentGreenZone,
  _ProposedValues.BOMUsageCode AS BOMUsageCode,
  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,
  _ProposedValues.CurRedZoneAdjustmentFctr AS CurRedZoneAdjustmentFctr,
  _ProposedValues.CurYellowZoneAdjustmentFctr AS CurYellowZoneAdjustmentFctr,
  _ProposedValues.CurGreenZoneAdjustmentFctr AS CurGreenZoneAdjustmentFctr,
  _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_StockLevelProposal AS _ProposedValues ON Material = _ProposedValues.Material AND Plant = _ProposedValues.Plant AND MRPArea = _ProposedValues.MRPArea AND StockLevelProposalID = _ProposedValues.StockLevelProposalID  -- association [1..*]
;