SAP SELECT FROM ITAB HIERA ABEXA



Get Example source ABAP code based on a different SAP table
  



SELECT, Internal Table as a Data Source of the HierarchyGenerator
This example demonstrates how an internal table is accessed in a common table expression with self association and how the table is used as a data source of the hierarchy generator.

ABAP_SOURCE_CODE
DEMO CL_DEMO_SELECT_FROM_ITAB_HIERA

ABAP_DESCRIPTION
An internal table parent_child_tab is used as a data source of the common table expression +parent_child_source in a WITH statement. A CTE association _relat is defined and exposed for the common table expression. The CTE association is a self-association. The common table expression can be used as a data source and the CTE association can be used as a hierarchy association of the hierarchy generator HIERARCHY used in the main query of the WITH statement.