'-Begin-----------------------------------------------------------------
Sub Test()
'-Variables---------------------------------------------------------
Dim oFunc As Object
Dim oConn As Object
Dim SAPConn As Integer
Set oFunc = CreateObject("SAP.Functions.Unicode")
If Not IsObject(oFunc) Then
MsgBox "CreateObject(SAP.Functions.Unicode) failed", vbOKOnly, _
"Error"
Exit Sub
End If
Set oConn = oFunc.Connection()
If Not IsObject(oConn) Then
MsgBox "SAPFunc.Connection failed", vbOKOnly, "Error"
Exit Sub
End If
SAPConn = oConn.Logon(0, vbFalse)
If SAPConn <> 0 Then
oConn.Logoff
Else
MsgBox "Connection.Logon failed", vbOKOnly, "Error"
End If
End Sub
'-End-------------------------------------------------------------------
'-Begin-----------------------------------------------------------------
Sub Test()
'-Variables---------------------------------------------------------
Dim oFunc As SAPFunctionsOCX.SAPFunctions
Dim oConn As SAPLogonCtrl.Connection
Dim SAPConn As Integer
Set oFunc = CreateObject("SAP.Functions.Unicode")
If Not IsObject(oFunc) Then
MsgBox "CreateObject(SAP.Functions.Unicode) failed", vbOKOnly, _
"Error"
Exit Sub
End If
Set oConn = oFunc.Connection()
If Not IsObject(oConn) Then
MsgBox "SAPFunc.Connection failed", vbOKOnly, "Error"
Exit Sub
End If
SAPConn = oConn.Logon(0, vbFalse)
If SAPConn <> 0 Then
oConn.Logoff
Else
MsgBox "Connection.Logon failed", vbOKOnly, "Error"
End If
End Sub
'-End-------------------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
4 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |