10-19-2005 12:01 PM
My program has a problem finding my file. Is the name wrong in some way?
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = 'G:\Test\Testfil_01_051004'
filetype = lc_filetype
CHANGING
data_tab = lt_transar
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
10-19-2005 12:06 PM
Can you tell what exactly is your error..
Also what is the value of lc_filetype and file type of Testfil_01_051004
10-19-2005 12:08 PM
what is the error you are getting?
try passing the filename in a <b>string</b> type variable
example:::
TYPES:
ty_xline(1024) TYPE x.
DATA:
lf_file TYPE string,
lf_filelength TYPE i,
lt_datatab TYPE STANDARD TABLE OF ty_xline.
lf_file = file.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = lf_file
filetype = 'BIN'
IMPORTING
filelength = lf_filelength
CHANGING
data_tab = lt_datatab
EXCEPTIONS
OTHERS = 1.
rgds,
PJ
10-19-2005 12:52 PM
Hi,
I think you did not give the extension of the file name,
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
<b>filename = 'G:\Test\Testfil_01_051004'</b>
should be
<b>filename = 'G:\Test\Testfil_01_051004.txt'</b>
OR whatever the extension of that file..
Hope this helps..
Sri
10-19-2005 12:56 PM
as the others suggested you need to pass it via astring variable with the extension.
Regards
Raja