Skip to Content
0

TextEdit Control Issue : Full text is not getting displayed

Nov 20, 2017 at 06:44 AM

109

avatar image
Former Member

We are giving text of 4000 characters in a custom container on a module pool screen with the help of class cl_gui_textedit(methods set_text_as_r3table, get_text_as_r3table etc) .The module pool screen is called from a custom transaction. The text is getting saved in a custom table and getting printed in an adobe form. While saving in custom table and printing the adobe form, the whole 4000 characters are getting saved in custom table and getting printed on the form. But after exiting the transaction and while executing the transaction again, we need to display the previously saved text from the custom table. We are using set_text_as_r3table to set the text in the container. But while displaying the text in the custom container using set_text_as_r3table, some of the characters from the end of the text are getting truncated, although the FULL text is being passed to this method. It seems the standard class method(set_text_as_r3table) is unable to set the FULL text. Can anyone please suggest a solution for this issue. Thanks!!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sandra Rossi Nov 20, 2017 at 08:22 AM
1

Maybe there's a limit, I don't know. But SET_TEXT_AS_R3TABLE is known to truncate the ends of lines. If the length of lines of the internal table is 100 (that could be 200 or anything, I take 100 for my example) and one line in the editor has a length over 100, then it's truncated. So, either increase the width of the internal table, or rewrite your program to use SET_TEXT_AS_STREAM. Of course, I don't understand why the whole table is saved if one of your lines is greater than 100 characters and you use GET_TEXT_AS_R3TABLE, so you should debug when the characters are lost.

You might want to use another editor like CL_GUI_TEXTEDIT or CL_GUI_ABAPEDIT (search the web for example).

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Sandra!! In my case only some characters from the last line is getting truncated and by debugging I saw there is no issue in my code as the FULL text is being sent to SET_TEXT_AS_R3TABLE. Also I found this Link which states that this "problem is solved with <b>SAPGui's patch 52</b>"

0

If was a comment in 2005 about installing the patch 52 of an unknown SAP GUI release.

Another possibility of your problem is that maybe you call the text editor with invalid "word wrap" parameters.

By the way, when you say "characters from the end of the text are getting truncated", is it for the last line of the text only, or is it at the right of lines with long text?

0
Former Member

Yes....Always some characters from the last line of the text.

1

By the way, I remember that I used cl_gui_textedit for displaying big ABAP programs, there was no limit (I don't remember which were the SAP GUI and ABAP kernel versions), the only issue I had was the performance (rather slow/I had to switch to cl_gui_abapedit).

0
Raymond Giuseppi
Nov 20, 2017 at 01:15 PM
1

Look for, more recent than 2005, OSS notes like 1261482 - ITS TextEdit: text is truncated.

Also sometimes it's easier to use GET_TEXT_AS_STREAM and then convert it with CONVERT_STREAM_TO_ITF_TEXT to keep actual formatting.


Share
10 |10000 characters needed characters left characters exceeded