Skip to Content
author's profile photo Former Member
Former Member

Problem reading texts from htmlb:textEdit control


I'm using a htmlb:textEdit tag to display a Text Area in my screen. The text from this field, when it comes to the controller, has some symbols '##' in it. I think this is being inserted by the htmlb tag (may be for its internal use like wrapping etc.,).

I need to check the number of characters in this text (excluding the ## symbol). So I treid to use the command REPLACE ALL OCCURRENCES OF '#' IN <ls_form_field>-value WITH SPACE.

But the REPLACE does not work here.

Please help me out i finding the length of the text without '##'.



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 25, 2005 at 01:08 PM

    The character probably isn't actually '#' that is just a replacement character for a non-printable character. It is probably the line feed character. You can do replaces on this if you use the class CL_ABAP_CHAR_UTILITIES. There are public attributes of this class for CR_LF and NEWLINE. I have used these before to remove the line feeds in a return text from <htmlb:textEdit>.

    Add a comment
    10|10000 characters needed characters exceeded

    • the two # s could be either one CL_ABAP_CHAR_UTILITIES=>CR_LF (this produces two #)

      or two CL_ABAP_CHAR_UTILITIES=>NEWLINE (this produces one #)

      you need to use replace all occurrences of CL_ABAP_CHAR_UTILITIES=>CR_LF in <var> with '' . and see whether this removes it else you have to use




Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.