Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

TextEdit Control Issue : Full text is not getting displayed

Anindya
Explorer
1,069

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

7 REPLIES 7

Sandra_Rossi
Active Contributor
245

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

0 Kudos
245

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 Kudos
245

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?

245

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

0 Kudos
245

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

raymond_giuseppi
Active Contributor
245

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.


kjyothiraditya
Participant
0 Kudos
245

hi everyone,

Even I am facing similar issue where the last character is not being displayed, but exists in the table. Also my text has ##( I think for new line) . Any suggestions ?? Using r3table method as mentioned below.