3.2.15 Export CL_GUI_ALV_TREE to the Excel (Org.unit hierarchy)

The introduction

The previous example explains how to export CL_SALV_TREE to Excel. But, what if we have CL_GUI_ALV_TREE ?

By analogy with the previous example, we will do these steps.

First, in the Printing program we build tree CL_HRPAYNA_GUI_ALV_TREE (CL_GUI_ALV_TREE) and fill it by org.unit hierarchy, based on the data of HR module.

Next, we create an Excel-Form and insert this ALV-Tree into it.

Expected result:

Hierarchy Excel SAP ABAP