Showing results for 
Search instead for 
Did you mean: 

To open multiple GUI sessions automatically - is there a way?

Former Member
0 Kudos


wonder whether there is an option to make SAP GUI automatically open, right after logon,

multiple sessions in parallel with specific transactions according to instructions,

whether set by script, parametres or other ways.

As a sample, typically I need to open four sessions anytime I log on

+ transaction BAPI

+ transaction spro

+ transaction se11

+ and one specific application transaction

Searching all and especially this forum wouldn't help, so I publish this question.

Certainly this works manually, open one session after the other, calling each transaction, either by favorites or by menue path or typing manually.

Does anyone know a more elegant way?

kind regards

thanks for help in advance


Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Ashwini,

thanks for the prompt reply!

Will give your script a test tonight and will come back with feedback soon after.

Given than in many projects the graphical tool of recording and playback of scripts are switched off, which are available in the SAP reference systems by now, I am in need of a written and stored solution, which I could carry over to customer installations as well (given this is approved by the local security concept of course).



Former Member
0 Kudos


Try running this below SAPGUI Script after login to R3 system,


If Not IsObject(application) Then

Set SapGuiAuto = GetObject("SAPGUI")

Set application = SapGuiAuto.GetScriptingEngine

End If

If Not IsObject(connection) Then

Set connection = application.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]").resizeWorkingPane 106,23,false

session.findById("wnd[0]/tbar[0]/okcd").text = "/ose11"

session.findById("wnd[0]").sendVKey 0

session.findById("wnd[0]/tbar[0]/okcd").text = "/obapi"

session.findById("wnd[0]").sendVKey 0

session.findById("wnd[0]/tbar[0]/okcd").text = "/ospro"

session.findById("wnd[0]").sendVKey 0


Best Regards,