P_SLOWMOMATPREDSTOCKSUM
Stock Aggregate
P_SLOWMOMATPREDSTOCKSUM is a Composite CDS View that provides data about "Stock Aggregate" in SAP S/4HANA. It reads from 2 data sources (P_MatlStkPerdsInMonth, I_MaterialDocumentRecord) and exposes 14 fields with key fields StartDate, Material, Plant, StockIdentifyingBatch, SpecialStockIdfgSupplier. Part of development package ODATA_MM_IM_SLONOMOMAT.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_MatlStkPerdsInMonth | per | from |
| I_MaterialDocumentRecord | rec | inner |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | StartDate | P_MatlStkPerdsInMonth | StartDate | |
| KEY | Material | I_MaterialDocumentRecord | StockIdentifyingMaterial | |
| KEY | Plant | I_MaterialDocumentRecord | Plant | |
| KEY | StockIdentifyingBatch | I_MaterialDocumentRecord | StockIdentifyingBatch | |
| KEY | SpecialStockIdfgSupplier | I_MaterialDocumentRecord | SpecialStockIdfgSupplier | |
| KEY | SpecialStockIdfgSalesOrder | I_MaterialDocumentRecord | SpecialStockIdfgSalesOrder | |
| KEY | SpecialStockIdfgSalesOrderItem | I_MaterialDocumentRecord | SpecialStockIdfgSalesOrderItem | |
| KEY | SpecialStockIdfgWBSElement | I_MaterialDocumentRecord | SpecialStockIdfgWBSElement | |
| KEY | SpecialStockIdfgCustomer | I_MaterialDocumentRecord | SpecialStockIdfgCustomer | |
| KEY | SpecialStockIdfgStockOwner | I_MaterialDocumentRecord | SpecialStockIdfgStockOwner | |
| KEY | InventorySpecialStockType | I_MaterialDocumentRecord | InventorySpecialStockType | |
| KEY | InventoryStockType | I_MaterialDocumentRecord | InventoryStockType | |
| KEY | MaterialBaseUnit | I_MaterialDocumentRecord | MaterialBaseUnit | |
| MatlStkChangeQtyInBaseUnit |
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass:#TRANSACTIONAL
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck:#NOT_REQUIRED
//@EndUserText.label: 'Stock Aggregate'
define view entity P_SLOWMOMATPREDSTOCKSUM as select from P_MatlStkPerdsInMonth as per
inner join I_MaterialDocumentRecord as rec
on rec.PostingDate <= per.EndDate
{
key per.StartDate,
key rec.StockIdentifyingMaterial as Material,
key rec.Plant,
key rec.StockIdentifyingBatch,
key rec.SpecialStockIdfgSupplier,
key rec.SpecialStockIdfgSalesOrder,
key rec.SpecialStockIdfgSalesOrderItem,
key rec.SpecialStockIdfgWBSElement,
key rec.SpecialStockIdfgCustomer,
key rec.SpecialStockIdfgStockOwner,
key rec.InventorySpecialStockType,
key rec.InventoryStockType,
key rec.MaterialBaseUnit,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
sum(rec.MatlStkChangeQtyInBaseUnit) as MatlStkChangeQtyInBaseUnit
}
group by
per.StartDate,
rec.StockIdentifyingMaterial,
rec.Plant,
rec.StockIdentifyingBatch,
rec.SpecialStockIdfgSupplier,
rec.SpecialStockIdfgSalesOrder,
rec.SpecialStockIdfgSalesOrderItem,
rec.SpecialStockIdfgWBSElement,
rec.SpecialStockIdfgCustomer,
rec.SpecialStockIdfgStockOwner,
rec.InventorySpecialStockType,
rec.InventoryStockType,
rec.MaterialBaseUnit
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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