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: 

Subject: Automating export from ALV.

Former Member
0 Kudos
106

Hi,

Being fairly new to ABAP programming, I need a hand on something. An SAP report (rptabs20) is called many times with different variants, producing an ALV output each time. The user compile the information and produce one document. Instead of copying informations, each result could be exported to an unformatted text file and processed after that. I know how to do the export by hand, using the menu options, but I would like to call the export from the ABAP program as if I was using the menu. Can it be done easily? If not I will have to make a copy of the SAP report and customize it.

I succeeded in calling the report with all the existing variants using SUBMIT, I just don't know how to force exporting without replacing the ALV part by some code (probably OLE export functionnality).

Thanks in advance for any help I could get.

Thanks for the hint, I'll look at the course as soon as possible, and will read the documentation in the meantime.

Message was edited by: Dominique Perrier

2 REPLIES 2

nablan_umar
Advisor
Advisor
0 Kudos
65

Hi Dominique,

When you submit program RPTABS20 in your Abap, use addition EXPORTING LIST to MEMORY in your Submit statement. The output of each report will be stored into memory. Then use function module LIST_FROM_MEMORY.

0 Kudos
65

Hi Nablan,

Thanks for the information, even though I did not succeeded in using it. I found that passing parameters to some functions is still a bit tricky for me.

Every option I used were asking for a confirmation after each submit.

To fix that I used:

SUBMIT AND RETURN VIA JOB TO SAP-SPOOL WITHOUT SPOOL DYNPRO

The SUBMIT being run in background and the output sent to spool, there is no more windows requiring an intervention from the user.

Thanks again, it helped me in my search of a solution.