Entering content frame

END-OF-SELECTION Locate the document in its SAP Library structure

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 GET events.


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.


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

GET spfli FIELDS carrid connid cityfrom cityto.

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


  LOOP AT spfli_tab INTO spfli_line.
    WRITE: / spfli_line-cityfrom,


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:

This graphic is explained in the accompanying text



Leaving content frame