PROGRAM INTERFACE:
A GUI status is made up of a menu bar, a standard toolbar, an application toolbar, and of function key settings. Each screen can have one or more GUI statuses. For example, an editor program might have two statuses - one for display mode and one for change mode.
The elements of a GUI status allow users to choose functions using the mouse.
Menus are control elements that allow the user to choose which functions will be processed by an application program. Menus can also contain submenus. The 'System' and 'Help' menus are present on every screen in the R/3 System. They always have identical functions and cannot be changed or hidden.
The application toolbar contains icons for frequently-used functions. The standard toolbar, which is the same on every screen in the R/3 System, contains a set of icons, each of which has a fixed assignment to a corresponding function key. If a function in the standard toolbar is not available on the current screen, the icon is grayed out.
The application toolbar allows the user to choose frequently-used functions by clicking the corresponding pushbutton.
You use the function key settings to assign functions such as Find, Replace, or Cut to the function keys.
All of a program's GUI titles and statuses taken together make up its user interface. Whenever you change or add a new title or status, you must regenerate the user interface.
There are three ways to create a title: from the object list in the Object Navigator, from the Menu Painter, or by forward navigation from the ABAP Editor.
The name of a title can be up to 20 characters long.
You should set an appropriate title for each screen in your application.
You can use variables in titles that are set dynamically at runtime by including the ampersand character (&) as a placeholder. At runtime, the ampersand is replaced by a value that you specify.
You can use up to nine variables by placing digits after the ampersand.
To set a title that contains variables, use the statement:
SET TITLEBAR
WITH <&1> ... <&10>.A title bar remains in place until you set another one. At runtime, the system variable sy-title contains the current title. Title bars are also known as GUI titles.From a technical point of view, a status is a reference to a menu bar, to certain key assignments and to an application toolbar.A single component (such as a menu bar) can be used by more than one GUI status.GUI statuses are ABAP program objects that can be displayed on screens and lists.You should set a status for every screen in your application.A status is a reference to a menu bar, a key setting, and an application toolbar.A menu bar is made up of individual menus.Key assignments and application toolbars are sub-objects of the function key settings.You can create a set of application toolbars for a single key setting. In order to include a function in an application toolbar, the function must be assigned to a function key. Each status contains a single application toolbar.All program menus and key assignments refer to a particular function list. This list can be reached using F4 help. Application toolbars refer to the function list indirectly by way of the key assignment.A function within a status can be either active or inactive. Inactive functions are not displayed in the application toolbar.Functions are identified by their function codes.The attribute function type determines the intended purpose of a function. You can use the function types ' ' (space), 'E', and 'P' for pushbuttons that you place on a screen using the Screen Painter, and for tab titles. Function types 'S and 'H' are reserved for internal use by SAP. Function type 'T' indicates a transaction code. When the user chooses a function with this type, the system leaves the current program (without performing any checks) and calls the new transaction.Functions can be created with static texts or dynamic texts.If a function has a static text, you can assign an icon to it (Icon name attribute). If the function is already assigned to a pushbutton, an icon is displayed instead of the static text. The static text is used when you assign the function to a menu entry. The function text belonging to the function is used as "quick info". The contents of the Infotext attribute appear in the status bar of the screen when the user chooses the function. If you want to display text as well as the icon, enter the text in the Icon text attribute.The Fastpath attribute allows you to define a letter code, which users can enter to choose the function without using the mouse.Functions can be assigned to individual function keys or pushbuttons.Function key settings consist of a key assignment and an application toolbar pushbutton.A function key assignment's type (possible values: screen or dialog box) only serves to define the technical use of the key assignment.Key assignments consist of Reserved Functions Keys, Recommended Functions Keys and Freely Assigned Function Keys. Reserved Functions Keys are function keys whose assigned values cannot be changed in the SAP system. You may activate and deactivate their functions, however, the icons and texts assigned to them cannot be changed. Activated Reserved Functions Keys appear in the standard toolbars of both screens and lists.Recommended Functions Keys are assigned suggested values that satisfy SAP usability (ergonomic) norms.Functions that have been assigned to function keys can also be assigned to pushbuttons in the application toolbar.An application toolbar can contain up to 35 pushbuttons.A menu can contain up to 15 entries.Possible entries are functions, separators, and menus (cascading menus).Menus can be up to three levels deep. The third level may only contain functions and separators.Menus can be created with static or dynamic text. You must assign a field name to menus with dynamic text, whose contents will be displayed as the menu text at runtime.The menu type Include menu allows you to reference menus in other programs. When you do this, you must specify the name of the program and status from which you want to include the menu next to the Short documentation field.Include menus can only be accessed using the menu bar.A menu bar can contain up to eight different menus. Up to six of these can be freely assigned. The system automatically adds both the System menu and the Help menu to every menu bar.There are three ways to create a title: from the object list in the Object Navigator, from the Menu Painter, or by forward navigation from the ABAP Editor.The status type indicates the technical attributes of the status. You can choose between a dialog status (status for fullscreen), or a dialog box status (for use with modal dialog boxes). Context menus are special collections of functions that can be displayed when the user clicks the right-hand mouse button. We will deal with them separately in the Context Menus unit.You can create your own statuses by initially generating new settings, using existing ones (reference technique), or by combining both of these procedures. If you want to create an entirely new status, you must then create your own menu bars, menu functions, and other elements. Changes to a status only affect that status.When you use the reference technique, you create menu bars, application toolbars, and function key assignments as independent elements. You then create your own status and refer to the menu bar, application toolbar, and any function key assignment you want. The Menu Painter stores and maintains these references so that any changes in the menu bar, application toolbar or function key assignments automatically take effect in all statuses referring to them.The linking technique is particularly effective for ensuring consistency in very large applications that use several statuses. The links ensure that the user can access functions in the same way whatever status is set.In a key setting, you assign individual functions to function keys and pushbuttons. Function key settings consist of a key assignment and a set of application toolbars.A function key assignment's type (possible values: Screen, Dialog box, List, List in a dialog box) determines where the key can be used.You can attach functions to reserved function keys, recommended function keys, and freely-assigned function keys. You should observe SAP's ergonomic guidelines. There is a series of examples that you can display from within the Menu Painter.Recommended Functions Keys are assigned suggested values that satisfy SAP usability (ergonomic) norms.If a function is important, and you have already assigned it to a function key, you can also assign it to a pushbutton in the application toolbar. The application toolbar may contain up to 35 pushbuttons.When you assign a function to the standard toolbar, it is also automatically assigned to a reserved function key.To find out the function keys to which these functions are assigned in the current status, click the Information icon in the Menu Painter.For more information about how key combinations such as Ctrl-P are converted into internal function key numbers (for example, for batch input), follow menu path GUI-3 in the Menu Painter.You can only use a function in the application toolbar if you have already assigned it to a function key.Functions in the application toolbar are identified by their function code. The Function type attribute identifies the purpose of the function. If you want to process a function in the program, use the type ' ' (space). If you assign type 'T' to a function, the current program terminates when the user chooses the function, and the system starts the transaction assigned to the function. If you assign an icon to a function with a static text (Icon name attribute), the system displays the icon instead of the text in the application toolbar. The function text belonging to the function is used as "quick info". The contents of the attribute Info. text appear in a screen's status line whenever the event is triggered. If you want to display additional text with an icon, it should be entered in the attribute Icon text.You can use the Fastpath attribute to specify the letters that allow you to choose a function without using the mouse.To insert a separator in the application toolbar, use the Insert menu in the Menu Painter.If you use the 'Fixed positions' attribute for the application toolbar, pushbuttons for inactive functions are grayed out instead of being hidden. To set this attribute, double -click the open padlock symbol next to the application toolbar description.A menu entry can be a function, a separator, or another menu (cascading menu)To add a function to a menu, enter its function code in the left-hand column. If the function already exists in the function list and has a text assigned to it, this is entered automatically in the text field. If not, double -click the right-hand field to maintain a text.To insert a separator, use the 'Insert' menu or fill the function text field with minus signs at the appropriate position.Status and title names can be up to 20 characters in length and must be entered all in capital letters. A status stays active until a new one is set.You can use up to nine variables in a GUI title using the syntax SET TITLEBAR title WITH f1 ..f9.If no GUI interface has been set, a standard user interface is displayed. Use SET PF-STATUS SPACE to deactivate previously entered statuses and activate the default list status. You can deactivate functions at runtime with the EXCLUDING addition. If you want to deactivate several function codes at the same time, you must first transfer these to the system using an internal table.You should work with an interactive event and centrally control various user actions in the program, handling the actions independently of each other.You program AT USER-COMMAND as an interactive event and evaluate the system field syucomm in a CASE control structure. This field contains the current function code.Data is restored from the hide area to the corresponding global data fields for the line on which the cursor was positioned.
No comments:
Post a Comment