P_SI4_CalendarDate2

DDL: P_SI4_CALENDARDATE2 SQL: PSDSI4CD2 Type: view COMPOSITE

P_SI4_CalendarDate2 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_SI4_CalendarDate1) and exposes 11 fields with key field CalendarDate.

Data Sources (1)

SourceAliasJoin Type
P_SI4_CalendarDate1 P_SI4_CalendarDate1 from

Annotations (4)

NameValueLevelField
AbapCatalog.sqlViewName PSDSI4CD2 view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY CalendarDate CalendarDate Calendar Date
CalendarYear CalendarYear Year
LastCalendarYear LastCalendarYear
YearQuarter YearQuarter Year Quarter
CalendarQuarter CalendarQuarter Calendar Quarter
YearMonth YearMonth Year Month
CalendarMonth CalendarMonth Calendar Month
CalendarWeek CalendarWeek Calendar Week
PartOfMonth PartOfMonth
Next1YearMonth
Previous1YearMonth

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_SI4_CalendarDate2.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PSDSI4CD2

CREATE VIEW P_SI4_CalendarDate2 AS
SELECT
  CalendarDate,
  CalendarYear,
  LastCalendarYear,
  YearQuarter,
  CalendarQuarter,
  YearMonth,
  CalendarMonth,
  CalendarWeek,
  PartOfMonth,
  left(dats_add_months( CalendarDate, 1,'FAIL'), 6) AS Next1YearMonth,
  left(dats_add_months( CalendarDate, -1,'FAIL'), 6) AS Previous1YearMonth
FROM P_SI4_CalendarDate1
;