Show TOC

 Deactivating Functions at RuntimeLocate this document in the navigation structure

Use

You can deactivate menu functions dynamically at runtime. To do this, use the EXCLUDING addition when you set the GUI status. You can deactivate either individual functions, or a whole group of functions.

Procedure

The following procedures are explained using an example.

Deactivating a Single Function

Suppose you have a GUI status called CREATE . This GUI status could have a List reservations menu option with the function code LIST . If List reservations is active by default, you can deactivate it at runtime with the following statement.

SET PF-STATUS 'CREATE' EXCLUDING 'LIST'.

If List reservations is included in a menu, the system grays out the function text. If the function is assigned to a pushbutton, the pushbutton is not displayed unless you have set the Display of inactive functions option for the application toolbar.

Deactivating a Group of Functions

You can deactivate several functions at once by filling an internal table with all the function codes that you want to deactivate. Following our example above, and using an internal table called itab , you would do this as follows:

SET PF-STATUS 'CREATE' EXCLUDING itab.

Note

For more information about how to deactivate functions dynamically, see the ABAP Keyword documentation for the SET PF-STATUS statement.