When the SAP GUI script searches for data via SAP GUI and finds nothing, it sends us a pop-up message saying "that it has not found any data", how to keep the macro running because later there are other transactions.
Sub FOS()
...
On Error GoTo ConsoleAbs
Set Sapgui = GetObject("SAPGUI")
On Error GoTo 0
'transaction1
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").Text = "S_ALR_87011964"
session.findById("wnd[0]/tbar[0]/btn[0]").press
session.findById("wnd[0]/usr/ctxtBUKRS-LOW").Text = "0092"
...
'transaction2
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").Text = "S_ALR_87012039"
session.findById("wnd[0]/tbar[0]/btn[0]").press
...
End Sub
I've been trying
On Error GoTo ConsoleAbs
Set Sapgui = GetObject("SAPGUI")
On Error GoTo 0
but I'm not sure that's the right solution.