Skip to Content
avatar image
Former Member

TextEdit Control Issue : Full text is not getting displayed

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!!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 20, 2017 at 08:22 AM

    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).

    Add comment
    10|10000 characters needed characters exceeded

    • 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).

  • Nov 20, 2017 at 01:15 PM

    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.


    Add comment
    10|10000 characters needed characters exceeded