cancel
Showing results for 
Search instead for 
Did you mean: 

How to perform multiple SAP Login at back end without GUI

former_member687599
Discoverer
0 Kudos

Hi Expert,

I am new in SAP GUI scripting. I would like to know how can perform

login session with no login window (back end login session) and multiple same username on my machine.

The username is able to do that manually. Below are my script. Currently it able to do single login session with logon popup GUI.

I have tried "TASKKILL /F /IM saplogon.exe" but does not works. Please help as I need to perform load and stress test to my SAP GUI on the server.

Option Explicit

Dim WSHShell, SAPGUIPath, SID, InstanceNo, WinTitle, SapGuiAuto, application, connection, session, skillword, vbHide, Shell

SID = "x.x.x.x"

InstanceNo = "00"

Set WSHShell = WScript.CreateObject("WScript.Shell")

If IsObject(WSHShell) Then

SAPGUIPath = "C:\Program Files (x86)\SAP\FrontEnd\SAPgui\"

WSHShell.Exec SAPGUIPath & "SAPgui.exe " & SID & " " & _

InstanceNo

WinTitle = "SAP"

End If

rem skillword = "TASKKILL /F /IM saplogon.exe"

rem Shell skillword, vbHide

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 108,20,false

session.findById("wnd[0]/usr/txtRSYST-BNAME").text = "username"

session.findById("wnd[0]/usr/pwdRSYST-BCODE").text = "password"

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

Thanks

Aswan

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member687599
Discoverer
0 Kudos

It has been a month since I post my question. Hope to get any suggestion or at least acknowledge this.