I want to avoid the "Enter" at the end of a certain InputScript because it can cause an unwanted action on the current screen. But without enter, the GuiXT script for this screen is not executed. Is there a way to handle this situation?

Yes, there are see two possibilities:

-   at the end of the InputScript, use an "Include" for the GuiXT script (if GuiXT version 2006 Q3 1 and upwards), e.g.

Include "SAPML03T.E0106.txt"

- or (a trick that I would prefer) use a "dummy" action on the screen, i.e. one that is guaranteed to do nothing. I suggest you display the session overview and then return, since this will work in every screen:

Enter "/o"

// Overview of sessions

Screen RSM040000:ALV.20000

  Enter "/12"