P_Rshresource2monthsperiod

DDL: P_RSHRESOURCE2MONTHSPERIOD SQL: PRSHRES2MTH Type: view CONSUMPTION

2 Months period

P_Rshresource2monthsperiod is a Consumption CDS View that provides data about "2 Months period" in SAP S/4HANA. It reads from 2 data sources (I_CalendarDate, I_CalendarDate) and exposes 7 fields.

Data Sources (2)

SourceAliasJoin Type
I_CalendarDate FirstCalendaerMonth from
I_CalendarDate SecondCalendaerMonth inner

Parameters (1)

NameTypeDefault
P_CalendarDate dats

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PRSHRES2MTH view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label 2 Months period view

Fields (7)

KeyFieldSource TableSource FieldDescription
CalendarDate
FirstDateFirstMonth I_CalendarDate FirstDayOfMonthDate First Day of Month
LastDateFirstMonth
YearMonthFirstMonth I_CalendarDate YearMonth Year Month
FirstDateSecondMonth I_CalendarDate FirstDayOfMonthDate First Day of Month
LastDateSecondMonth
YearMonthSecondMonth I_CalendarDate YearMonth Year Month

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_Rshresource2monthsperiod.
-- 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: PRSHRES2MTH
-- Parameters: P_CalendarDate : dats

CREATE VIEW P_Rshresource2monthsperiod AS
SELECT
  $parameters.P_CalendarDate AS CalendarDate,
  FirstCalendaerMonth.FirstDayOfMonthDate AS FirstDateFirstMonth,
  dats_add_days(dats_add_months(FirstCalendaerMonth.FirstDayOfMonthDate,1,'FAIL'), -1, 'FAIL') AS LastDateFirstMonth,
  FirstCalendaerMonth.YearMonth AS YearMonthFirstMonth,
  SecondCalendaerMonth.FirstDayOfMonthDate AS FirstDateSecondMonth,
  dats_add_days(dats_add_months(SecondCalendaerMonth.FirstDayOfMonthDate,1,'FAIL'), -1, 'FAIL') AS LastDateSecondMonth,
  SecondCalendaerMonth.YearMonth AS YearMonthSecondMonth
FROM I_CalendarDate AS FirstCalendaerMonth
INNER JOIN I_CalendarDate AS SecondCalendaerMonth ON /* join condition not captured in parsed metadata */
;