on 02-22-2010 9:23 AM
Dear All,
I am working on one scenario in which i am getting 0# in my input paylaod ,because of this only I think I am gettiing the mapping Error.
Error Description is Below
com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser : #0 not allowed in Character data sections(:main:, row:1, col:5361080) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException(Transformer.java:187) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:174) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:64) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest
to validate this invalid data can you plz suggset me which fn i have to use ................
Warm Regards
Abhay
Hi All,
To Resolve this problem I have used the java mapping to handle the special charectes and after that I was grtting junk data from ECC side for this I asked abaper to change the logic on there side and worked...
I would like to thank Nutan and Stefan to helping me on this...........:)
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
That means we cannot handle special charecters in XI anyhow.
Regards
Abhay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can handle anything you want in a Java mapping. You get an inputstream, do something with it and return an output stream. This means you can remove characters, convert them, what you want.
But in this case IT DOES NOT MAKE SENSE, because the error is on the sender side (before it even arrives in XI !!)
=> fix it on sender side, not in XI.
I think this thread will enter the hitlist regarding most answers to one question
CSY
Hi Abhay,
The points that Stefan trying to make is:
Do you think if by doing Java/XSLT or any other way that data get passed to Receiver system, then receiver system will accept it?
I mean to say will that be a valied data for receiver system? I think the answer will be NO.
SO you have to ask Sender system to fix that there only or if they can not then ask them how that data should be interpre in the receiver system and after doing that just do <replaceAll> with the valied data and send the proper data to Receiver.
If they say they want to send that special character only and receiver system will understand that then simply put that field in CDATA formate. anything in CDATA formate never gets validated so you will not get any error in mapping for any special character till date :-)...
I hope i am able to put my point.
Thanks,
Sunil Singh
Hi Abahy,
Instead of going around the problem, just get a confirmation from the sender system whether the data which you are receiving is correct or not.Ask them about the particular field where you are receiving this data.If they make it confirm that input data is correct, then ask whether it has to be moved in the same format to receiver.After clarifying only try for handling special characters.
I handled it because I got confirmation from the sender and receiver system.So, please get confirmation and then proceed.
Regards,
Nutan
HI Nutan,
I checked with sender side they want the same data to receiver side(in CSV file ).I have handle the special charecters also with the below code but still I am getting the parser error.code is below.
/*
*
*
To change the template for this generated file go to
Window>Preferences>Java>Code Generation>Code and Comments
*/
package com.agr.test.replacechar;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
import java.util.HashMap;
import com.sap.aii.mapping.api.AbstractTrace;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationConstants;
import com.sap.aii.mapping.api.MappingTrace;
import com.sap.aii.mapping.api.StreamTransformationException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
*
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
*/
public class ReplaceAmpersnd implements StreamTransformation {
private Map param = null;
private AbstractTrace trace = null;
public void setParameter (Map param)
{
this.param = param;
if (param == null)
{
this.param = new HashMap();
}
else
{
trace =(AbstractTrace) param.get(StreamTransformationConstants.MAPPING_TRACE);
}
}
public void execute(InputStream in, OutputStream out) {
try {
int read_data;
while ((read_data = in.read())!=-1)
{
if (read_data != '&')
{
out.write(read_data);
}
else
{
out.write("".getBytes());
}
}
out.flush();
}
catch (Exception e)
{
trace.addWarning("Error " + e.getMessage());
}
}
}
NOw there is now # and $ charecters are coming sttill I am getting this error
Edited by: Abahy Aggarwal on Mar 3, 2010 5:10 AM
I am still getting this error
com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xb(:main:, row:1, col:83739) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException(Transformer.java:187) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:174) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:64) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at
Edited by: Abahy Aggarwal on Feb 23, 2010 12:31 PM
Edited by: Abahy Aggarwal on Feb 23, 2010 12:39 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the last page of the docuemnt, there is some table given. In that table, there are some symbols are there and corresponding XML equivalents are also given. These characters may present inthe iput data as a result your mapping program is failing.
Please check the data of the record in SAP tables. and identify what is the value exactly exists in SAP. then see MONI data in SAP R3 itself to identify how the record is coming to moni of R3. If you can observe deviation, then post your observation.
Thanks,
Subbu
What XML encoding is used in this incoming document (see first line) ? Maybe a wrong encoding is used.
CSY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I am using UTF8 Encoding...........
I have total 60K records in tables. For testing I am sending Records in 10K slots .I have observed that first 40K it is not showing error in this 40K records
SAP Desktop Application Launcher Demo Role #2 like this text I am getting from input side.
And for Next 10K records where I am getting the Text is Like this.............
según las posiciones de ingresos y # gastos#
plz suggest me how I can handle this.
Regards
Abhay
Edited by: Abahy Aggarwal on Feb 23, 2010 5:23 AM
Are the first 40k texts which ascii characters only?
It seems to have an issue with non-ascii characters.
You should inspect the ABAP code of the sending application.
There might be a string -> char conversion or something which corrupts the encoding.
If it is a non-unicode system the ABAP code has to deal also with different languages.
I know that I repeat myself, but it is definitely an issue in the sender application.
Fix the issue there. In PI you cannot do anything.
The # is a hint that the problem already occurs in the sender application. We had a similar issue some time ago. Go in your SAP RFC destination (SM59) from where you send the data. You will see some field which says that a # will be sent when the character cannot be translated correctly. Check in your RFC destination that you have turned on Unicode (Unicode & MDMP settings tab).
With Unicode, you should be able to send this Spanish text correctly without problems.
CSY
hi
I have checked in Sender Payload there I am getting & # 0 in one element . I have tested with this in test tab
and when I am excuteing my mapping with & # 0, I am getting error and when I excuteing mapping without & # 0, it is getting processed sucessfully.
Regards
Abhay
Edited by: Abahy Aggarwal on Feb 23, 2010 11:26 AM
Edited by: Abahy Aggarwal on Feb 23, 2010 12:39 PM
Edited by: Abahy Aggarwal on Feb 23, 2010 12:40 PM
Edited by: Abahy Aggarwal on Feb 23, 2010 12:45 PM
Edited by: Abahy Aggarwal on Feb 23, 2010 1:05 PM
Edited by: Abahy Aggarwal on Feb 23, 2010 1:06 PM
Edited by: Abahy Aggarwal on Feb 23, 2010 1:10 PM
Hi Abhay,
As you posted that if the input data is having & # 0; its failing in mapping. I think you have not used any java mapping for handling it.So,its failing to convert.I tried the data which you have provided with my java mapping it worked fine.
TEXT>benötigt. & # 0;</TEXT>
Here, is the step for that
1.> Create IA(Imported Archieve)
2.> Use it before your actual mapping.
Please try:
The code for java mapping:
public class HandleSpecialCharacter implements StreamTransformation {
public void setParameter(Map param)
{ }
public void execute(InputStream in,OutputStream out)
{
try
{
int read_data;
while((read_data = in.read()) != -1)
{
if (read_data != '&')
{
out.write(read_data);
}
else
{
out.write("&".getBytes());
}
}
out.flush();
}
catch (Exception e)
{
}
}
}
I believe, it will resolve the issue.
Regards,
Nutan
Hi Stefan/Abhay,
Is it because of 0 coming in the input or XI is unable to convert the special characters properly. Because, similar type of issue happened with me. Our input data was having special characters as Euro and Pound sign, which was failing in mapping, due to conversion problem. So, I handled in java mapping and it worked.
It's very important to get clear idea from the sender system about the input data. May be it's an error of the sender system while generating the file also.
Regards,
Nutan
Hi Nutan,
Thanks for your Reply...
I have posted this value & # 0; with space beacuse it is not allowing me write and post without space .I think this is also happening beacuse xml does not accept the null value ...........as & # 0; returing null value....
Can't we write a UDF and handle this & in graphical mapping only...........
Regards
Abhay
Edited by: Abahy Aggarwal on Mar 1, 2010 12:01 PM
Hi All,
I have used this java code to handle & charecter in XI then
public class HandleSpecialCharacter implements StreamTransformation {
public void setParameter(Map param)
{ }
public void execute(InputStream in,OutputStream out)
{
try
{
int read_data;
while((read_data = in.read()) != -1)
{
if (read_data != '&')
{
out.write(read_data);
}
else
{
out.write("&".getBytes());
}
}
out.flush();
}
catch (Exception e)
{
}
}
}
I got the error which says
Java class TEST/TestJar does not implement the required interface "StreamTransformation"</
I have checked on SDN for this error and this useful link
I have checked for in my program
import com.sap.aii.mapping.api.StreamTransformation;
it is there in my program..
PLease suggest me on this.............
Regards
Abhay
Edited by: Abahy Aggarwal on Mar 2, 2010 7:09 AM
> row:1, col:5 361 080
5 Million?
It might be an unexpected "end of file" sign.
It is definitely a technical issue, not a mapping issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
0# is coming in middle of payload and now from RWB i have tested with paylaod which is having 0#, 00000 ######## like this and it is processing successfully.
SAP_AUDITOR_BA_FI_AA##AIS # Imobilizări corporale
SAP_AUDITOR_BA_FI_AA 000 ## # Imobilizări corporale
with this both cases I have tested from RWB and processing successfull.
Regards
Abhay
the error message does not ean, that that as a character combination between 0 and #.
It stands for the ascii value zero.
ascii zero is not a valid error and you cannot enter ascii zero values with a keyboard.
In the message you have #. Is this expected? could you check, whether there should be other, foreign characters?
it might be a code page issue as well.
You see, there are man possible reasons for the error.
It is really hard to tell you, what is wrong.
An experienced guy has to look into your system.
Hi Abahy,
Please get confirmed with the sender sytsem that this data is the correct data as per their expectation.If its yes, then you have to handle it at the mapping level. As per the error it seems XML payload is not getting generated because this #0 is disturbing the XML payload. So either first get confirm that the invalid character has to be sent to receiver or not.If no then try to substring at mapping level.Or if yes, then better use Java mapping for handling special characters.But, I believe XI understand # and converts it easily.Please post the input here and kindly check which field this data is coming.
Regards,
Nutan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nutan,
I am getting the input below like this
Date>20100222</Date>
<Identifier>AGR_TEXTS</Identifier>
<Flag>1</Flag>
<MANDT>100</MANDT>
<AGR_NAME>AUDITOR_A</AGR_NAME>
<SPRAS>4</SPRAS>
<LINE>00012</LINE>
<TEXT>SAP_AUDITOR_BA_FI_AA_A##AIS - Imobilizări corporale (Autorizaţii)</TEXT>
</row>
- <row>
<Date>20100222</Date>
<Identifier>AGR_TEXTS</Identifier>
<Flag>1</Flag>
<MANDT>100</MANDT>
<AGR_NAME>AUDITOR_A</AGR_NAME>
<SPRAS>4</SPRAS>
<LINE>00013</LINE>
<TEXT>SAP_AUDITOR_ A ##AIS - Autorizaţii centrale</TEXT>
Can you plz suggest how I can handle these special charecters....
Regards
Abhay
Is your Date in proper format?
Text Field seems to have some special characters, can you test if your scenario works if you do not send these characters in Text field (just for testing).
However I still fell that the starting line of your payload has some character (something like a space).... test your mapping in IR by manually entering the payload in the test tab .....the payload should be exactly same as your input payload....if successful, then trigger the interface with this payload.
Regards,
Abhishek.
> to validate this invalid data can you plz suggset me which fn i have to use ................
When the sender of the message provides an invalid document, please fix the error in the sender application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can either use JAVA or XSLT mapping to handle the special characters.....blogs for both area available....in XSLT it can be handled using CDATA tag.....also check if the sender is not passing this character unintentionally
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.