cancel
Showing results for 
Search instead for 
Did you mean: 

how to get pop up for saving data using ws_download

Former Member
0 Kudos

Hi,

i am using ws-download for downloading data to excel .its working fine.But user wants at the time of clicking user command botton in the output of the report ,pop up should come to save the data as where user wants to save the data.

can some body tell me how to get user specific pop up at the time of download to save the file path??

AT USER-COMMAND.

  • Process the user action.

CASE sy-ucomm.

WHEN 'DWNL'. " Download

PERFORM download.

data:p_file(120) type c value 'C:\TEMP\PPIMPACT.xls'.

form download.

CALL FUNCTION 'WS_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE = ' '

  • CODEPAGE = ' '

FILENAME = P_FILE

FILETYPE = 'DAT'

  • MODE = ' '

  • WK1_N_FORMAT = ' '

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • COL_SELECT = ' '

  • COL_SELECTMASK = ' '

  • NO_AUTH_CHECK = ' '

  • IMPORTING

  • FILELENGTH =

TABLES

data_tab = gt_download

  • FIELDNAMES =

EXCEPTIONS

FILE_OPEN_ERROR = 1

FILE_WRITE_ERROR = 2

INVALID_FILESIZE = 3

INVALID_TYPE = 4

NO_BATCH = 5

UNKNOWN_ERROR = 6

INVALID_TABLE_WIDTH = 7

GUI_REFUSE_FILETRANSFER = 8

CUSTOMER_ERROR = 9

OTHERS = 10

.

IF sy-subrc <> 0.

MESSAGE e998(zv) WITH text-i12.

ELSE.

MESSAGE s998(zv) WITH text-i13.

ENDIF.

ENDFORM. " download

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

first use the FM

f4_filename or

TMP_GUI_BROWSE_FOR_FOLDER

to ask the user to enter the file path.

and then take this file path and use it in the ws_download FM.

Regards,

Venkatesh

Answers (0)