I_SaraDailyChemicalProductQty
SARA: Daily Chemical Product Quantity
I_SaraDailyChemicalProductQty 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 11 fields with key fields Material, Plant, StorageLocation.
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 (14)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ISARAPRODQTY | 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 | |
| VDM.lifecycle.status | #DEPRECATED | view | |
| VDM.lifecycle.successor | I_DailyChmlProductStkQty | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| DataAging.noAgingRestriction | true | view |
Fields (11)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| EndDateasEndDate | ||||
| KEY | Material | _MaterialStock | Material | |
| KEY | Plant | _MaterialStock | Plant | |
| KEY | StorageLocation | _MaterialStock | StorageLocation | |
| ProductBaseUnit | _MaterialStock | MaterialBaseUnit | ||
| Quantity | ||||
| ChemicalUUID | I_ChemicalMaterial | ChemicalUUID | ||
| CompanyCode | P_PLANTCURRENCY | CompanyCode | ||
| _Material | _MaterialStock | _Material | ||
| _StorageLocation | _MaterialStock | _StorageLocation | ||
| _Plant | _MaterialStock | _Plant |
@AbapCatalog: { sqlViewName: 'ISARAPRODQTY',
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
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'I_DailyChmlProductStkQty'
@ObjectModel:
{
usageType:
{
dataClass: #MIXED,
sizeCategory: #XL,
serviceQuality: #D
}
}
@DataAging.noAgingRestriction:true
define view I_SaraDailyChemicalProductQty
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,
@Semantics.unitOfMeasure
_MaterialStock.MaterialBaseUnit as ProductBaseUnit,
// Quantity
@Semantics.quantity.unitOfMeasure: 'ProductBaseUnit'
@DefaultAggregation : #SUM
sum(MatlWrhsStkQtyInMatlBaseUnit) as Quantity,
_ChemicalMaterial.ChemicalUUID as ChemicalUUID,
_CompanyCode.CompanyCode as CompanyCode,
_MaterialStock._Material,
_MaterialStock._StorageLocation,
_MaterialStock._Plant
}
where PeriodType = :P_PeriodType
and InventoryStockType = '01'
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.MaterialBaseUnit,
_ChemicalMaterial.ChemicalUUID,
_CompanyCode.CompanyCode
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHEMICALMATERIAL",
"I_CHEMICALREVISION",
"I_MATERIALSTOCKTIMESERIES",
"I_UNITOFMEASURE",
"P_PLANTCURRENCY"
],
"ASSOCIATED":
[
"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