A GUI status comprises different components including
a menu bar;
a standard toolbar;
an application toolbar; and
certain function key settings.
A screen can have more than one status. For instance, an editor program can have one status for display mode and another for the change mode. The GUI titles and statuses for a program together constitute the user interface.
Menus are control elements which enable a user to choose one or many functions for processing. Each screen of the R/3 system contains both system menus and help menus. These menus perform similar functions and can neither be modified nor hidden.
The standard toolbar is uniform across every screen in the SAP R/3 system. It contains a set of icons, each of which is assigned to a corresponding function key. If a function icon is grayed out, it means that it is not available on a current screen.
An application toolbar contains a set of icons for frequently used functions. You can use these functions by clicking the corresponding button in the application tool bar.
In addition, you can use the function key settings to allocate functions, such as Find, Replace, or Cut to the function keys.
To create a GUI title, uncomment the SET TITLEBAR statement in the module output. You can specify a name for the title as shown here. Double-click this title to get a confirmation dialog box. You can mention the title code and title in the Create Title dialog box.
A GUI title name cannot consist of more than 20 characters. However, each screen in your application should have an appropriate title.
Titles can contain variables that are set dynamically at runtime by inserting the ampersand character (&) as a placeholder. The title should not contain more than nine variables.
STATUS: TECHNICAL VIEW (1)
Technically speaking, a status can be defined as a reference to a menu bar, to certain key assignments, and to an application toolbar. You can display a single component of the status on screens and lists. In fact, a GUI status can also be described as an ABAP program object that can be displayed on screens and lists.
STATUS: TECHNICAL VIEW (2)
As shown here, the menu bar consists of individual menus. On the other hand, the key assignments and the application toolbars are subobjects of the function key settings.
There is an application toolbar in each status. You can set functions within a status as either active or inactive. Additionally, all program menus and key assignments are related to all interface functions which can be accessed using the F4 help.
All functions are described by their function codes. You can create functions with either static or dynamic text. If a static text is used, then that function is given an icon using the Icon name attribute. Similarly, you can display both text and icon by entering the text in the Icon text attributes.
The attribute, (F type) function type, defines the purpose of the function. Function types such as E and P are meant for the users, while the function types S and H can only be used by the SAP developers. When you use the function type T, the system leaves the calling program and calls the new program.
Moreover, by using the Fastpath attributes, you can choose a function from the menu bar without using a mouse by specifying a single letter to select that particular function.
FUNCTION KEY SETTING
Function key settings comprise a key assignment and an application toolbar pushbutton. You can assign functions to individual function keys and buttons. Different types of function key settings, such as for a screen and dialog box, have different technical purposes.
Key assignments consist of
reserved function keys;
recommended function keys; and
freely assigned function keys.
Reserved function keys are those that have assigned values which cannot be changed in the SAP system.
Recommended function keys contain proposals, which comply with SAP System’s ergonomic standards.
The buttons in the application toolbar can also be used for functions that are assigned to the function keys.
MENUS AND MENU BAR
Menu entries can include functions, separators, and other menus such as cascading menus. A menu can have as many as three levels. Each level, however, can contain only functions and separators.
You can create menus with either static or dynamic text. If a static text is used, the Fastpath attributes allow you to choose a function from the menu bar without using a mouse by specifying a single letter to select that particular function.
If dynamic text is to be used, you should assign a menu field to the menu. The contents of this field will then be displayed as the menu text. The menu type Include Menu allows you to relate to menus in other programs. Include menus can be accessed only by using the menu bar. You must specify the name of the program and status from which you want to include the menu next to the Short documentation field.
CREATING A GUI STATUS
The GUI status is created by using the SET PF-STATUS statement. You can double-click the name given in this statement, which is, BASE, as shown here, to create the object.
You can set status type as any of these – full screen, dialog box, and context menu. A status can be created by creating links to existing components or by creating a new blank status. In case the status is entirely new, you should also design a menu bar, menu functions, and other elements. Any changes made to this status only affect that particular status.
However, if you use the reference technique, the menu bars, application toolbars, and function key assignments are created independently. The references to the menu bars are stored and maintained separately. Therefore, any changes in the menu bar, application toolbar, or function key assignments get automatically reflected in all statuses referring to them.
CREATING A GUI STATUS: FUNCTION KEY ASSIGNMENT
The function key settings consist of a key assignment and a set of application toolbars.
There are two types of functions, static texts and dynamic texts, each of which have specific attributes.
You can attach functions to reserved function keys, recommended function keys, and freely assigned function keys.
Reserved function keys appear in the standard toolbar on screens and lists.
STANDARD TOOLBAR: AUTOMATIC ASSIGNMENT
When a function key is assigned to the standard toolbar, it is also automatically assigned to a reserved function key. You can find the function keys for these functions by selecting Information in the Menu painter.
CREATING A GUI STATUS: APPLICATION TOOLBAR
The functions in an application toolbar can be used only if they are already assigned to a function key. F4 help allows you to select the functions. When an icon is assigned to a function with a static text, the system displays the icon rather than the static text in the application toolbar. You can use the function text belonging to the function as a quick info text.
CREATING GUI STATUS: MENU BAR
A menu entry includes a function, a separator, or another menu, such as a cascading menu. You can add a function to a menu by entering its function code in the left-hand column. If a function already exists in the function list and has text assigned to it, it is automatically entered in the text field. Otherwise, you need to enter text by double-clicking the right-hand field.
You can create a submenu by entering the name in the right field of the menu entry.
The reserved function keys appear in the standard toolbar on screens and lists. The user should reuse the existing menu bars, application toolbars, and key settings to ensure consistency. You can use the Menu Painter so that changes made in objects can reflect in statuses which use them.
The reserved function keys in the standard toolbar should be used according to the SAP standards to keep the program user-friendly.
INCLUDING EXISTING ELEMENTS
You can use the Menu Painter, working from the bottom upward, to include key settings and application toolbars or menu bars in a status. If there are multiple application toolbars for your key setting, you can choose the most relevant one.
All functions are inactive at the beginning of the program. You need to activate only those functions that are required in the current status. After creating a new function, you can also opt to change all statuses which refer to the same object.
PROCESSING THE FUNCTION CODE
When you call a function with type ‘ ‘ (space) using a button, menu entry or function key, the system inserts the required function code in the OK_CODE field of the screen. You must assign a name to this field for processing it in the PAI event. Additionally, you should enter this name in the element list in the Screen Painter and create a field in your ABAP program with the same name.
At the beginning of the PAI event, the function code passes from the screen to the corresponding field in the program as part of the automatic field transport. At this point, function code may lead to unexpected processing steps on the subsequent screen.