P_DemandDrivenCalcValues
Calculated Values for DD MRP
P_DemandDrivenCalcValues is a Consumption CDS View that provides data about "Calculated Values for DD MRP" in SAP S/4HANA. It reads from 1 data source (I_DemandDrivenMaterial) and exposes 78 fields with key fields Plant, Material, MRPArea. It has 13 associations to related views. Part of development package ODATA_PP_DD_REPL.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_DemandDrivenMaterial | pph_ddl_mat | from |
Associations (13)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_DemandDrivenProduct1 | pph_prod | $projection.Material = pph_prod.Material and $projection.Plant = pph_prod.Plant and $projection.MRPArea = pph_prod.MRPArea |
| [0..1] | I_ExpeditedProduct | _ExpeditedProduct | $projection.Material = _ExpeditedProduct.Material and $projection.Plant = _ExpeditedProduct.Plant and $projection.MRPArea = _ExpeditedProduct.MRPArea |
| [1..1] | P_FirstStockOutValues | _FirstStockOutVal | $projection.Material = _FirstStockOutVal.Material and $projection.Plant = _FirstStockOutVal.Plant and $projection.MRPArea = _FirstStockOutVal.MRPArea |
| [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_BOMUsageText | _BOMUsgText | $projection.BOMUsageCode = _BOMUsgText.BOMUsageCode and _BOMUsgText.Language = $session.system_language |
| [0..1] | I_ProcurementTypeText | _ProcmtText | $projection.ProcurementType = _ProcmtText.ProcurementType and _ProcmtText.Language = $session.system_language |
| [0..1] | I_OnHandStockStatusText | _OnHandStockStatusText | $projection.OnHandStockStatus = _OnHandStockStatusText.OnHandStockStatusCode and _OnHandStockStatusText.Language = $session.system_language |
| [0..1] | I_ProdPlngPrioStatusText | _ProdPlngPrioStatusText | $projection.MaterialPlanningPriorityStatus = _ProdPlngPrioStatusText.ProdPlaningPriorityStatusCode and _ProdPlngPrioStatusText.Language = $session.system_language |
| [0..1] | I_DemandDrivenPlanningStatus | _PlanningStatus | $projection.Material = _PlanningStatus.Material and $projection.Plant = _PlanningStatus.Plant and _PlanningStatus.UserID = $session.user |
| [0..1] | I_ProdPlngActionStatusText | _ProdPlngActionStatusText | $projection.OrderPlanningStatusText = _ProdPlngActionStatusText.ProdPlanningActionStatusCode and _ProdPlngActionStatusText.Language = $session.system_language |
| [0..1] | I_ProjectedStockOutStatusText | _ProjectedStockOutStatusText | $projection.projectedstockoutstatus = _ProjectedStockOutStatusText.ProjectedStockOutStatus and _ProjectedStockOutStatusText.Language = $session.system_language |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PDDCALCVAL | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| EndUserText.label | Calculated Values for DD MRP | view |
Fields (78)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Plant | I_DemandDrivenMaterial | Plant | Valuation Area |
| KEY | Material | I_DemandDrivenMaterial | Material | Vehicle Model |
| KEY | MRPArea | I_DemandDrivenMaterial | MRPArea | MRP Area |
| BaseUnitofMeasure | I_DemandDrivenMaterial | BaseUnitofMeasure | Base Unit | |
| MaterialBaseUnit | I_DemandDrivenMaterial | MaterialBaseUnit | Valuation Unit | |
| MRPController | I_DemandDrivenMaterial | MRPController | MRP Controller | |
| MaterialGroup | I_DemandDrivenMaterial | MaterialGroup | Product Group | |
| MRPType | I_DemandDrivenMaterial | MRPType | MRP Type | |
| MRPGroup | I_DemandDrivenMaterial | MRPGroup | MRP Group | |
| DecoupledLeadTime | ||||
| ConsumptionDescription | ||||
| ReplenishmentLeadTimeDesc | ||||
| BOMUsageDescription | ||||
| VariabilityDescription | ||||
| ConsumptionCode | ||||
| ProductConsumptionAmount | pph_prod | ProductConsumptionAmount | ||
| Currency | pph_prod | Currency | Valuation Crcy | |
| ReplenishmentLeadTimeCode | ||||
| ReplenishmentLeadTimeValue | pph_prod | ReplenishmentLeadTimeValue | ||
| BOMUsageCode | ||||
| BOMUsageValue | pph_prod | BOMUsageValue | ||
| VariabilityCode | ||||
| VariabilityQuantity | pph_prod | VariabilityQuantity | ||
| ProcurementType | ||||
| MaterialSafetyStockQty | I_DemandDrivenMaterial | MaterialSafetyStockQty | Safety Stock | |
| MaterialSafetyStockTodayQty | I_DemandDrivenMaterial | MaterialSafetyStockTodayQty | ||
| MaterialMaxStockLevelQuantity | I_DemandDrivenMaterial | MaterialMaxStockLevelQuantity | Max.Stock Level | |
| ReorderThresholdQuantity | I_DemandDrivenMaterial | ReorderThresholdQuantity | Reorder Point | |
| ThresholdPercentage | I_DemandDrivenMaterial | ThresholdPercentage | ||
| QualifiedDemandQuantity | _FirstStockOutVal | QualifiedDemandQuantity | ||
| NetFlowPositionQuantity | _FirstStockOutVal | NetFlowPositionQuantity | ||
| OnHandStockQuantity | _FirstStockOutVal | OnHandStockQuantity | ||
| OpenSupplyQuantity | _FirstStockOutVal | OpenSupplyQuantity | ||
| dec82endasOnHandBufferStatusQuantity | ||||
| dec82endasMaterialPlanningPriority | ||||
| dec313else0endasProposedQuantity | ||||
| ExpeditedDateTime | _ExpeditedProduct | ExpeditedDateTime | ||
| ExpeditedOnHandStockStatus | _ExpeditedProduct | ExpeditedOnHandStockStatus | ||
| ExpeditedQuantity | _ExpeditedProduct | ExpeditedQuantity | Expedited Quantity | |
| ProjectedOnHandStockStatus | _FirstStockOutVal | ProjectedOnHandStockStatus | ||
| IsWithinDLT | _FirstStockOutVal | IsWithinDLT | ||
| StockOutAlertIsPresent | _FirstStockOutVal | StockOutAlertIsPresent | ||
| FirstStkOutDate | _FirstStockOutVal | FirstStkOutDate | ||
| FirstStkOutProjtdStkQty | _FirstStockOutVal | FirstStkOutProjtdStkQty | ||
| FirstStkOutProjtdSFTQty | _FirstStockOutVal | FirstStkOutProjtdSFTQty | ||
| FirstStkOutProjtdSFTPct | _FirstStockOutVal | FirstStkOutProjtdSFTPct | ||
| FirstStkOutFromTodayInDays | _FirstStockOutVal | FirstStkOutFromTodayInDays | ||
| ThresholdAlertIsPresent | _FirstStockOutVal | ThresholdAlertIsPresent | ||
| FirstBelowThldDate | _FirstStockOutVal | FirstBelowThldDate | ||
| FirstBelowThldProjtdStkQty | _FirstStockOutVal | FirstBelowThldProjtdStkQty | ||
| FirstBelowThldThldLvlQty | _FirstStockOutVal | FirstBelowThldThldLvlQty | ||
| FirstBelowThldProjtdSFTQty | _FirstStockOutVal | FirstBelowThldProjtdSFTQty | ||
| FirstBelowThldProjtdSFTPct | _FirstStockOutVal | FirstBelowThldProjtdSFTPct | ||
| FirstBelowThldFromTodayInDays | _FirstStockOutVal | FirstBelowThldFromTodayInDays | ||
| SafetyStockAlertIsPresent | _FirstStockOutVal | SafetyStockAlertIsPresent | ||
| FirstBelowSFTDate | _FirstStockOutVal | FirstBelowSFTDate | ||
| FirstBelowSFTProjtdStkQty | _FirstStockOutVal | FirstBelowSFTProjtdStkQty | ||
| FirstBelowSFTThldLvlQty | _FirstStockOutVal | FirstBelowSFTThldLvlQty | ||
| FirstBelowSFTProjtdSFTQty | _FirstStockOutVal | FirstBelowSFTProjtdSFTQty | ||
| FirstBelowSFTProjtdSFTPct | _FirstStockOutVal | FirstBelowSFTProjtdSFTPct | ||
| FirstBelowSFTFromTodayInDays | _FirstStockOutVal | FirstBelowSFTFromTodayInDays | ||
| ProjectedStockOutStatus | _FirstStockOutVal | ProjectedStockOutStatus | ||
| PastHorizonDLTMultiplierValue | pph_prod | PastHorizonDLTMultiplierValue | ||
| FutureHrznDLTMultiplierValue | pph_prod | FutureHrznDLTMultiplierValue | ||
| IsBulkMaterial | pph_prod | IsBulkMaterial | Bulk material | |
| IsPhantomItem | pph_prod | IsPhantomItem | Phantom item | |
| _ConsumptionText | _ConsumptionText | |||
| _VarText | _VarText | |||
| _ReplnmtText | _ReplnmtText | |||
| _BOMUsgText | _BOMUsgText | |||
| _ProcmtText | _ProcmtText | |||
| _OnHandStockStatusText | _OnHandStockStatusText | |||
| _ProdPlngPrioStatusText | _ProdPlngPrioStatusText | |||
| _ProjectedStockOutStatusText | _ProjectedStockOutStatusText | |||
| IndividualLeadTime | ||||
| MRPMaterialStatus | pph_prod | MRPMaterialStatus | ||
| _MatStatus | pph_prod | _MatStatus | ||
| _ProdPlngActionStatusText | _ProdPlngActionStatusText |
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_DemandDrivenCalcValues.
-- 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: PDDCALCVAL
CREATE VIEW P_DemandDrivenCalcValues AS
SELECT
pph_ddl_mat.Plant AS Plant,
pph_ddl_mat.Material AS Material,
pph_ddl_mat.MRPArea AS MRPArea,
pph_ddl_mat.BaseUnitofMeasure AS BaseUnitofMeasure,
pph_ddl_mat.MaterialBaseUnit AS MaterialBaseUnit,
pph_ddl_mat.MRPController AS MRPController,
pph_ddl_mat.MaterialGroup AS MaterialGroup,
pph_ddl_mat.MRPType AS MRPType,
pph_ddl_mat.MRPGroup AS MRPGroup,
coalesce(pph_prod.DecoupledLeadTime,0) AS DecoupledLeadTime,
pph_prod._ConsumptionText.ConsumptionDescription AS ConsumptionDescription,
pph_prod._ReplnmtText.ReplenishmentLeadTimeDesc AS ReplenishmentLeadTimeDesc,
pph_prod._BOMUsgeText.BOMUsageDescription AS BOMUsageDescription,
pph_prod._VarText.VariabilityDescription AS VariabilityDescription,
coalesce(pph_prod.ConsumptionCode,'') AS ConsumptionCode,
pph_prod.ProductConsumptionAmount AS ProductConsumptionAmount,
pph_prod.Currency AS Currency,
coalesce(pph_prod.ReplenishmentLeadTimeCode,'') AS ReplenishmentLeadTimeCode,
pph_prod.ReplenishmentLeadTimeValue AS ReplenishmentLeadTimeValue,
coalesce(pph_prod.BOMUsageCode,'') AS BOMUsageCode,
pph_prod.BOMUsageValue AS BOMUsageValue,
coalesce(pph_prod.VariabilityCode,'') AS VariabilityCode,
pph_prod.VariabilityQuantity AS VariabilityQuantity,
coalesce(pph_prod.ProcurementType,'') AS ProcurementType,
pph_ddl_mat.MaterialSafetyStockQty AS MaterialSafetyStockQty,
pph_ddl_mat.MaterialSafetyStockTodayQty AS MaterialSafetyStockTodayQty,
pph_ddl_mat.MaterialMaxStockLevelQuantity AS MaterialMaxStockLevelQuantity,
pph_ddl_mat.ReorderThresholdQuantity AS ReorderThresholdQuantity,
pph_ddl_mat.ThresholdPercentage AS ThresholdPercentage,
_FirstStockOutVal.QualifiedDemandQuantity AS QualifiedDemandQuantity,
_FirstStockOutVal.NetFlowPositionQuantity AS NetFlowPositionQuantity,
_FirstStockOutVal.OnHandStockQuantity AS OnHandStockQuantity,
_FirstStockOutVal.OpenSupplyQuantity AS OpenSupplyQuantity,
case when pph_ddl_mat.MaterialSafetyStockTodayQty != 0 then division(_FirstStockOutVal.OnHandStockQuantity , pph_ddl_mat.MaterialSafetyStockTodayQty,2) * 100 else fltp_to_dec( 999999.00 as abap.dec( 8, 2 ) ) end as OnHandBufferStatusQuantity AS dec82endasOnHandBufferStatusQuantity,
case when pph_ddl_mat.MaterialMaxStockLevelQuantity != 0 then division(_FirstStockOutVal.NetFlowPositionQuantity , pph_ddl_mat.MaterialMaxStockLevelQuantity,2) * 100 else fltp_to_dec( 999999.00 as abap.dec( 8, 2 ) ) end as MaterialPlanningPriority AS dec82endasMaterialPlanningPriority,
case when _FirstStockOutVal.NetFlowPositionQuantity < pph_ddl_mat.ReorderThresholdQuantity then cast(pph_ddl_mat.MaterialMaxStockLevelQuantity - _FirstStockOutVal.NetFlowPositionQuantity as abap.dec(31, 3)) else 0 end as ProposedQuantity AS dec313else0endasProposedQuantity,
_ExpeditedProduct.ExpeditedDateTime AS ExpeditedDateTime,
_ExpeditedProduct.ExpeditedOnHandStockStatus AS ExpeditedOnHandStockStatus,
_ExpeditedProduct.ExpeditedQuantity AS ExpeditedQuantity,
_FirstStockOutVal.ProjectedOnHandStockStatus AS ProjectedOnHandStockStatus,
_FirstStockOutVal.IsWithinDLT AS IsWithinDLT,
_FirstStockOutVal.StockOutAlertIsPresent AS StockOutAlertIsPresent,
_FirstStockOutVal.FirstStkOutDate AS FirstStkOutDate,
_FirstStockOutVal.FirstStkOutProjtdStkQty AS FirstStkOutProjtdStkQty,
_FirstStockOutVal.FirstStkOutProjtdSFTQty AS FirstStkOutProjtdSFTQty,
_FirstStockOutVal.FirstStkOutProjtdSFTPct AS FirstStkOutProjtdSFTPct,
_FirstStockOutVal.FirstStkOutFromTodayInDays AS FirstStkOutFromTodayInDays,
_FirstStockOutVal.ThresholdAlertIsPresent AS ThresholdAlertIsPresent,
_FirstStockOutVal.FirstBelowThldDate AS FirstBelowThldDate,
_FirstStockOutVal.FirstBelowThldProjtdStkQty AS FirstBelowThldProjtdStkQty,
_FirstStockOutVal.FirstBelowThldThldLvlQty AS FirstBelowThldThldLvlQty,
_FirstStockOutVal.FirstBelowThldProjtdSFTQty AS FirstBelowThldProjtdSFTQty,
_FirstStockOutVal.FirstBelowThldProjtdSFTPct AS FirstBelowThldProjtdSFTPct,
_FirstStockOutVal.FirstBelowThldFromTodayInDays AS FirstBelowThldFromTodayInDays,
_FirstStockOutVal.SafetyStockAlertIsPresent AS SafetyStockAlertIsPresent,
_FirstStockOutVal.FirstBelowSFTDate AS FirstBelowSFTDate,
_FirstStockOutVal.FirstBelowSFTProjtdStkQty AS FirstBelowSFTProjtdStkQty,
_FirstStockOutVal.FirstBelowSFTThldLvlQty AS FirstBelowSFTThldLvlQty,
_FirstStockOutVal.FirstBelowSFTProjtdSFTQty AS FirstBelowSFTProjtdSFTQty,
_FirstStockOutVal.FirstBelowSFTProjtdSFTPct AS FirstBelowSFTProjtdSFTPct,
_FirstStockOutVal.FirstBelowSFTFromTodayInDays AS FirstBelowSFTFromTodayInDays,
_FirstStockOutVal.ProjectedStockOutStatus AS ProjectedStockOutStatus,
pph_prod.PastHorizonDLTMultiplierValue AS PastHorizonDLTMultiplierValue,
pph_prod.FutureHrznDLTMultiplierValue AS FutureHrznDLTMultiplierValue,
pph_prod.IsBulkMaterial AS IsBulkMaterial,
pph_prod.IsPhantomItem AS IsPhantomItem,
coalesce(pph_prod.IndividualLeadTime,0) AS IndividualLeadTime,
pph_prod.MRPMaterialStatus AS MRPMaterialStatus,
pph_prod._MatStatus AS _MatStatus
FROM I_DemandDrivenMaterial AS pph_ddl_mat
LEFT OUTER JOIN I_DemandDrivenProduct1 AS pph_prod ON Material = pph_prod.Material AND Plant = pph_prod.Plant AND MRPArea = pph_prod.MRPArea -- association [1..1]
LEFT OUTER JOIN I_ExpeditedProduct AS _ExpeditedProduct ON Material = _ExpeditedProduct.Material AND Plant = _ExpeditedProduct.Plant AND MRPArea = _ExpeditedProduct.MRPArea -- association [0..1]
LEFT OUTER JOIN P_FirstStockOutValues AS _FirstStockOutVal ON Material = _FirstStockOutVal.Material AND Plant = _FirstStockOutVal.Plant AND MRPArea = _FirstStockOutVal.MRPArea -- association [1..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_BOMUsageText AS _BOMUsgText ON BOMUsageCode = _BOMUsgText.BOMUsageCode AND _BOMUsgText.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_OnHandStockStatusText AS _OnHandStockStatusText ON OnHandStockStatus = _OnHandStockStatusText.OnHandStockStatusCode AND _OnHandStockStatusText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_ProdPlngPrioStatusText AS _ProdPlngPrioStatusText ON MaterialPlanningPriorityStatus = _ProdPlngPrioStatusText.ProdPlaningPriorityStatusCode AND _ProdPlngPrioStatusText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_DemandDrivenPlanningStatus AS _PlanningStatus ON Material = _PlanningStatus.Material AND Plant = _PlanningStatus.Plant AND _PlanningStatus.UserID = $session.user -- association [0..1]
LEFT OUTER JOIN I_ProdPlngActionStatusText AS _ProdPlngActionStatusText ON OrderPlanningStatusText = _ProdPlngActionStatusText.ProdPlanningActionStatusCode AND _ProdPlngActionStatusText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_ProjectedStockOutStatusText AS _ProjectedStockOutStatusText ON projectedstockoutstatus = _ProjectedStockOutStatusText.ProjectedStockOutStatus AND _ProjectedStockOutStatusText.Language = $session.system_language -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA