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: 

Suppress download dialog

former_member2492
Active Participant
0 Kudos
923

CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
 EXPORTING
* window_title = ' '
 DEFAULT_EXTENSION = LV_FORMAT
 DEFAULT_FILE_NAME = LV_FILENAME
 INITIAL_DIRECTORY = LV_PATH
 CHANGING
 FILENAME = LV_FILENAME
 PATH = LV_PATH
 FULLPATH = LV_PATH
 USER_ACTION = LV_RESULT.
CHECK LV_RESULT EQ '0'.
CALL FUNCTION 'GUI_DOWNLOAD'
 EXPORTING
 FILENAME = LV_FILENAME
 FILETYPE = 'ASC'
* APPEND = 'X'
 WRITE_FIELD_SEPARATOR = 'X'
* CONFIRM_OVERWRITE = 'X'
 TABLES
 DATA_TAB = LTY_DATATAB
 EXCEPTIONS
 FILE_OPEN_ERROR = 1
 FILE_WRITE_ERROR = 2OTHERS = 3.

This is the code I use to download,it pop ups a dialog and requires the user to save.How can I run it as a background job?

So the file should download and save without the pop up!

1 ACCEPTED SOLUTION

matt
Active Contributor
490

For security reasons it can't be done. You could use a network share or FTP.

4 REPLIES 4

matt
Active Contributor
491

For security reasons it can't be done. You could use a network share or FTP.

0 Kudos
490

can you give me an example,also keep in mind that the format is not always text,it can be xls...thanks

0 Kudos
490

To download the file in FTP server, you can refer these demo programs - RSFTP0*. You would get lot of examples in the google to download in the application server.

matt
Active Contributor
0 Kudos
490

Plenty of examples of both if you'll search. Like asked just 9 hours ago. https://answers.sap.com/questions/671763/move-zip-files-from-application-server-to-presenta.html The format of the file is irrelevant.