ABAP Keyword Documentation → ABAP - Reference → User Dialogs → Screens → Statements in the Screen Flow Logic → Subscreens, Tabstrips, and Splitter Controls
CALL SUBSCREEN
Other versions: 7.31 | 7.40 | 7.54
Syntax
CALL SUBSCREEN sub_area [INCLUDING prog dynnr.].
Variants
1. CALL SUBSCREEN sub_area INCLUDING prog dynnr..
2. CALL SUBSCREEN sub_area.
Effect
Binds a subscreen into the
screen flow logic. There is a variant for the event
PBO and a variant for the event
PAI. The statement CALL
SUBSCREEN cannot be used between the statements LOOP
and ENDLOOP
or CHAIN
and ENDCHAIN
.
Notes
The statement CALL SUBSCREEN
is required both for
direct binding of subscreens as well as for binding through
Tabstrip or Splitter Controls.
-
An obsolete variant of this statement is
CALL CUSTOMER SUBSCREEN
.
Variant 1
CALL SUBSCREEN sub_area INCLUDING prog dynnr.
Effect
PBO
With this statement, the subscreen
dynpro of the program specified in prog
and the dynpro number specified in dynnr
in the subscreen
area sub_area
of the current dynpro is bound and itsPBOflow logic processed at this point. After the PBOprocessing
of the subscreen dynpro, the flow logic of the current dynpro is processed after the CALL
statement.
The area sub_area
must be specified 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 the type n
of length
4 of the current ABAP program or a text field literal is expected. If the specified subscreen dynpro
is not found, an untreatable exception is triggerred. If in a subscreen area for PBO no subscreen dynpro is bound, the area remains empty.
If the specified subscreen dynpro is not defined in the current ABAP program, the specified program
is loaded into internal mode, whereby LOAD-OF-PROGRAM
is triggerred. If this is a
function group, a new
additional program group is formed. In the case of
executable programs and
module pools, the program is loaded into 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. During the processing of a subscreen,
the system fieldsy-dynnr
contains the dynpro number of the subscreen when the latter is being processed.
In the dialog modules of the subscreen, the GUI status and the current subsequent dynpro must not be changed, and the statementsSET { TITLEBAR | PF-STATUS
} and { LEAVE | SET } SCREEN
there cause an untreatable exception.
Variant 2
CALL SUBSCREEN sub_area.
Effect
PAI
With this statement, the PAI flow logic of the subscreen dynpro bound into the subscreen areasub_area
is called
. The subscreen dynpro
must have been already bound forPBO into the subscreen area (see variant 1). For the dialog modules
called by the PAI, the same applies as for the PBO ones. The data transport between the subscreen dynpro
and its ABAP program takes place at the moment of the call, or is delayed during the execution of
FIELD
statements in the PAI flow logic of the subscreen dynpro.
Notes
- If, due to using subscreens, the names of the screen elements displayed on a screen are not unique, several screen fields can be assigned to one global data object of the ABAP program and, therefore, several data transports can take place for it at PBO und PAI.
- Since the function codes of subscreen dynpros are placed into theOK field of the bound dynpro, we recommend that you give these function codes unique names.
-
Since the screen fields of subscreen dynpros are transported into those global data objects of the program
where the subscreen dynpros are defined, for external calls you must make sure that this data is transported
to the calling program. If you want to define subscreen dynpros to be reusable, you should encapsulate them in function groups and use function modules for setting the global data and for transporting it to the caller.
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. With the statement CALL SUBSCREEN
the subscreen dynpro of the same ABAP program. whose number is contained in the ABAP data object
dynnr , is bound into the subscreen area SUB . The correspondng programming of the ABAP program
can be found 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.