P_CALENDARWEEK

DDL: P_CALENDARWEEK Type: view COMPOSITE

P_CALENDARWEEK is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 10 fields.

Data Sources (1)

SourceAliasJoin Type
I_CalendarDate _Calendar from

Annotations (10)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PCALENDARWK view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XXL view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (10)

KeyFieldSource TableSource FieldDescription
FirstDayOfYearDate
ShiftedCalendarDate
CalendarDate CalendarDate
YearMonth YearMonth
YearQuarter YearQuarter
CalendarWeek
EndDateWeek
YearDay YearDay
CalendarYear CalendarYear
FirstDayOfWeekDate FirstDayOfWeekDate
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog:{
sqlViewName: 'PCALENDARWK',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
//@EndUserText.label: 'Calendar Week'

@ObjectModel: {
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #B,
     sizeCategory:   #XXL
   }
   }
@VDM: {
  viewType: #COMPOSITE,
  private:true
}
define view P_CALENDARWEEK
  as select from I_CalendarDate as _Calendar
{
  cast(concat(CalendarYear, '0101') as abap.dats(8))                                              as FirstDayOfYearDate,
  DATS_ADD_DAYS(CalendarDate,365,'NULL')                                                          as ShiftedCalendarDate,
  CalendarDate,
  YearMonth,
  YearQuarter,
  cast(concat('00',cast(CalendarWeek as abap.char( 4 ))) as abap.numc( 4 ))                       as CalendarWeek,
  cast(concat('00',(cast( cast(CalendarWeek as int4) + 52 as abap.char(12 )))) as abap.numc( 4 )) as EndDateWeek,
  //  cast(concat('00',(cast( cast(CalendarWeek as int4) + 53 as abap.char(12 )))) as abap.numc( 4 )) as EndDateWeek,

  YearDay,
  CalendarYear,
  FirstDayOfWeekDate
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/