‎2010 Feb 14 2:10 PM
Hi,
i am reading a text file using GUI_UPLOAD.
but after reading the file when i am looking into table its reading upto only position 256 of each line.
i need to read full line upto position 600 of the text file .. please guide me on this.
I tried with all possible ways like increasing the size of the internal table and declaring with a type string, but still its not working, could any one please help me on this
Your help is appreciated.
Thanks
Sathish
‎2010 Feb 14 2:58 PM
Hi,
Try as below. As far as I know this works for 1024 characters long files. But declare internal table manually with the required length before passing.
data: begin of file occurs 0,
data(600),
end of file.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = file name on PC
filetype = 'ASC'
has_field_separator = ' '
dat_mode = 'X'
CHANGING
data_tab = FILE
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.Hope this works !!!
Regards,
Ganga
Edited by: Ganga Bhavani R on Feb 14, 2010 8:40 PM