SAP SELECT HIERARCHY DATA



Get Example source ABAP code based on a different SAP table
  



SELECT, FROM hierarchy_data

ABAP_SYNTAX
... hierarchy
$| hierarchy_navigator ...

What does it do?
Specifies hierarchy data as a data source data_source in an AB_SQL query. Possible hierarchy data is:
An SQL hierarchy hierarchy
A hierarchy navigator hierarchy_navigator that accesses an SQL hierarchy.
Access to hierarchy data is not supported by all databases.



Latest notes:

Hierarchy data sources are handled like any other data source. They can have alias names defined using AS and can be used in join expressions. There are no restrictions on which queries they can be used in.
NON_V5_HINTS
In an ABAP program, it is possible to use the method USE_FEATURES of the class CL_ABAP_DBFEATURES to check whether the current database system or a database system accessed using a secondary connection supports access to hierarchy data. This requires the constant HIERARCHIES of this class to be passed to the method in an internal table.
Accessing hierarchy data enforces the ABAP_STRICT_773 strict mode from ABAP_RELEASE ABAP_773 / .
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Access to the hierarchy navigator HIERARCHY_SIBLINGS as the data source of a query. The hierarchy navigator uses a CDS hierarchy as a source.
ABEXA 01239
ABAP_EXAMPLE_END