Stops a process flow in a script.
The leave command is actually a custom function but behaves like a standard WS command. It is used to stop a process flow in a script. When the script has been stopped, the user will be retained on the page from which he or she is located when the script stops. The syntax is as follows:
leave();
The leave command does not take any options:
To demonstrate the leave command, please do the following:
Open the VA01 script file and add the following code.
onscreen 'SAPMV45a.0101'
enter();
leave();
onscreen 'SAPMV45A.4001'
println("-=-----Inside SAPMV45A.4001----");
enter();
Press Enter to initiate the script. The leave command should stop the script before the VA01 screen displays.
Verify that you do not see the VA01 Overview screen and also verify that the println statement does not display in the Console.