SAP NetWeaver AS ABAP Release 752, ©Copyright 2017 SAP AG. All rights reserved.ABAP - Keyword Documentation → ABAP - Reference → SAP GUI User Dialogs → Classic Lists → Event Blocks for Lists → AT list_event →
This statement defines an event block whose event is raised by the
ABAP runtime environment
if, when a screen is displayed, a function with a self-defined function code is chosen. The function code is available in the system field sy-ucomm when processing starts.
Self-defined function codes are all those that include character combinations, except for the following:
|%CTX||Calls a context menu|
|%PC||Save to file|
|%SC||Search for ...|
|%SL||Save in Office|
|%ST||Save in report tree|
|P-||Scroll to previous page|
|P--||Scroll to first page|
|P+||Scroll to next page|
|P++||Scroll to last page|
|PFILE name||Saves list lines in a text file named "abap.lst" in standard character format in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.|
|PL-||Scroll to first line of the page|
|PL-n||Scroll back n lines|
|PL+||Scroll to last line of the page|
|PL+n||Scroll forward n lines|
|PP-||Scroll back one page|
|PP-n||Scroll back n pages|
|PP+||Scroll forward one page|
|PP+n||Scroll forward n pages|
|PPn||Scroll to beginning of page n|
|PS--||Scroll to first column|
|PS++||Scroll to last column|
|PS-||Scroll one column to the left|
|PS-n||Scroll n columns to the left|
|PS+||Scroll one column to the right|
|PS+n||Scroll n columns to the right|
|PSn||Scroll to column n|
|PZn||Scroll to line n|
This program works with a self-defined GUI status MYLIST. The function associated there with the function code MY_SELECTION raises the event AT USER-COMMAND when the list is displayed and also creates details lists.
SET PF-STATUS 'MYLIST'.
WRITE 'List line'.
IF sy-lsind = 20.
SET PF-STATUS 'MYLIST' EXCLUDING 'MY_SELECTION'.
WRITE: / 'You worked on list', sy-listi,
/ 'You are on list', sy-lsind.