Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Document: Menu Painter File name: saphelp_nw73ehp1_en_d1_801ce8454211d189710000e8322d00_content.pdf URL: http://help.sap.com/saphelp_nw73ehp1/helpdata/en/d1/801ce8454211d189710000e8322d00/content.htm Date created: November 24, 2012
2012 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System ads, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C , World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
Page 1 of 23
Menu Painter
Purpose
The Menu Painter is one of the tools of the ABAP Workbench. You use it to design user interfaces for your ABAP programs and to define the functions that you want to use within these interfaces.
If you want to use the Menu Painter and the Modification Assistant together, see
Features
ABAP programs contain a wide variety of functions which fall into different categories within the user interface. An instance of the user interface consisting of a menu bar, a standard toolbar, an application toolbar, and a function key setting, is called a GUI status. The GUI status and GUI title defines how the user interface looks and behaves in an ABAP program. You can see a representation of these objects in the figure below.
Some statuses do not use all of the objects in the figure above. For example, the status of a modal dialog box uses only function keys and an application toolbar.
More information:
Basic Concepts
Basic Concepts
Use
This section provides comprehensive information about GUI statuses and their elements. The GUI Status The Dialog Status Functions Special Function Keys and Function Codes Context Menus
Page 2 of 23
A GUI status is an independent component of an ABAP program which you can create using the Menu Painter in the ABAP Workbench. There are three different types of GUI statuses: Dialog status Dialog box Context menu.
Features
The role of a GUI status is to provide the user with a range of functions on a screen. Each function is associated with a function code of up to 20 characters. When you choose a function, a PAI event is triggered. In each PAI event, the function code, if it is not empty, is placed in the system field syst-ucomm (sy-ucomm) and assigned to the OK_CODE field. Empty function codes are placed neither in the sy-ucomm field, nor in the OK_CODE field.
Before you can work with the OK_CODE field, you must assign a name to it in the Screen Painter. For more information, see
All function codes in an ABAP program, apart from those assigned only to pushbuttons on screens, are defined and administered in the Menu Painter.
The GUI status type defines how the function codes are displayed: A dialog status consists of a menu bar, a standard toolbar, an application toolbar, and function key settings. The standard function codes of the toolbar and the function codes linked to function keys but not to the application toolbar can be used by means of key combinations. A status for a dialog box contains an application toolbar and function key settings. The standard function codes of the toolbar and function codes that are linked with function keys but not with the application toolbar are available using the keyboard. The context menu type consists solely of a context menu and serves as the static model for the dynamic creation of context menus.
Dialog statuses are the most general form of user interfaces for screens. Statuses for dialog boxes and dialog statuses are generally created statically for an ABAP program.
Transaction XYZ can be executed in two modes (has two statuses) - Change and Display. In change mode, the delete function is active, but in display mode it is not. Several different screens of a program can use the same status. The screens of one program can use the statuses of other programs. You set the GUI title of a screen independently of its status.
Page 3 of 23
The information below applies not only to dialog statuses but also, with some restrictions, to statuses for dialog boxes. A status of a dialog box contains only a toolbar and the standard function codes of the toolbar and function codes which are linked with function keys but not with the application toolbar are available using the keyboard.
Use
A dialog status consists of a menu bar, a standard toolbar, an application toolbar, and a function key setting. When you define a dialog status in the Menu Painter, every function code is assigned to a menu entry in a menu bar or to a freely-assignable function key on the keyboard. Function codes that are assigned to a function key can also be assigned to an icon in the standard toolbar or a pushbutton in the application toolbar. For each function code, there is a static or dynamic function text. Dynamic function texts allow you to use context-sensitive texts in your ABAP program. For more information, see Defining Dynamic Function Texts. The user interface is a visualization of all possible functions, and is meant to make programs easier to use. From a technical point of view, you could just enter the function code in the command field and trigger the PAI event by pressing ENTER.
A dialog status must contain all possible function codes as menu entries. The most important functions should also be assigned to function keys, and the most important of these should also be assigned to icons in the standard toolbar or the application toolbar. In the Menu Painter, the functions that you assign to icons in the standard toolbar must also be assigned to particular function keys. You cannot assign them freely. When you assign a function code to an icon, the system automatically assigns the relevant function to the corresponding function key.
You should always activate at least one of the Back (F3), Exit (Shift+F3), or Cancel (F12) functions, so that the user can always leave the screen in the normal fashion. The assignment of function keys to pushbuttons in the application toolbar is not fixed. The Menu Painter provides you with help when you assign function codes to interface elements, since you can use the Display standards function in the menu bar and corresponding checks. As well as the function codes for Normal Application Functions which trigger the PAI event, you can create function codes in the Menu Painter with other functions (for example, to call another transaction or trigger a system functions). Such function codes can also be assigned to pushbuttons, checkboxes, or radio buttons on screens. To do this, you must assign a different function type to the function code in either the Menu Painteror the Screen Painter.
Functions
You execute a function whenever you choose a menu entry, or press a function key or pushbutton. The element in the interface is linked to the ABAP program itself by a unique function code which you assign to the interface element when you create it in the Menu Painter.
Defining a Function
The definition of an interface function contains the following elements: Function code: Unique key for the function which can be interpreted by the ABAP program. Function type: The function type is used to determine processing control. For example, function types can tell the system when or how to carry out a function. Function text: A text that describes the function (such as Save). Icon name: Name of the icon to be displayed on a pushbutton. Icon text: Text to be output on the pushbutton in addition to the icon. Info Text: Text to be displayed as quick info. Fastpath: Letter combination that allows users to choose functions without using the mouse.
More information:
Using Functions
Page 4 of 23
The following function keys do not trigger the PAI event, but are reserved for other functions: F1 calls the field help F4 calls the input help F10 positions the cursor on the menu bar
The F2 Key
The F2 key is always linked to a mouse double-click. If a function code in the GUI status is assigned to the F2 key, the PAI event can be triggered either when the user chooses F2 or when he or she double-clicks a screen element. In both cases, the corresponding function code is passed to sy-ucomm and the OK_CODE field. If you need to use the cursor position to control what happens next, you must find it out yourself using the GET CURSOR statement.
Context Menus
Use
For each dialog status, the system automatically creates a standard context menu which the user can display by right-clicking on the screen (or choosing Shift+F10). The standard context menu contains all of the function keys to which functions are assigned. It therefore makes it easy to access any function code that is available using the keyboard, since only the most important are assigned to the application toolbar. As well as the standard context menu, you can define context-specific menus for any of the following screen elements: Input/output fields Text fields Table controls Frames Subscreens
You cannot assign context menus to pushbuttons, checkboxes or radio buttons. However, you can assign unique function codes to them instead.
Page 5 of 23
Work Area of the Menu Painter From the worksheet, you can create a menu bar, define menu functions, assign F keys, customize the standard tool bar, and create an application toolbar. To maintain the menu bar, application toolbar, or function key settings, click the Expand icon next to the relevant area.
See also:
Inactive Sources
Page 6 of 23
screen in a program. Titles help to orient the user, which is especially useful for transactions with several screens.
Procedure
1. Open the Repository Browser (Transaction Code SE80) and navigate to the program for which you want to create the GUI Title. 2. In the context menu of the relevant program, choose Create GUI Titles. A dialog box appears. 3. Enter a title code.
A title code can be up to 20 characters long. 4. In the Title field, enter the title that you want to appear at the top of your screen. 5. Choose with the quick info text Transfer.
The new GUI title appears in the Repository Browser. 6. To activate the new GUI title, in the context menu, chose Activate Interface.
Result
You have now created a GUI title that you can set in an ABAP program using the following statement: SET TITLEBAR <TITLECODE>.
If you do not set a title, the system uses a standard title. The GUI title must be a component of the current ABAP program unless you use the OF PROGRAMaddition to set a GUI status of another program.
GUI titles remain set until you explicitly change them. At runtime, the system stores the current title in the SY-TITLE system field.
Defining a Status
Purpose
Use this process to create a new GUI status using the Menu Painter.
Process Flow
To create a new GUI Status, use the following procedures in the sequence in which they occur below. Creating a GUI Status Creating a Menu Bar (or create a reference to an existing menu bar) Adding Functions to a Menu Defining Function Key Settings Defining an Application Toolbar (or create a reference to an existing one) Creating the Standard Toolbar (or create a reference to an existing one) Testing and Activating a Status
Navigation
Page 7 of 23
You can maintain a status from various points within the ABAP Workbench: From the Object Navigator, under Program objects By forward navigation from the ABAP Editor From the initial screen of the Menu Painter (transaction code SE41).
A status name can consist of up to 20 alphanumeric characters. 4. In the Short Text field, enter a meaningful short description. 5. Select a Status Type by choosing the appropriate radio button. The status type enables the Menu Painter to display the correct work area for the kind of status you want to create. The following status types follow the standards in the SAP Style Guide. Status type: Dialog status (Normal Screen) Dialog box Context menu References to Menu bars, standard toolbar, function keys and application toolbar Function keys and application toolbar. Dialog boxes do not have menu bars or a standard toolbar. A context menu. Context menus contain a set of functions that you can use to construct a context-sensitive menu. See also Creating a Context Menu.
6. Choose
The system displays the work area of the Menu Painter. 7. Define the components of the interface (or refer to existing interface components). 8. Save your new status.
Result
The new status object appears in your program object list.
You cannot call a status in your program until you have activated it. For more information, see Testing and activating statuses.
See also:
Defining Key Assignments Creating Menu Bars Defining Pushbuttons Creating Standard Toolbars
Page 8 of 23
Procedure
1. Open the Repository Browser and navigate to the corresponding program. 2. In the context menu of the program, choose Create GUI Status. 3. In the new dialog box, enter a name of the context menu. This is the name that you pass to the importing parameter STATUS of the method LOAD_GUI_STATUS. 4. Enter a short description and select the Context menu radio button. 5. Choose with the quick info text Continue.
The maintenance screen for the context menu appears. 6. In the Code column, enter a function code, and under Text, enter the corresponding text for the menu entry. 7. If you want to enter a separator, choose Edit Insert Separator line. 8. If you want to create a cascading menu, leave the Code field empty, and enter the menu text for the cascading menu. You can then open it by doubleclicking on it, and enter the required entries.
Result
You have created a set of functions that can be used as a template for constructing a context menu.
For information about defining the relevant processing logic in ABAP, see
Context Menus.
Menu Bars
Use
Each new status that you create can have a reference to its own menu bar. You can either create a new menu bar, or link to an existing one. A menu bar can contain up to six menus. The system then adds the two standard menus - System and Help. Both menus are always displayed in the last two positions on the menu bar. If you want to create a new menu bar, the status work area starts with an empty menu bar area.
In a status for a list, you can also adopt individual default functions. Choose Display list functions to display the defaults. You can either adopt the defaults, or change them to suit your own requirements.
See also:
Creating a Menu Bar Adding Functions to a Menu
Page 9 of 23
3. If you want to use the default settings, choose Display standards. 4. If you are using the standards, change the first menu title <Object> to something relevant to your application. 5. If you are not using the standards, enter the menu titles as required.
6. Add menu entries to the menus. For more information, see Adding Functions to a Menu.
The Menu Painter supports the user interface standards outlined in the SAP Style Guide by proposing names for GUI objects. To display the proposals, open the Menu Painter and choose Utilities Help texts Standards/Proposals. Following these proposals helps you to create transactions with the look and feel of the standard applications.
Procedure
The following procedures describe how to create and maintain menu entries.
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.
Page 10 of 23
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.
See also chapter Defining an Application Toolbar for a description how to assign a function to a switch.
Inserting Separators
1. Position the cursor on the line where you want to insert the separator. 2. Choose Edit Insert Separtor line.
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.
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).
Page 11 of 23
Recommended function key settings Freely assigned function keys The following function keys are reserved by SAP, and cannot be changed: F1 F3 F4 F12 Help Back Possible entries Cancel
The reserved or recommended function keys depend on the type of status. For more information, see the SAP Style Guide. To reach the guide, choose Utilities Help texts Standards/proposals.
Procedure
1. Open the Menu Painter for the relevant GUI status and switch to change mode. 2. Expand the Function keys section. 3. In the first input field for the corresponding function key, enter a function code. If you want to link to an existing function key setting, see Linking objects in a GUI status. 4. In the second input field, enter a text for the function. This text is visible as documentation whenever the user presses the secondary mouse button.
When you define a function key in theRecommended Function Key Settings group, the system proposes a default function description. However, you can overwrite this text. Assign to these function keys only functions that correspond to the standard description, since these are intended to be used uniformly throughout the system.
Prerequisites
You must have assigned a function to a function key before you can include it in the application toolbar. You can include up to 35 pushbuttons in the application toolbar. Application toolbar functions can contain an icon, a text, an info text (tooltip) or all of these together.
Procedure
1. Assign a function to a function key. For more information, see Defining a function key setting. 2. Expand the application toolbar and enter a name for it. 3. Enter the function code (that you assigned to the function key in step 1) in one of the pushbutton fields of the application toolbar and press ENTER. The system automatically fills in the text for the function definition, and an icon, if one exists.
When composing the application toolbar, you must adhere to the standards in the SAP Style Guide. To reach this guide, choose Utilities Help Texts Standards/proposals. 4. If required, you can add icons and info texts to the pushbuttons. For more information about assigning icons to pushbuttons, see Icons in the Application Toolbar.
Using a Switch
You can assign (optionally) a function to a switch of the Switch Framework. Using a switch you can define whether the relevant function should be displayed or hidden when the switch is either in state ON or STAND-BY. To assign a function to a switch, perform the following: 1. In the Menu Painter, double-click on the relevant function. The Function Attributes screen appears.
Page 12 of 23
2. In the Switch field, specify the corresponding switch. 3. Specify the Reaction.
See also chapter Adding Functions to a Menu for a description how to assign a menu to a switch.
Additional Features
You can make a function active or inactive by selecting it and then choosing You can display inactive functions within the application toolbar. For more information, see Displaying Inactive Functions. You can also assign a dynamic text to a pushbutton at runtime. For more information about how to assign dynamic texts, see the section Defining Dynamic Function Texts. You can group functions in the application toolbar using separators. For more information, see Inserting Separators. Function Code.
We recommend you create pushbuttons only for functions that are also available on a menu. For further information about the standard functions, choose Utilities Help texts Standards/proposals.
The set of icons available for use in the Menu Painter is not the same as that available in other editors (for example, in the Screen Painter). In the icon pool, all icons are classified into different groups according to where they are used.
Procedure
1. Double-click on a function in the function key setting. The Function Attributes dialog box appears. 2. In the Icon name field, enter a name of an icon. You can display a list of possible icons using the input help of the field.
Further Options
If you want the icon to appear with an explanatory text next to it, enter a text in the Icon Text field. In the Info. Text field, enter an info text, if required. The system displays the quick info text when the user places the cursor on the pushbutton or holds down the secondary mouse button. You can also define info texts for functions that do not have an icon.
Procedure
1. Open the Menu Painter for the relevant GUI status.
Page 13 of 23
3. Choose the icon that appears to the right of the application toolbar. This icon indicates how inactive functions has to be handled at present: Hide all (default) Display all Function Selection The Application Toolbar Attributes dialog box appears. 4. In the Display of inactive functions group box, select the appropriate radio button. You can choose between Display all, Hide all and Function selection. If you select the last radio button, the system allows you to select the required functions from a list where all the functions assigned to the application toolbar are displayed.
If you have defined to view inactive functions, the pushbuttons in the application toolbar are not shifted when you activate or deactivate functions dynamically.
Inserting Separators
Use
As in menus, you use separators to divide application toolbars into groups of related functions.
Procedure
1. Open the Menu Painter for the relevant GUI status. 2. Switch to change mode. 3. Position the cursor where you want to insert a separator. 4. Choose Edit Insert Separator line. The system inserts a separator at the cursor position.
The SAP Style Guide recommends you activate at least one of the Back, Exit, and Cancel functions.
Procedure
1. Open the Menu Painter for the relevant GUI status. 2. Switch to change mode. 3. Expand the Function Keys work area by choosing .
4. In the Standard toolbar section, enter the function code above the corresponding icon.
The standard toolbar is identical for all interfaces of the SAP System with status type Screen or List. If a function is inactive, its icon is grayed out. Interfaces with the status type Dialog box or List in dialog boxdo not have a standard toolbar.
Page 14 of 23
Interfaces with the status type Dialog box or List in dialog boxdo not have a standard toolbar.
Changes to a GUI status become visible in your application only when you reactivate the status.
If you do not enter a screen number, the system simulates the status using an empty test screen. 5. Choose Execute.
A dialog box that contains the window coordinates appears. 6. Choose with the quick info text Continue.
Activating a Status
To activate a status, choose with the quick info text Activate.
When you activate a status, the system automatically checks for syntax errors.
You must correct all syntax errors in your GUI status before activating it.
More information:
Inactive Sources
Page 15 of 23
Procedure
1. Open the Menu Painter for the relevant GUI status. 2. To start the check, choose User Interface Check Ergonomics. The system displays the result of the check procedure in the form of a hierarchical tree structure. The results of the check are sorted by priority. 3. Open the appropriate node in the tree display. 4. Choose an object from the check list by double-clicking it. The system opens the corresponding work area in the Menu Painter. 5. Switch to change mode and correct the error. 6. Choose with the quick info text Back to return to the tree display.
Further Information
To see more information about an error, select a node in the hierarchy tree and choose with the quick info text Error Documentation. The system also displays information about how to correct the error. If you select one of the Priority nodes, the system displays the general documentation.
PDF Content
This page content is in PDF format.
Download
Copying a Status
Use
You can create a new GUI status by making a copy of an existing status. There are two ways to do this:
If you want to use a standard interface for your program, you have to reference these components to the original.
Procedure
This procedure tells you how to create a new status by copying an existing status from the same program. 1. Open the Repository Browser and navigate to the GUI status that you want to copy. 2. In the context menu of the relevant GUI status, choose Copy. The Copy Status dialog box appears. The current program and status appear as the To and Frm program and status. 3. Enter a new status for the To status. 4. Choose Copy.
A second dialog box appears. 5. In the new dialog box, choose whether the copy should use all or some of the components. The default option is The same sub-objects. However, you can also choose Partly the same sub-objects(see above diagram). In this case, you must select the components that you want to use.
Page 16 of 23
6. Select the components that you want to use by setting the corresponding indicators. 7. Choose Copy.
The system asks you, whether you want to change the short texts of the new objects. 8. Specify the short texts for the new objects (optional) and choose The system creates the new status in the same program. Copy.
When you copy the status into another program, steps 5, 6 and 7 are omitted, since the system copies all components automatically.
Procedure
Use the procedures below to copy a menu bar, a function key setting or an application toolbar.
Removing Links
The simplest way to remove a link is to overwrite the link with new information. You can also use the Edit Initialize function to reset a function key, menu, or pushbutton setting.
Page 17 of 23
Overview Lists
Use
Reusable components of the program interface are grouped together in overview lists. These are sorted by category into a menu list, title list, and so on. You can choose individual objects from these lists and edit them. Objects that are not used within the interface are also included in the lists.
Unused objects are not assigned to a status. For example, if you delete a menu from the work area, the system does not delete it from the menu list, even though it no longer appears in the interface. The menu remains in the menu list, and you can link it in a new status reference later on if required.
Features
The following section describes the features of overview lists and how you can use them.
Accessing Lists
To access the display lists from the worksheet, choose Goto Menu list (Function list, Status list and so on). To switch back to the maintenance screen of the status, choose Goto Current status. You can also access the lists from the initial screen of the Menu Painter.
Observing Standards
The Menu Painter supports the user interface standards outlined in the BC - SAP Style Guide by proposing names for GUI objects. To display the proposals, open the Menu Painter and choose Utilities Help texts Standards/Proposals. Following these proposals helps you to create transactions with the look and feel of the standard applications.
Using Functions
This section provides comprehensive information about functions in the Menu Painter and their usage. Function Types Defining Function Types Defining a Fastpath
Page 18 of 23
Function Types
Use
When you create functions, you define a function code and a name. When a user chooses a function, the system stores the function code in the SY-UCOMM field. The code tells the system which function a user has chosen. You can also assign a type to your functions. Function types can, for example, tell the system when or how to carry out a function. The system uses the following function types: Type Description Normal function code processing (for example, in a PAI module). E T S P Triggers an "at exit-command" module in the Process After Input (PAI) processing block (MODULE <xxx> AT EXIT-COMMAND). When the user selects an E type function, the system enters the "at exit-command" module before carrying out any input checks. Calls another transaction. Activating a T type function has the same effect as the LEAVE TO TRANSACTION statement. The user cannot return to the original transaction. Triggers system functions used internally in SAP standard applications. You must not use type S when creating your own functions. Triggers a function defined locally at the GUI. This function is not passed back to the ABAP program (no SY-UCOMM or OK_CODE). Instead, it is processed at the presentation server. This type of function can only currently be used for tabstrip controls (Screen Painter).
Defining a Fastpath
Use
Fastpaths allow you to enter a menu path using a single letter or sequence of letters instead of the mouse.
Constraints
The fastpath for a menu must be unique within the menu bar. The fastpath for a function must be unique within its menu. The letter must be a part of the complete function name. For example, you could not choose Z as the fastpath for the Create function.
In double-byte languages, the English fastpath keys are used. The front end displays the double-byte language text in the menu, with the English letter for the fastpath in parentheses afterwards.
Procedure
Page 19 of 23
You do not have to maintain fastpaths explicitly. As soon as you generate the interface, the system creates a set of default fastpaths automatically. You can then change the fastpath if required. 1. To change the fastpath, open the status in the Menu Painter. 2. Choose Goto Object lists Fastpaths. The fastpath maintenance screen appears. 3. Switch to change mode. 4. Enter the new fastpaths for the relevant functions. 5. To display a default set of fastpaths, choose Extras Propose fastpath. 6. Choose with the quick info text Save.
Example
You have defined D as a fastpath of the Delete function. Now you are able to choose the Delete function from the Edit menu by entering D. You can also enter the entire menu path using the letter combination preceded with a period. In our example, you have to enter .DE in the command field.
Procedure
To activate or deactivate a function code in the status work area of the Menu Painter, use the corresponding procedure below:
The function code and description are now displayed in a different color. The system has activated inactive functions or deactivated active functions. If the system displays the function in red in the Menu Painter, it is deactivated. If the function is colored in black, it is already active.
You can use the same procedure to activate several functions at the same time.
Page 20 of 23
7. Select the statuses in which you want to make the change. 8. Choose Copy.
Procedure
The following procedures are explained using an example.
For more information about how to deactivate functions dynamically, see the ABAP Keyword documentation for the SET PF-STATUS statement.
Procedure
1. Open the relevant GUI status in the Menu Painter. 2. Place the cursor on an empty function line. 3. Choose Edit Insert Function with dyn. text. The Insert Function with Dynamic Function Text dialog box appears. 4. Enter a function code and choose with the quick info text Continue.
The Enter function text dialog box appears. 5. Enter a program or ABAP Dictionary field name using the input help for the Field name field. 6. Select the appropriate radio button (Table field or Program field). 7. Select one of the possible entries and choose The system displays the field in <> (brackets). Accept.
Page 21 of 23
For information about how to create a dynamic text for a menu, see Defining dynamic menu texts You can also change static function text to dynamic ones, and vice versa. For more information, see Changing Function Texts.
Since the field name that you specify to store the function name can be up to 132 bytes long (as on the screen), the system cannot always display the field in its full length. You can change the field name by double-clicking the function or menu name.
Page 22 of 23
Example
You have a program with an assigned screen 100. If you want this screen to appear with the menus, standard toolbar, and application toolbar from GUI CREATE status, you must insert the following code into a Process Before Output (PBO) module of screen 100: SET PF-STATUS 'CREATE'. To call screen 100 with the title bar '100', insert the following code into the same PBO module: SET TITLEBAR '100'.
When you set a GUI status or a GUI title, it remains set until you explicitly set a new GUI status or title. In the above example, if you call screen 200 without setting a new status, screen 200 appears with the GUI CREATE status and title bar 100.
Example
If your GUI status contains the function codes 'BACK', 'EXIT', and 'SAVE', for example, you need the following code in your PAI module. MODULE USER_COMMAND_0100. CASE OK_CODE. WHEN 'BACK'. ... WHEN 'EXIT'. ... WHEN 'SAVE'. ... ENDCASE. ENDMODULE.
Page 23 of 23