cancel
Showing results for 
Search instead for 
Did you mean: 

Context menu

ravi_kumar221
Participant
0 Kudos

please tell me how  to create context menu

Accepted Solutions (0)

Answers (1)

Answers (1)

RicardoRomero_1
Active Contributor
0 Kudos

Hi,

Create a Menu in the layout within CONTEXT_MENUS and a MenuActionItem within this menu.

Then you need to add the following code in the method WDDOONCONTEXTMENU:

data l_menu_action_item             type ref to cl_wd_menu_action_item.

  menu = context_menu_manager->get_context_menu( 'YOUR_MENU' ).
  l_menu_action_item ?= menu->get_item( id = 'YOUR_ACTION_ITEM' ).
  l_menu_action_item->set_enabled( abap_true ).

Check also this document:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3041fcd6-3833-2c10-efad-b545c6001...