Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  User Dialogs →  Classic Lists →  Displaying Lists 

LEAVE LIST-PROCESSING

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


LEAVE LIST-PROCESSING. 

Effect

This statement immediately exits the list processor. The runtime environment continues the processing with the PBO event of the screen from which the list processor was called using LEAVE TO LIST-PROCESSING or the screen that was set using the AND RETURN TO SCREEN addition to this statement.

If the statement is not executed when the list is displayed by the list processor, it has no effect, except in the event blocks for reporting events. Here it branches to the end of the program and processing continues as described for the SUBMIT statement.

When the list processor is exited, the list buffer of the screen sequence is initialized. New output statements describe a new basic list.


Example

This example shows the recommended procedure for displaying lists during screen sequences. A separate screen 500 is defined for calling the list processor. The screen does not contain any screen elements and it calls a single PBO module call_list but no PAI modules. The entire basic list, including the GUI status, is defined in the PBO module. When the screen is exited using LEAVE SCREEN, its processing is stopped and the list processor is started. The list events are handled in the same program. When the list processor is exited the screen sequence of screen 500 is ended, because the next screen 0 is specified when the list processor is called.

PROGRAM demo NO STANDARD PAGE HEADING. 

... 

MODULE call_list OUTPUT. 
  SET PF-STATUS space. 
  WRITE 'Basic List'. 
  LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0. 
  LEAVE SCREEN. 
ENDMODULE. 

TOP-OF-PAGE. 
  WRITE 'Header' COLOR COL_HEADING. 
  ULINE. 

TOP-OF-PAGE DURING LINE-SELECTION. 
  WRITE sy-lsind COLOR COL_HEADING. 
  ULINE. 

AT LINE-SELECTION. 
  WRITE 'Secondary List'. 
  IF sy-lsind = 20. 
    LEAVE LIST-PROCESSING. 
  ENDIF.