P_CurrentYearMonth

DDL: P_CURRENTYEARMONTH Type: view_entity COMPOSITE Package: VDM_PP_MP

Current Year Month

P_CurrentYearMonth is a Composite CDS View that provides data about "Current Year Month" in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 4 fields with key field CalendarDate. Part of development package VDM_PP_MP.

Data Sources (1)

SourceAliasJoin Type
I_CalendarDate I_CalendarDate from

Parameters (1)

NameTypeDefault
P_TodayDate sydate

Annotations (3)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY CalendarDate CalendarDate
CurrentYearMonth YearMonth
CalendarMonth I_CalendarDate CalendarMonth
_CalendarMonth I_CalendarDate _CalendarMonth
@VDM.private:true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@Analytics: { dataCategory: #DIMENSION, 

//              dataExtraction.enabled: true }

//@EndUserText.label: 'Techn. Int. CDS View to determine Current Period and Date'



define view entity P_CurrentYearMonth

with parameters
  @Consumption.hidden     : true
  @Environment.systemField: #SYSTEM_DATE
  P_TodayDate   : sydate

as select 
//@Semantics.calendar.dayDate  : true  //check using code completion

 //23092015


from  I_CalendarDate
{
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
}  
  where CalendarDate = $parameters.P_TodayDate 
  
group by 
YearMonth, 
I_CalendarDate.CalendarMonth, //23092015

CalendarDate 
;