All:
I have a SAPScript that generates a Message Type X error when it runs. I can run the same steps outside a script and everything is fine, but when a script executes them, it fails.
The script is opening a DP forecasting log for a given day when there are multiple runs that day. It chooses the job with the latest start time.
I have copied the script below. Please excuse any typos.
Jeff
>session.findById("wnd[0]/tbar[0]/okcd").text = "/n/SAPAPO/MC8K"
>session.findById("wnd[0]").sendVKey 0
>session.findById("wnd[0]/usr/ctxtJOB1").text = strFileName
>session.findById("wnd[0]/usr/ctxtDAY1").text = strDate
>session.findById("wnd[0]/usr/ctxtDAY1").setFocus
>session.findById("wnd[0]/usr/ctxtDAY1").caretPosition = 9
>session.findById("wnd[0]/tbar[1]/btn[8]").press
>session.findById("wnd[1]/usr/lbl[12,1]").setFocus
>session.findById("wnd[1]/usr/lbl[12,1]").caretPosition = 4
>session.findById("wnd[1]").sendVKey 2
>session.findById("wnd[1]").sendVKey 33
>session.findById("wnd[1]/usr/lbl[1,3]").setFocus
>session.findById("wnd[1]/usr/lbl[1,3]").caretPosition = 6
>session.findById("wnd[1]").sendVKey 2