P_ProjCalendarWeekClassfctn

DDL: P_PROJCALENDARWEEKCLASSFCTN SQL: PPRCALNDRWEEK Type: view COMPOSITE

P_ProjCalendarWeekClassfctn is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 7 fields with key fields CalendarDate, CalendarWeek, CalendarYear. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_CalendarDate I_CalendarDate from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_CalendarDate _CurrentCalendarDate _CurrentCalendarDate.CalendarDate = $session.system_date

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PPRCALNDRWEEK view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CalendarDate CalendarDate Calendar Date
KEY CalendarWeek CalendarWeek Calendar Week
KEY CalendarYear CalendarYear Year
YearWeek YearWeek Year and Calendar Week
FirstCalendarWeekInterval _CurrentCalendarDate CalendarWeek Calendar Week
IntervalStartDate
IntervalEndDate

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_ProjCalendarWeekClassfctn.
-- 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: PPRCALNDRWEEK

CREATE VIEW P_ProjCalendarWeekClassfctn AS
SELECT
  CalendarDate,
  CalendarWeek,
  CalendarYear,
  YearWeek,
  _CurrentCalendarDate.CalendarWeek AS FirstCalendarWeekInterval,
  dats_add_days(_CurrentCalendarDate.FirstDayOfWeekDate,7,'FAIL') AS IntervalStartDate,
  dats_add_days(_CurrentCalendarDate.FirstDayOfWeekDate, 42, 'FAIL') AS IntervalEndDate
FROM I_CalendarDate
LEFT OUTER JOIN I_CalendarDate AS _CurrentCalendarDate ON _CurrentCalendarDate.CalendarDate = $session.system_date  -- association [0..1]
;