Show TOC

 The GUI StatusLocate this document in the navigation structure

Use

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.

Note

Before you can work with the OK_CODE field, you must assign a name to it in the Screen Painter. For more information, see Reading Function Codes .

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.
    Note

    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.

Additional Characteristics of GUI statuses

  • Different GUI statuses can refer to common components.
  • A program can have many GUI statuses and titles. These represent the different modes in which an application operates.
    Tip

    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.