Skip to Content
author's profile photo Former Member
Former Member

Open file Dialog!!!

Hello folks,

In my program I am using the FM TMP_GUI_FILE_OPEN_DIALOG for opening a file. My additional requirement is I want to add some types to FILE TYPE LIST BOX on the dialog.

For example...when we try to open a file on windows...we get a dialog with two fields at the bottom of the dialog

1. file name

2. type of file

I want to add some options to the file type list on this dialog in ABAP. Can anyone help me with that.??

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 25, 2005 at 03:19 AM

    Hi,

    If u use this method u can call a file open dialog box with ur requirement.

    Check the sample code attached:

    CALL METHOD cl_gui_frontend_services=>file_open_dialog

    EXPORTING

    window_title = 'Select file for download'

    default_extension = '.txt'

    DEFAULT_FILENAME = '.txt'

    file_filter = '.txt ,.txt.', '.xls', '.pdf'

    initial_directory = 'C:\'

    CHANGING

    file_table = li_filetable

    rc = lv_return

    EXCEPTIONS

    file_open_dialog_failed = 1

    cntl_error = 2

    error_no_gui = 3

    OTHERS = 4

    .

    IF sy-subrc <> 0.

    MESSAGE e003 WITH text-015.

    ELSE.

    READ TABLE li_filetable INTO lw_filetable INDEX 1.

    p_fnam2 = lw_filetable-filename.

    ENDIF.

    Regards,

    Anjali

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 25, 2005 at 09:20 PM

    Anjali,

    Thanks for the response. I am facing the same problem with your part of the code also. It is not filtering the files. Does this code worked for you??? Just Curious. I am lost 😔

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 03, 2005 at 09:54 PM

    Hello,

    You guys are of good help. It solved my problem. I don't see the radio buttons for the points to award. Please help me with that.

    Thanks,

    Naren

    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.