C_MaterialDailyDemand
Material Daily Demand
C_MaterialDailyDemand is a Consumption CDS View that provides data about "Material Daily Demand" in SAP S/4HANA. It reads from 3 data sources (I_MatlAvgDailyUsge1, P_DailyWeeklyMnthlyPIRHistDate, P_DailyWeeklyMnthlyPIRHistDate) and exposes 24 fields with key fields Material, Plant, MRPArea, PostingDate, Plant. It has 2 associations to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_MatlAvgDailyUsge1 | _AvgDailyUsage | left_outer |
| P_DailyWeeklyMnthlyPIRHistDate | _PIRHist | from |
| P_DailyWeeklyMnthlyPIRHistDate | _PIRHist | union |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..*] | P_TimeDependentStockBuffer | _ActualValues | $projection.Material = _ActualValues.Material and $projection.Plant = _ActualValues.Plant and $projection.MRPArea = _ActualValues.MRPArea |
| [1..1] | I_ProdBufLvlPrpslData | _ProposalHeader | $projection.Material = _ProposalHeader.Material and $projection.Plant = _ProposalHeader.Plant and $projection.MRPArea = _ProposalHeader.MRPArea and _ProposalHeader.ProposalEndDate = '99991231' and _ProposalHeader.ProposalStartDate <= $session.system_date |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | CMATDAILYDMND | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Material Daily Demand | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (24)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | _DemandDrivenProduct | Material | Vehicle Model |
| KEY | Plant | _DemandDrivenProduct | Plant | Prod plnt |
| KEY | MRPArea | _DemandDrivenProduct | MRPArea | MRP Area |
| KEY | PostingDate | I_MatlAvgDailyUsge1 | PostingDate | Delivery Date |
| CurrentAverageDailyUsage | _ActualValues | CurrentAvgDailyUsage | ||
| dec133endasPlndIndepRqmtQuantity | ||||
| DailyPlndIndepRqmtQuantity | ||||
| WeeklyPlndIndepRqmtQtyPerDay | ||||
| MonthlyPlndIndepRqmtQtyPerDay | ||||
| TotalWeeklyPlndIndepRqmtQty | ||||
| TotalMonthlyPlndIndepRqmtQty | ||||
| Material | Vehicle Model | |||
| KEY | Plant | P_DailyWeeklyMnthlyPIRHistDate | ProductionPlant | Prod plnt |
| KEY | MRPArea | P_DailyWeeklyMnthlyPIRHistDate | MRPArea | MRP Area |
| KEY | PostingDate | DeliveryDate | Delivery Date | |
| CurrentAverageDailyUsage | ||||
| PlndIndepRqmtQuantity | ||||
| QuantityInBaseUnit | ||||
| DailyPlndIndepRqmtQuantity | ||||
| WeeklyPlndIndepRqmtQtyPerDay | ||||
| MonthlyPlndIndepRqmtQtyPerDay | ||||
| TotalWeeklyPlndIndepRqmtQty | ||||
| TotalMonthlyPlndIndepRqmtQty | ||||
| MaterialBaseUnit |
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 C_MaterialDailyDemand.
-- 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: CMATDAILYDMND
CREATE VIEW C_MaterialDailyDemand AS
SELECT
_DemandDrivenProduct.Material AS Material,
_DemandDrivenProduct.Plant AS Plant,
_DemandDrivenProduct.MRPArea AS MRPArea,
_AvgDailyUsage.PostingDate AS PostingDate,
_ActualValues.CurrentAvgDailyUsage AS CurrentAverageDailyUsage,
case when (_AvgDailyUsage.PostingDate < _ProposalHeader.ProposalStartDate ) then cast(0 as abap.dec( 13, 3 )) end as PlndIndepRqmtQuantity AS dec133endasPlndIndepRqmtQuantity,
cast(0 as abap.dec( 13, 3 )) AS DailyPlndIndepRqmtQuantity,
cast(0 as abap.dec( 13, 3 )) AS WeeklyPlndIndepRqmtQtyPerDay,
cast(0 as abap.dec( 13, 3 )) AS MonthlyPlndIndepRqmtQtyPerDay,
cast(0 as abap.dec(13, 3)) AS TotalWeeklyPlndIndepRqmtQty,
cast(0 as abap.dec(13, 3)) AS TotalMonthlyPlndIndepRqmtQty,
sum(_PIRHist.QuantityInBaseUnit) AS PlndIndepRqmtQuantity,
cast(0 as abap.dec( 13, 3 )) AS QuantityInBaseUnit,
_ProposalHeader._BufMatPlant._Material.BaseUnit AS MaterialBaseUnit
FROM P_DailyWeeklyMnthlyPIRHistDate AS _PIRHist
LEFT OUTER JOIN I_MatlAvgDailyUsge1 AS _AvgDailyUsage ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_TimeDependentStockBuffer AS _ActualValues ON Material = _ActualValues.Material AND Plant = _ActualValues.Plant AND MRPArea = _ActualValues.MRPArea -- association [1..*]
LEFT OUTER JOIN I_ProdBufLvlPrpslData AS _ProposalHeader ON Material = _ProposalHeader.Material AND Plant = _ProposalHeader.Plant AND MRPArea = _ProposalHeader.MRPArea AND _ProposalHeader.ProposalEndDate = '99991231' AND _ProposalHeader.ProposalStartDate <= $session.system_date -- association [1..1]
-- UNION with additional select branch(es): P_DailyWeeklyMnthlyPIRHistDate
;
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