Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Removing diacritical (special & accented) characters in SAP

Former Member
0 Kudos

Hi

We have a requirement wherein we have some diacritical characters coming in the inbound bank statement to SAP.

Any inputs to replace the below characters will be highly appreciated.

Umlaut symbol

Ä ä Ë ë Ï ï Ö ö Ü ü u0178 ÿ

accute symbol

á é í ó ú

Grave symbol

À à Ầ ầ Ằ ằ È è Ề ề Ì ì Ò ò Ồ ồ Ù ù Ǜ ǜ Ừ ừ Ẁ ẁ Ỳ ỳ

cedilla tilde

Ç ç Ḉ ḉ Ḑ ḑ Ȩ ȩ Ḝ ḝ Ģ ģ Ḩ ḩ Ķ ķ Ļ ļ M̧ m̧ Ņ ņ Æ̧ æ̧ Ŗ ŗ Ş ş Ţ ţ Z̧ z̧

I know about the SCP_REPLACE_STRANGE_CHARS function module.. but it is not able to fully replace the Grave symbols and cedilla tilde.

I am using the FM with the default settings, If you know about any input config for code page etc.. will also help

Thanks,

Anil

1 REPLY 1

Former Member
0 Kudos

Hi Anil,

Check out if OSS note 1062237 - Transliteration of characters with SCP_REPLACE_STRANGE_CHARS is of any help. I've tried many variations of the main input parameters INTER_CP and INTER_BASE_CP, but have not gotten any results that I could explain.

Per documentation

With INTER_CP you can specify another character set which is to be used for the replacement. 1146 is the default.

The replacements done when using the default parameters, i.e. code page 1146 for INTER_CP, correspond to replacing special characters with US ASCII characters. E.g. code page 1146 contains for example an ä, yet the function replaces it with ae when using this code page. On the other hand the "English version" of code page 1146, code page 1155 produces the translation a for ä. Maybe that's straightforward for some, but to me this is simply puzzling. Also, if I actually do specify US ASCII (e.g. 1101) then I don't get any translations at all (except for the straighforward 1-to-1 translation for US ASCII characters).

So what does SAP say about INTER_BASE_CP?

The function module makes use of the fact that 1146 is a sub-codepage of 1100. If you set a code page with INTER_CP that is neither a sub-codepage of 1100 nor belongs to the same code page family as IN_CP, you can use INTER_BASE_CP to specify the code page that incorporates INTER_CP.

Maybe I'm missing some simple point, but from playing with different variations of those two (what I'd consider main parameters) INTER_CP and INTER_BASE_CP I couldn't get any results that I could understand. E.g. by setting INTER_CP to 1146 and INTER_BASE_CP to 1100 one seems to either get a translation with US ASCII characters only or no translation at all. However, if I set for example both parameters to 4110 (UTF-8) then I get no translation at all for any Unicode character. If I use on the other hand something like INTER_CP = 1101 (US ASCII) and INTER_BASE_CP = 4110 (UTF-8) then only US ASCII characters are mapped 1-to-1 and all other characters are not translated at all. I'd love if somebody could provide me an explanation for this behavior.

Some missing conversions might be attributed to bugs, e.g. see OSS note 447519 - Kernel patches for code pages, languages and locales.

Cheers, harald