10-10-2007 3:20 PM
Hi,
I have read a long text into a internal table and now I want to combine all these lines in one. I have done this with the following code.
REPORT zz_sylvie2 LINE-SIZE 1023.
DATA:
text_ges(999) TYPE c,
...
CALL FUNCTION 'READ_TEXT'
...
TABLES
lines = it_line.
LOOP AT it_line INTO wa_line.
CONCATENATE text_ges wa_line-tdline INTO text_ges SEPARATED BY space.
ENDLOOP.
The concatenated text (text_ges) ends at 256 signs, but the text ist longer. Why is this so? What can I do to see this text?
Can anybody help me?
Thanks
sylvie
10-10-2007 3:33 PM
Hi sylvia,
Instead of DATA delaration, declare it asstring.
DATA: text_ges TYPE string. " Change
Please check.
Award points if found useful.
10-10-2007 3:26 PM
Hi,
variables of type C are limited to 256 characters. You better use STRING for the data declaration.
<b>data text_ges TYPE string.</b>
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
10-10-2007 3:28 PM
try declaring text_ges as string.
The length of a string is not static but variable and adjusts itself to the current field content at runtime. Dynamic memory management is used internally. Strings can have any length unlike chareceter filed.
You can store data upto 2 GB inside a string variable.
10-10-2007 3:33 PM
Hi sylvia,
Instead of DATA delaration, declare it asstring.
DATA: text_ges TYPE string. " Change
Please check.
Award points if found useful.
10-10-2007 4:05 PM
Hello,
The longest data type existing in SAP ABAP is EDI_SDATA which is 1000 charactes long. If this solves your problem then use this otherwise use the type STRING.
Thanks.
Abhijit.