cancel
Showing results for 
Search instead for 
Did you mean: 

JCO and Japanese Users

Former Member
0 Kudos

Hi,

I have created users in Japanese in the SAP system. These users can login using SAP GUI to the SAP System. However, when I use JCO to login in these users, I get the following error message:

com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Name or password is incorrect. Please re-enter

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:1098)

at com.sap.mw.jco.JCO$Client.connect(JCO.java:2986)

at com.sap.mw.jco.JCO$Pool.initPool(JCO.java:4382)

at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:5757)

at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:5712)

at com.sap.mw.jco.JCO.getClient(JCO.java:7939)

Does anybody know the steps required to allow a user with a Japanese user name to login using JCO?

Please can you point me to some documentation?

Thakns

Gaurav

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

From what kind of application you are trying to connect to the SAP system? Is it a standalone application or a enterprise app??

Secondly, the users you have created , are the user names in Zenkaku or they are in Hankaku Katakana(I presume you understand this)

Former Member
0 Kudos

Hi,

On behalf of Gaurav Khanna,

Amol Joshi: We do not understand Zenkaku and Hankaku Katakana.

We are testing the following scenario:

We have Unicode BW 3.5 system on which we cerated users in different languages and one of which is Japanses after importing the languages.

Using SAPGUI we are able to authenticate using japanese language but when we use JCO calls to the system then it fails. We are using latest JCO libraries available in SAP market place which is 2.1.6 but still we have the authentication problems.

Error messages and script which we are using is given in the ablve messages. If anyone really understood the scenario can help us.

If you need any additional information please update this message.

Former Member
0 Kudos

Zenkaku - Full width Hiragana / Katakana characters

Hankaku Katakana - Half width Katakana characters.

Hankaku Katakana characters in most of the cases cause problems as very few char sets allow it and hence the clarification was asked for.

<b> but when we use JCO calls to the system then it fails.</b>

Where from this JCo call is made? is it from a standalone application or is it from a Web application / EJB code??

Former Member
0 Kudos

Hi Amol,

Actually we are making calls from "Standalone Application" to SAP System using Jco.

As far as SAP system is concerned it is supporting the characters and hence directly using SAPGUI we are able to login to the system with Japanese user ID but at the same time JCO call fails.

I hope when SAP system is supporting the characters,

Zenkaku - Full width Hiragana / Katakana characters

Hankaku Katakana - Half width Katakana characters

We should not take in to consideration about the characters which you mentioned above. We should try to concentrate on JCO in this case.

Give your comments whether my statement is true in this case.

Regards,

Rajkumar

Former Member
0 Kudos

<i>I hope when SAP system is supporting the characters,

Zenkaku - Full width Hiragana / Katakana characters

Hankaku Katakana - Half width Katakana characters

We should not take in to consideration about the characters which you mentioned above. We should try to concentrate on JCO in this case.</i>

Definitely we should not. the reason behind asking that was in most of the cases Hankaku Katakana characters need special treatment when they are exchanged over web...in your case its a standalone application so time being lets keep it aside.

Presuming that your dev env for this application is Windows, are you sure that the DLL files(librfc32.dll & sapjcorfc.dll) you are using are the correct ones?

In addition to this, may be you can try to get a detailed trace by setting the system property on your dev system using

-Djco.trace_level=N (where 0 =< N =< 10 with 10 = most detailed trace)

Hope this helps.

Former Member
0 Kudos

Hi,

Well the code seems to be alright.

Are u converting the username to uppercase? Maybe the BAPI you call for user existance might to be doing the neccessary conversions for you.

There are number of cases where the login has failed for not converting the name to uppercase.

Do check it and get back to us in this thread.

If it helps you, please close the thread and awards points.

Regards,

Tanveer.

Former Member
0 Kudos

I think this could be the solution to your problem.

The character code set that SAP applications use for Japanese is SAP-8000. This code set does not support MS932 characters.

Therefore, the SAP JCo library cannot handle some characters. If these characters are included in the SAP application, the connector replaces them with the # or ? character. When data contains these characters, it is not processed correctly, and the connector does not report errors.

Thats the limitation of JCO i suppose.

Regards,

Tanveer.

Please please mark helpful answers.

Former Member
0 Kudos

Hi,

The Japanese characters for the user name is passed into other BAPIs through JCO and that does not cause any issues. For instance: BAPI_USER_EXISTENCE_CHECK is invoked with this user name and it returns true for this user. Therfore encoding or code points do not seem to be the issue. It is only in the following piece of code that we get the error detailed above.

Properties props = new Properties();

props.put("jco.client.client", "800");

props.put("jco.client.user", "SOME_JAPANESE_USER_NAME");

props.put("jco.client.passwd", "password");

props.put("jco.client.lang", "EN"); // tried JA as well

props.put("jco.client.sysnr", "01");

props.put("jco.client.ashost", "172.11.22.11");

client = JCO.createClient(props);

// Open the connection

client.connect();

Former Member
0 Kudos

Is your R/3 Unicode or not? How are you connecting to it?

Can u elaborate with some sample code.

I guess the problem is in Unicode conversion.

The R/3 stores the foreign usernames in a different format then the username you must be passing to it.

Regards,

Tanveer.

Please mark the helpful answers.