Ansicht
Dokumentation

ABENDYNPRO_SUBSCREEN_ABEXA - DYNPRO SUBSCREEN ABEXA

ABENDYNPRO_SUBSCREEN_ABEXA - DYNPRO SUBSCREEN ABEXA

PERFORM Short Reference   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

- Subscreens

This example demonstrates how to include subscreens.

Source Code

Execute

Description

The static next dynpro number of dynpro 100 is 100. Four pushbuttons with function codes "SUB1" to "SUB4" and two identically sized subscreen areas area1 and area2 have been created. In the same ABAP program, four subscreen dynpros 110 to 140 are defined. The input/output field of all four subscreen dynpro has the name field. The function codes of the pushbuttons on the subscreen dynpros 110 and 130 are OK1 and OK2. The dynpro flow logic for dynpro 100 is as follows:

PROCESS BEFORE OUTPUT.
  MODULE status_100.
  CALL SUBSCREEN: area1 INCLUDING sy-repid number1,
                  area2 INCLUDING sy-repid number2.
PROCESS AFTER INPUT.
  MODULE cancel AT EXIT-COMMAND.
  MODULE save_ok.
  CALL SUBSCREEN: area1,
                  area2.
  MODULE user_command_100.

The dynpro flow logic of subscreen dynpros 110 and 130 is:

PROCESS BEFORE OUTPUT.
  MODULE fill_0110$|0130.
PROCESS AFTER INPUT.
  MODULE user_command_0110$|0130.

The dynpro flow logic of subscreen dynpros 120 and 140 is:

PROCESS BEFORE OUTPUT.
  MODULE fill_0120$|0150.
PROCESS AFTER INPUT.

When the program is executed, a screen appears on which subscreens 110 and 130 are displayed. The pushbuttons on the main dynpro allow the user to choose between two subscreen dynpros for each screen area. The pushbuttons on the subscreen dynpros 110 and 130 allow data to be passed to the subscreen dynpros 120 and 140.

Since all subscreen dynpros use the same field name field, the identically named ABAP field is transported more than once at each PBO and PAI of the main dynpro. For this reason, the values must be stored in the auxiliary fields field1 and field2 in the ABAP program.

The function code of the pushbuttons of the subscreen dynpros is different and regular handling in an ABAP field is enough. If the function codes had the same names, it would be necessary to use multiple helper fields here as well.






ABAP Short Reference   General Material Data  
This documentation is copyright by SAP AG.

Length: 2896 Date: 20240329 Time: 032501     sap01-206 ( 45 ms )