Skip to Content
1
Sep 12, 2018 at 05:29 AM

New SAP window and not an active one

357 Views Last edit Nov 08, 2018 at 08:02 AM 2 rev

i would like to know what command or code i can use in a VBA macro to lunch a new SAP window and not an active one

Set SapGuiAuto = GetObject("SAPGUI") 'Get the SAP GUI Scripting object
Set SAPApp = SapGuiAuto.GetScriptingEngine 'Get the currently running SAP GUI
Set SAPCon = SAPApp.Children(0) 'Get the first system that is currently connected
Set session = SAPCon.Children(0) 'Get the first session (window) on that connection