cancel
Showing results for 
Search instead for 
Did you mean: 

Macro & SAP scripting runtime error 619

former_member815475
Discoverer
0 Kudos
334

Hi Macro Expert,

I have encountered the issue when I run my SAP scripting and I re-record the same step and I found the differentiate here, however ,please advise how should I include this two different scripting here.

Can I apply IF function ? if yes, how could I do that.

Please advise 🙂

first code

session.findById("wnd[0]/usr/sub/1[0,0]/sub/1/8[0,9]/sub/1/8/9[0,12]/lbl[23,12]").SetFocus

session.findById("wnd[0]/usr/sub/1[0,0]/sub/1/8[0,9]/sub/1/8/9[0,12]/lbl[23,12]").caretPosition = 2

second code

session.findById("wnd[0]/usr/sub/1[0,0]/sub/1/9[0,10]/sub/1/9/10[0,13]/lbl[32,13]").SetFocus

session.findById("wnd[0]/usr/sub/1[0,0]/sub/1/9[0,10]/sub/1/9/10[0,13]/lbl[32,13]").caretPosition = 2

the rest are same coding.

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

session.findById("wnd[0]/tbar[1]/btn[13]").press

session.findById("wnd[0]/tbar[1]/btn[5]").press

session.findById("wnd[1]/usr/txtBKPF-XREF1_HD").Text = Invoice

session.findById("wnd[1]/usr/txtBKPF-XREF1_HD").SetFocus

session.findById("wnd[1]/usr/txtBKPF-XREF1_HD").caretPosition = 12

session.findById("wnd[1]/tbar[0]/btn[0]").press

session.findById("wnd[0]/tbar[0]/btn[11]").press

session.findById("wnd[0]/tbar[0]/btn[3]").press

session.findById("wnd[0]/tbar[0]/btn[3]").press

session.findById("wnd[0]/tbar[0]/btn[3]").press

session.findById("wnd[0]/tbar[0]/btn[3]").press

Sandra_Rossi
Active Contributor
0 Kudos

I never saw that "syntax", are you sure it corresponds to something in your screen?

wnd[0]/usr/sub/1[0,0]/sub/1/8[0,9]/sub/1/8/9[0,12]

Concerning the "IF", we can't help if you don't tell more about the condition you want, or the exact context of why there is a difference...

Accepted Solutions (0)

Answers (0)