@AbapCatalog.sqlViewName: 'PPPCURYEARMONTH'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@VDM.private:true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@Analytics: { dataCategory: #DIMENSION,
// dataExtraction.enabled: true }
//@EndUserText.label: 'Techn. Int. CDS View to determine Current Period and Date'
define view P_CurrentYearMonth
with parameters
@Consumption.hidden : true
@Environment.systemField: #SYSTEM_DATE
P_TodayDate : sydate
as select
//@Semantics.calendar.dayDate : true //check using code completion
key CalendarDate,
//@Semantics.calendar.yearMonth: true - deactivated, because otherwise the following association is said to be ignored
YearMonth as CurrentYearMonth,
I_CalendarDate.CalendarMonth, //23092015 - necessary to include "I_CalendarDate._CalendarMonth" here
I_CalendarDate._CalendarMonth //23092015
from I_CalendarDate
where CalendarDate = $parameters.P_TodayDate
group by
YearMonth,
I_CalendarDate.CalendarMonth, //23092015
CalendarDate
;
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE"
],
"ASSOCIATED":
[
"I_CALENDARMONTH"
],
"BASE":
[
"I_CALENDARDATE"
],
"ANNO_REF":
[],
"VERSION":0
}
}*/