Skip to Content
-1

How to perform multiple SAP Login at back end without GUI

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Aug 03, 2020 at 03:37 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.