cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a menu item

Former Member
0 Kudos

Hi,

I am trying to add a new menu item under the "Business Partner Master Data" menu. I was wondering if anyone had any suggestions on where I should place the code to add this menu item. I originally thought I could do it under the form load event for the "Business Partner Master Data" screen, but that event seems to fire only before the form is loaded, which causes problems because the menu hasn't updated to the business partner choices yet. I need this menu item to be created any time the "Business Partner Master Data" screen is loaded.

Thanks in advance for your help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

If I'm right, when you open the form "Business Partner Master Data", there is a new Menu in the menu bar called "Business Partner Master Data" between Data and Module.

By default, there are "Document Editing", and "User-Defined Fields"

Did you try to add the adding your code when you detect the et_FORM_ACTIVATE event ?

As this menu disappear all the time, I guess you have to add it all the time.

I couldn't check if the menu appears after the et_FORM_ACTIVATE event, but you should try.

Sebastien

Former Member
0 Kudos

I tried the et_form_activate event, but it doesn't seem to work like I want it to. This event isn't fired when the form loads initially, only when the user switches from another form back to the "Business Partner" form. Basically what I need is some way for the user to get from the "Business Partner Master Data" form to a user form I have created. I read somewhere that adding buttons to existing forms was not recommended, so I was trying to use the menu items. Any other suggestions?

Thanks for your help.

Former Member
0 Kudos

Hi,

I don´t think adding a unique new button to the Business Partner form is so bad. The problem will be that if in any future version the layout is changed or any control is added where you place your button, you should change its position.

Another approach could be to create your own menu using the Application.Menus.Add(...) method, and place there your functionallity. Ensure that is only active when the Business Partner form is active.

Regards,

Ibai Peñ

Former Member
0 Kudos

Do you want to add a menu item each time the form is loaded, or to the form itself? If you want to add to the menu, add the item when your add on runs the first time. Or to add to the form, link it to the form load event

Former Member
0 Kudos

I just want to add one menu item to the "Business Partner Master Data" menu on the menu bar at the top of the screen. My problem in adding the menu item when the add on first runs or during the form load event is that the "Business Partner Master Data" menu choice does not exist at these events. The menu choice is instead "SAP Business One". Does that make sense?