on 2020 Mar 09 9:49 AM
Hi Everyone,
We have a requirement in SAP CPI to read each special character from the input and replace it with respective value.
Input :
<Data1>Árvíztűrő tükörfúrógépÆâÇßÐ</Data1>
Expected Output :
<Data1>Arvizturo tukorfurogepAEaCssD</Data1>
I am able to handle the same using replace function in groovy script but i want to handle the same in mapping.
Can someone please suggest.
Regards,
Avinash
Request clarification before answering.
Hi Avinash,
Try below code as a custom groovy udf in message mapping, and use it for required fields as a mapping rule.
import java.text.Normalizer
str = Normalizer.normalize(str, Normalizer.Form.NFD);
str = str.replaceAll("[^\\p{ASCII}]", "");return str;
Regards,
Srikanth Vadlamani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
30 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.