on 06-12-2008 5:29 AM
Hello,
I have scenario from IDOC to XML file.
The XML file use by VAN company that transfer it to EDI format.
My problem is in TELX1 field.
This field look normal in IDOC, Look normal in XML.
But when the VAN company open the XML file with text editor in ANSI format they found more characters like in the example below:
<TELX1>גu20AC310גu20AC</TELX1>
Have a way to clean this hidden characters?
Elad
>
> But when the VAN company open the XML file with text editor in ANSI format they found more characters like in the example below:
> <TELX1>גu20AC310גu20AC</TELX1>
> Have a way to clean this hidden characters?
> Elad
You should not clean any characters. The question ist: What is in the field and what do you expect? Maybe you open the file with Word or Internet Explorer and set the encoding to UTF-8.
If the customer needs different encoding as UTF-8, ask first, what encoding he wants.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<TELX1>u05D2u20AC310u05D2u20AC</TELX1>
i think this is because of new line characters are coming in the TELX1 field. so you have to ckean these characters during your mapping.
i am suggesting you to use this udf:
create a udf named cleanHidden with the value cache type.
public String cleanHidden(String a,Container container){
return a.replaceAll("
", "");
}
now use this udf in your mapping like this:
Source-->cleanHidden-->TELX1
*Reward points if helpful.
--Sankar Choudhury
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sankar,
I try to use with this UDF and i received this error message:
08:20:32 Start of test
Source code has syntax error: L:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map48a91ac2383f11dd82ad001635c5b25f/source/com/sap/xi/tf/_Invoice_MM_.java:488: illegal start of expression public String cleanHidden(String a){ ^ L:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map48a91ac2383f11dd82ad001635c5b25f/source/com/sap/xi/tf/_Invoice_MM_.java:491: ';' expected ^ 2 errors Source code has syntax error: L:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map48a91ac2383f11dd82ad001635c5b25f/source/com/sap/xi/tf/_Invoice_MM_.java:488: illegal start of expression public String cleanHidden(String a){ ^ L:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map48a91ac2383f11dd82ad001635c5b25f/source/com/sap/xi/tf/_Invoice_MM_.java:491: ';' expected ^ 2 errors
08:20:34 End of test
Any idea?
Elad
Hi,
try this code in your udf "cleanHidden".
StringBuffer str=new StringBuffer();
for(int i=0;i<a.length();i++)
if((a.charAt(i)>=48&&a.charAt(i)<=57)||(a.charAt(i)>=65&&a.charAt(i)<=90)||(a.charAt(i)>=97&&a.charAt(i)<=122))
str.append(a.charAt(i));
String result=new String(str);
return result;
--Sankar Choudhury
in the xml declaration i.e
instead of :
<?xml version="1.0" encoding="utf-8" ?>
use
<?xml version="1.0" encoding="utf-16" ?>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try using UTF-16 as encoding instead of UTF-8..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.