cancel
Showing results for 
Search instead for 
Did you mean: 

Dnamic Menu

Former Member
0 Kudos

Hi All,

I have a big drouble with Menu and MenuActionitems. I know how to create menu in design time.

But in my project i have to create the menu and menu actions from coding.

Means based on some conditions i should create Menu and MenuActionitems dynamically.

is it possible in Webdynpro Abap?

Please help me to find the solution.

Regards,

Kumar K

Accepted Solutions (0)

Answers (2)

Answers (2)

uday_gubbala2
Active Contributor
0 Kudos

Hi Kumar,

What do you mean to ask for by Menu & MenuActionItems? You had earlier posted a similar [thread |;long back & I had given you the full coding for creating MenuItems when the user right clicks over a TextView. You had neither closed that thread nor cared to reply back to my answer.

Uday

Former Member
0 Kudos

Hi uday,

See the ral problem im facing is..

I have one table called AccessRights it contains Accessgroup wise access of menu and menuactions

sample table structue : MenuTable

MenuId MenuName ViewName MainMenu

1 Admin NULL 0

2 user Creation vw_UserCrt 1

10 Access Group vw_AccGrp 1

3 Maintanence NULL 0

12

sample table structue : AccessRights

Accessgroupid MenuId MenuLevel satus

-


-


-


-


1 1 0 1

1 2 0 1

1 10 1 1

1 112 2 1

2 1 1 1

2 2 0 0

2 10 1 0

0 - Menu (Level 0)

1 - Menu Action (Level 1)

so based on the aacees rights and its status i have to display the menu and menu items

if all menu action's status are false then i dont need to display the Menu in level 0.

I hope you can understand...

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There is no Menu UI element in Web Dynpro, so please be more specific about what you are building. Are you refering to the right mouse click Context Menu? In that case you have WDONCONTEXTMENU method where you can dynamically fill the menu items:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/93d4352e8c60d6e10000000a114a6b/frameset.htm

Or are you talking about the MenuBar or MenuPopup (like would be a child under the Tray UI element)? In those cases you would have to use WDDOMODIFYVIEW to dynamiclly insert the child menu items.

Or are you talking about something like the ButtonChoice or LinkChoice that have expansion menus inplace off the UI element? These would also need to use WDDOMODIFYVIEW to create the child items dynamically.

Former Member
0 Kudos

There exists a Menu UI element, see

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/37/978b411fb4b05fe10000000a1550b0/content.htm

It can be attached at a certain set of UI elements like TextView, LinkTo* etc. or used inside a MenuBar.

More powerful is the context menu with its own programming model.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/93d4352e8c60d6e10000000a114a6b/content.htm

Armin