‎2009 May 14 4:53 PM
Hello.
when i use the sentence import and there are two lines. the string comes with ## and i want to delete them.
ej: Hello##Bye
The sentence replace doesn't work.
How can i replace them with a blank?
thanks.
‎2009 May 14 4:56 PM
DATA: str TYPE string VALUE 'Hel##o'.
REPLACE ALL OCCURRENCES OF '#' in str WITH ''.
Write str.
Helo
‎2009 May 14 4:59 PM
‎2009 May 14 5:07 PM
‎2009 May 14 5:07 PM
Well, when there are two lines, than this hash symbol is most likely a Carriage return Line Feed. In class CL_ABAP_CHAR_UTILITIES there is an attribute called CR_LF. Use this to replace the hash symbols.
REPLACE ALL OCCURENCES OF CL_ABAP_CHAR_UTILITIES=>CR_LF.....
‎2009 May 14 5:07 PM
Hi,
Check this code..The ## might be CRLF
DATA : VAR TYPE CHAR20 VALUE 'Hello##Bye'.
REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>CR_LF IN VAR WITH SPACE.
CONDENSE VAR.
‎2009 May 15 6:03 AM
Hi Jose,
Try with TRANSLATE
data: var1 type string value 'Hello##Bye'.
TRANSLATE var1 USING '# '. "Give a Space after #
write:/ var1.
‎2009 May 15 6:49 AM
Above threads are correct.
we can remove # in the lines using..
REPLACE ALL OCCURRENCES OF '#' in str WITH ''.
please try again...
if you still dint get the rt ouput please post the sample code.
safel