P_ProjCalendarWeekClassfctn

DDL: P_PROJCALENDARWEEKCLASSFCTN SQL: PPRCALNDRWEEK Type: view COMPOSITE

P_ProjCalendarWeekClassfctn is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 7 fields with key fields CalendarDate, CalendarWeek, CalendarYear. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_CalendarDate I_CalendarDate from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_CalendarDate _CurrentCalendarDate _CurrentCalendarDate.CalendarDate = $session.system_date

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PPRCALNDRWEEK view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CalendarDate CalendarDate
KEY CalendarWeek CalendarWeek
KEY CalendarYear CalendarYear
YearWeek YearWeek
FirstCalendarWeekInterval _CurrentCalendarDate CalendarWeek
IntervalStartDate
IntervalEndDate
@AbapCatalog.sqlViewName: 'PPRCALNDRWEEK'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
define view P_ProjCalendarWeekClassfctn
  as select from I_CalendarDate

  association [0..1] to I_CalendarDate as _CurrentCalendarDate on _CurrentCalendarDate.CalendarDate = $session.system_date
  
{
  key   CalendarDate,
  key   CalendarWeek,
  key   CalendarYear,
        YearWeek,
        _CurrentCalendarDate.CalendarWeek                                  as FirstCalendarWeekInterval,
        dats_add_days(_CurrentCalendarDate.FirstDayOfWeekDate,7,'FAIL')    as IntervalStartDate,
        dats_add_days(_CurrentCalendarDate.FirstDayOfWeekDate, 42, 'FAIL') as IntervalEndDate
         

}