Creating trees

In this recipe, we will see how we can display a tree in our Web Dynpro application. We will create a tree that will display the employee department-wise data, that is, nodes showing department names, each of which when opened will display a list of employees within the department along with the employee names.

For the sake of this recipe, we assume that we have an internal table DATA_TAB comprising of three fields, department, pernr, and sname containing the department name, employee number, and the employee names respectively sorted according to the department name.

Creating trees

How to do it...

We will now follow the steps as shown:

  1. We first define ...

Get SAP ABAP Advanced Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.