P_CurrentYearMonth

DDL: P_CURRENTYEARMONTH SQL: PPPCURYEARMONTH Type: view COMPOSITE

P_CurrentYearMonth is a Composite CDS View in SAP S/4HANA.

Parameters (1)

NameTypeDefault
P_TodayDate sydate

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PPPCURYEARMONTH view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
@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
}
}*/