‎2006 Sep 18 9:33 AM
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
‎2006 Sep 18 9:35 AM
Hi,
Use the function module GUI_DOWNLOAD, here the file path can be given directly without user intervention.
Regards,
Devendra
‎2006 Sep 18 9:37 AM
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
‎2006 Sep 18 9:37 AM
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.
‎2006 Sep 18 9:39 AM
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