In this recipe, we will create a small program that will take as input a folder name and filename(s) from the user. Both standard function modules, as well as classes, may be used for this purpose.
In the main part of this recipe, we will use the function modules, TMP_GUI_BROWSE_FOR_FOLDER
and TMP_GUI_FILE_OPEN_DIALOG
. In addition to the browsing capability, the user may also create a new folder while entering a folder. The file's function module lets you select multiple files from your local directory.
The There's more... section of this recipe will show an equivalent based on the object oriented approach. The methods, directory_browse
and file_open_dialog
, of the class cl_gui_frontend_services
will be used.