Neo Gotcha
New Member
- Joined
- Jun 3, 2019
- Messages
- 4
Dear all,
i'm facing a problem running an SAP SCRIPT, actually i'm running VL06F transaction automatically to generate a sales report from the beginning of the month up to date ashown in the code below, can you help me to find what to change in order to set the ending date to the previous date than the actual date:
below the entire code:
thank you for your support.
i'm facing a problem running an SAP SCRIPT, actually i'm running VL06F transaction automatically to generate a sales report from the beginning of the month up to date ashown in the code below, can you help me to find what to change in order to set the ending date to the previous date than the actual date:
Code:
session.findById("wnd[1]/usr/cntlCONTAINER/shellcont/shell").focusDate = "20190603"
below the entire code:
Code:
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 = "/nvl06f"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[1]/btn[17]").press
session.findById("wnd[1]/tbar[0]/btn[8]").press
session.findById("wnd[0]/usr/ctxtIT_WTIST-HIGH").setFocus
session.findById("wnd[0]/usr/ctxtIT_WTIST-HIGH").caretPosition = 0
session.findById("wnd[0]").sendVKey 4
session.findById("wnd[1]/usr/cntlCONTAINER/shellcont/shell").focusDate = "20190603"
session.findById("wnd[1]/tbar[0]/btn[0]").press
session.findById("wnd[0]/tbar[1]/btn[8]").press
thank you for your support.