Application Development and Automation 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: 
Read only

Function 'Download'

Former Member
0 Likes
508

Hi,

I am trying to make a abap program that export a txt file. I am using the function 'download' so when the program ends it appears a popup for the user make the download.

The question is: can we make the download without the user action??

It is my intention to run the program during the night so it is not possible a user action.

Best Regards

João Fernandes

4 REPLIES 4
Read only

Former Member
0 Likes
466

Hi,

Use the function module GUI_DOWNLOAD, here the file path can be given directly without user intervention.

Regards,

Devendra

Read only

Former Member
0 Likes
466

HI Fernandes

As you are scheduling a job which will download the

data. You can not use the FM: GUI_DOWNLOAD.

Download the data using OPEN DATASET statements to

download to application server. Below is an example for

doing the same.

Eg:

parameters: p_file like rlgrap-filename obligatory.

*-- Extract data to an internal table
open dataset p_file for output in text mode encoding default.
if sy-subrc ne 0.
*** Error Mesg
else.
   loop at itab.
        transfer itab to p_file.
   endloop.
   close dataset p_file.
endif.

Kind Regards

Eswar

Read only

Former Member
0 Likes
466

Hi,

You can make use of the trasaction CG3y to upload the file from the application server to the presentation server and make use of tcode CG3z to download data from the application server to the presentation server.

I guess if you are using the presentation server to upload data then the tcode CG3y will be usefull to you.

You can make use of function module GUI_DOWNLOAD and GUI_UPLOAD.

Please reward valuable answers.

Regards,

Shrita.

Read only

Former Member
0 Likes
466

Hi,

If u use GUI_DOWNLOAD and schedule the job in SM36 to run at night, u will get error bcz when u run in bckground u can download the file only to application server not to presentation server.

U can download to application server using open dataset and close dataset. GUI_DOWNLOAD will work only in foreground.

Regards

Divakar