on 04-27-2010 12:50 PM
Hi,
i have this little script by using scripting.
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 113,38,false
session.findById("wnd[0]/usr/txtRSYST-BNAME").text = "BNAME"
session.findById("wnd[0]/usr/pwdRSYST-BCODE").text = "**********"
session.findById("wnd[0]/usr/pwdRSYST-BCODE").setFocus
session.findById("wnd[0]/usr/pwdRSYST-BCODE").caretPosition = 7
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[0]/okcd").text = "se38"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtRS38M-PROGRAMM").text = "ZMREPORT"
session.findById("wnd[0]/usr/ctxtRS38M-PROGRAMM").caretPosition = 8
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[0]/usr/ctxtS_MTART-LOW").text = "ZTART"
session.findById("wnd[0]/usr/ctxtS_MTART-LOW").caretPosition = 4
session.findById("wnd[0]").sendVKey 8
How can i set the SAP-System wich i want to use.
thanks.
Regards, Dieter
Change your connection portion to:
If Not IsObject(connection) Then
Set connection = application.OpenConnection("the name of your system")
End If
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.