Advertisement
Advertisement
| 05.16.2008 at 08:19AM PDT, ID: 23408593 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: |
Function GrabOrders()
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]").Maximize
Session.findById("wnd[0]/tbar[0]/okcd").Text = "sq00"
Session.findById("wnd[0]").sendVKey 0
Session.findById("wnd[0]").sendVKey 19
Session.findById("wnd[1]").sendVKey 71
Session.findById("wnd[2]/usr/txtRSYSF-STRING").Text = "RWHITE"
Session.findById("wnd[2]/usr/txtRSYSF-STRING").caretPosition = 6
Session.findById("wnd[2]").sendVKey 0
Session.findById("wnd[3]/usr/lbl[0,2]").SetFocus
Session.findById("wnd[3]/usr/lbl[0,2]").caretPosition = 3
Session.findById("wnd[3]").sendVKey 2
Session.findById("wnd[1]").sendVKey 0
Session.findById("wnd[0]/usr/ctxtRS38R-QNUM").Text = "ZORDERFREIGHT"
Session.findById("wnd[0]/usr/ctxtRS38R-QNUM").caretPosition = 13
Session.findById("wnd[0]").sendVKey 17
Session.findById("wnd[1]/usr/ctxtRS38R-VARIANT").Text = "STARTUP"
Session.findById("wnd[1]/usr/ctxtRS38R-VARIANT").caretPosition = 7
Session.findById("wnd[1]").sendVKey 0
Session.findById("wnd[0]").sendVKey 12
Session.findById("wnd[0]").sendVKey 17
Session.findById("wnd[1]/usr/ctxtRS38R-VARIANT").Text = "YESTERDAY"
Session.findById("wnd[1]/usr/ctxtRS38R-VARIANT").caretPosition = 9
Session.findById("wnd[1]").sendVKey 0
Session.findById("wnd[0]").sendVKey 8
End Function
|