I_MaterialStockRangeOfCoverage
Range of Coverage Calculation
I_MaterialStockRangeOfCoverage is a Composite CDS View (Cube) that provides data about "Range of Coverage Calculation" in SAP S/4HANA. It reads from 1 data source (P_MaterialStockRoC2) and exposes 11 fields with key fields Material, Plant, MaterialBaseUnit. It has 4 associations to related views. Part of development package MM_IM_VDM_STOCK.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_MaterialStockRoC2 | P_MaterialStockRoC2 | from |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | sydate | |
| P_NumberOfDays | nsdm_roc_consideration_period |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_Material | _Material | $projection.Material = _Material.Material |
| [1..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [1..1] | I_PlantMaterialCount | _PlantCount | $projection.Plant = _PlantCount.Plant |
| [1..1] | I_UnitOfMeasure | _UnitOfMeasure | $projection.MaterialBaseUnit = _UnitOfMeasure.UnitOfMeasure |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Range of Coverage Calculation | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.private | false | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| Analytics.dataCategory | #CUBE | view | |
| Analytics.technicalName | IMATSTOCKROC | view | |
| Metadata.allowExtensions | true | view |
Fields (11)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | Vehicle Model | |
| KEY | Plant | RoC | Plant | Valuation Area |
| KEY | MaterialBaseUnit | MaterialBaseUnit | Valuation Unit | |
| MatlWrhsStkQtyInMatlBaseUnit | MatlWrhsStkQtyInMatlBaseUnit | Quantity | ||
| MatlCnsmpnQtyInMatlBaseUnit | MatlCnsmpnQtyInMatlBaseUnit | |||
| P_NumberOfDays2endasMatlCnsmpnQtyAverage | ||||
| dec183endasRangeOfCoverageInDays | Quantity | |||
| _PlantCount | _PlantCount | |||
| _Material | _Material | |||
| _Plant | _Plant | |||
| _UnitOfMeasure | _UnitOfMeasure |
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 I_MaterialStockRangeOfCoverage.
-- 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.
-- Parameters: P_KeyDate : sydate, P_NumberOfDays : nsdm_roc_consideration_period
CREATE VIEW I_MaterialStockRangeOfCoverage AS
SELECT
Material,
RoC.Plant AS Plant,
MaterialBaseUnit,
MatlWrhsStkQtyInMatlBaseUnit,
MatlCnsmpnQtyInMatlBaseUnit,
case $parameters.P_NumberOfDays when 0 then cast(0 as abap.dec(18,3)) else division(cast(MatlCnsmpnQtyInMatlBaseUnit as abap.dec(18,3)), $parameters.P_NumberOfDays, 2) end as MatlCnsmpnQtyAverage AS P_NumberOfDays2endasMatlCnsmpnQtyAverage,
case when MatlWrhsStkQtyInMatlBaseUnit > 0 and MatlCnsmpnQtyInMatlBaseUnit > 0 then division(cast(MatlWrhsStkQtyInMatlBaseUnit as abap.dec(18,3)) * $parameters.P_NumberOfDays, cast(MatlCnsmpnQtyInMatlBaseUnit as abap.dec(18,3)), 2) else cast(0 as abap.dec(18,3)) end as RangeOfCoverageInDays AS dec183endasRangeOfCoverageInDays
FROM P_MaterialStockRoC2
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material -- association [1..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [1..1]
LEFT OUTER JOIN I_PlantMaterialCount AS _PlantCount ON Plant = _PlantCount.Plant -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _UnitOfMeasure ON MaterialBaseUnit = _UnitOfMeasure.UnitOfMeasure -- 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