Entering content frame

Procedure documentationCreating a Context Menu Locate the document in its SAP Library structure

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 method LOAD_GUI_STATUS from the global class CL_CTMENU.

Procedure

To create a context menu from the Object Navigator:

  1. Select Program objects and choose Edit.
  2. Enter the name of the ABAP program.
  3. Choose GUI Status and enter the name of your context menu.
    This is the name that you will pass to the importing parameter STATUS of the method LOAD_GUI_STATUS.
  4. Choose Create.
    The Create Status dialog box appears, containing fields for the status attributes.
  5. Enter a short text.
  6. Select the status type context menu.
  7. Choose Continue.
    The work area for the context menu appears.
  8. In the Code column, enter a function code, and under Text, the corresponding text for the menu entry.
  9. Repeat step 8 for each further function you want to add to your context menu.
  10. If you want to enter a separator, choose Edit ® Insert ® Separator.
  11. 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, and enter the required entries.

Example:

This graphic is explained in the accompanying text

Result

You have created a set of functions that can be used as a template for constructing a context menu.

This graphic is explained in the accompanying text

For information about how to define the relevant processing logic in ABAP, refer to Structure link Context Menus.

 

 

 

Leaving content frame