@AbapCatalog.sqlViewName : 'PSDSPPPP'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view P_SPP_PredictionPeriod
as select from I_CalendarDate
{
key CalendarDate,
// Prediction dimension selection:
// PredictionStartDate2 -> PredictionEndDate
// Prediction period selection
// PredictionStartDate3 -> PredictionEndDate
// Data used for prediction
// PredictionStartDate1 -> PredictionEndDate
concat( left ( dats_add_months( CalendarDate, -6, 'FAIL'), 6 ), '01') as PredictionStartDate1,
concat( left ( dats_add_months( CalendarDate, -3, 'FAIL'), 6 ), '01') as PredictionStartDate2,
concat( YearMonth, '01') as PredictionStartDate3,
concat( left ( dats_add_months( CalendarDate, 2, 'FAIL'), 6 ), '01') as PredictionEndDate,
cast (
case
when CalendarDay >= '01' and CalendarDay <= '10'
then 1
when CalendarDay >= '11' and CalendarDay <= '20'
then 2
else 2
end
as sp_pom ) as CurrentPartOfMonth,
YearMonth as CurrentYearMonth,
left ( dats_add_months( CalendarDate, 1, 'FAIL'), 6 ) as NextYearMonth
}
where CalendarDate = $session.system_date
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_CALENDARDATE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_SPP_PredictionPeriod view