P_DaysBeyondTerms6

DDL: P_DAYSBEYONDTERMS6 SQL: PDAYSBYNDTERMS6 Type: view COMPOSITE

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

Data Sources (1)

SourceAliasJoin Type
I_CalendarDate I_CalendarDate from

Parameters (1)

NameTypeDefault
P_TodayDate sydate

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PDAYSBYNDTERMS6 view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (4)

KeyFieldSource TableSource FieldDescription
CalendarYear CalendarYear Year
CalendarMonth CalendarMonth Calendar Month
ThisMonth
ThisYear

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_DaysBeyondTerms6.
-- 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: PDAYSBYNDTERMS6
-- Parameters: P_TodayDate : sydate

CREATE VIEW P_DaysBeyondTerms6 AS
SELECT
  CalendarYear,
  CalendarMonth,
  cast(substring(cast(:P_TodayDate as abap.char(8)), 5, 2) as abap.numc(2)) AS ThisMonth,
  cast(substring(cast(:P_TodayDate as abap.char(8)), 1, 4) as abap.numc(4)) AS ThisYear
FROM I_CalendarDate
;