cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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.

0 Likes
View Entire Topic
jayanthi_jayaraman
Active Contributor
0 Likes

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.