C_RSHCalendarWeeksBetweenDates

DDL: C_RSHCALENDARWEEKSBETWEENDATES SQL: CRSHCALWKBTWNDT Type: view CONSUMPTION Package: RSH_CDS_PROJECT_ASG

Calendar Weeks Between Dates

C_RSHCalendarWeeksBetweenDates is a Consumption CDS View that provides data about "Calendar Weeks Between Dates" in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 3 fields with key field YearWeek. Part of development package RSH_CDS_PROJECT_ASG.

Data Sources (1)

SourceAliasJoin Type
I_CalendarDate I_CalendarDate from

Parameters (2)

NameTypeDefault
P_StartDate syst_datum
P_EndDate syst_datum

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName CRSHCALWKBTWNDT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Calendar Weeks Between Dates view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY YearWeek YearWeek Year and Calendar Week
FirstDayOfWeekDate I_CalendarDate FirstDayOfWeekDate First day of week date
LastDayOfWeekDate

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 C_RSHCalendarWeeksBetweenDates.
-- 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: CRSHCALWKBTWNDT
-- Parameters: P_StartDate : syst_datum, P_EndDate : syst_datum

CREATE VIEW C_RSHCalendarWeeksBetweenDates AS
SELECT
  YearWeek,
  I_CalendarDate.FirstDayOfWeekDate AS FirstDayOfWeekDate,
  dats_add_days( FirstDayOfWeekDate , 7 , 'UNCHANGED' ) AS LastDayOfWeekDate
FROM I_CalendarDate
;