on 08-06-2012 10:04 AM
HI All,
My scenario is MDM to JMS in PI7.1 EHP 1. Users create and access the mdm data using webdynpro java screens. when creating data some special characters also comes to MDM.
Any create or update happens in MDM record will get sysdicated to PI.
we have received the xml file which contains special character. but is not failing in PI. it is successfully getting processed from PI.
when i viewed the xml file in message mapping and internet explorer the special character is not visible. but when i opened it in wordpad i can be able to see the special character.
For example : “ is appears same if i open the payload in internet explorer and message mapping.
if the open same payload in wordpad it appears like this “.
JMS team does not want to receive the special character.
MDM team has suggested to implement the sap note 800354 to overcome this issue.
can anyone suggest me how to overcome this issue?
why does that special character is not appearing correct in message mapping?
Regards,
Muniyappan.
Hi ,
PI handles nearly 60 special charaters, if you dont want special characters then ask sender system team to correct it and ask them to send correct data.
If you want to do it in PI then try below aproach.
1)Create JAVA mapping and convert pay load to one string.
2)use regular expresions to replace special characters with required value.
Search in scn/google you will find sample code.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What is the sender adapter used ?
Thanks,
Sudhansu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First of all install a HEX editor in your system from this link. http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm
Now find out the exact ascii value of the character causing trouble.
If you are not getting ASCII HEX value of 22 for the character " then replace the occurence of strange charcaters with proper character in mapping using UDF as shown.
filed---->UDF----->field
Lets say for example you wanna replace all charcaters '1' from a string with character ".
First find out what is the ASCII value of 1 which is 0X31.
Thus I would write a code like this
public static String replaceASCII(String s)
{
String a="";
int b=0X31;// ascii value for "1"
int l=s.length();
for(int i=0;i<l;++i)
{
if((int)s.charAt(i)==b)
{
a=a+'"';
}
else
{
a=a+s.charAt(i);
}
}
return a;
}
Thus for input
"2134512"
I will get oputput as
"2"345"2"
You can remove the chars(instead of replace) in similar way:- just delete the line of code under "if" clause. Hope this resolves the issue.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Muniyappan Marasamy,
If you are having only one type of sequence of Special characters in multiple fields, then write one Java Mapping; where you convert all the occurances of special character sequences to blank. And use this java mapping in operation mapping before message mapping.
Regards,
Arindam
Hi,
I believe you are using either MDM or file adapter to pick the file from MDM. Please set the parameter srcEncoding.
Regards
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.