sample code:
Dim iData As Integer
Dim nField As Integer
Dim nData As Integer
Dim Result As Boolean
Dim vRow As Variant
MsgBox "Execution Start"
Set R3 = CreateObject("SAP.Functions")
R3.Connection.System = "XXX" '此处为系统标示
R3.Connection.SystemNumber = "XX" '系统编号
R3.Connection.client = "500"
R3.Connection.User = "ID"
R3.Connection.Password = "PWD"
R3.Connection.Language = "EN"
R3.Connection.ApplicationServer = "hostname"
If R3.Connection.logon(0, True) = True Then
MsgBox "Connection Succefully"
Else
MsgBox "Connection Failed"
End If
Dim iData As Integer
Dim nField As Integer
Dim nData As Integer
Dim Result As Boolean
Dim vRow As Variant
MsgBox "Execution Start"
Set R3 = CreateObject("SAP.Functions")
R3.Connection.System = "XXX" '此处为系统标示
R3.Connection.SystemNumber = "XX" '系统编号
R3.Connection.client = "500"
R3.Connection.User = "ID"
R3.Connection.Password = "PWD"
R3.Connection.Language = "EN"
R3.Connection.ApplicationServer = "hostname"
If R3.Connection.logon(0, True) = True Then
MsgBox "Connection Succefully"
Else
MsgBox "Connection Failed"
End If