Show TOC

END-OF-SELECTIONLocate this document in the navigation structure

END-OF-SELECTION

This is the last of the events called by the runtime environment to occur. It is triggered after all of the data has been read from the logical database, and before the list processor is started. You can use the corresponding event block to process and format all data that the program has stored in sequential datasets, such as internal tables or extracts, during the various GETevents.

Tip

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

REPORT demo_program_end_of_selection.

NODES spfli.

DATA: spfli_tab TYPE SORTED TABLE OF spfli                WITH UNIQUE KEY cityfrom cityto carrid connid,      spfli_line TYPE spfli.

START-OF-SELECTION.

 WRITE 'Demo program for END-OF-SELECTION'.  SKIP.

GET spfli FIELDS carrid connid cityfrom cityto.

 MOVE-CORRESPONDING spfli TO spfli_line.  INSERT spfli_line INTO TABLE spfli_tab.

END-OF-SELECTION.

 LOOP AT spfli_tab INTO spfli_line.    WRITE: / spfli_line-cityfrom,             spfli_line-cityto,             spfli_line-carrid,             spfli_line-connid.  ENDLOOP.

This program fills a sorted table with data from the logical database in the GET spfli event, and displays them in a list in the END-OF-SELECTION event. Depending on what you enter on the selection screen, the beginning of the list display might look like this: