In order to execute a script when the user clicks on a tab, I use a statement:
On "=TAB01"  process="..."
The script is executed but the SAP system now won't change the tab. Why?

Please add the "fcode=" option in your statement:

On "=TAB01" fcode="=TAB01" process="..."

Without the fcode=... parameter, GuiXT will perform a simple "Enter" without function code.