C_StkKPIGroupComparison
Stock KPI grouping of delta
C_StkKPIGroupComparison is a Consumption CDS View that provides data about "Stock KPI grouping of delta" in SAP S/4HANA. It reads from 1 data source (I_StkKPIGroupingDeltaComprn) and exposes 21 fields with key fields Material, Plant, StorageLocation, StockIdentifyingBatch, SpecialStockIdfgSupplier. It has 4 associations to related views. Part of development package ODATA_MM_IM_KPITIMESERIES.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_StkKPIGroupingDeltaComprn | I_StkKPIGroupingDeltaComprn | from |
Parameters (6)
| Name | Type | Default |
|---|---|---|
| P_StartDateOfPreviousPeriod | vdm_v_start_date | |
| P_EndDateOfPreviousPeriod | vdm_v_end_date | |
| P_StartDateOfReferencePeriod | vdm_v_start_date | |
| P_EndDateOfReferencePeriod | vdm_v_end_date | |
| P_PeriodType | nsdm_period_type | |
| P_InventoryConsumptionGroup | inventory_consumption_group |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_Product | _Product | $projection.Material = _Product.Product |
| [1..1] | I_ProductPlant | _ProductPlant | $projection.Material = _ProductPlant.Product and $projection.Plant = _ProductPlant.Plant |
| [1..1] | I_Batch | _Batch | $projection.Material = _Batch.Material and $projection.Plant = _Batch.Plant and $projection.StockIdentifyingBatch = _Batch.Batch |
| [0..1] | I_WBSElementBasicData | _SpclStkIdfgWBSElmntBasicData | $projection.SpecialStockIdfgWBSElement = _SpclStkIdfgWBSElmntBasicData.ProjectInternalID |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Stock KPI grouping of delta | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | false | view | |
| ObjectModel.createEnabled | false | view | |
| ObjectModel.updateEnabled | false | view | |
| ObjectModel.deleteEnabled | false | view |
Fields (21)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | Vehicle Model | |
| KEY | Plant | Plant | Valuation Area | |
| KEY | StorageLocation | StorageLocation | StorageLocation | |
| KEY | StockIdentifyingBatch | StockIdentifyingBatch | ||
| KEY | SpecialStockIdfgSupplier | SpecialStockIdfgSupplier | ||
| KEY | SpecialStockIdfgSalesOrder | SpecialStockIdfgSalesOrder | Stock Ident Header | |
| KEY | SpecialStockIdfgSalesOrderItem | SpecialStockIdfgSalesOrderItem | Stock Ident Item | |
| KEY | SpecialStockIdfgWBSElement | SpecialStockIdfgWBSElement | WBS Internal ID | |
| KEY | SpecialStockIdfgCustomer | SpecialStockIdfgCustomer | ||
| KEY | InventoryStockType | InventoryStockType | Stock Type | |
| KEY | InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | |
| StkQtyDeltaInPercent | StkQtyDeltaInPercent | |||
| CnsmpnQtyDeltaInPercent | CnsmpnQtyDeltaInPercent | |||
| InvtryTurnoverDeltaInPercent | InvtryTurnoverDeltaInPercent | |||
| InvtryAgingDeltaInPercent | InvtryAgingDeltaInPercent | |||
| RangeOfCvrgDeltaInPercent | RangeOfCvrgDeltaInPercent | |||
| NumberOfMaterialsHavingStkQty | ||||
| WBSElementExternalID | _SpclStkIdfgWBSElmntBasicData | WBSElementExternalID | WBS Element External ID | |
| _Product | _Product | |||
| _ProductPlant | _ProductPlant | |||
| _Batch | _Batch |
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_StkKPIGroupComparison.
-- 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_StartDateOfPreviousPeriod : vdm_v_start_date, P_EndDateOfPreviousPeriod : vdm_v_end_date, P_StartDateOfReferencePeriod : vdm_v_start_date, P_EndDateOfReferencePeriod : vdm_v_end_date, P_PeriodType : nsdm_period_type, P_InventoryConsumptionGroup : inventory_consumption_group
CREATE VIEW C_StkKPIGroupComparison AS
SELECT
Material,
Plant,
StorageLocation,
StockIdentifyingBatch,
SpecialStockIdfgSupplier,
SpecialStockIdfgSalesOrder,
SpecialStockIdfgSalesOrderItem,
SpecialStockIdfgWBSElement,
SpecialStockIdfgCustomer,
InventoryStockType,
InventorySpecialStockType,
StkQtyDeltaInPercent,
CnsmpnQtyDeltaInPercent,
InvtryTurnoverDeltaInPercent,
InvtryAgingDeltaInPercent,
RangeOfCvrgDeltaInPercent,
cast(1 as abap.int8) AS NumberOfMaterialsHavingStkQty,
_SpclStkIdfgWBSElmntBasicData.WBSElementExternalID AS WBSElementExternalID
FROM I_StkKPIGroupingDeltaComprn
LEFT OUTER JOIN I_Product AS _Product ON Material = _Product.Product -- association [1..1]
LEFT OUTER JOIN I_ProductPlant AS _ProductPlant ON Material = _ProductPlant.Product AND Plant = _ProductPlant.Plant -- association [1..1]
LEFT OUTER JOIN I_Batch AS _Batch ON Material = _Batch.Material AND Plant = _Batch.Plant AND StockIdentifyingBatch = _Batch.Batch -- association [1..1]
LEFT OUTER JOIN I_WBSElementBasicData AS _SpclStkIdfgWBSElmntBasicData ON SpecialStockIdfgWBSElement = _SpclStkIdfgWBSElmntBasicData.ProjectInternalID -- 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