Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

How To Extract Formatted SALV Output As An Excel Document in the background

$
0
0

Recently, have come across a requirement to send output of report developed based on SALV as an excel attachment. To achieve the same we can use the method TO_XML of class CL_SALV_TABLE. This method will have the formatted output content as XSTRING value.

 

Here are the steps.

 

a. Variable Declaration.

scn_blog_alv_decl02.png

b.Data Selection/ALV Customizing calls.

 

scn_blog_alv_call02.png

scn_blog_alv_call03.png

scn_blog_alv_call04.png

 

c.Call to Convert ALV Output as internal XML Format.

scn_blog_alv_call05.png

 

d.E-Mail Data Declaration.

scn_blog_alv_call06.png

e.EMail - Content Conversion/Body/Attachment Creation

scn_blog_alv_call07.png

Send E-Mail

 

scn_blog_alv_call08.png

 

 

Excel Output

scn_blog_alv_call09.png

 

we can also use TO_XML method to download the content as an XLS or XML documents  in Abap Web dynpro based applications .

 

Here is the sample source code for this approach.


Viewing all articles
Browse latest Browse all 943

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>