Deactivating Functions at Runtime
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.
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
fixed positions 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 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.
For further information about how to deactivate functions dynamically, see the online documentation for the
SET PF-STATUS statement.