General Dynpros

Use

Dynpro (sometimes also known as a screen) is an abbreviation for "dynamic program". A dynpro is a repository object and is always a component of an ABAP program.

General dynpros are created using the Screen Painter tool in ABAP Workbench. Special dynpros are generated from ABAP statements.

Dynpros consist of the actual screen and the associated dynpro flow logic. Dynpros can be defined for every executable program, every module pool, and every function group.

The dynpros in a single ABAP program can be combined to form dynpro sequences. Individual dynpros or dynpro sequences can be called either using a transaction code from outside the ABAP program or by using the statement CALL SCREEN in the associated ABAP program. Once a dynpro or dynpro sequence is called, control of the execution of the ABAP program is passed to the flow logic of the dynpro. Dynpro sequences can be defined dynamically by setting the next dynpro attribute for a dynpro dynamically in the ABAP program.

Dynpros consist of the actual screen and the related screen 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 position of dynpros between the GUI status and the ABAP program:

The dynpro flow logic calls dialog modules in the ABAP program, either to prepare the screens for display (PBO event) or to process the user's entries (PAI event). Dynpros are dynamic programs and have their own data objects, called dynpro fields. These are associated with the input/output fields that appear on the screen itself. When the screen is displayed and exited, data is passed between dynpros and ABAP programs on the basis of the matching names of dynpro fields and data objects in the ABAP program.

Each screen has a GUI status, containing a menu bar, standard toolbar, and an application toolbar. Like dynpros, GUI statuses are independent components of the ABAP program. They are created in the Menu Painter tool in ABAP Workbench. GUI statuses are assigned to dynpros dynamically in ABAP programs. Each dynpro is associated with the current GUI status using a special dynpro field to which the corresponding function code is passed whenever user actions are performed on the GUI status. The dynpro passes the function code to the ABAP program, where it can then be evaluated, just like any other dynpro field.

Dynpro Elements

Processing Dynpros

Complex Screen Elements