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.
The following executable program is connected to the logical database F1S.
NODES: spfli, sflight, sbook.
WRITE 'Test Program for STOP'.
WRITE: 'Bookid', sbook-bookid.
WRITE: / 'End of Selection'.
This produces the following output:
Test Program for STOP
End of Selection
As soon as the first line of SBOOK has been read, the system calls the END-OF-SELECTION event block.