‎2006 Dec 04 5:44 AM
I have a free text area on a BSP (a form). When users type continuously in this area the text gets wraped. When the BSP is submitted it generates a sapscript form and the text area is printed on the form, but it has '##' which are placed where the text wrapped round. I would like to remove '##', so tried the following:
replace all occurrences of '##' in text_area with ' '.
This did not work as the '##' are not recognised presumably because they are some type of carriage return and not in fact has marks.
‎2006 Dec 04 5:55 AM
You can find the hexadecimal value for a carriage return (0x0d) and then replace that with spaces.
But if replace statement has problems operating on non char like characters. The we have to look for some work around.
The work around can be declaring a constant for the carraige return referring to the CL_ABAP_CHAR_UTILITIES class CR_LF attribute.
CL_ABAP_CHAR_UTILITIES=>CR_LF.
and then use it in replace statement.
‎2006 Dec 04 5:55 AM
You can find the hexadecimal value for a carriage return (0x0d) and then replace that with spaces.
But if replace statement has problems operating on non char like characters. The we have to look for some work around.
The work around can be declaring a constant for the carraige return referring to the CL_ABAP_CHAR_UTILITIES class CR_LF attribute.
CL_ABAP_CHAR_UTILITIES=>CR_LF.
and then use it in replace statement.
‎2006 Dec 05 1:38 AM
‎2006 Dec 05 7:54 AM
Hello,
Check out using this,
cl_abap_char_utilities=>cr_lf
Regards,
Shehryar Dahar
‎2007 May 07 9:38 AM
If you dont have access to the class CL_ABAP_CHAR_UTILITIES, do this instead:
DATA: crlf(2) TYPE x VALUE '0D0A',
itab TYPE TABLE OF string,
w_input TYPE string.
w_input = '<contains the text with the line feed.>'.
SPLIT w_input AT crlf INTO TABLE itab.
Regards Michael.