@AbapCatalog.sqlViewName: 'PMATVALMGMVCHMX'
@VDM.private: true
@VDM.viewType: #BASIC
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_Matval_Manage_Val_Ch_Max
as select from P_Matval_Manage_13_Periods as p13
left outer to many join P_Matval_Manage_Max_Hdpp as mxpp on mxpp.CostEstimate = p13.CostEstimate
and mxpp.FiscalYearPeriod <= p13.FiscalYearPeriod
{
key p13.CostEstimate,
key mxpp.ValuationArea,
key p13.FiscalYear,
key p13.FiscalPeriod,
key p13.FiscalYearPeriod,
max(mxpp.FiscalYearPeriod) as MaxFiscPerCKMLPP
}
group by
p13.CostEstimate,
mxpp.ValuationArea,
p13.FiscalYearPeriod,
p13.FiscalYear,
p13.FiscalPeriod
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_MATVAL_MANAGE_13_PERIODS",
"P_MATVAL_MANAGE_MAX_HDPP"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/