Hello ,
I'm trying to use note 492561 in order to connect to the BW server via VBA. When I implement the following code :
Sub Logon_to_server()
logontoBW = False
On Error GoTo leave
Dim MyConnection As Object
Set MyConnection = Run("SAPBEX.XLA!SAPBEXgetConnection")
With MyConnection
.client = "100"
.user = "TESTUSER"
.password = "12345"
.Language = "NL"
.Systemid = "BWD"
.SAPROUTER = ""
.systemnumber = "00"
.system = "BWP"
.ApplicationServer = "ZD01"
.logon 0, True
If .isConnected <> 0 Then
.logon 0, False
If .isConnected <> 1 Then
MsgBox "Something went wrong"
Exit Sub
End If
End If
End With
Run "SAPBEX.XLA!SAPBEXInitConnection"
logontoBW = True
exit sub
leave:
MsgBox Err.Description
End Sub
the connection fails and .isConnected <> 0
If .isConnected <> 0 Then
.logon 0, False
The next code ".logon 0, False" will triger the normal logon screen in the BexAnalyser and when i press enter ( OK ) , I will logon to the system normally with the settings I have provided in the vba code.
Does anyone know why I can't logon with .logon 0,True ???
( This code is used to logon to the system without the popupscreen. )
Thanx in Advance ...
Hans

