SAP HIER ANCS AGG ABEXA



Get Example source ABAP code based on a different SAP table
  



SELECT, Hierarchy Navigator HIERARCHY_ANCESTORS_AGGREGATE
This example demonstrates the hierarchy navigator HIERARCHY_ANCESTORS_AGGREGATE.

ABAP_SOURCE_CODE
DEMO CL_DEMO_HRRCHY_ANCESTORS_AGG

ABAP_DESCRIPTION
Calls of the hierarchy navigator HIERARCHY_ANCESTORS_AGGREGATE. If the example is executed with the predefined input values, the result set contains two rows, representing paths from a start node with the ID A to two hierarchy nodes with the IDs F1 and D2. The paths are highlighted as a result of the aggregate function STRING_AGG.
If the input value for the start node is raised, further start nodes are added by the comparison operator after START WHERE and hence further rows are added to the result set. In this example, the aggregated paths can be taken from the last column, however there is currently no way of interpreting the start node from the hierarchy columns.