SET PF-STATUS status [OF PROGRAM prog] [EXCLUDING fcode].
1. ... OF PROGRAM prog
2. ... EXCLUDING fcode
During screen processing, this statement defines the GUI status defined in status for the subsequent screen layouts. The components of the set status are active in the user interface from the next time a screen layout is sent, and remain active until the end of the program or until the next SET PF-STATUS statement. The name of the current GUI status can be read from the system field sy-pfkey .
For status, a character-type data object must be specified that contains either the name of the GUI status of the
main program of the current
program group, or the program specified
in upper case in prog, or it only contains blank characters.
If the status is not available, an empty status is displayed, in which no control elements are active
except for the predefined system functions. Of these functions, only the Enter key, to which an empty function code is assigned in this case, triggers the event
PAI. If the data object status contains only blank characters, the
standard list status is set and the additions have no effect.
If a switch is assigned to an element of the GUI status in the Menu Painter, this controls the activation of this element.
... OF PROGRAM prog
By default, a GUI status defined in the current main
program is used. The addition OF PROGRAM can be used
to set the GUI status of the program specified in prog.
A character-type data object that contains the name of the ABAP program in upper case is expected for prog.
... EXCLUDING fcode
The addition EXCLUDING can be used to deactivate functions of the set GUI status. An inactive function cannot be selected in the user interface. For fcode, either a character-type data object or an internal table with a flat character-type data type can be specified. The functions, whose function codes are contained in the field or in the rows of the internal table, are deactivated. Only one function code can be specified for each row of the table. The codes are not case-sensitive. Function codes specified in fcode, for which there is no function in the GUI status, are ignored.
Setting the GUI status STATUS_0100 of the main program in a PBO module, whereby the functions with the function codes "CHANGE" and "SAVE" are deactivated.
DATA fcode TYPE TABLE OF sy-ucomm.
...
MODULE status_0100 OUTPUT.
APPEND 'CHANGE' TO fcode.
APPEND 'SAVE' TO fcode.
SET PF-STATUS 'STATUS_0100' EXCLUDING fcode.
ENDMODULE.