SET PF-STATUS - List

Syntax

SET PF-STATUS status [OF PROGRAM prog] [EXCLUDING fcode]
                     [IMMEDIATELY].


Extras:

1. ... OF PROGRAM prog

2. ... EXCLUDING fcode

3. ... IMMEDIATELY

Effect:

During list processing, this statement sets the GUI status specified in status for the display window of the current list, and all subsequent list levels until the next SET PF-STATUS statement. The statement mainly has the same function as for screens.

In contrast to the screen layouts of screens, however, every list level is automatically linked to the GUI status that is set for it. If the user returns from displaying a higher list level to a lower list level, the latter is redisplayed with the GUI status that was set for it.

If the status of the data object is initial, the standard list status is set and the additions OF PROGRAM and EXCLUDING have no effect. The standard list status contains predefined list-specific functions whose functions are handled by the runtime environment during the display of a screen list, and do not lead to the call of event blocks in the ABAP program. If event blocks are also defined with AT LINE-SELECTION or AT PF##, further function keys are automatically assigned function codes in the standard list status:

If the standard list status is set, sy-pfkey receives the value "STLI".

Note:

When setting the GUI status for the list screen, it is recommended to set a GUI status for which a list status has been included as a template status in the Menu Painter. Including this type of template status copies the list-specific functions of the standard list status into a self-defined GUI status.

Addition 1

...  OF PROGRAM prog

Addition 2

... EXCLUDING fcode

Effect

Wie bei screens.

Addition 3

... IMMEDIATELY

Effect:

The addition IMMEDIATELY only has an effect if it is used when creating a details list, that is, within an event block following an interactive list event. The effect of this addition is that SET PF-STATUS has an effect on the current displayed list (sy-listi) and all subsequent list levels, and not only starting from the current details list (sy-lsind).

Example:

In the following program segment, double clicking the mouse or using the function key F2 only enables selection of a single line from the basic list. This function is then deactivated for the basic list and all subsequent list levels.

START-OF-SELECTION.
  SET PF-STATUS 'BASIC'.
  WRITE / `Pick me!`.

AT LINE-SELECTION.
  SET PF-STATUS 'BASIC' EXCLUDING 'PICK' IMMEDIATELY.
  WRITE / `Don't pick me!`.