Directory selection for ABAP report using SAP method DIRECTORY_BROWSE

Provides a popup on an abap report selection screen to allow the user to select a directory from their PC.

*Selecting a Directory
*The following declaration may need to be 'gd_path(500) type c.' in older versions of SAP"
data: gd_path type string.
parameters: p_path like rlgrap-filename.
at selection-screen on value-request for p_path.
    CALL METHOD cl_gui_frontend_services=>directory_browse
        EXPORTING window_title = 'File Directory'
                        initial_folder = 'C:'
        CHANGING selected_folder = gd_path.
    CALL METHOD cl_gui_cfw=>flush.
    concatenate gd_path '' into p_path.

Related Articles

SAP applications and ABAP reports that process data files stored on your PC or within SAP
HEX codes and there associated ABAP declaration within SAP
Display files on SAP Application Server(UNIX)
Browse files on SAP Application Server(UNIX)
Downloading files to PC(Presentation Server)
Downloading files to SAP Application Server
Popup window to select a File using function module WS_FILENAME_GET
Get list of files within specific directory or SAP Application server
File Selection for ABAP report using SAP object method FILE_OPEN_DIALOG
Save file location popup on ABAP report selection screen using FILE_SAVE_DIALOG
ABAP Upload and download Function Modules in SAP
SAP File Selection Window - various methods of adding a file selection popup to your ABAP report
Upload Tab delimited file from PC into ABAP internal table
Upload and download files into and out of SAP or your PC
ABAP to check if file exists before downloading from SAP
SAP Upload Excel document into internal table
ABAP to Upload Excel document into internal table on SAP system including .xlsx
Upload Excel document into ABAP internal table
ABAP Uploading files from PC to SAP R/3 system
ABAP to Upload files from SAP Application Server
Upload Tab delimited file from PC into ABAP internal table
Upload Tab delimited file from application server into ABAP internal table
Example Excel Spreadsheet used to demo SAP upload and download using ABAP
Download file from SAP unix system to your desktop using transaction SXDA