Skip to Content
Author's profile photo Holger Kohn

SAP GUI Scripting ‘How to avoid system messages during recording/playback’


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:

Hope this will help you to make your scripting more stable and reduce interruption.

Best regards,


Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Holger,

      Just a side question. How to read the file "Test_Record_Filename" ?

      As the file located in "SapWorkDir" is there a way to retrieve the file content by programming without hardcode the path name?