Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  SAP GUI User Dialogs →  General Dynpros →  Statements in the Dynpro Flow Logic →  Subscreens, Tabstrips, and Splitter Controls 


Other versions: 7.31 | 7.40 | 7.54


CALL SUBSCREEN sub_area [INCLUDING prog dynnr]. 


1. CALL SUBSCREEN sub_area INCLUDING prog dynnr.

2. CALL SUBSCREEN sub_area.


Includes a subscreen in the dynpro flow logic. There is one variant for event PBO and one variant for event PAI. The statement CALL SUBSCREEN cannot be used between the statements LOOP and ENDLOOP or CHAIN and ENDCHAIN.


Variant 1

CALL SUBSCREEN sub_area INCLUDING prog dynnr.



This statement is used to include the subscreen dynpro of the program defined in prog and the dynpro number defined in dynnr in the subscreen area sub_area of the current dynpro, and to process its PBO flow logic at this point. After PBO processing of the subscreen dynpro, the flow logic of the current dynpro is continued after the CALL statement.

The area sub_area must be specified directly. prog expects either a two-character data object of the current ABAP program or a text field literal. dynnr expects a data object of the type n and length 4 from the current ABAP program or a text field literal. An exception that cannot be handled is raised if the specified subscreen dynpro cannot be found. If no subscreen dynpro is included for PBO in a subscreen area, the area remains empty.

If the specified subscreen dynpro is not defined in the current ABAP program, the specified program is loaded into the internal session and LOAD-OF-PROGRAM is raised. If the object is a function group, a new additional program group is created. If the object is an executable program or a module pool, the program is loaded to the program group of the current program.

The flow logic of the subscreen dynpro calls the dialog modules of its own ABAP program and the global fields of its own program are transported to the subscreen dynpro . When a subscreen is being processed, sy-dynnr contains the dynpro number of the subscreen.

The GUI status and the current next dynpro cannot be changed in the dialog modules of the subscreen, and the statements SET { TITLEBAR | PF-STATUS } and { LEAVE | SET } SCREEN raise an exception there that cannot be handled.

Variant 2




The statement calls the PAI flow logic of the subscreen dynpro bound in the sub_area subscreen area. The subscreen dynpro must be included in the subscreen area for PBO (see variant 1). The same applies to the dialog modules called by the PAI flow logic as to the modules called by PBO. The data transport between the subscreen dynpro and its ABAP program is performed at the call, or is delayed when FIELD statements are executed in the PAI flow logic of the subscreen logic.


  • If the use of subscreens means that the names of the displayed screen elements are not unique, multiple dynpro fields can be assigned to a global data object of the ABAP program, and, accordingly, multiple transports can be performed for PBO and PAI.
  • Since function codes from the subscreen dynpro are moved to the OK field of the including dynpro, it is advisable to give these function codes unique names.
  • Since the dynpro fields of subscreen dynpros are transported to the global data objects of the program in which the subscreen dynpros are defined, it must be ensured that the calling program is provided with this data when called externally. If reusable subscreen dynpros are to be defined, it is advisable to encapsulate them in function groups and to use function modules to enable the caller to set and use the global data.


If a tabstrip control with untyped tabstrips and a subscreen area called SUB is defined on a dynpro, the associated dynpro flow logic can appear as follows. The statement CALL SUBSCREEN includes the subscreen dynpro of the same ABAP program whose number is in the ABAP data object dynnr in the subscreen area SUB. The associated programming section of the ABAP program is in the example for CONTROLS.

  MODULE prepare_tabstrip.
  CALL SUBSCREEN sub INCLUDING sy-repid dynnr.
  MODULE handle_user_command.