P_PPH_ReportingDate
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)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | I_CalendarDate | from |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA