cancel
Showing results for 
Search instead for 
Did you mean: 

New SAP window and not an active one

Former Member

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

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

If you have a active session w then

use

session.createSession

and try

Set session1 = SAPCon.Children(1)

session1.findById("wnd[0]").