Entering content frame

Leaving a Screen from a Program Locate the document in its SAP Library structure

In a program, you can use one of the two following ABAP statements to leave a screen:

LEAVE SCREEN.

or

LEAVE TO SCREEN Next Screen.

The LEAVE SCREEN statement ends the current screen and calls the subsequent screen. The next screen is either the static next screen or a dynamic next screen. In the second case, you must override the static next screen using the SET SCREEN statement before the LEAVE SCREEN statement.

The LEAVE TO SCREEN statement exits the current screen and calls the dynamic next screen, which you specify as part of the statement. The LEAVE TO SCREEN statement is no more than a contraction of the two statements

SET SCREEN Next Screen.
LEAVE SCREEN.

These statements do not end the entire screen sequence. They merely branch to another screen in the same sequence. The screen sequence only ends when you leave to next screen 0.

 

Leaving content frame