Creating a Context Menu
Use
You can use the entries from a context menu that you define in the Menu Painter to construct a context menu on a screen or list using the static method LOAD_GUI_STATUS from the global class CL_CTMENU.
Procedure
- Open the Repository Browser and navigate to the corresponding program.
- In the context menu of the program, choose Create → GUI Status.
- In the new dialog box, enter a name of the context menu.
This is the name that you pass to the importing parameter STATUS of the method LOAD_GUI_STATUS.
- Enter a short description and select the Context menu radio button.
- Choose
with the quick info text Continue.
The maintenance screen for the context menu appears.
- In the Code column, enter a function code, and under Text, enter the corresponding text for the menu entry.
- If you want to enter a separator, choose Edit → Insert → Separator line.
- If you want to create a cascading menu, leave the Code field empty, and enter the menu text for the cascading menu. You can then open it by double-clicking on it, and enter the required entries.
Result
You have created a set of functions that can be used as a template for constructing a context menu.