P_SlowMoMatPredConsSum

DDL: P_SLOWMOMATPREDCONSSUM SQL: PSLOWMOMATCNSAGR Type: view COMPOSITE

P_SlowMoMatPredConsSum is a Composite CDS View 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.

Data Sources (2)

SourceAliasJoin Type
P_MatlStkPerdsInMonth per from
P_SlowMoMatPredConsQty rec inner

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PSLOWMOMATCNSAGR view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY InventoryConsumptionGroup InventoryConsumptionGroup
KEY StartDate StartDate
KEY Material Material
KEY Plant Plant
KEY StockIdentifyingBatch StockIdentifyingBatch
KEY SpecialStockIdfgSupplier SpecialStockIdfgSupplier
KEY SpecialStockIdfgSalesOrder SpecialStockIdfgSalesOrder
KEY SpecialStockIdfgSalesOrderItem SpecialStockIdfgSalesOrderItem
KEY SpecialStockIdfgWBSElement SpecialStockIdfgWBSElement
KEY SpecialStockIdfgCustomer SpecialStockIdfgCustomer
KEY SpecialStockIdfgStockOwner SpecialStockIdfgStockOwner
KEY InventorySpecialStockType InventorySpecialStockType
KEY InventoryStockType InventoryStockType
KEY MaterialBaseUnit MaterialBaseUnit
MatlCnsmpnQtyInMatlBaseUnit
@AbapCatalog.sqlViewName: 'PSLOWMOMATCNSAGR'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass:#TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck:#NOT_REQUIRED
//@EndUserText.label: 'Consumption Aggregate'

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

{

  key InventoryConsumptionGroup,
  key StartDate,  
  key Material,
  key Plant,
  key StockIdentifyingBatch,
  key SpecialStockIdfgSupplier,
  key SpecialStockIdfgSalesOrder,
  key SpecialStockIdfgSalesOrderItem,
  key SpecialStockIdfgWBSElement,
  key SpecialStockIdfgCustomer,
  key SpecialStockIdfgStockOwner,
  key InventorySpecialStockType,
  key InventoryStockType,
  key MaterialBaseUnit,  
  
  @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
  sum(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
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_MATLSTKPERDSINMONTH",
"P_SLOWMOMATPREDCONSQTY"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/