on 06-29-2020 11:07 AM
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
It has been a month since I post my question. Hope to get any suggestion or at least acknowledge this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.