01-14-2009 3:22 AM
I need to popup the selection for local directory and my program generates the file and stores into the directory.
how to do this pop up of directory?
01-14-2009 6:15 AM
Hi Venkat,
Try using following method
CALL METHOD cl_gui_frontend_services=>directory_browse
EXPORTING
window_title = <title you want to be displayed on the popup> Its optional
initial_folder = <default directory that is to be displayed> again optional
CHANGING
selected_folder = <pass the variable to capture the directory that is selected>
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
01-14-2009 3:32 AM
Hi Venkatabby,
Use this method cl_gui_frontend_services=>file_open_dialog
regards,
Peter
01-14-2009 3:34 AM
Hi,
You can use FM POPUP_TO_DISPLAY_TEXT_LO. Just pass your directory in parameter TEXTLINE1.
Hope this will be helpful.
Thanks,
Amit
01-14-2009 3:45 AM
hi
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
default_extension = 'text'
default_file_name = ld_fullpath
initial_directory = 'c:\temp\'
CHANGING
filename = ld_filename
path = ld_path
fullpath = ld_fullpath
user_action = ld_result.
and call the FM GUI_DOWNLOAD
01-14-2009 4:20 AM
Hi,
Use the below code and FM F4_FILENAME.
parameters: p_pcfile like rlgrap-filename default 'c:\test.txt'.
at selection-screen on value-request for p_pcfile.
call FM F4_FILENAME. " this FM will show the popup for saving in local directory.
Thanks,
Srilakshmi.
01-14-2009 5:10 AM
Hello Venkat,
Please try to use below code:.
PARAMETERS: p_file type RLGRAP-filename,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
IMPORTING
FILE_NAME = p_file
.
Hope it will solve your problem.
Have a Nice Day.
regards,
Sujeet
01-14-2009 6:15 AM
Hi Venkat,
Try using following method
CALL METHOD cl_gui_frontend_services=>directory_browse
EXPORTING
window_title = <title you want to be displayed on the popup> Its optional
initial_folder = <default directory that is to be displayed> again optional
CHANGING
selected_folder = <pass the variable to capture the directory that is selected>
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.