cancel
Showing results for 
Search instead for 
Did you mean: 

RFC (Java) : Use connexion string with Message Servers and Logon Groups

Former Member
0 Kudos

Hello,

I have created a Java program which contact an R3 system.

Here, this is a part oh my program :

mConnection = JCO.createClient("1", // SAP client

"UserSAP", // userid

"SAP", // password

"EN", // language

"SapServerName", // server host name or connection string

"00"); // system number

mConnection.connect();

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

mConnection.disconnect();

If i use server host ("SapServerName" which is my dababase server), this program works fine.

In my environment, i have to use a connexion string which contains Logon Groups. I have to contact Application servers instead of directly the Dabase server.

I can set my connexion string like this : "/M/SapServerName/S/3600/G/SAP_LAN"

where SapServerName is my server name, 3600 is my port because 00 is my system number and SAP_LAN is my Logon Group.

If i run my program with this connexion string, it raised an error "Server not found". I have tested with other ports (range 3600-3700) but a do not have any results.

Do you know how can i call my server with a connexion string please?

Thank's a lot.

Guillaume

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Closed because old - and the legacy system released a SAP connector

Yann

Former Member
0 Kudos

I have find another solution to connect on an SAP server using LOGON GROUPS. My java code is

mConnection = JCO.createClient("001", "UserSAP", "SAPPASS", "EN", "SapServerName","3600", "SAP_LAN");

Where

001 : Client Number

EN : Language

3600 : SAP Port Number

SAP_LAN : Logon Group.

I know that this solution works.

Now, i want to create a connection string which use Server Name, SAP Port Number and Logon groups.

I want to use connection string with this Java Code (see my previous post)

mConnection = JCO.createClient("1", "UserSAP", "SAP", "EN", "SapServerNameORConnexionString", "00");

I have created and tested some connexion string (with help on this on this link :http://www.elec.ucl.ac.be/SAP/Manual-6.4r4/backgrnd/connstr.htm).

I have replaced SapServerNameORConnexionString by :

H/SapServerName/S/3300 : Connection is opened OK.

H/SapServerName/S/3600 : KO.

M/SapServerName/S/3300/G/SAP_LAN : KO

M/SapServerName/S/3600/G/SAP_LAN : KO

Do you know how can i create a accepted connexion string with my parameters (SapServerName , Port Number : 3600, SAP_LAN) ?

Thank's a lot.