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

upgradtion doubt in calling cl_gui_frontend_services=>file_open_dialog

hi,

Im upgrading from 4.5b to ecc 6.0 in the following code the export parameter Default extn parameter in the call method

cl_gui_frontend_services=>file_open_dialog does not get displayed

i,e *.xls should be there bydefault it is not there in 6.0 how to get it. check the code once

ws_filename get fm is in comments

CALL FUNCTION 'WS_FILENAME_GET'

  • EXPORTING

  • DEF_FILENAME = C_DEFFILE

  • DEF_PATH = L_LOCFILE

  • MASK = C_MASK

  • MODE = C_MODE

  • IMPORTING

  • FILENAME = L_FILE

  • EXCEPTIONS

  • INV_WINSYS = 1

  • NO_BATCH = 2

  • SELECTION_CANCEL = 3

  • SELECTION_ERROR = 4

  • OTHERS = 5.

  • IF SY-SUBRC EQ 3.

  • MESSAGE I999 WITH 'Action Cancelled by user'(044).

  • EXIT.

  • ENDIF.

CALL METHOD cl_gui_frontend_services=>file_open_dialog

EXPORTING

DEFAULT_EXTENSION = '*.xls,'

FILE_FILTER = '.'

CHANGING

file_table = W_FILENAME

rc = w_rc

EXCEPTIONS

FILE_OPEN_DIALOG_FAILED = 1

CNTL_ERROR = 2

ERROR_NO_GUI = 3

NOT_SUPPORTED_BY_GUI = 4

others = 5.

IF W_RC IS NOT INITIAL.

READ TABLE W_FILENAME INTO W_AREA INDEX 1.

IF SY-SUBRC = 0.

L_FILE = W_AREA-FILENAME.

ENDIF.

ENDIF.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 21, 2007 at 01:52 PM
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title            = 'File Selection'
          default_filename        = '*.xls'
          file_filter             = '(*.xls)|*.XLS|'
        CHANGING
          file_table              = lt_filetable
          rc                      = lv_filecount
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5.
    
    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.