cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Logon to SAP through RFC (wdtfuncs)

Former Member
0 Kudos

Dear all,

Problem with Logon to SAP through RFC

We are using the using wdtfuncs.ocx (which bases on librfc32.dll) to logon and access SAP from our ocx- Control (written in Visual Basic 6.0, but also tested with VB.NET).

After the update to a newer version of the ocx – control our control always gives an error back. The problem is the logon to SAP.

We have written a short test program, which logons to SAP. Here the code:

Set objFunction = Nothing

Set objFunction = CreateObject("SAP.Functions")

If objFunction Is Nothing Then

Err.Raise -15020, "Error on creating object …"

End If

objFunction.Connection.user = txtUserID.Text

objFunction.Connection.client = txtClient.Text

objFunction.Connection.language = txtLanguage.Text

objFunction.Connection.Password = txtPassword.Text

objFunction.Connection.System = txtSystem.Text

objFunction.Connection.MessageServer = lstDatabase.Text

objFunction.Connection.GroupName = ""

objFunction.Connection.ApplicationServer = lstDatabase.Text

objFunction.Connection.SystemNumber = CLng(txtSysNo.Text)

If Not objFunction.Connection.Logon(, True) Then

Err.Raise -15000, , "Logon was not possible"

End If

I’ve also tried to open set the appropriate values directly at the control:

‘ Opens the Control

objFunction.Connection.Logon

The problem is always the same! It seems that the passwort is not correctly transmitted. After trying to connect several times to SAP the account is disabled, so user name and all other parameters are correctly sent to SAP.

Has anybody an idea what wrong? I’m also searching for documentation of the used ocx-controls.

Here the version of the files, which produce the error:

- WDTFUNCS.OCX

buildno: 746496, fileversion: 6403.3.9.59, productversion: 640 Final Release

- WDTAOCX.OCX

buildno: 746496, fileversion: 6403.3.9.61, productversion: 640 Final Release

- WDTLOG.OCX

buildno: 746496, fileversion: 6403.3.9.64, productversion: 640 Final Release

- LIBRFC32.DLL

buildno: Mon May 02 01:37:26 2005, fileversion: 6403, 3, 70, 4683, productversion: 640 6403.3.70

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear All,

We have a same problem too.

And after we re-check the value of some required fields for logon to SAP,

User name (Function.Connection.user) and password (Function.Connection.Password), they are both must have an Upper-case value.

You can try to re-check that two fields value first, after that you can re-testing the program.

Hope this help,

Former Member
0 Kudos

Hi Frank,

Check this one,

/people/kathirvel.balakrishnan2/blog/2005/09/07/remote-function-call-to-sap-system-using-microsoft-excel

Hope that will be helpful.

Thanks

Kathirvel

Former Member
0 Kudos

Hi Kathirvel,

thanks for your information, but it didn't solve our problem.

The example shows that "CreateObject("SAP.functions")" ist used. This leads to the same error with our lib versions.

Any other idea?

Thanks

Frank

paul_stoltz
Explorer
0 Kudos

We are having a similar problem with our excel JV upload. When the user tries to connect to SAP instead of the logon screen, a pop-up window returns the message "out of memory" VB error.

The strange thing is, the error doesnt occur on every machine trying to run it. Both machines are running Windows XP, both are running the same GUI version. We have re-installed the GUI following a successful sapsweep in addition to re-registering the drivers.

The actual logon step is:

' logon to SAP system

Set R3 = CreateObject("SAP.Functions")

R3.Connection.Destination = "00"

R3.Connection.logon

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

MsgBox "Cannot logon!"

Exit Sub

Else

MsgBox ("Link SAP Success")

End If

' create data object

result = R3.Z_MALLOCOBJ(num:=total, DATAOBJ:=appData)

I believe this is a VB issue but we are rapidily running out of ideas. Any help would be great.

Thanks!!