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: 

download excel file to PC in background

Former Member
0 Kudos

Hi All,

I need to write a report to local PC as an excel file. The program is working fine in foreground using cl_gui_frontend_services=>gui_download. However since the report data is very large, when the user runs the program in foreground, it always gets timeout. So it has to be run in background. I did a lot of research and tried the example posted here as well: http://abapblog.com/articles/tricks/33-create-xlsx-mhtml-file-from-internal-table-in-background

But I am still not successful. I am getting ""control_flush_error". Does anybody have any ideas?


Thanks,

Meiying


1 ACCEPTED SOLUTION

0 Kudos

Hi ,

cl_gui_frontend_services=>gui_download is for front end if you use this for background job scheduling it will throw dump !!

so the solution is write a program to download the file to application  server using

'OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE'

and from there you can get the file.

there is no way that you can schedule a program in background and store it on local PC.

3 REPLIES 3

0 Kudos

Hi ,

cl_gui_frontend_services=>gui_download is for front end if you use this for background job scheduling it will throw dump !!

so the solution is write a program to download the file to application  server using

'OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE'

and from there you can get the file.

there is no way that you can schedule a program in background and store it on local PC.

0 Kudos

Thanks. I think I have to agree with you.

guillaume-hrc
Active Contributor
0 Kudos

Hi,

There are some workarounds with SM59 destination for instance.

Check this post:

Best regards,

Guillaume