P_PPH_ReportingDate

DDL: P_PPH_REPORTINGDATE Type: view_entity COMPOSITE

P_PPH_ReportingDate is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 10 fields with key field ReportingDate. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_CalendarDate I_CalendarDate from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_CalendarDate _ReportingDate $projection.ReportingDate = _ReportingDate.CalendarDate
[0..1] I_CalendarDate _CurrentDate $projection.TodayDate = _CurrentDate.CalendarDate
[0..1] I_CalendarDate _YesterdayDate $projection.YesterdayDate = _YesterdayDate.CalendarDate

Annotations (3)

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

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY ReportingDate
TodayDate
datsasYesterdayDate
ReportingDateWeekDay WeekDay
ReportingDateWeek CalendarWeek
ReportingDateMonth CalendarMonth
ReportingDateYear CalendarYear
_ReportingDate _ReportingDate
_CurrentDate _CurrentDate
_YesterdayDate _YesterdayDate
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private: true

define view entity P_PPH_ReportingDate
  as select from I_CalendarDate
  association [0..1] to I_CalendarDate as _ReportingDate on $projection.ReportingDate = _ReportingDate.CalendarDate
  association [0..1] to I_CalendarDate as _CurrentDate   on $projection.TodayDate = _CurrentDate.CalendarDate
  association [0..1] to I_CalendarDate as _YesterdayDate on $projection.YesterdayDate = _YesterdayDate.CalendarDate
{
  key cast(CalendarDate as ftr_reporting_date preserving type) as ReportingDate,

      cast(substring(cast(TSTMP_CURRENT_UTCTIMESTAMP() as abap.char(23)), 1, 8) as abap.dats) as TodayDate,
      cast(substring(cast(TSTMP_ADD_SECONDS(TSTMP_CURRENT_UTCTIMESTAMP(), cast( -86400 as abap.dec( 15, 0 )) , 'FAIL') 
                                                       as abap.char(23)), 1, 8) as abap.dats) as YesterdayDate,

      WeekDay       as ReportingDateWeekDay,
      CalendarWeek  as ReportingDateWeek,
      CalendarMonth as ReportingDateMonth,
      CalendarYear  as ReportingDateYear,  

      // Associations

      _ReportingDate,
      _CurrentDate,
      _YesterdayDate
}
where CalendarDate > '19700101';
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE"
],
"ASSOCIATED":
[
"I_CALENDARDATE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/