I_DailyChmlProductStkQty
SARA: Daily Chemical Product Quantity
I_DailyChmlProductStkQty is a Composite CDS View that provides data about "SARA: Daily Chemical Product Quantity" in SAP S/4HANA. It reads from 5 data sources (I_UnitOfMeasure, I_ChemicalMaterial, I_ChemicalRevision, P_PLANTCURRENCY, I_MaterialStockTimeSeries) and exposes 13 fields with key fields Material, Plant, StorageLocation, InventoryStockType, ProductBaseUnit.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_UnitOfMeasure | _BaseUnit | inner |
| I_ChemicalMaterial | _ChemicalMaterial | inner |
| I_ChemicalRevision | _ChemicalRevision | inner |
| P_PLANTCURRENCY | _CompanyCode | inner |
| I_MaterialStockTimeSeries | I_MaterialStockTimeSeries | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_StartDate | vdm_v_start_date | |
| P_EndDate | vdm_v_end_date | |
| P_PeriodType | nsdm_period_type |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ICHMDLYPRODQTY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | SARA: Daily Chemical Product Quantity | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| DataAging.noAgingRestriction | true | view |
Fields (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| EndDateasEndDate | ||||
| KEY | Material | MaterialStock | Material | |
| KEY | Plant | MaterialStock | Plant | |
| KEY | StorageLocation | MaterialStock | StorageLocation | |
| KEY | InventoryStockType | MaterialStock | InventoryStockType | |
| KEY | ProductBaseUnit | MaterialStock | MaterialBaseUnit | |
| KEY | ChemicalUUID | I_ChemicalMaterial | ChemicalUUID | |
| Quantity | ||||
| CompanyCode | P_PLANTCURRENCY | CompanyCode | ||
| _Material | MaterialStock | _Material | ||
| _StorageLocation | MaterialStock | _StorageLocation | ||
| _Plant | MaterialStock | _Plant | ||
| _InventoryStockType | MaterialStock | _InventoryStockType |
@AbapCatalog: { sqlViewName: 'ICHMDLYPRODQTY',
compiler.compareFilter: true,
preserveKey: true }
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'SARA: Daily Chemical Product Quantity'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@ObjectModel:
{
usageType:
{
dataClass: #MIXED,
sizeCategory: #XL,
serviceQuality: #D
}
}
@DataAging.noAgingRestriction:true
define view I_DailyChmlProductStkQty
with parameters
P_StartDate : vdm_v_start_date,
P_EndDate : vdm_v_end_date,
P_PeriodType : nsdm_period_type
as select from I_MaterialStockTimeSeries(P_StartDate: :P_StartDate,
P_EndDate: :P_EndDate,
P_PeriodType: :P_PeriodType) as MaterialStock
inner join I_ChemicalMaterial as _ChemicalMaterial on _ChemicalMaterial.Material = MaterialStock.Material
inner join I_ChemicalRevision as _ChemicalRevision on _ChemicalMaterial.ChemicalRevisionUUID = _ChemicalRevision.ChemicalRevisionUUID
and _ChemicalMaterial.ChemicalUUID = _ChemicalRevision.ChemicalUUID
inner join I_UnitOfMeasure as _BaseUnit on MaterialStock.MaterialBaseUnit = _BaseUnit.UnitOfMeasure
inner join P_PLANTCURRENCY as _CompanyCode on MaterialStock.Plant = _CompanyCode.Plant
{
@Semantics.businessDate.at: true
@Semantics.businessDate.to: false -- switch of semantic inherited from one of the lower view in the stack
key MaterialStock.EndDate as EndDate,
// Stock Identifier
@ObjectModel.foreignKey.association: '_Material'
key MaterialStock.Material as Material,
@ObjectModel.foreignKey.association: '_Plant'
key MaterialStock.Plant as Plant,
@ObjectModel.foreignKey.association: '_StorageLocation'
key MaterialStock.StorageLocation as StorageLocation,
@ObjectModel.foreignKey.association: '_InventoryStockType'
key MaterialStock.InventoryStockType as InventoryStockType,
@Semantics.unitOfMeasure
key MaterialStock.MaterialBaseUnit as ProductBaseUnit,
key _ChemicalMaterial.ChemicalUUID as ChemicalUUID,
// Quantity
@Semantics.quantity.unitOfMeasure: 'ProductBaseUnit'
@DefaultAggregation : #SUM
sum(MatlWrhsStkQtyInMatlBaseUnit) as Quantity,
_CompanyCode.CompanyCode as CompanyCode,
MaterialStock._Material,
MaterialStock._StorageLocation,
MaterialStock._Plant,
MaterialStock._InventoryStockType
}
where PeriodType = :P_PeriodType
and MatlWrhsStkQtyInMatlBaseUnit is not initial
and _ChemicalRevision.RevisionStartDate <= $session.system_date
and _ChemicalRevision.RevisionEndDate >= $session.system_date
group by
MaterialStock.EndDate,
MaterialStock.Material,
MaterialStock.Plant,
MaterialStock.StorageLocation,
MaterialStock.InventoryStockType,
MaterialStock.MaterialBaseUnit,
_ChemicalMaterial.ChemicalUUID,
_CompanyCode.CompanyCode
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHEMICALMATERIAL",
"I_CHEMICALREVISION",
"I_MATERIALSTOCKTIMESERIES",
"I_UNITOFMEASURE",
"P_PLANTCURRENCY"
],
"ASSOCIATED":
[
"I_INVENTORYSTOCKTYPE",
"I_MATERIAL",
"I_PLANT",
"I_STORAGELOCATION"
],
"BASE":
[
"I_MATERIALSTOCKTIMESERIES"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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