‎2008 Mar 23 3:19 PM
Hi Friends,
I read with open dataset a line into a string.
Data text_line type string.
READ DATASET dir INTO text_line.
The record in the text file is about 350 characters.
But when I watch the debugger, text_line shows only 255 characters.
Has anyone an explanation for it?
Thanks in advance.
Jimbob
‎2008 Mar 23 3:32 PM
‎2008 Mar 23 3:32 PM
‎2008 Mar 23 3:39 PM
‎2008 Mar 23 3:49 PM
Thanks for the reply.
The length of text line is variable, means it fits normally allways and it is not possible to assign a length.
But even when I change the declaration to
DATA text_line(1024) type c.
it shows only 255 characters.
DATA text_line(1024) type c. ( only 255 possible)
OPEN DATASET dir FOR INPUT IN TEXT MODE encoding DEFAULT.
DO.
READ DATASET dir INTO text_line.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
DO SOMTHING..............
ENDDO
thanks for your answers.
Jimbob
Edited by: jimbob on Mar 23, 2008 4:52 PM
‎2008 Mar 23 6:43 PM
I can not believe it is not possible to open a file and read a record longer than 255 characters.
In report " /SAPDMC/SAP_LSMW_IMPORT_TEXTS"
there is a variable "DATA: line(1000)" for this purpose.
So I assume it works there, but why not here.
And if not, how is it possible to to read files like what, per Hand?
It is crazy.
‎2008 Mar 24 11:02 AM
Problem solved.
Reason:
during the filetransfer from frontend to server in ASC mode the format of the file was changed.
Now the transfer takes place in BIN mode and everything is fine.
It was defenetly a matter of the file format.
Rg. Jimbob
Edited by: jimbob on Mar 24, 2008 12:03 PM