Menu Enhancements

Menu enhancements were integrated unchanged in the new neue BAdI concept as of Release 7.0 as Function code enhancements.

Menu enhancements with function codes are provided for in the user interfaces. These function codes must adhere to the form /namensraum/+<...>, just like in the enhancement technique SMOD/CMOD. These function codes are assigned to an enhancement. Only when there is an active implementation of the assignment do they appear in the menu.

The application developer reserves specific function codes for customers when defining a Business Add-In and assigns them in the Menu Painter in the appropriate menu lists. The application developer must also ensure that these menu options are queried in the application program and that the corresponding add-in method is also called. Customers can take advantage of menu enhancements by creating a new implementation, choosing a text for the menu option, and then programming the method used to determine what action is performed when the menu enhancement is called.

Menu enhancements can only be used for single-use add-ins (not multiple-use add-ins) that are not filter-dependent. Currently, menu enhancements can only be created in conjunction with program enhancements (interfaces).

To create a menu enhancement, proceed as follows:


       1.      Create the definition of an add-in and define its interface.

       2.      Choose the FCodes tab.

       3.      Enter the name of your program, the function code, and a description.

       4.      Call the Menu Painter or double-click on the program name or function code to navigate to user interface maintenance in the Menu Painter. Enter the function code in the appropriate menu list. If you have accessed the Menu Painter directly during add-in definition, you can call the menu lists by choosing Goto ® Object Lists ® Menu Lists.

Calling a Menu Enhancement from the Application Program

The application program should look like this:

case fcode.
  when 'SAP'.
  when '+CUS'
    call method …

Implementing a Menu Enhancement

To create the implementation of a menu enhancement, proceed as follows:

       5.      Create an implementation and choose the FCodes tab. All data adopted from your Business Add-In's definition is displayed here. You can make entries for the implementation on the right. You can also double-click on the first input field. The following dialog box appears.

Here you may enter a text for your function code, the name of an icon, a text for the icon, and a short description.

The actions that you want the system to perform after the pushbutton is chosen must be programmed in the appropriate method, either manually or using a default source code that has been provided for this purpose.

Menu enhancements only become visible after the implementation has been activated and the application program that calls the Business Add-In has been executed.