‎2010 May 11 6:36 AM
Hi Experts,
by using "TMP_GUI_FILE_OPEN_DIALOG" with these parameters:
window_title = 'Please select an Excel File'
default_extension = '*.xls'
file_filter = '*.xls'
multiselection = ' '
init_directory = 'C:\temp'
it doesn't show any file the first time we call the Function, we have to close the window and then restart the Function Then it show all Fileformat, I just want to see .XLSX files.
Any idea?
Regards,
David
‎2010 May 11 6:43 AM
I found the solution:
Initialisierung
CONCATENATE 'Alle-Dateien(.)|.|'
'Word-Dateien(.doc)|.doc|'
'Bild-Dateien(.gif)|.gif|'
'Bild-Dateien(.jpg)|.jpg|'
'Mail-Dateien(.msg)|.msg|'
'PDF-Dateien(.pdf)|.pdf|'
'Bild-Dateien(.tif)|.tif|'
'Text-Dateien(.txt)|.txt|'
'Excel-Dateien(.xls)|.xls'
INTO filter.
Datei abfragen
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Datei auswählen'
file_filter = filter
initial_directory = 'C:'
CHANGING
file_table = i_file[]
rc = rcode
EXCEPTIONS
OTHERS = 1.
Regards,
David
‎2010 May 11 6:45 AM
Try this way
* Update View
CALL METHOD cl_gui_cfw=>update_view
EXCEPTIONS
cntl_system_error = 1
cntl_error = 2
OTHERS = 3.
lv_title = text-003.
* Get the file with open dialog box
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = lv_title
file_filter = p_filetype
initial_directory = lv_desktop
CHANGING
file_table = lt_filetable
rc = lv_rc
user_action = lv_action
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
OTHERS = 4.
a®