cancel
Showing results for 
Search instead for 
Did you mean: 

Problem reading texts from htmlb:textEdit control

Former Member
0 Kudos

Hi,

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 '##'.

Regards,

Pradeep

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

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

athavanraja
Active Contributor
0 Kudos

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

CL_ABAP_CHAR_UTILITIES=>NEWLINE

Regards

Raja