sapdev logo background
sapdev logo sapdev logo
Comments

ABAP SET PF-STATUS DYNPRO Statement syntax, information and example SAP source code



Return to Statement index



SET PF-STATUS - Screen

Short Reference

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

ABAP_ADDITIONS:
1 ... OF PROGRAM prog
2 ... EXCLUDING fcode

What does it do? In 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 .
status expects a character-like data object that contains either the name of the GUI status of the
main program of the current program group , or the program specified in uppercase (or only blanks) in
prog . 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 blanks, the standard list status is set and the additions have no effect.

Latest notes: The GUI status of a screen must be set at the latest during the event PBO . If no GUI status is set for a screen, the empty status described above is used.
If the set GUI status contains dynamic function texts, the function texts are read from the assigned global data objects of the program in which the GUI status is defined. If these do not exist, question marks (?) are displayed. For dynamic function texts, an explicitly specified program prog is loaded into the current program group if it does not already exist in the internal session. This enables access to its global data objects.
The statement SET PF-STATUS has a variant for the GUI status of
lists .
There is no guarantee that the statement SET PF-STATUS will work at PBO for the selection screen . This statement should no longer be used for selection screens.
If a switch is assigned to an element of the GUI status in the Menu Painter , this controls the activation of this element.

ABAP_ADDITION_1 ... OF PROGRAM prog

What does it do? 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 . prog expects a character-like data object that contains the name of the ABAP program in uppercase.

ABAP_ADDITION_2 ... EXCLUDING fcode

What does it do? The addition EXCLUDING can be used to deactivate functions of the set GUI status. An inactive function cannot be selected in the user interface. fcode expects either a character-like data object or an internal table with a flat character-like row type. The functions whose function codes are contained in the field or in the rows of the internal table are dea
ctivated. 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.

Example ABAP Coding 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.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




SET_PF-STATUS
SET_PF-STATUS_LIST




comments powered by Disqus