on 03-30-2005 10:31 PM
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();
}
}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.