Purpose

The Return statement terminates processing in InputScripts as well as in functions called using Process . Its behavior depends on the context:

  • In an InputScript before the first Screen statement: Return ends the InputScript and triggers an Enter with “?”. This means that the current screen is not processed by the SAP application. If a text is specified, it is additionally displayed as a popup message.
  • In an InputScript after the first Screen statement: Return returns control to the calling transaction. Internally, the function code /nXXXX is triggered with the corresponding transaction code XXXX. If a text is specified, it is also displayed as a popup message.
  • In a function called via Process : Return terminates the function and returns the specified string or variable value to the caller. For more details, refer to the documentation of Process .
  • In a GuiXT script: The Return statement is ignored.
Examples

Further examples
Return "Only currency USD is supported for the fast posting mode"
Format Return

Return "message text"

Return "message text" "title"

After returning, the message "message text" is displayed with title "Title".

Options
-statusline The message  is displayed in the status line. An already existing SAP standard message is not shown in this case.

If the message text starts with  "S: " or "E: " or "W: ", the message is shown as information or error message or warning message. Example:

Return "E: Amount &V[amount] exceeds the limit of 50,000" -statusline

  • A title parameter is ignored in this case
  • The -statusline option is always assumed in "SAP GUI for HTML" environment (ITS)
Hints
  • As always you can use variables in the message text and title
  • By inserting \n in your message you can create a carriage return in your message, by inserting \t a tab
Components GuiXT + InputAssistant