Search code examples
abapdynpro

Why buttons added to a GUI Status are not visible or grayed out?


I want to add buttons to a standard screen.

I have added the buttons to the GUI status, but they are still not visible.

What is the reason and how to make them visible?


For instance, I have changed the GUI status corresponding to one screen of the transaction code MB52:

GUI Status > Definition of buttons of the Application Toolbar

The buttons are not displayed:

MB52 List Application Toolbar


Solution

  • First of all, in case you want to change a standard screen, make sure to identify the right GUI Status. See here how to identify it.

    Here's the logic used by the ABAP runtime environment to decide whether the button or menu entry corresponding to a Function Code is displayed or not, and how it is displayed:

    • A Function Code may be active or inactive as you wish, by using the toggle button "Function active <-> Inactive" or key F7. Note: by default, a new Function Code is inactive if the program was created in another system (Object Directory Entry > Name of Source System), it's active if the program was created in this system. You may display the Object Directory Entry of the program either via the Program menu Goto > Object Directory Entry, or via the transaction code SM30 > Table TADIR > Enter your program name at the right of R3TR PROG.

      In the GUI Status, set the cursor on the function code and press the button "Function active <-> Inactive", the Function Code is red or highlighted (dependent on the SAP GUI Theme) if it's inactive:

      SAP GUI - GUI Status - "Function active <-> Inactive" (F7)

    • An active Function Code may still be considered inactive if a Switch (object of the Switch Framework) is assigned to a Function Code.

      SAP GUI - GUI Status - Function Code assigned to a Switch

      The Function Code would be definitely inactive if:

      • both the Switch is inactive (or doesn't exist), and the Switch Reaction is "Display",

      • or both the Switch is active, and the Switch Reaction is "Hide".

    • If the Function Code is inactive, it's either hidden or visible/grayed out:

      • If a button has been defined in the Application Toolbar for this Function Code, it depends on the Application Toolbar setting (green, yellow or red icon at the right):

        SAP GUI - GUI Status - Application Toolbar setting

        SAP GUI - GUI Status - Application Toolbar setting - Display all, Hide all, Function selection

        • This button is visible but grayed out if the setting is "display all" or if it's "Function selection" and the Function Code has been defined in the selection.

        • This button is hidden if the setting is "hide all" or if it's "Function selection" and the Function Code has not been defined in the selection.

      • If a menu entry has been defined in the Menu Bar for this Function Code, this menu entry is visible but grayed out.

    Last but not least, the GUI Status belongs to the CUA Interface of the program. This CUA Interface must be activated, otherwise the changes remain inactive and are ignored.