Ansicht
Dokumentation

ABENDYNPRO_AT_EXIT_COMM_ABEXA - DYNPRO AT EXIT COMM ABEXA

ABENDYNPRO_AT_EXIT_COMM_ABEXA - DYNPRO AT EXIT COMM ABEXA

Addresses (Business Address Services)   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

- Unconditional Module Call

This example demonstrates how a dynpro can be exited without the automatic input checks.

Source Code

Execute

Description

The static next dynpro number of dynpro 100 is 100. The input fields have the dynpro fields input1 and input2 assigned to them. The input fields are marked in their attributes as required fields. The function codes of the pushbuttons are EXECUTE and CANCEL, in which CANCEL has the function type E. In GUI status STATUS_100, the symbols Back (F3) and Cancel (F12) are activated using the function codes BACK and CANCEL. Both have the function type E. The function key F8 remains assigned to the function code EXECUTE. EXECUTE does not have the function type E. The dynpro flow logic is as follows:

PROCESS BEFORE OUTPUT.
  MODULE init_screen_0100.
PROCESS AFTER INPUT.
  MODULE execute1.
  MODULE cancel AT EXIT-COMMAND.
  MODULE back AT EXIT-COMMAND.
  MODULE execute2.

Using information messages and status messages, the program demonstrates which modules are called after user actions and which data is transported.

  • When "Execute" is selected without input in the mandatory fields, the automatic input check demands that the mandatory fields are filled.
  • When "Execute" is selected with filled mandatory fields, all dynpro fields are transported and the modules execute1 and execute2 are called consecutively.
  • When "Cancel" is selected with or without input in the mandatory fields, the OK field is transported and the module cancel is called. The program is exited at this point.
  • When "Back" is selected with or without input in the mandatory fields, the OK field is transported and the module cancel is called. However, the program is not exited there, because the function code is BACK. Instead, the automatic field checks are performed. If the mandatory fields are filled, the modules execute1 and execute2 are called.

The back module is never called. Two module calls using AT EXIT-COMMAND are pointless in the dynpro flow logic. In the above example, the function code BACK is to be handled in module cancel as well. In this case, the position of the statement MODULE with AT EXIT-COMMAND is irrelevant.






BAL_S_LOG - Application Log: Log header data   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 3714 Date: 20240426 Time: 061758     sap01-206 ( 66 ms )