P_DDProductCalcFields
DD Product Calculated Fields
P_DDProductCalcFields is a Composite CDS View that provides data about "DD Product Calculated Fields" in SAP S/4HANA. It reads from 1 data source (I_DemandDrivenProduct1) and exposes 14 fields with key fields Material, Plant, MRPArea. It has 2 associations to related views. Part of development package PPH_DD_VDM_STLM.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_DemandDrivenProduct1 | _DDProduct | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_ProfileAssgmtToPlant | _ProfileAssign | $projection.Plant = _ProfileAssign.Plant |
| [1..1] | I_ProfileAssgmtToPlant | _PlantDefaultThreshold | _PlantDefaultThreshold.Plant = '' |
Annotations (3)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | Vehicle Model | |
| KEY | Plant | Plant | Valuation Area | |
| KEY | MRPArea | MRPArea | MRP Area | |
| MRPAreaCategory | I_MRPArea | MRPAreaCategory | ||
| HorizonDaysInPast | HorizonDaysInPast | |||
| HorizonDaysInFuture | HorizonDaysInFuture | |||
| HorizonDaysPastInDcmlVal | ||||
| HorizonDaysFutureInDcmlVal | ||||
| DecoupledLeadTime | DecoupledLeadTime | |||
| TotalNoOfDays | ||||
| HorizonConstant | ||||
| StartDate | ||||
| EndDate | ||||
| SpikeHorizonMultiplierendasSpikeHorizon |
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_DDProductCalcFields.
-- 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.
CREATE VIEW P_DDProductCalcFields AS
SELECT
Material,
Plant,
MRPArea,
I_MRPArea.MRPAreaCategory AS MRPAreaCategory,
HorizonDaysInPast,
HorizonDaysInFuture,
cast(HorizonDaysInPast as abap.dec(7,2)) AS HorizonDaysPastInDcmlVal,
cast(HorizonDaysInFuture as abap.dec(7,2)) AS HorizonDaysFutureInDcmlVal,
DecoupledLeadTime,
cast( _DDProduct.HorizonDaysInPast as abap.int4) + cast( _DDProduct.HorizonDaysInFuture as abap.int4) AS TotalNoOfDays,
cast(cast( 180 as abap.int4) as abap.dec(7,2)) AS HorizonConstant,
DATS_ADD_DAYS(DATS_ADD_DAYS( cast($session.system_date as sydatum) ,(-1 * cast(_DDProduct.HorizonDaysInPast as abap.int4)),'FAIL'),0 ,'FAIL') AS StartDate,
DATS_ADD_DAYS(DATS_ADD_DAYS( cast($session.system_date as sydatum) , (cast(_DDProduct.HorizonDaysInFuture as abap.int4) - 1),'FAIL'),0,'FAIL') AS EndDate,
case when _ProfileAssign.Plant = Plant then _ProfileAssign.SpikeHorizonConstant + DecoupledLeadTime * _ProfileAssign.SpikeHorizonMultiplier else _PlantDefaultThreshold.SpikeHorizonConstant + DecoupledLeadTime * _PlantDefaultThreshold.SpikeHorizonMultiplier end as SpikeHorizon AS SpikeHorizonMultiplierendasSpikeHorizon
FROM I_DemandDrivenProduct1 AS _DDProduct
LEFT OUTER JOIN I_ProfileAssgmtToPlant AS _ProfileAssign ON Plant = _ProfileAssign.Plant -- association [1..1]
LEFT OUTER JOIN I_ProfileAssgmtToPlant AS _PlantDefaultThreshold ON _PlantDefaultThreshold.Plant = '' -- association [1..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