Entering content frameSyntax documentation add_menu_item Locate the document in its SAP Library structure

You use this method to generate a new menu entry in a user-defined menu. You must assign this menu entry to an existing macro in the desktop application.

This graphic is explained in the accompanying text

CALL METHOD document->add_menu_item
     EXPORTING item_name          = item_name
               item_macro         = item_macro
               menu_bar_name      = menu_bar_name
               menu_popup_name    = menu_popup_name
               insert_before_item = insert_before_item
               item_pos           = item_pos
               item_before        = item_before
               no_flush           = no_flush
     IMPORTING error              = error
               retcode            = retcode.

Description of parameters

Parameter

Optional

Description

item_name

 

The name of the new menu option

item_macro

 

The name of the macro to be executed when the function is chosen

menu_bar_name

X

Name of the menu bar containing the menu menu_popup_name.

menu_popup_name

X

Name of the menu to which you want to add the menu entry.

insert_before_item

X

Position of the existing menu entry before which you want to add the new entry (0: Add at end).

item_before

X

Not used

item_pos

X

Not used

Note

If you do not specify the name of a menu bar, the menu is placed in the main menu bar of the desktop application.

Leaving content frame