P_SPP_PREDICTIONPERIOD
P_SPP_PREDICTIONPERIOD is a CDS View in S/4HANA. 3 CDS views read from this table.
CDS Views using this table (3)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_SPP_PredictionData01 | view | left_outer | COMPOSITE | |
| P_SPP_PredictionDate01 | view | left_outer | COMPOSITE | |
| P_SPP_PredictionDimension | view | left_outer | COMPOSITE |
@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
}
}*/