Hello Carsten,
I tried the following code, and it works - but it is a little bit different from yours:
Sub Test()
Dim rfcFunction As SAPFunctionsOCX.SAPFunctions
Dim rfcConnection As SAPLogonCtrl.Connection
Dim table As SAPTableFactoryCtrl.table
Dim func As SAPFunctionsOCX.Function
Set rfcFunction = CreateObject("SAP.Functions.Unicode")
If Not IsObject(rfcFunction) Then
Exit Sub
End If
Set rfcConnection = rfcFunction.Connection
rfcConnection.ApplicationServer = "C0T"
rfcConnection.System = "C0T"
rfcConnection.SystemNumber = 65
rfcConnection.User = "YI00159"
rfcConnection.Client = "099"
rfcConnection.Language = "DE"
If Not rfcConnection.Logon(0, False) Then
Exit Sub
End If
Set func = rfcFunction.Add("BAPI_BUS1077_GETDETAIL")
Set table = func.Tables("SUB_HEADER")
Stop
rfcConnection.Logoff
Set rfcLogon = Nothing
Set rfcConnection = Nothing
End Sub
Maybe it is an alternative for you.
Cheers
Stefan