Application Development 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: 

How we can create standard Menu bar using opps concept

Former Member
0 Kudos

Hi Friends,

How we can create standard menu bar using class and methods.in that menu bar i need Drop down like below

1.Print preivew,

2.Export->Word proceesing

->Spread Sheet

->Local File

3.Import

4.print

When click the menu any option it should perform that operation .I was tried using the FM (REUSE_ALV_GRID_DISPLAY).it is working but oops how we can do.

Please Help me and send any sample code

Thanks

Nani

1 REPLY 1

Former Member
0 Kudos

Hi,

Try doing this

While defining your calss add this method.

  • context menu

METHODS handle_context_menu

FOR EVENT context_menu_request OF cl_gui_alv_grid

IMPORTING e_object.

data :menu type ref to cl_ctmenu,

submenu type ref to cl_ctmenu.

CREATE OBJECT submenu.

*--Add Display All.

CALL METHOD e_object->add_function

EXPORTING

fcode = 'DALL'

text = 'Display All'.

CALL METHOD e_object->add_submenu

EXPORTING

menu = submenu

text = 'Display'.

Regards,

theja