Skip to Content
Former Member
Apr 29, 2011 at 10:46 AM

How to read what field the user has right clicked in Module pool


Halo Experts,

I have a main screen say 0001 in Module pool .

I am calling subscreens based on some criteria

subscreen 2090 for criteria 1

2091 for criteria 2

I have fields in Subscreen which are from dictionary strucutres . These fiedls have parameter ids from data elements. These fields have context menus in the attribute also. for example for FIELD1 the context menu is CTX_MENU_ALL in 2090.But for 2091 the FIELD2 might be there which refers to the same parameter id and uses the same context menu CTX_MENU_ALL.

I have written the code inside the form to load the GUI Status.

Form on_ctmenu_CTX_MENU_ALL USING l_menu TYPE REF TO cl_ctmenu.

l_menu ->load_gui_status( ).


The above thing is working fine. Bue depending on the value of field1 or field 2 I need to disable the functions in CTX_MENU_ALL .But is there a way that I can get which screen field and its value the user has clicked inside this form and what is the value in it.I tried GET CURSOR statement . But it is not having any values.

GET CURSOR field l_field value l_value.

GET parameter id is also not working.

Is there any way I can get the fieldname,dynnr,fieldvalue the user has right clicked so that I can use l_menu->hide_functions to hide the menu options?