[英]SAP Catching Data with RFC_CALL_TRANSACTION RFC VB
I become an errorcode 1001, an SAP Remote error?我变成了一个错误代码 1001,一个 SAP Remote 错误?
I've googled alot but didn't find anything.我用谷歌搜索了很多,但没有找到任何东西。 Maybe someone knows whats the Problem here.
也许有人知道这里的问题是什么。 Im using SAP 720.
我使用 SAP 720。
System.Runtime.InteropServices.COMException (0x000003E9): SAP Remote Function Call bei Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) bei Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) ...
System.Runtime.InteropServices.COMException (0x000003E9): SAP Remote Function Call bei Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) bei Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) ...
Here is my code:这是我的代码:
Public FunctionCtrl As Object
Function login_Call()
Try
Dim conn As Object
FunctionCtrl = CreateObject("SAP.Functions")
conn = FunctionCtrl.Connection
conn.System = XXX
conn.ApplicationServer = XXX
conn.SystemNumber = XXX
conn.Client = "XXX"
conn.user = XXX
conn.Password = XXX
conn.Language = XXX
'needed for frontend dialog
conn.RfcWithDialog = True
'log on with logon dialog
If Not conn.Logon(0, 1) Then
Dim WsShell
Dim intText As Integer
WsShell = CreateObject("WScript.Shell")
intText = WsShell.Popup("Logon not succesful." & vbCrLf & _
"will be closed automatically in one minute...", 60)
'conn = Nothing
Anmeldung_Call = False
Exit Function
End If
Anmeldung_Call = True
Catch ex As Exception
Anmeldung_Call = False
End Try
Me.Text = DateTime.Now.ToString()
End Function
Sub Open_IW73()
Dim BdcTable As Object
Dim RfcCallTransaction As Object
Dim Messages As Object
Dim count As Integer
'call transaction IW73
RfcCallTransaction = FunctionCtrl.Add("RFC_CALL_TRANSACTION")
RfcCallTransaction.Exports("TRANCODE") = "IW73"
RfcCallTransaction.Exports("UPDMODE") = "S"
BdcTable = RfcCallTransaction.Tables("BDCTABLE").....
The Error comes in this line: "RfcCallTransaction = FunctionCtrl.Add("RFC_CALL_TRANSACTION") "错误出现在这一行:“RfcCallTransaction = FunctionCtrl.Add("RFC_CALL_TRANSACTION")”
Thank you谢谢
I've had the same error.我有同样的错误。 People suggested different fixes like using SAP.functions.Unicode.
人们提出了不同的修复方法,例如使用 SAP.functions.Unicode。 What did it for me was simply changing to "RFC_CALL_TRANSACTION_USING".
对我来说只是简单地更改为“RFC_CALL_TRANSACTION_USING”。 I'm not sure of the exact difference between these commands, so be careful with that.
我不确定这些命令之间的确切区别,所以要小心。 So far it has been working for me though.
到目前为止,它一直对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.