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: 

function module to download using file browser

Former Member
0 Kudos

FUNCTION MODULE TO download the data to a file by choosing the path using file browser.

6 REPLIES 6

former_member223537
Active Contributor
0 Kudos

Hi,

YOu need to use to FM's

1st ... cl_gui_frontend_services=>get_filename or FILENAME_GET

2nd .. GUI_DOWNLOAD

Best regards,

Prashant

Former Member
0 Kudos

In your selection screen use this below logic. Then on the screen a pop up file browser wud appear where you can select the path to download the file.

PS: If this solves your problem please reward points and mark this question answered.

Regards.

----


  • SELECT-OPTIONS AND PARAMETERS *

----


  • Local File path

SELECTION-SCREEN BEGIN OF BLOCK file_info WITH FRAME TITLE text-001.

PARAMETER : p_file TYPE ibipparms-path .

SELECTION-SCREEN END OF BLOCK file_info.

----


  • AT SELECTION-SCREEN EVENTS - validate user input *

----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

*Pop up screen to select the local file from PC

CALL FUNCTION 'F4_FILENAME'

IMPORTING

file_name = p_file.

Former Member
0 Kudos

F4_filename --> It will show you a popup for choosing the location where to save the file and will return the path string.

GUI_DOWNLOAD --> It will download the data into the file on your system.

Former Member
0 Kudos

hi,

fm name is ---> gui_file_save_dialog

if u want i can give u the code also

Reward point if helpful,

Thanks,

Puneet Mehta

Former Member
0 Kudos

HI,

Func mod:- f4_filename just gives the path name You have to use GUI_FILE_SAVE_DIALOG with use F4_FILENAME to get the path

and pass this path to path parameter in GUI_FILE_SAVE_DIALOG

Reward Points if helpful,

Thanks,

Puneet Mehta

varma_narayana
Active Contributor
0 Kudos

Hi..

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

CALL FUNCTION ‘F4_FILENAME’ "this will give File popup

<b>reward if Helpful,</b>