If I want to use Excel VBA for gathering information from an NWBC started SAP instance, how can I / could I manage to do that? In case I start my NWBC SAP (over Citrix connection) and I start my code via an Excel instance within NWBC, code is working well...
Sub Start_SAP_things()
If Not IsObject(Application) Then
Set SapGuiAuto = GetObject("SAPGUISERVER")
Set SAPApp = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(Connection) Then
Set Connection = SAPApp.Children(0)
End If
If Not IsObject(session) Then
Set session = Connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject Application, "on"
End If
session.findById("wnd[0]").maximize
'And so on
End Sub
But is there any possibility to use an Excel-Macro-File from a "desktop-excel" connecting to NWBC SAP? (right now I unfortunately have create an export form SAP (eg. an ALV-Grid) in order have an active NWBC-Excel instance and then call the procedure... pretty nasty)
Best regards and thanks in advance.
House MD