09-25-2008 1:41 PM
HI,
Can i have any Function Module to have a popup, which accepts the file Path to download.
Im having problem with GUI..so please suggest me Other than.
GUI_FILE_SAVE_DIALOG.
Thanks in Advance..
Dayakar
09-25-2008 1:49 PM
hi,
Try this code. it will work sure...
tables rlgrap.
DATA: ld_filename TYPE string,
ld_path TYPE string,
ld_fullpath TYPE string,
ld_result TYPE i,
gd_file TYPE c.
selection-screen begin of block m with frame.
PARAMETERS: p_file TYPE rlgrap-filename.
selection-screen end of block m.
At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Display save dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = ' '
default_extension = 'XLS'
default_file_name = 'accountsdata'
initial_directory = 'c:\temp\'
CHANGING
filename = ld_filename
path = ld_path
fullpath = ld_fullpath
user_action = ld_result.
p_file = ld_fullpath.
I hope it will solve definatly ur problem...
Regards,
Shankar.
09-25-2008 1:45 PM
Hi,
The older way of doing this was via function module DOWNLOAD
Regards,
Darren
09-25-2008 1:47 PM
Try with method FILE_SAVE_DIALOG from class
CL_GUI_FRONTEND_SERVICES.
Michael
09-25-2008 1:49 PM
hi,
Try this code. it will work sure...
tables rlgrap.
DATA: ld_filename TYPE string,
ld_path TYPE string,
ld_fullpath TYPE string,
ld_result TYPE i,
gd_file TYPE c.
selection-screen begin of block m with frame.
PARAMETERS: p_file TYPE rlgrap-filename.
selection-screen end of block m.
At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Display save dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = ' '
default_extension = 'XLS'
default_file_name = 'accountsdata'
initial_directory = 'c:\temp\'
CHANGING
filename = ld_filename
path = ld_path
fullpath = ld_fullpath
user_action = ld_result.
p_file = ld_fullpath.
I hope it will solve definatly ur problem...
Regards,
Shankar.
09-25-2008 1:53 PM
Hi Shankar,
I dont want The Popup on selection screen..that should be on Report output list.
Regards,
Dayakar
09-25-2008 1:59 PM
hi,
then just u add a button on status bar under that u call that which i specified.
Regards,
Shankar.
09-25-2008 2:03 PM
09-25-2008 1:53 PM
Hi,
there should be no reason NOT to use class cl_gui_frontend_services. However you may use function module POPUP_TO_GET_VALUE with FIELDNAME = FILE_NAME and TABNAME = FLSYSRQST.
Or define own screen and use F4_FILENAME for the input field...
kind regards,
hp