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
Add a custom function in your Message Mapping and reuse the code, that already works in your Groovy script.
Regards,
Morten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Hi Avinah,
maybe have a look at XSLT mappings?
https://stackoverflow.com/questions/3067113/xslt-string-replace
BR Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Can someone express their views on this request.
Regards,
Avi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
30 | |
10 | |
8 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.