Wednesday, September 4, 2019

SAP Auto Login Script

Set SapGui = GetObject("SAPGUI")

Set application = SapGui.GetScriptingEngine

Set connection = application.OpenConnection("System Name as per Logon Pad", True)

Set Session = connection.children(0)

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

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

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

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