Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

3 ALV custom containers download in single file

Former Member
0 Kudos

Hi,

We have three ALV custom containers in the same output screen &  the user requirement is to download the three alv outputs in single excel file. Please advise.

Regards,

Devdatth

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Devdathh,

I would recommend the following solution remove the export button from all three ALV and put a custom download button in the toolbar O|R a single Download button on your SCREEN PF-Status.

This will give centralized Download functionality as per your requirement.

For the download you already have all 3 tables.

Create a new table with single field as a character.

Data : begin of it_download,

            line type c length 1024,

          begin of it_download.

Now loop on all three tables and concatenate the entire contents of the table in single line

seperated by the horizontal tab and append it to the it_download table.

Once done download this table as XLS.

Regards

5 REPLIES 5

Former Member
0 Kudos

Hi Devdatth,

     you can use OLE concept to download Excel there you can map your internal table data one by one to each cell. and you can exclude Excel download button from all alv output. give single button and you can handle your OLE logic that will download an excel as your output. As your output you have three different internal table. you can download each table data according to your requirement.

for that OLE concept should be clear. OLE concept is not a big deal you can just copy and past code from online available documents.

     Hope my idea will help you.

Thanks

Amit Gupta

0 Kudos

Hi Amit,

Thanks for your reply.

Can you please let me know some links or docs through which I can get the Code for OLE concept.

Regards,

Devdatth

0 Kudos

Hi,

find below link, here you find some code that can be easy to work with it.

http://saptechnical.com/Tutorials/ABAP/OLE/Index.htm

Regards

Amit

Former Member
0 Kudos

Hi Devdathh,

I would recommend the following solution remove the export button from all three ALV and put a custom download button in the toolbar O|R a single Download button on your SCREEN PF-Status.

This will give centralized Download functionality as per your requirement.

For the download you already have all 3 tables.

Create a new table with single field as a character.

Data : begin of it_download,

            line type c length 1024,

          begin of it_download.

Now loop on all three tables and concatenate the entire contents of the table in single line

seperated by the horizontal tab and append it to the it_download table.

Once done download this table as XLS.

Regards

Former Member
0 Kudos

You can take the data from three containers in one internal table and download that table in excel