on 01-16-2009 12:01 PM
Dear all,
we would like to make RFC call from a java application (client) to SAP (server) via Java connector. I have prepare a configuration file with following information:
[SAP]
Server=xxx.xxx.xxx.xxx/S/3300
User=xxxxxx
Password=xxxxx
System=00
Mandant=100
xxx.xxx.xxx.xxx is the IP address of SAP gateway and application server.
But I got the following error by test the connection:
Connect to SAP gateway failed
Connect_PM GWHOST=xxx.xxx.xxx.xxx/S/3300, GWSERV=sapgw00, ASHOST=xxx.xxx.xxx.xxx/S/3300, SYSNR=00
LOCATION CPIC (TCP/IP) on local host
ERROR hostname 'xxx.xxx.xxx.xxx/S/3300' unknown
TIME Fri Jan 16 10:56:36 2009
RELEASE 620
COMPONENT NI (network interface)
VERSION 36
RC -2
MODULE ninti.c
LINE 382
DETAIL NiPHostToAddr
SYSTEM CALL gethostbyname
COUNTER 1
Can someone help me?
Thanks and regards
Tao
it seems you gave parameters like you do in Java gui but for JCo it should be like this in java code,
public CallFunction() {
try {
// Logon info
mConnection = JCO.createClient("500", // SAP client
"username", // userid
"password", // password
null, // language
"server name", // application server host name
"00"); // system number
mConnection.connect();
mRepository = new JCO.Repository("ARAsoft", mConnection);
} catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
}
so change your configuration file with respect to code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tao Chen,
Could you pelase check the below link:
http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm
Regards,
S.Manu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.