cancel
Showing results for 
Search instead for 
Did you mean: 

Can not login by JCO V 2.15

Former Member
0 Kudos

Hi,

I am able to login to SAP thru GUI, but I can not login to SAP system by using JCO version 2.15 with a sample java program below. I got an error " RFC_ERROR_LOGON_FAILURE : You are not authorizated to logon to target system. " Could someone advise. Thanks.

Sample program

import com.sap.mw.jco.*;

/**

  • @author Thomas G. Schuessler, ARAsoft GmbH

*/

public class TutorialConnect1 extends Object {

JCO.Client mConnection;

public TutorialConnect1() {

try {

// Change the logon information to your own system/user

mConnection =

JCO.createClient("10", // SAP client

"mySapID", // userid

"mySapPw", // password

null, // language

"hostname", // application server host name

"00"); // system number

mConnection.connect();

System.out.println(mConnection.getAttributes());

mConnection.disconnect();

}

catch (Exception ex) {

ex.printStackTrace();

System.exit(1);

}

}

public static void main (String args[]) {

TutorialConnect1 app = new TutorialConnect1();

}

}

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

oh yes. In other for you to logon to SAP you must have the right privileges. Tell your Basis Admin to provide you with RFC access privilege(I think its called the dialog privilege or so.) Check this out with your Basis Admin. I hope this will help

Former Member
0 Kudos

Hey ,

Check if your username, password are in the correct case. I think from 2.1.5 the access pareamters in JCo are case sensitive.Check out the release doc that comes with JCo 2.1.5.

Regards

Dilip