Show TOC

Exiting Event Blocks Using STOPLocate this document in the navigation structure

Exiting Event Blocks Using STOP

If you use the STOP statement within an event block, the system stops processing the block immediately. The ABAP runtime environment triggers the next event according to the following diagram:

Before and during selection screen processing, the next event in the prescribed sequence is always called. From the AT SELECTION-SCREEN event onwards, the system always triggers the END-OF-SELECTION event when an event block with STOP is exited. Once the corresponding event block has been processed, the system displays the list.

Tip

The following executable program is connected to the logical database F1S.

REPORT demo_program_stop.

NODES: spfli, sflight, sbook.

START-OF-SELECTION.  WRITE 'Test Program for STOP'.

GET sbook.  WRITE: 'Bookid', sbook-bookid.  STOP.

END-OF-SELECTION.  WRITE: / 'End of Selection'.

This produces the following output:

Test Program for STOP

Bookid 00010001

End of Selection

As soon as the first line of SBOOK has been read, the system calls the END-OF-SELECTION event block.