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: 

Reg: Displaying the popup for user to select directory

Former Member
0 Kudos
286

Hi All,

I got one requirement to download an excel file to presentation server. For that I should allow the user to select the directory to which he wants to download the file. Are there any FM or methods which satisfy my requirement

I saw some FM's like GUI_FILE_SAVE_DIALOG, ITS_FILE_SAVE_DIALOG etc...and method like FILE_OPEN_DIALOG & FILE_SAVE_DIALOG in CL_GUI_FRONTEND_SERVICES..but these are allowing to select the file but not the directory..

Thanks,

RAvee

4 REPLIES 4

RemiKaimal
Active Contributor
0 Kudos
146

Hello,

Using : CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG

.....

CHANGING

filename = fname "--- name of file

path = path "----


Directory Selected

fullpath = fullpath "--- Path\filename

Path will return the directory you select.

Pass fullpath to :

cl_gui_frontend_services=>gui_download

EXPORTING

filename = fullpath

filetype = 'BIN'

..........

Hope this helps.

Cheers,

Remi

b_deterd2
Active Contributor
0 Kudos
146

Hi,

Try method DIRECTORY_BROWSE in CL_GUI_FRONTEND_SERVICES. It gives you the selected directory back which you can use from there on in your program.

regards,

Bert

Former Member
0 Kudos
146

Try out FM: "J_8AS_POPUP_GET_FILENAME"

jj
Active Contributor
0 Kudos
146

call function 'KD_GET_FILENAME_ON_F4'

exporting

static = 'X'

changing

file_name = tab_file-low.