P_APAgingGrid2

DDL: P_APAGINGGRID2 SQL: PAPAGINGGRID2 Type: view COMPOSITE

P_APAgingGrid2 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_APAgingGrid1) and exposes 7 fields with key field CalendarDate.

Data Sources (1)

SourceAliasJoin Type
P_APAgingGrid1 P_APAgingGrid1 from

Parameters (2)

NameTypeDefault
P_AgingGridMeasureInDays abap.int4
P_NumberOfAgingGridColumns abap.int4

Annotations (6)

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

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CalendarDate CalendarDate Calendar Date
AgingGridColumnSequence AgingGridColumnSequence
NumberOfAgingGridColumns_x2 NumberOfAgingGridColumns_x2
int4else0endasOffset_Low
int4else0endasOffset_High
Interval_Low
Interval_High

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_APAgingGrid2.
-- 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: PAPAGINGGRID2
-- Parameters: P_AgingGridMeasureInDays : abap.int4, P_NumberOfAgingGridColumns : abap.int4

CREATE VIEW P_APAgingGrid2 AS
SELECT
  CalendarDate,
  AgingGridColumnSequence,
  NumberOfAgingGridColumns_x2,
  case when Interval_Offset > 0 then cast(1 as abap.int4) else 0 end as Offset_Low AS int4else0endasOffset_Low,
  case when Interval_Offset < 0 then cast(1 as abap.int4) else 0 end as Offset_High AS int4else0endasOffset_High,
  :P_AgingGridMeasureInDays * (AgingGridColumnSequence - :P_NumberOfAgingGridColumns - 1 ) AS Interval_Low,
  :P_AgingGridMeasureInDays * (AgingGridColumnSequence - :P_NumberOfAgingGridColumns) AS Interval_High
FROM P_APAgingGrid1
;