on 03-31-2006 2:38 PM
hi, all
Please help me out, Is it possible to pass SAP Logon information dynamically. Means for connecting R/3 to modal I have to pass information like:-
<b>single server</b>
host name----
system number-----
<b>user account</b>
client----
logon name----
password----
language----
can I pass these information at run time. so, that I can easily identified which user connect to the R/3 based on logon name and password .
Regards
Jitender kumar
Hello Jitender,
Use this code (taken from help.sap.com) which helps you to pass the SAP Logon information dynamically
while connecting to R/3.
import com.sap.mw.jco.*;
public class TutorialConnect1 extends Object {
JCO.Client mConnection;
public Connect1() {
try {
// Change the logon information to your own system/user
mConnection =
JCO.createClient("001", // SAP client
"<userid>", // userid
"****", // 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[]) {
Connect1 app = new Connect1();
}
}
Bala
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.