P_MLValAreaMaxPeriod

DDL: P_MLVALAREAMAXPERIOD SQL: PMXFISCINVPPR Type: view COMPOSITE

P_MLValAreaMaxPeriod is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_MLInventoryPriceRawData, I_MLInventoryFiscalPeriod) and exposes 3 fields with key field CostEstimate.

Data Sources (2)

SourceAliasJoin Type
I_MLInventoryPriceRawData cr inner
I_MLInventoryFiscalPeriod I_MLInventoryFiscalPeriod from

Parameters (1)

NameTypeDefault
P_CalendarDate calendardate

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PMXFISCINVPPR view
VDM.private true view
VDM.viewType #COMPOSITE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.preserveKey true view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate hd CostEstimate
ToFiscalYearPeriod
ValuationArea ValuationArea
@AbapCatalog.sqlViewName: 'PMXFISCINVPPR'
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey:true 

//@EndUserText.label: 'Manage MAX FiscalYearPeriod for Inventory Price'

define view P_MLValAreaMaxPeriod with parameters
    P_CalendarDate : calendardate

  as select from I_MLInventoryFiscalPeriod(P_CalendarDate :
                     $parameters.P_CalendarDate) as hd
    inner join   I_MLInventoryPriceRawData      as cr on  cr.CostEstimate     =  hd.CostEstimate
                                                       and cr.FiscalYearPeriod <= hd.FiscalYearPeriod

{
  key  hd.CostEstimate,
       max(cr.FiscalYearPeriod ) as ToFiscalYearPeriod,
       ValuationArea

}
group by
  hd.CostEstimate,
  ValuationArea
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MLINVENTORYFISCALPERIOD",
"I_MLINVENTORYPRICERAWDATA"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/