CALL SUBSCREEN

Syntax

CALL SUBSCREEN sub_area [INCLUDING prog dynnr].

Variants:

1. CALL SUBSCREEN sub_area INCLUDING prog dynnr.

2. CALL SUBSCREEN sub_area.

Effect

Includes a subscreen into the dynpro flow logic. There is one variant for the event PBO and one variant for the event PAI. You must not use the CALL SUBSCREEN statement between the LOOP and ENDLOOP or the CHAIN and ENDCHAIN statements.

Variant 1

CALL SUBSCREEN sub_area INCLUDING prog dynnr.


Effect

PBO

This statement includes the subscreen dynpro of the program specified in prog and the screen specified in dynnr into the subscreen area sub_area of the current screen and processes its PBO flow logic at this point. After processing the PBO of the subscreen dynpro, the flow logic of the current screen continues after the CALL statement.

You must specify the sub_area directly. For prog, either a character-type data object of the current ABAP program or a text field literal is expected. For dynnr, a data object of type n and length 4 of the current ABAP program or a text field literal is expected. If the specified subscreen dynpro cannot be found, an untreatable exception is triggered.

If the program is specified as a literal containing "SAPLX...", it must have been delivered as a customer exit and the subscreen must have been activated using transaction CMOD. Otherwise, the statement is ignored. If no subscreen dynpro is included into a subscreen area at PBO, 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 mode and LOAD-OF-PROGRAM is triggered. 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. During the processing of a subscreen, the system field sy-dynnr contains its dynpro number.

In the dialog modules of the subscreen, the GUI status and the current next screen may not be changed; the statements SET { TITLEBAR | PF-STATUS } and { LEAVE | SET } SCREEN would trigger an untreatable exception.

Variant 2

CALL SUBSCREEN sub_area.


Effect

PAI

This statement calls the PAI flow logic of the subscreen dynpro included in the subscreen area sub_area. The subscreen dynpro must have been included at PBO into the subscreen area (see variant 1). For the dialog modules called by the PAI flow logic, the same applies as for those called at PBO. Data transport between the subscreen dynpro and its ABAP program happens at the call or is delayed during the execution of FIELD statements in the PAI flow logic of the subscreen dynpro, respectively.

Notes

Example

If on a screen a tabstrip control with untyped tab titles and a subscreen area named SUB is defined, the respective dynpro flow logic may look as follows. The CALL SUBSCREEN statement includes the subscreen dynpro of the same APAB program whose number is set in the ABAP data object dynnr into the subscreen area. SUB. You can find the corresponding ABAP program code in the example for CONTROLS.

PROCESS BEFORE OUTPUT.
  MODULE prepare_tabstrip.
  CALL SUBSCREEN sub INCLUDING sy-repid dynnr.
PROCESS AFTER INPUT.
  CALL SUBSCREEN sub.
  MODULE handle_user_command.