Hello.
When we run an recorded SAP Script may upcoming system messages or messages type "I" and "A" can interrupt our script. Messages type "S", "E" and "W" will always shown in statusbar.
To avoid this behaviour during record or playback of scripts SAP GUI Scripting provide an session property named 'TestToolMode' which can be set in our script (straight before update statements):
session.TestToolMode = 1
When we do an recording this has to be done like:
session.TestToolMode = 1
session.RecordFile = "Test_Record_Filename"
session.Record = 1
Stop Recording:
session.Record = 0
session.TestToolMode = 0
Setting of property 'session.TestToolMode = 1' on GuiSession object will have below impact:
- While success (S), warning (W) and error (E) messages are always displayed
in the statusbar, information (I) and abort (A) messages are displayed as pop-up
windows unless testToolMode is set. - The update mode of the application server is changed to immediate mode for
the connection. - System messages are ignored so that they do not interrupt the recording or
playback of scripts.
(Source: SAP GUI Scripting API 7.10 helpfile / Author: christian.cohrs@sap.com)
Hope this will help you to make your scripting more stable and reduce interruption.
Best regards,
Holger