demo_cds_date_functions

DDL: DEMO_CDS_DATE_FUNCTIONS SQL: DEMO_CDS_DATFNC Type: view

demo_cds_date_functions is a CDS View in SAP S/4HANA. It reads from 1 data source (demo_expressions) and exposes 13 fields with key field id.

Data Sources (1)

SourceAliasJoin Type
demo_expressions demo_expressions from

Parameters (2)

NameTypeDefault
p_days abap.int4
p_months abap.int4

Annotations (2)

NameValueLevelField
AbapCatalog.sqlViewName DEMO_CDS_DATFNC view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY id id WorklistID
date1 dats1
valid1
date2 dats2
valid2
difference
day1
day2
date3 datn1
date4 datn2
days_between
add_days
add_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 demo_cds_date_functions.
-- 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: DEMO_CDS_DATFNC
-- Parameters: p_days : abap.int4, p_months : abap.int4

CREATE VIEW demo_cds_date_functions AS
SELECT
  id,
  dats1 AS date1,
  dats_is_valid(dats1) AS valid1,
  dats2 AS date2,
  dats_is_valid(dats2) AS valid2,
  dats_days_between(dats1,dats2) AS difference,
  dats_add_days(dats1,:p_days,'INITIAL') AS day1,
  dats_add_months(dats2,:p_months,'FAIL') AS day2,
  datn1 AS date3,
  datn2 AS date4,
  datn_days_between( datn1, datn2 ) AS days_between,
  datn_add_days( datn1,:p_days ) AS add_days,
  datn_add_months( datn1,1 ) AS add_month
FROM demo_expressions
;