P_MatStkQtyValByKeyDateBaseHdr
SlowNonMovingMat: quant and val base
P_MatStkQtyValByKeyDateBaseHdr is a Composite CDS View that provides data about "SlowNonMovingMat: quant and val base" in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 18 fields with key fields Material, Plant, StorageLocation, Batch, Supplier. Part of development package ODATA_MM_IM_SLONOMOMAT.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialStock_2 | I_MaterialStock_2 | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | calendardate |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (18)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | ||
| KEY | Plant | Plant | ||
| KEY | StorageLocation | StorageLocation | ||
| KEY | Batch | Batch | ||
| KEY | Supplier | Supplier | ||
| KEY | SDDocument | SDDocument | ||
| KEY | SDDocumentItem | SDDocumentItem | ||
| KEY | WBSElementInternalID | WBSElementInternalID | ||
| KEY | Customer | Customer | ||
| KEY | SpecialStockIdfgStockOwner | SpecialStockIdfgStockOwner | ||
| KEY | InventoryStockType | InventoryStockType | ||
| KEY | InventorySpecialStockType | InventorySpecialStockType | ||
| KEY | MaterialBaseUnit | MaterialBaseUnit | ||
| CostEstimate | CostEstimate | |||
| CompanyCode | CompanyCode | |||
| MatlWrhsStkQtyInMatlBaseUnit | ||||
| _CurrentInvtryPrice | _CurrentInvtryPrice | |||
| _CompanyCode | _CompanyCode |
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass:#TRANSACTIONAL
@VDM.viewType: #COMPOSITE
@VDM.private: true
/*
Calculate the stock for a given date (summing up to that date) on storage location level
and provide the link to the material prices
Important: because for a set of stock identifiying fields a dedicated CostEstimate does exist (or not if the movement is non-valuated)
and because there might be a mapping of various stock identifiying fields to the same CostEstimate
(e.g. all stock types with special stock type = blank do map to the same CostEstimate for a material/plant combination)
it is sufficient to work with CostEstimate as key below for cases where quantities and values on storage location level
(and not beyond e.g. splitted up to special stock identifier or below like on dedicated customers (consignments) are required
*/
define view entity P_MatStkQtyValByKeyDateBaseHdr
with parameters
P_KeyDate : calendardate
as select from I_MaterialStock_2
{
key Material,
key Plant,
key StorageLocation,
key Batch,
key Supplier,
key SDDocument,
key SDDocumentItem,
key WBSElementInternalID,
key Customer,
key SpecialStockIdfgStockOwner,
key InventoryStockType,
key InventorySpecialStockType,
key MaterialBaseUnit,
CostEstimate,
CompanyCode,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
@DefaultAggregation : #SUM
sum(MatlWrhsStkQtyInMatlBaseUnit) as MatlWrhsStkQtyInMatlBaseUnit,
_CurrentInvtryPrice,
_CompanyCode
}
where
MatlDocLatestPostgDate <= $parameters.P_KeyDate
group by
Material,
Plant,
StorageLocation,
Batch,
Supplier,
SDDocument,
SDDocumentItem,
WBSElementInternalID,
Customer,
SpecialStockIdfgStockOwner,
InventoryStockType,
InventorySpecialStockType,
MaterialBaseUnit,
CostEstimate,
CompanyCode
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