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
:
The buttons are not displayed:
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:
An active Function Code may still be considered inactive if a Switch (object of the Switch Framework) is assigned to a Function Code.
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):
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.