The GUI status of a selection screen is generated by the system. The SET PF-STATUS statement in the PBO event of the selection screen has no effect on the standard GUI status. If you want to use your own GUI status for a selection screen, or deactivate functions in the standard GUI status in exceptional cases, you can use one of the following function modules in the PBO event of the selection screen:
Sets another GUI status defined in the same ABAP program, or deactivates functions of the standard GUI status.
Sets a GUI status defined in an external function group. You must use the SET PF-STATUS statement to set the status in a special function module in this function group. You must pass the name of the function module that sets the status as a parameter to the function module RS_EXTERNAL_SELSCREEN_STATUS.
For further information, refer to the function module documentation.
REPORT demo_sel_screen_status. DATA itab TYPE TABLE OF sy-ucomm. PARAMETERS test(10) TYPE c. AT SELECTION-SCREEN OUTPUT. APPEND: 'PRIN' TO itab, 'SPOS' TO itab. CALL FUNCTION 'RS_SET_SELSCREEN_STATUS' EXPORTING p_status = sy-pfkey TABLES p_exclude = itab.
In this example, the Print and Save as variant functions are deactivated. To find out the function codes of the standard GUI status, choose and double-click the GUI status field.