09-19-2014 10:13 AM
Hi experts,
When we extract the addresses, the string contains the accent symbol " ' " . We need to delete it via our coding,
Could you please provide any guidance and sample code for that?
The symbol looks like this, it should be converted to "o" .
many thanks!
Kelvin
09-19-2014 11:37 AM
Have a look at this snippet.
/.
09-19-2014 10:27 AM
Are you using a custom (Z) program ? Or standard SAP ?
Where is the screenshot of the XML coming from ?
Please provide more details if you want help.
E.g in ABAP you can do replace all occurrences of ò with o.
09-19-2014 10:40 AM
Dear Peter,
It's a Z program we developed to generate the XML file through information in SAP. However, as required by the receiver of the exported XML, the related accent should be deleted.
We found most of the accent symbol is located in the address which is input manually by users, and we can't require them to neglect the symbol when input.
Therefore, we have to append some abap codes to convert the string so as to delete these accent symbols.
Could you please kindly advise how to do it with abap coding? Or SAP have provided some function we can call to convert the strings?
Many thanks!
Kelvin
09-19-2014 10:49 AM
Like I said in my previous answer. Use REPLACE ALL OCCURRENCES of 'õ' in XML_STRING with '0'.
I think that should do the trick. Check the documentation on REPLACE keyword.
09-19-2014 10:50 AM
Hi,
Please try this FM its may solved your Problem. '' SCP_REPLACE_STRANGE_CHARS''. Also read the documentation of FM
Thanks
Sam
09-19-2014 10:57 AM
Dear Sam,
Many thanks for your kind suggestion.
We've tried this FM but it requires us to list all the required symbols to be replaced.
Could you kindly suggest is that any other fm we can call to replace all the accent symbols in Spanish languages?
Many thanks.
Kelvin
09-19-2014 11:04 AM
To export to XML or HTML, if you are in a release greater or equal to 7.31, you could use the Escape Function (Perform some tests with demo report DEMO_ESCAPE)
Regards,
Raymond
09-19-2014 11:08 AM
Hello Kelvin,
Try this one FM Name ' ES_REMOVE_SPECIAL_CHARACTER'.
Thanks
Sam
09-19-2014 11:37 AM
Have a look at this snippet.
/.
09-19-2014 11:53 AM
In above snippet, example string is taken from:
And character mapping is taken from:
activerecord - How do I replace accented Latin characters in Ruby? - Stack Overflow