Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

A code sample on context menu

Former Member
0 Likes
348

Context menu but I do not know how I can make it worked ...

FORM on_context_menu_request USING i_object TYPE REF TO cl_ctmenu .

*--Here you can add some logic to retrive what was clicked and

*--decide what to add to the context menu

CALL METHOD i_object->add_function

EXPORTING

fcode = 'UPDT'(200)

text = 'Update Record'(204) .

ENDFORM .

How will I use this fcode?

and where?

Thanks.

1 REPLY 1
Read only

Former Member
0 Likes
299

You can set the context menu fcode for a field in the screen painter. Look for property 'Context Menu form' in the properties.

In your example below, the fcode set was request, and hence the form is called on_context_menu_request.

As for the call_object function, a double click on the method name should take you to the method itself so you can figure out what is happening there?

Sudha

Message was edited by:

Sudha Mohan