‎2009 Aug 03 10:33 AM
hello,
I've got the following problem
I receive an xml string with some '#' characters and would like to remove them
I know that replace ... '#' doesn't work because it's not actually the char '#' that should be removed but it's a
hexadecimal character (I think it's a blanc)
any ideas on how to do this ?
regards
‎2009 Aug 03 10:39 AM
Hi,
Switch to debugging mode .Check this character in debugging mode and try to find wat exactly this character is?
I thnk that the characters which are not interpreted by SAP are shown as #. It means that characters which cannot be printed are
shown as #.
Regards,
Lakshman.
‎2009 Aug 03 10:39 AM
Hi,
Switch to debugging mode .Check this character in debugging mode and try to find wat exactly this character is?
I thnk that the characters which are not interpreted by SAP are shown as #. It means that characters which cannot be printed are
shown as #.
Regards,
Lakshman.
‎2022 Apr 14 11:18 AM
REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>NEWLINE IN < your String > WITH SPACE.
Regards.
Nawal
‎2009 Aug 03 10:43 AM
‎2009 Aug 03 10:45 AM
hiiii
REPLACE ALL OCCURRENCES OF '#' IN your_variable WITH ' '.It should work.
Thanks & Regards
Prashant Gupta
‎2009 Aug 03 10:47 AM
Hi,
characters cannot be removed because they are actaully hexadecimal charcters like horizontal tabs etc.
Use the class CL_ABAP_CHAR_UTILITIES and the HORIZONTAL_TAB attribute or other relevant one so that you can remove the #.
Regards,
Subhashini
‎2009 Aug 03 10:48 AM
Hi,
symbol is used for new line carried feed variable. It can be replaced with the following code.
Replace all occurances of CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB in string with space
or
Replace all occurances of CL_ABAP_CHAR_UTILITIES=>NEWLINE in string with space.
Regards,
Vik
‎2009 Aug 03 10:50 AM
thanks for your replies
I've used the class CL_ABAP_CHAR_UTILITIES but none of the provided attributes (CR_LF, horizontal_tab, ..) work
I think that's it's a hex blanc that should be removed
‎2009 Aug 03 10:58 AM
Hi,
If you can go to the debugger and at the right of the field value we have a hex viewer click on that and see what is the value of the space in HEX then in your code declare a variable as hex and try to replace it as below.
data: lv_char type 'X' value '09'.
replace lv_char with space in text.
Regards,
Himanshu
‎2009 Aug 03 11:26 AM
Hello,
I think in debugging you should check the hex value for this #.
This will give you an idea which value you need to replace for the class CL_ABAP_CHAR_UTILITIES viz., NEWLINE(0A), CR_LF(0D0A) etc.
Hope this helps.
BR,
Suhas
‎2009 Aug 03 10:52 AM
Hello,
I guess you are getting this # as a result of xml transformation.
You can either use shift to shift xml string 1 place to remove '#' char or you can use offset to
replace it with space. For e.g. string+1(1) = space.
Check if this helps,
Thanks,
Augustin.
‎2009 Aug 03 2:46 PM
thanks for the replies
solved it in another way but if someone knows the answer with hexadecimal formatting ...