cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to logon true load balancing using WDTFUNCS.OCX

Former Member
0 Kudos

Hello,

In Visual Basic we use the WDTFUNCS.OCX to logon to SAP and call an RFC. This works fine using a fixed IP address for any SAP server. But now we want to use load balancing.

To realize this we did the following things:

Add line to hosts file: IPnumber KLAPSTUK

Add line to services file: sapmsHMP 3600/tcp

And change the VB logon code with messageserver and groupname instead of fixed ipnumber.

We are not able to logon using this load balancing. Could anybody have at tip on this.

VB code:

Dim R3 As SAPFunctionsOCX.SAPFunctions

'System data

R3 = CreateObject("SAP.Functions")

R3.Connection.System = "HMP"

R3.Connection.SystemNumber = "00"

R3.Connection.Client = "500"

'Load Balancing logon

R3.Connection.MessageServer = "sapmsHMP"

R3.Connection.GroupName = "HMP_RFC"

'User data

R3.Connection.User = "xx"

R3.Connection.Password = "xx"

R3.Connection.Language = "EN"

'Tracing

R3.Connection.tracelevel = "1"

If R3.Connection.Logon(0, True) <> True Then

MsgBox("No connection to SAP")

Exit Sub

end if

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Just a comment, and I don't know if it will help you:

The line:

R3.Connection.MessageServer = "sapmsHMP"

You have given it a service name and not a server name. Try with the central instance hostname and see if that works.