cancel
Showing results for 
Search instead for 
Did you mean: 

PI not handling special chars

Former Member
0 Kudos

Hi,

We are on SAP PI 7.11 SPS06.

We designed a synchronous BPM scenario, which sends the Idoc from ECC

to HTTP web service(third party) and receives the respose using ABAP

proxy.

Sender Adapter: Idoc

Receiver Adapter: SOAP

This scenario works fine with regular payload except when special

characters present in the payload. These special characters (european, latin, german, etc.) going from

ECC in the Idoc and receiving back in the same response(that is the

requirement). These special characters can go out to target(web HTTP

service) without any issue, but fails when they present in the response.

Also, I’ve used ‘Transform.ContentType’ to ‘application/xml;charset=utf-8’ in the SOAP receiver adapter module but it didn’t help.

Example:

IDOC request:

- <ZABRS01 SEGMENT="1">

<TYPE>Final Destination</TYPE>

<KUNNR>0019999999</KUNNR>

<NAME>EU End User US</NAME>

<ADDRESS1>7151 JACK NEéäÜéäÜéäÜ, B</ADDRESS1>

<CITY>FORT WORTH éäÜéäÜéäÜ</CITY>

<REGION>01</REGION>

<POST_CODE1>761187</POST_CODE1>

<COUNTRY>IN</COUNTRY>

</ZABRS01>

Error while respose coming back:

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_MM_AmberRoad_TransactionResponse_T~</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>

<SAP:P3>Invalid byte 2 of 3-byte UTF-8 sequence.</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:Stack>Runtime exception occurred during application mapping

com/sap/xi/tf/_MM_AmberRoad_TransactionResponse_T~;

com.sap.aii.utilxi.misc.api.BaseRuntimeException:Invalid byte 2 of 3-

byte UTF-8 sequence.</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Please help.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Bose,

I think the problem could be in the sender system that generate an incorrect codification. Check if your sender system is unicode and if it is generating a correct codification type. Check this thread http://scn.sap.com/thread/139233

Regards.

Former Member
0 Kudos

Thanks, Inaki Vila.

Sender confirmed that they are using UTF-8 encoding.

Basically we want those special characters to be processed through PI.

My question here is when Idoc sent over to receiver(HTTP service) with special charaters without an issue, why PI dont process the same characters on its way back as a response?

This response has been sent to PI as an XML with UTF-8 encoding( confirmed by sender).

Only difference i see is respose doesnt containg the below header, where as request(Idoc) does.

<?xml version="1.0" encoding="UTF-8" ?>

Please help.

Thanks.

nabendu_sen
Active Contributor
0 Kudos

Hi Bose,

Go to <SMLT> transaction of PI and check what languages are installed. May be these different language packs are not installed and that's why its throwing error.

Regards,

Nabendu.

Former Member
0 Kudos

Thanks, Nabendu.

In that case, how come Idoc is being sent to HTTP web service, including these special characters?

Thanks.

Former Member
0 Kudos

Also, we have a seperate asynch interface from HTTP web to -> ABAP Proxy

It processes all the charactes(including special) through PI, no issues there.

Only issue is with Synch response.

Thanks.

Former Member
0 Kudos

Hi,

Below Module configuration In the SOAP receiver adapter worked for me.

1

sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean

Local Enterprise Bean

soap

2

localejbs/AF_Modules/MessageTransformBean

Local Enterprise Bean

transform

3

AF_Modules/TextCodepageConversionBean

Local Enterprise Bean

convert

convert

Conversion.charset

UTF-8

transform

Transform.ContentType

text/xml

Thanks.

Answers (0)