on ‎2006 Jan 09 11:57 AM
Can any one tell me if there is a Function module that will display the windows directory path and returns the filenames in the selected folder when F4 help is clicked.Currently I am using
cl_gui_frontend_services=>directory_browse
But please let me know if ther is any function module which gives me the same functionality as the above method does.
Request clarification before answering.
Hi Sridhar,
try using the FM TMP_GUI_DIRECTORY_LIST_FILES. It might work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Check these codes
selection-screen begin of block b1 with frame .
Parameters File(100) lower case.
selection-screen end of block b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
* DEF_FILENAME = ' '
DEF_PATH = '*.*'
* MASK = ' '
* MODE = ' '
* TITLE = ' '
IMPORTING
FILENAME = FILE
* RC =
.
or
PARAMETERS:P_FILE LIKE 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.
Hi Sridhar,
WS_FILENAME_GET consits of classes only. i feel calling the method cl_gui_frontend_services=>directory_browse is the best solution. why do you want to go for Function module is there any specific requirements..
please let me know.
Note: it is adviced to use class methods rather than FM's
Regards
vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use this FM -'EPS_GET_DIRECTORY_LISTING' along with other F4 function modules which select the directory.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here is the sample code.Kindly reward points by clicking the star on the left of reply,if it helps.
PARAMETERS P_FILE LIKE RLGRAP-FILENAME.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
PERFORM SUB_F4_FILEPATH USING 'P_FILE' P_FILE.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = P_FILE
MASK = ',..'
MODE = '0 '
TITLE = 'Choose File'
IMPORTING
FILENAME = P_FILE
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
USe the below FM to get the files in an Application Server directory.
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = p_dir_name
TABLES
dir_list = i_files.
Best Regards,
vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
USe Function Module WS_FILENAME_GET.
Hope it works.
Thanks
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can use <b>F4_FILENAME</b> .
Hope This Info Helps YOU.
<i>Reward Points If It Helps YOU.</i>
Regards,
Raghav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi sridhar,
1. F4_FILENAME
This is the Fm.
regards,
amit m.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
F4_FILENAME_GET or use
call function 'KD_GET_FILENAME_ON_F4'
changing
file_name = file
exceptions
mask_too_long = 1
others = 2.
if sy-subrc <> 0.
message 'Error in getting filename'.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.