‎2011 Aug 03 2:07 PM
Hi,
when I open a file (input mode) I can only read part of the file because the file is created without End of Line ('#'). I tried to read
into a string but it return sy-subrc = 4. It's impossible to read all the file and then get the information.
I read about this and I tried with cr_lf = cl_abap_char_utilities=>cr_lf but it doesn't work.
Anybody has a suggestion , please?
Thanks in advance.
DATA: REG(255) TYPE C.
OPEN DATASET FILE_IN FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
IF SY-SUBRC EQ 0.
DO. "Only 1 time because the file has one register.
READ DATASET FILE_INTO REG. "Here is the problem I only read 150 chars.
[..]
ENDO.
[..]
ENDIF.
‎2011 Aug 03 2:20 PM
Are you sure the DO exits after one iteration? I dont see a exit statement there. Anyways try using encoding default with text mode or the file might have also been created in binary mode.
Vikranth
‎2011 Aug 04 7:48 AM
The solution:
It's impossible work with a wrong file so you have to modify the report which makes the file.