As with normal screens, you can define your own GUI status for lists and attach it to a list level using the SET PF-STATUS statement. If you do not set a particular GUI status, the system sets a default list status for the list screen in an executable program. In other programs, for example, when you call a list from screen processing [Page 934], you must set this status explicitly using the statement
SET PF-STATUS space.
This default interface always contains at least the functions described in the Standard List [Page 818] section.
Unlike normal dialog statuses, the default list status is affected by the ABAP program.
If you define event blocks in your program using the event keywords AT LINE-SELECTION or AT PF<nn>, the system automatically assigns extra functions to other function keys that provide additional functions.
• AT PF<nn> (obsolete)
All function keys of the keyboard F<nn> that are not used for predefined system functions, are set to the function codes PF<nn>, where <nn> is a number between 01 and 24. During list processing, the function codes PF<nn> are linked to the events AT PF<nn>. Choosing PF<nn> always triggers AT PF<nn>. You should no longer use event blocks for PF<nn>.
• AT LINE-SELECTION
For this event, the F2 key (double-click) is assigned the function code PICK and function code Choose. The function also always appears in the application toolbar. During list processing, the PICK function code is assigned to the event AT LINE-SELECTION. PICK always triggers AT LINE-SELECTION.
All other function codes are either intercepted by the runtime environment or trigger the event AT USER-COMMAND. Function codes that trigger AT USER-COMMAND must be defined in your own GUI status. The easiest way to do this is to use the standard list status and add extra functions of your own to it.
Dialog Status for Lists
You can create a dialog status for a list using the Menu Painter [Extern] in the ABAP Workbench [Extern]. As soon as you create the status, you should choose Extras → Adjust template and select List status for your template. This status already contains standard function codes for list processing. They are distributed as follows on the menus, standard toolbar, and application toolbar:
Dialog Status for Lists
Code Menu Standard toolbar Function key Description
%PC List Save list to file
%SL List Save list in SAPoffice
%ST List Save list in report tree
PRI List CTRL-P Print displayed list
%EX List Shift-F3 Exit processing
PICK Edit F2 Event AT LINE-SELECTION
RW Edit F12, ESC Cancel processing
%SC Edit CTRL-F Find
%SC+ Edit CTRL-G Find next
BACK Goto F3 Back one level
P-- CTRL-PgUp Scroll to first window page
P- PgUp Scroll to previous window page
P+ PgDn Scroll to next window page
P++ Ctrl-PgDn Scroll to last window page
%CTX Shift-F10 Context menu on list
In addition, the following function codes are predefined, but not set as status functions. You can assign them freely to any empty status element.
Code Description PF<nn> Event AT PF<nn>
PP<n> Scroll to top of list page <n>
PP-[<n>] Scroll back one list page or <n> pages PP+[<n>] Scroll forward one list page or <n> pages
Dialog Status for Lists PS<n> Scroll to column <n>
PS-- Scroll to first column of the list PS-[<n>] Scroll left by one or <n> columns PS+[<n>] Scroll right by one or <n> columns PS++ Scroll to last column of the list PZ<n> Scroll to line <n>
PL-[<n>] Scroll back to first line of the page or by <n> lines PL+[<n>] Scroll to last line of the page or by <n> lines /.... For other system commands
The runtime environment directly queries and processes all function codes of the above tables, except PICK and PF<nn>. These function codes do not trigger events, and you cannot use them for the AT USER-COMMAND event.
The function code PICK triggers the AT LINE-SELECTION event, whenever the cursor is positioned on a list line. The function codes PF<nn> always trigger the AT PF<nn> event.
Therefore, you cannot use them for the AT USER-COMMAND event either.
To trigger AT USER-COMMAND, you can define any number of function codes yourself. If they do not have a function code listed in the above table, they will trigger AT USER-COMMAND.
Note the following special function key assignments:
• Function key F2:
A double-click is always equivalent to pressing function key F2. Each function code you assign to F2 is therefore activated by double-clicking. Double-clicking triggers the AT LINE-SELECTION event only if the function code PICK is assigned to function key F2. If you assign your own function code to F2, double-clicking triggers the AT USER-
COMMAND event. If a predefined function code is assigned to F2, double-clicking triggers the corresponding action from the runtime environment.
• Function key SHIFT-F10:
The SHIFT-F10 key is always the equivalent of right-clicking. When you use context menus in lists [Page 903], it is assigned the function code %CTX.
You can change the list-specific template if you have other requirements. You can
• replace function code PICK with your own function code to prevent the AT LINE-SELECTION event from being triggered in the report. You can then program all reactions to user actions in a single processing block (AT USER-COMMAND).
• delete predefined function codes whose functionality you do not want to support. For example, this allows you to prevent the user from printing the list or saving it in a file on the presentation server.
• modify the standard key settings. For example, you can assign your own function code to F3 to navigate within the lists according to your requirements, instead of returning one list level (Back). This may be important if you keep several lists on the same logical level and therefore do not want to delete the displayed list as would the standard F3 setting. Or you may want to display a warning before leaving a list level.
Dialog Status for Lists