P_SlowMoMatPredConsSum

DDL: P_SLOWMOMATPREDCONSSUM Type: view_entity COMPOSITE Package: ODATA_MM_IM_SLONOMOMAT

Consumption Aggregate

P_SlowMoMatPredConsSum is a Composite CDS View that provides data about "Consumption Aggregate" in SAP S/4HANA. It reads from 2 data sources (P_MatlStkPerdsInMonth, P_SlowMoMatPredConsQty) and exposes 15 fields with key fields InventoryConsumptionGroup, StartDate, Material, Plant, StockIdentifyingBatch. Part of development package ODATA_MM_IM_SLONOMOMAT.

Data Sources (2)

SourceAliasJoin Type
P_MatlStkPerdsInMonth per from
P_SlowMoMatPredConsQty rec inner

Annotations (6)

NameValueLevelField
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 (15)

KeyFieldSource TableSource FieldDescription
KEY InventoryConsumptionGroup P_SlowMoMatPredConsQty InventoryConsumptionGroup
KEY StartDate P_MatlStkPerdsInMonth StartDate
KEY Material P_SlowMoMatPredConsQty Material
KEY Plant P_SlowMoMatPredConsQty Plant
KEY StockIdentifyingBatch P_SlowMoMatPredConsQty StockIdentifyingBatch
KEY SpecialStockIdfgSupplier P_SlowMoMatPredConsQty SpecialStockIdfgSupplier
KEY SpecialStockIdfgSalesOrder P_SlowMoMatPredConsQty SpecialStockIdfgSalesOrder
KEY SpecialStockIdfgSalesOrderItem P_SlowMoMatPredConsQty SpecialStockIdfgSalesOrderItem
KEY SpecialStockIdfgWBSElement P_SlowMoMatPredConsQty SpecialStockIdfgWBSElement
KEY SpecialStockIdfgCustomer P_SlowMoMatPredConsQty SpecialStockIdfgCustomer
KEY SpecialStockIdfgStockOwner P_SlowMoMatPredConsQty SpecialStockIdfgStockOwner
KEY InventorySpecialStockType P_SlowMoMatPredConsQty InventorySpecialStockType
KEY InventoryStockType P_SlowMoMatPredConsQty InventoryStockType
KEY MaterialBaseUnit P_SlowMoMatPredConsQty MaterialBaseUnit
MatlCnsmpnQtyInMatlBaseUnit
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass:#TRANSACTIONAL
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck:#NOT_REQUIRED
//@EndUserText.label: 'Consumption Aggregate'

define view entity P_SlowMoMatPredConsSum as select from  P_MatlStkPerdsInMonth  as per
                                       inner join  P_SlowMoMatPredConsQty as rec
                                         on  rec.PostingDate >= per.StartDate
                                         and rec.PostingDate <= per.EndDate  

{

  key rec.InventoryConsumptionGroup,
  key per.StartDate,  
  key rec.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.MatlCnsmpnQtyInMatlBaseUnit) as MatlCnsmpnQtyInMatlBaseUnit
  
}

group by

  per.StartDate,
  rec.InventoryConsumptionGroup,
  rec.Material,
  rec.Plant,
  rec.StockIdentifyingBatch,
  rec.SpecialStockIdfgSupplier,
  rec.SpecialStockIdfgSalesOrder,
  rec.SpecialStockIdfgSalesOrderItem,
  rec.SpecialStockIdfgWBSElement,
  rec.SpecialStockIdfgCustomer,
  rec.SpecialStockIdfgStockOwner,
  rec.InventorySpecialStockType,
  rec.InventoryStockType,
  rec.MaterialBaseUnit