SAP SELECT CTE HIERARCHY



Get Example source ABAP code based on a different SAP table
  



SELECT, FROM cte_hierarchy

ABAP_SYNTAX
... +cte_hierarchy

What does it do?
Specifies a CTE hierarchy +cte_hierarchy as a an SQL hierarchy hierarchy in an AB_SQL query of a WITH statement. A CTE hierarchy is a common table expression defined as an SQL hierarchy using the addition WITH HIERARCHY.
The rows of the tabular result set of a CTE hierarchy are the hierarchy nodes of the SQL hierarchy accessed in its subquery, including their hierarchy columns.



Latest notes:

More specifically, a CTE hierarchy can be specified as a source of the hierarchy navigators.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Specification of a CTE hierarchy as a data source of a SELECT statement in the class CL_DEMO_HIERARCHY_TREE with explicit access to the hierarchy columns. The data source of the subquery of the CTE hierarchy is a CDS hierarchy.
ABEXA 01238
ABAP_EXAMPLE_END

ABAP_EXAMPLE_VX5
See also the example under WITH - hierarchy.
ABAP_EXAMPLE_END