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
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 |
---|---|
71 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.