Purpose
Refresh a screen automatically and periodically

If a screen is based on content that may change quickly, for example performance data of a system or data collected from outside, it makes sense to offer a way to automatically refresh the screen periodically, e.g. every minute.

Solution
Embed an HTML page that uses a JavaScript timer to execute a "Refresh" action in SAP GUI

Example
In transaction ST04  (Performance overview) we embed a small HTML page
which allows the user to choose a time interval and to start the automatic refresh:


The "refresh" area then changes and displays the timer:

 

With a second click the user can stop the automatic refresh:

 

Video


Show video in full screen

Link to HTML page:
Display embedded HTML page "AutomaticRefresh.html"


GuiXT Script:

// delete some fields which we are going to replace with the refresh area
del
F[HDB_OVERVIEW-HOST] // HDB_OVERVIEW-HOST
del F[HDB_OVERVIEW-INSTANCE_NAME] // HDB_OVERVIEW-INSTANCE_NAME

// display the refresh control
// use option -closeonhide so that the processing stops when the user leaves the screen
Control (-0.5,33.4) (0.5,73.4) progid="file://AutomaticRefresh.html" _
      
name="AutomaticRefresh"
-closeOnHide

// Use connectHTM to call "guixt_initialize" and pass the "guixt" object
connectHTML name="AutomaticRefresh"

 

Components
InputAssistant + Controls