Integration
of a Tree Structure in a Web Dynpro TableIn the following tutorial, you will create a Web Dynpro application that displays a table with tree structure in the leading column. The basis for this constitutes a specific Web Dynpro UI element named TreeByNestingTableColumn.
This tutorial illustrates how you create a table in a view, whose row structure depends on a tree structure in the leading column. First, we demonstrate how you integrate the tree structure in a table using the TreeByNestingTableColumn UI element. After that, you will implement the controller of the view in such a way, that only when the user expands a node at runtime, the direct sub-nodes and sub-elements of the node are added. To make the structure more efficient, the respective datasets, which are reloaded when a tree node is expanded, are loaded “on-demand“ from a data layer only as early as the tree node is expanded.
The application to be created is an article catalog from a bookshop. The article catalog should provide a complete overview about the articles in stock, article prices and other information for the staff of the bookshop. To do this, the entries of the article catalog are to be displayed in a table. In addition, it is desirable not to have all articles displayed altogether, but to organize them hierarchically in three levels. The highest level should organize the articles according to article category. Below this level should be a level organized according to article groups. Eventually, the lowest hierarchy level should list the articles themselves.

By the end of this tutorial, you will be able to:
! |
Use a context recursively |
! |
Integrate a TreeByNestingTableColumn UI element in a table. |
! |
Implement a parameter mapping between the parameter of an UI element event and the parameter of an action event handler. |
! |
Implement an event handler that can react to the selection of a node of the TreeByNestingTableColumn UI element. |
· The SAP NetWeaver Developer Studio is installed on your PC.
· You have access to the SAP J2EE Engine.
· Java programming language
· Knowledge of programming Web Dynpro applications
· Knowledge of Web Dynpro trees, illustrated in the tutorial Structure of a recursive and reloadable Web Dynpro tree, is an advantage.