cancel
Showing results for 
Search instead for 
Did you mean: 

Encoding Issue

former_member342243
Participant
0 Kudos

We have File to JDBC scenario. SAP HR system sending data in file with special char init. But it’s not correctly reached to Receiver system which is third party system. We have done encoding in configuration [ISO-8859-2]. But still we are not able to find exact issue. Please guide me if you have any idea.

Ex: 

Source File data looks like:

1060215 Griķis Dāvis

01060631 Grišetškina Maria

And at receiver side we are getting:

01060215;D#vis;Gri#is

01060631;Maria;Gri#et#kina

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hello Rohan,

The issue arises because the HR system is using ISO-8859 encoding format, whereas in PI if you use graphical map, it will always convert the file to UTF-8 encoding format. Hence the issue arises whenever you do a end-to-end test.

Best way to avert this is to go for Java map where you specify the encoding format as ISO-8859-2 and perform mapping translations.

P.S. - Kindly reward points if it is useful.

Regards,

Subhajit

abhradeepbasu
Participant
0 Kudos

Hi Rohan,

Try this:

When we want to store unicode data in table, we have to preset an N in front of the string to mark it as a unicode string.

eg : insert into <table name> (col1) values (N'Some Unicode Characters') With this, the data will be correctly inserted.

Setting unicode in the URL string to the database will not change this behavior, we have to set a N in front of the string.

For clarity, one example:

If your original "INSERT" operation looks like this:

           <root>

             <StatementName>

              <dbTableName action="INSERT">

               <table>realDbTableName< /table>

                <access>

                 <col1>val1< /col1>

                 <col2>val2< /col2>

               </access>

              </dbTableName>

             </StatementName>

           </root>

And if "col1" and "col2" contains Unicode data, change the xml document as follows:

           <root>

             <StatementName>

              <dbTableName action="INSERT">

               <table>realDbTableName< /table>

                <access>

                 <col1 hasQuot="no"> N'val1'</col1>

                 <col2 hasQuot="no"> N'val2'</col2>

                </access>

              </dbTableName>

             </StatementName>

           </root>

/A.B

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rohan,

the example data contains special characters from the Baltic code page.

The following Non-Unicode code pages support these characters:

http://de.wikipedia.org/wiki/Windows-1257

On the Windows side.

http://en.wikipedia.org/wiki/ISO/IEC_8859-4

on a standard Non-Unicode SAP system.

Code page ISO-8859-2 is definitely not correct in this case.

Best regards,

Nils

former_member342243
Participant
0 Kudos

i checked code page using SNLS Tcode in SAP HR system and XI system. In SApHR codepage value is 4103.

and in XI system there is no value.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Rohan,

If you have the option to set this up as an integrated configuration then it would run on the AAE and it would never touch the ABAP stack during processing.  It appears that your HR system is setup to use UTF-16LE code page so you would want to indicate that in your sender channel so you can manage any conversions into the required code page at the receiver.

Regards,

Ryan Crosby

praveen_sutra
Active Contributor
0 Kudos

Hi Rohan,

you can try for java mapping to force the mapping to change the encoding.

hope this helps.

thanks and regards,

Praveen T

former_member191435
Contributor
0 Kudos

Hi,

Can you please check in reciver jdbc system.. is it accept those kind of data or ot

Thanks,

Sreenivas

gagandeep_batra
Active Contributor
0 Kudos

Hi Rohan,

Can you check is this issue in mapping or receiver CC?

also check :

scn.sap.com/people/prateek.srivastava3/blog/2009/04/02/unicode-handling-for-ms-sql-server

Regards

GB

former_member342243
Participant
0 Kudos

HI Gagandeep,

I Have tested in ESR and also ID test config. there is no issue. values coming correctly. But while testing end to end scenario we are getting that issue.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Rohan,

The # character is usually what you see when the system codepage for the ABAP side does not support certain characters.  Have you tried running a File to File scenario end to end to test the result file locally?

Regards,

Ryan Crosby

former_member342243
Participant
0 Kudos

While doing UAT testing. we found this.

How should i correct/check ABAP system code page.