How check if exists the field? I tried it:
If session.findById("wnd[1]").setFocus Then
you can try e.g. the following:
on error resume next
session.findById("wnd[1]").setfocus
if err.number = 0 then
msgbox "The SAP GUI element exists."
else
msgbox "The SAP GUI element does not exist."
end if
on error goto 0
Regards, ScriptMan