P_CalendarDate

DDL: P_CALENDARDATE SQL: PMMCALENDATE Type: view CONSUMPTION

Calendar Date

P_CalendarDate is a Consumption CDS View that provides data about "Calendar Date" in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 20 fields.

Data Sources (1)

SourceAliasJoin Type
I_CalendarDate I_CalendarDate from

Parameters (1)

NameTypeDefault
P_Date sydate

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PMMCALENDATE view
ClientDependent true view
AbapCatalog.compiler.compareFilter true view
VDM.private true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Calendar Date view
VDM.viewType #CONSUMPTION view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (20)

KeyFieldSource TableSource FieldDescription
CalendarDate I_CalendarDate CalendarDate Calendar Date
CalendarYear I_CalendarDate CalendarYear Year
CalendarQuarter I_CalendarDate CalendarQuarter Calendar Quarter
CalendarMonth I_CalendarDate CalendarMonth Calendar Month
CalendarWeek I_CalendarDate CalendarWeek Calendar Week
CalendarDay I_CalendarDate CalendarDay Occur Day in a Month
YearMonth I_CalendarDate YearMonth Year Month
YearQuarter I_CalendarDate YearQuarter Year Quarter
YearWeek I_CalendarDate YearWeek Year and Calendar Week
WeekDay I_CalendarDate WeekDay Weekdays
FirstDayOfWeekDate I_CalendarDate FirstDayOfWeekDate First day of week date
FirstDayOfMonthDate I_CalendarDate FirstDayOfMonthDate First Day of Month
CalendarDayOfYear I_CalendarDate CalendarDayOfYear Calendar day of year
YearDay I_CalendarDate YearDay Day of the year
_CalendarMonth I_CalendarDate _CalendarMonth
_CalendarQuarter I_CalendarDate _CalendarQuarter
_CalendarYear I_CalendarDate _CalendarYear
_WeekDay I_CalendarDate _WeekDay
_YearMonth I_CalendarDate _YearMonth
DaysBetween

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_CalendarDate.
-- 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: PMMCALENDATE
-- Parameters: P_Date : sydate

CREATE VIEW P_CalendarDate AS
SELECT
  I_CalendarDate.CalendarDate AS CalendarDate,
  I_CalendarDate.CalendarYear AS CalendarYear,
  I_CalendarDate.CalendarQuarter AS CalendarQuarter,
  I_CalendarDate.CalendarMonth AS CalendarMonth,
  I_CalendarDate.CalendarWeek AS CalendarWeek,
  I_CalendarDate.CalendarDay AS CalendarDay,
  I_CalendarDate.YearMonth AS YearMonth,
  I_CalendarDate.YearQuarter AS YearQuarter,
  I_CalendarDate.YearWeek AS YearWeek,
  I_CalendarDate.WeekDay AS WeekDay,
  I_CalendarDate.FirstDayOfWeekDate AS FirstDayOfWeekDate,
  I_CalendarDate.FirstDayOfMonthDate AS FirstDayOfMonthDate,
  I_CalendarDate.CalendarDayOfYear AS CalendarDayOfYear,
  I_CalendarDate.YearDay AS YearDay,
  I_CalendarDate._CalendarMonth AS _CalendarMonth,
  I_CalendarDate._CalendarQuarter AS _CalendarQuarter,
  I_CalendarDate._CalendarYear AS _CalendarYear,
  I_CalendarDate._WeekDay AS _WeekDay,
  I_CalendarDate._YearMonth AS _YearMonth,
  dats_days_between(I_CalendarDate.CalendarDate, :P_Date) AS DaysBetween
FROM I_CalendarDate
;