Show TOC Start of Content Area

Procedure documentation Adding Functions to a Menu  Locate the document in its SAP Library structure

Use

Once you have created a menu bar, you have to enter the individual menu entries. Each menu can contain up to 15 entries.

A menu can contain the following:

      Function names (with function code and text)

      Submenus (pull-down menus)

      Separators

You are allowed to include submenus up to three levels deep.

Menu functions that logically belong together are grouped together using separators. This makes the menu easier to use. Separators also make long menus easier to read by dividing them into smaller parts.

Procedure

The following procedures describe how to create and maintain menu entries.

Defining Menu Functions

To add functions to a menu that is already opened in the Menu Painter, proceed as follows:

...

       1.      Open a menu list in the menu bar by double-clicking the menu title.

The system opens the menu. The menu entries list contains two columns Code and Text.

       2.      In the Code column, enter a function code.

Function codes can be up to 20 characters long.

Note

If you want to enter a function code that is longer than the input field, you must first change the displayed length of the field in the user settings. To do this, choose Utilities ® Settings ® User-specific and set the new length.

       3.      In the Text column, enter the function text.

The name that you enter here appears in the menu at runtime. You can also determine the contents of function texts at runtime. Fore more information, see Defining Dynamic Function Texts.

       4.      Repeat steps 2 and 3 for each item in the menu.

Using a Switch

You can assign a menu to a switch of the Switch Framework. Using a switch you can define whether the relevant menu should be displayed or hidden, when the switch is either in state ON or STAND-BY.

To assign a menu to a switch, proceed as follows:

...

       1.      In the Menu Painter, open the relevant menu.

       2.      In its context menu, choose Attributes.

The Menu Attributes screen appears.

       3.      In the Switch field, specify the corresponding switch.

       4.      Specify the Reaction.

 

Note

See also chapter Defining an Application Toolbar for a description how to assign a function to a switch.

 

Creating Cascading Menus

To add a cascading menu (sub-menu) to a menu, proceed as follows:

...

       1.      Leave the Code column blank.

       2.      In the Text column, enter a menu name.

       3.      Double-click on the menu name in the Text column.

The system opens the menu entry list for the cascading menu.

       4.      Complete the menu in the normal manner.

Inserting Separators

...

       1.      Position the cursor on the line where you want to insert the separator.

       2.      Choose Edit ® Insert ® Separtor line.

Note

If you want to insert a separator between two existing menu entries, position the cursor on the line before which you want to insert a separator.

Editing Menu Entries

The Menu Painter allows you to cut, copy, paste, and delete menu entries. To do this, proceed as follows:

...

       1.      Position the cursor on a line.

       2.      Choose Edit ® Entry ® Cut (or Copy, or Paste, or Delete).

Note

If you double-click a function code, the Function Attributes dialog box appears. There you can maintain, for example, the Functional Type, the Icon name

(define the icon assigned to a function), the Icon Text, and an Info Text (tooltip).

Using Style Guide Proposals

Some functions are standard on SAP menus. If you are starting with the SAP standard menus, the standard functions appear on your menus. To use a standard function, activate it by entering a function code next to it. If you do not enter a function code, the function remains inactive, and is not displayed at runtime.

 

 

End of Content Area