File Selection for ABAP report using SAP object method FILE_OPEN_DIALOG

Provides a abap report election screen popup to allow the user to select a desired file from their PC. Also defaults to file extension of type .txt

*Selecting a File, plus inserting default file extension
tables rlgrap.
data: it_tab type filetable,
      gd_subrc type i.
selection-screen begin of block m with frame.
    select-options so_fpath for rlgrap-filename.
selection-screen end of block m.
at selection-screen on value-request for so_fpath-low.
REFRESH: it_tab.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    EXPORTING
        WINDOW_TITLE = 'Select File'
        DEFAULT_FILENAME = '*.txt'
        MULTISELECTION = 'X'
    CHANGING
        FILE_TABLE = it_tab
        RC = gd_subrc.
loop at it_tab into so_fpath-low.
    so_fpath-sign = 'I'.
    so_fpath-option = 'EQ'.
    append so_fpath.
endloop.

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
Directory selection for ABAP report using SAP method DIRECTORY_BROWSE
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