‎2008 Jul 17 8:48 AM
hi guys
i have to make a screen where user can put file path through explore. actually file will be on presentation server.
please help
regards
gani
‎2008 Jul 17 9:10 AM
Hi,
you can use the class cl_gui_frontend_services to do this. Use method file_save_dialog or method file_open_dialog.
Regards
Thomas
‎2008 Jul 17 9:59 AM
try this code
REPORT zreport.
PARAMETERS : p_path TYPE text100 OBLIGATORY .
*&---------------------------------------------------------------------*
*& AT SELECTION-SCREEN
*&---------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path .
PERFORM get_file_help .
*&---------------------------------------------------------------------*
*& Form get_file_help
*&---------------------------------------------------------------------*
FORM get_file_help.
DATA : i_file TYPE filetable ,
w_file TYPE file_table ,
l_rc TYPE i ,
l_ua TYPE i .
CALL METHOD cl_gui_frontend_services=>file_open_dialog
CHANGING
file_table = i_file
rc = l_rc
user_action = l_ua
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
OTHERS = 4.
IF l_ua <> cl_gui_frontend_services=>action_cancel .
READ TABLE i_file INTO w_file INDEX 1 .
IF sy-subrc = 0 .
p_path = w_file-filename .
ENDIF.
ENDIF.
ENDFORM. " get_file_help