Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
NOTE: Before beginning, the XLSX Workbench functionality must be available in the your system.
Let's use standard demo report SALV_DEMO_TREE_SIMPLE is available in the every system (the report demonstrates how to use CL_SALV_TREE control). We export this CL_SALV_TREE to the Excel based form.
1 PREPARE A PRINTING PROGRAM.
1.1 Copy standard demo report SALV_DEMO_TREE_SIMPLE to the customer namespace, for example Z_SALV_DEMO_TREE_SIMPLE :
1.2 In the copied report, add new button to GUI-status '100':
1.3 In the report line number 261, insert next code to processing the new OK-code :
1.4 Activate objects:
2 PREPARE A FORM.
2.1 Launch XLSX Workbench, and in the popup window specify a form name SALV_DEMO_TREE_SIMPLE , and then press the button «Create»:
Empty form will be displayed:
2.2 Push buttonto save the form.
2.3 Assign context CL_SALV_TREE to the form:
Herewith, you will be prompted to create a form's structure automatically (based on context):
Press the button .
The Tree component will be automatically added to the form structure :
2.4 Make markup in the Excel template (read more here😞
2.5 Assign Tree to the marked area (cells range A1:B4) in the Excel template.
To do that, select cells range A1:B4 in the Excel template, and then, press button with "pencil" in the item "Area in the template" of the Properties tab:
2.8 Activate form by pressing button.
3 EXECUTION.
Run your report SALV_DEMO_TREE_SIMPLE; ALV-tree will be displayed :