Skip to Content
0
Former Member
Nov 01, 2004 at 03:09 PM

Not able to logon true load balancing using WDTFUNCS.OCX

113 Views

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