Skip to Content

Opening a file fumction module ?


I am doing coding for a ALV report here i got a requirement like when i click a button in application tool bar it has to open the browser.

For example we use function "F4_FILENAME" for opening the browser. where we can select the file, but here i want to open the file like after clicking the F4 help browser will open from there i should click on the file required by which it has to open the file?

Can anyone help me to achieve this.

Advance Thks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 12, 2008 at 01:32 PM

    Use the "Execute" method of the frontend services class.

    REPORT  zrich_0001.
    DATA: v_rc TYPE i.
    data: v_file type string.
    DATA: lt_filetab TYPE filetable.
    DATA: ls_filetab LIKE LINE OF lt_filetab.
    PARAMETERS: p_file TYPE localfile.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
          file_table              = lt_filetab
          rc                      = v_rc
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5.
      READ TABLE lt_filetab INTO ls_filetab INDEX 1.
      IF sy-subrc = 0.
        v_file = ls_filetab-filename.
     CALL METHOD cl_gui_frontend_services=>execute
          document               = v_file.


    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.