cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error because of special characters

Former Member
0 Kudos

Hello,

We are extracting data from SAP system and sending it thru XI to 3rd party system (writing xml files on to file server).

Now, because of presence of few special characters in the data, there is a mapping exception error in XI.

The data which is causing the issue is "ABRANCENTRO MEDIAÇÃO IMOBILIÁRIA".

In SXMB_MONI, i see that this is failing is Request Message mapping step.

We can not remove special characters as this is master data. How can i fix this issue?

DO i need to use any modules in communication channel for this purpose?

Any leads are highly appreciated.

Thanks,

Chandra

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Chandra,

The error is not because of the special characters. Its because your XML is not well formed.

Please send the correct error then we can look into it.

Thanks

Veeru

anupam_ghosh2
Active Contributor
0 Kudos

Hi Chandra,

Can you please explain the scenario? is it idoc to file ? What special characters you receiving? R they printable characters? Are you processing those characters in your mapping or just forwarding them to target?

Regards

Anupam

Former Member
0 Kudos

I think your system is not unicode enabled and that's why you are getting error in MONI.

Check if your system is unicode enabled.

udo_martens
Active Contributor
0 Kudos

Hi Chandra,

an UDF cant help you assumedly coz that characters lead to "not wellformed" XML. Any parser would complain about that. So the PI parser would throw an error before executing the UDF.

The question is: what does the receiver expect? You wrote you like to write xml files to a server. But if the XML is not wellformed, the receiver would not be able to parse them, and therefore usually not able to process them.

If you really want to create such a file (not wellformed XML) you can create that with a not parsing mapping (ABAP or Java). So you map the message just with string operations. This is not very recommentable and only possible for very simple mapping cases.

Regards,

Udo

Former Member
0 Kudos

Hi.

You can remove special characters in your message mapping using a UDF

like this



 public static String StripChars(String val)
    {
        val = val.replaceAll("[a-zA-Z]", "");
        return val;
    }