Leaves the current program and continues processing after
DIALOG or SUBMIT
prog AND RETURN.
If you use
LEAVE TO TRANSACTION , SUBMIT prog or start the program via the transaction menu or a transaction code, you branch to the transaction selection screen.
LEAVE PROGRAM always leaves the current program - there is never any processing after LEAVE PROGRAM!