Saturday, March 15, 2014
CL_GUI_FRONTEND_SERVICE=>FILE_OPEN_DIALOG method is used to open file from the PC.
REPORT ztest_download. "&-------------------------------------------------------------* "& Declarations "&-------------------------------------------------------------* DATA:it_filetable TYPE filetable. DATA ls_filetable LIKE LINE OF it_filetable. DATA gv_rc TYPE i. "&-------------------------------------------------------------* "& Selection-screen "&-------------------------------------------------------------* PARAMETERS: p_file TYPE string. "&-------------------------------------------------------------* "& At Selection-Screen "&-------------------------------------------------------------* AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file. CALL METHOD cl_gui_frontend_services=>file_open_dialog EXPORTING window_title = 'Open file' * default_extension = * default_filename = * file_filter = * with_encoding = * initial_directory = * multiselection = CHANGING file_table = it_filetable rc = gv_rc * user_action = * file_encoding = * EXCEPTIONS * file_open_dialog_failed = 1 * cntl_error = 2 * error_no_gui = 3 * not_supported_by_gui = 4 * others = 5 . IF sy-subrc <> 0. * Implement suitable error handling here ELSE. READ TABLE it_filetable INTO ls_filetable INDEX 1. p_file = ls_filetable-filename. ENDIF.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Sending email with pdf attachment
- ABAP - Step by step tutorial on Smart Forms - Template Node
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.