Showing posts with label ABAP User Dialogs. Show all posts
Showing posts with label ABAP User Dialogs. Show all posts

Wednesday, June 10, 2009

Processing Screen

There are two ways of calling a screen. You can either use a transaction code, or the CALL SCREEN statement in an ABAP program. When you call a screen, the PROCESS BEFORE OUTPUT event (PBO) is called, and the corresponding event block in the screen flow logic is processed. The screen itself is then displayed until the user triggers the PROCESS AFTER INPUT (PAI) event by choosing a function. In between, there may be field or input help processing. The corresponding event blocks in the flow logic are processed, if they exist. The main purpose of event blocks in the screen flow logic is to call dialog modules in the ABAP program and to provide the ABAP program with data.

User Actions on Screens

Calling ABAP Dialog Modules

Input Checks

Field Help, Input Help, and Dropdown Boxes

Modifying Screens Dynamically

Screens

Screens are the most general type of user dialog that you can use in ABAP programs. You do not define them in ABAP programs, but instead in the Screen Painter. A screen consists of the input/output mask and the flow logic. You can define screens for any program with type 1, M, or F.

The screens in a single ABAP program can be combined to form screen sequences. You can call single screens or screen sequences either using a transaction code from outside the ABAP program, or by using the CALL SCREEN statement in the corresponding ABAP program. When you call a screen or screen sequence, the screen flow logic takes control of the ABAP program execution. You can define screen sequences dynamically by setting the next screen attribute for a screen dynamically in the ABAP program.

A screen consists of the input/output mask and the flow logic. The screen flow logic is divided into the Process Before Output (PBO) event, which is processed before the screen is displayed, and the Process After Input (PAI) event, which is processed after a user action on the screen.

The following diagram shows the place of screens between the GUI status and the ABAP program:

This graphic is explained in the accompanying text

The screen flow logic calls dialog modules in the ABAP program, either to prepare the screen for display (PBO event) or to process the user's entries (PAI event). Screens are dynamic programs, and have their own data objects, called screen fields. These are linked to the input/output fields that appear on the screen itself. When the screen is displayed, and when it finishes processing, the system passes data between the screen fields and data objects in the ABAP program. Data is copied between identically-named fields.

Each screen has a GUI status, containing a menu bar, standard toolbar, and an application toolbar. Like screens, GUI statuses are independent components of the ABAP program. You create them in the ABAP Workbench using the Menu Painter. You assign GUI statuses to screens dynamically in your ABAP programs. Each screen is linked to the current GUI status by a special screen field into which the corresponding function code is placed whenever the user chooses a function. The screen passes the function code to the ABAP program just like any other screen field. You can then read it in the program.

ABAP User Dialogs

This graphic is explained in the accompanying text

This section describes the dialogs that you can use in ABAP to communicate with program users. It explains how to pass data between user dialogs and ABAP programs, how to define user dialogs within your programs, and how to process user input.

Currently, ABAP programs with type 1 (executable programs), M (module pools), and F (function groups) can contain their own user dialogs. In the future, it is planned to allow classes in ABAP Objects also to have screens.

Screens

Selection Screens

Lists

Switching Between Dialog Screens and List Display

Messages

Blog Archive