Export CL_SALV_TREE to Excel with XLSX Workbench
related page 1
related page 2
related page 3
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 button
to 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):
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 :
Press buttonto export ALV-Tree to Excel form :
Good one Borodin...
Спасибо! Очень круто. Особенно хорошо что все так подробно прокомментировано 🙂 .
Limir, thank you a lot!
But, non-English posts are undesirable here ( see The SCN Rules of Engagement , Item 4)
Hi Borodin,
Nice Documentation. Can we compare this concept with ADOBE Forms Concept in sap abap?
Very Intresting...!
And how do we get XLSX Workbench on SAP System.
Is this BASIS Guys work or our self do this?
Hi Vamsilakshman,
Yes, some principles are similar to Smartforms and AdobeForms.
There are two ways of installing XLSX Workbench: Manually and via SAPLink tool .
Of course, you must have developer role.
Regards, Igor.
Outstanding work! This is exactly what I was looking for.
Thanks a lot !
Regards, Igor