on 12-04-2006 11:23 PM
I have written an EJB for NW2004s sp9 that reads an oracle database 10g using jdbc and writes that data to SAP via ABAP function modules. I am using the Oracle ojdbc14.jar driver. The problem occurs when the data read has unicode / international characters such as an umlaut.
I am using the getString method of the java.sql.ResultSet object to obtain the results. The column is defined as VARCHAR in the database. The string SÖDERMAN is printed as S?ERMAN in the J2EE log and looks like this in SAP, S�ERMAN.
To troubleshoot, I looped through each character in the string like this:
if (sqlResults.getString(6).length() > 0) {
for (int x1 = 0; x1 < sqlResults.getString(6).length(); x1++) {
tmpChar = (int) sqlResults.getString(6).charAt(x1);
cat.infoT(loc, " char : " + tmpChar);
}
}
and I'm getting these results:
char[0] = 83
char[1] = 65533
char[2] = 69
char[3] = 82
char[4] = 77
char[5] = 65
char[6] = 78
Any advice would be greatly appreciated.
Ray
Hi Ray,
In J2EE logs you can see special characters only if your editor supports.
Change the settings in your SAP R/3 GUI and see the change. Follow these steps:
In SAP R/3 GUI first screen -> Right Most Icon -> Customizing of Local Layout (Alt+F12) ---> From the Drop Down Menu, select <b>Character Set</b> -> select the language which you are looking at.
Now see the output in SAP R/3.
Regards
Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.