11-21-2007 7:05 AM
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.
11-21-2007 1: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.