P_GLEffectivityCalendar

DDL: P_GLEFFECTIVITYCALENDAR SQL: PGLEFFCAL Type: view COMPOSITE Package: ODATA_GL_OVP

Calendar For Card Effectivity

P_GLEffectivityCalendar is a Composite CDS View that provides data about "Calendar For Card Effectivity" in SAP S/4HANA. It reads from 2 data sources (I_CalendarDate, I_YearMonth) and exposes 4 fields with key field YearMonth. Part of development package ODATA_GL_OVP.

Data Sources (2)

SourceAliasJoin Type
I_CalendarDate _c1 from
I_YearMonth _c2 inner

Annotations (9)

NameValueLevelField
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PGLEFFCAL view
Analytics.dataExtraction.enabled false view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.dataClass #CUSTOMIZING view
VDM.private true view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY YearMonth I_YearMonth YearMonth
CalendarDate I_CalendarDate CalendarDate
EvaluationTimeFrameInMonths
CalendarMonthName
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.sqlViewName: 'PGLEFFCAL'
@Analytics: { dataExtraction.enabled: false  }
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #S
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.dataClass: #CUSTOMIZING
@VDM.private:true

define view P_GLEffectivityCalendar
  as select from I_CalendarDate as _c1
    join         I_CalendarDate as _c3 on _c3.CalendarDate = DATS_ADD_MONTHS(_c1.CalendarDate, - 12, 'FAIL')
    inner join   I_YearMonth    as _c2 on _c2.CalendarYear = _c1.CalendarYear
                                       or _c2.CalendarYear = _c3.CalendarYear
{
  key _c2.YearMonth,
      _c1.CalendarDate, 
      @ObjectModel.text.element: ['CalendarMonthName']
      //cast(1 + DIV(DATS_DAYS_BETWEEN(cast(CONCAT(_c2.YearMonth, '01') as sydate), _c1.CalendarDate), 30) as fac_gl_ovp_timeperiod_month) as EvaluationTimeFrameInMonths,

      cast(1 + DIV(DATS_DAYS_BETWEEN(cast(CONCAT(_c2.YearMonth, '01') as sydate), _c1.CalendarDate), 30) as fac_gl_ovp_timeperiod_month) as EvaluationTimeFrameInMonths,
//      1 + DIV(DATS_DAYS_BETWEEN(cast(CONCAT(_c2.YearMonth, '01') as sydate), _c1.CalendarDate), 30)  as EvaluationTimeFrameInMonths,

      @Semantics.text:true
      _c2._CalendarMonth._Text[1: Language = $session.system_language ].CalendarMonthName
}
where
  _c1.CalendarDate > '20000101'