SAP WITH CTE ABEXA



Get Example source ABAP code based on a different SAP table
  



WITH, Common Table Expressions
This example demonstrates how common table expressions are used in the statement WITH.

ABAP_SOURCE_CODE
DEMO CL_DEMO_CTE

ABAP_DESCRIPTION
A common table expression +conns creates a table of flight connections. A further expression, +cnts, determines the number of entries in the result set of +conns. The closing main query combines the result sets of both common table expressions using a cross join. This makes available the number of entries in every row of the result set of the WITH statement. The common table expression +conns is used twice in the WITH statement.