on 11-23-2021 8:20 PM
Hi all,
I have been trying to extract a database from SAP via Excel VBA using the following code:
Option Explicit
Public SapGuiAuto, WScript, msgcol
Public objGui As GuiApplication
Public objConn As GuiConnection
Public session As GuiSession
Sub SAPCustomerReport()
Set SapGuiAuto = GetObject("SAPGUI")
Set objGui = SapGuiAuto.GetScriptingEngine
Set objConn = objGui.Children(0)
Set session = objConn.Children(0)
'Insert your SAP Script here
MsgBox "The file is updated"
End Sub
The database extraction is not included yet, however, since that part will not be too difficult using SAP script recording. Unfortunately, this code above (which I got from a standard template found on Google and it worked for other people) returns the following error:Run-time error '-2147221020 (800401e4)':Automation errorInvalid syntax.If I debug the error, it highlights the first rule after starting the Sub.I think it has something to do with me running SAP through Citrix, but I do not know how to adapt the code correctly... Can somebody help me or share a link to a template that is connecting Excel VBA to SAP via Citrix? It would be much appreciated!
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.