08-19-2007 7:23 AM
hi SAPiens,
i need a function module which will pop-up a window for selecting a folder.........
08-19-2007 7:33 AM
Hi,
This sample program found in this forum may this also helpful
report zrich_0001 .
parameters: p_path type localfile.
at selection-screen on value-request for p_path.
data: path_str type string.
call method cl_gui_frontend_services=>directory_browse
exporting
window_title = 'Select Directory'
changing
selected_folder = path_str
exceptions
cntl_error = 1.
call method cl_gui_cfw=>flush
exceptions
cntl_system_error = 1
cntl_error = 2.
p_path = path_str.
aRs
08-19-2007 7:29 AM
Hi,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME' "For upload of the program
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
or
can use the methods FILE_OPEN_DIALOG or FILE_SAVE_DIALOG of the class CL_GUI_FRONTEND_SERVICES.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME = V_FILENAME
WITH_ENCODING =
FILE_FILTER =
INITIAL_DIRECTORY =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = V_FILENAME
PATH = V_FILEPATH
FULLPATH = V_FULLPATH
USER_ACTION =
FILE_ENCODING =
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.
aRs
08-19-2007 8:11 AM
08-19-2007 7:33 AM
Hi,
This sample program found in this forum may this also helpful
report zrich_0001 .
parameters: p_path type localfile.
at selection-screen on value-request for p_path.
data: path_str type string.
call method cl_gui_frontend_services=>directory_browse
exporting
window_title = 'Select Directory'
changing
selected_folder = path_str
exceptions
cntl_error = 1.
call method cl_gui_cfw=>flush
exceptions
cntl_system_error = 1
cntl_error = 2.
p_path = path_str.
aRs