P_Referencedates

DDL: P_REFERENCEDATES SQL: PDFREFDATES Type: view CONSUMPTION

P_Referencedates is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 3 fields.

Data Sources (1)

SourceAliasJoin Type
I_CalendarDate I_CalendarDate from

Parameters (1)

NameTypeDefault
P_DateFunctionValidityDate sydats

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PDFREFDATES view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (3)

KeyFieldSource TableSource FieldDescription
CalendarDate CalendarDate Calendar Date
LastYearDate
NextYearDate

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_Referencedates.
-- 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: PDFREFDATES
-- Parameters: P_DateFunctionValidityDate : sydats

CREATE VIEW P_Referencedates AS
SELECT
  CalendarDate,
  dats_add_months( CalendarDate, -12, 'FAIL') AS LastYearDate,
  dats_add_months( CalendarDate, 12, 'FAIL') AS NextYearDate
FROM I_CalendarDate
;