Ansicht
Dokumentation

ABENDYNPRO_ON_COND_ABEXA - DYNPRO ON COND ABEXA

ABENDYNPRO_ON_COND_ABEXA - DYNPRO ON COND ABEXA

General Data in Customer Master   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

- Conditional Module Call

This example demonstrates how to call modules on the basis of conditions.

Source Code

Execute

Description

The static next dynpro number of dynpro 100 is 100. The input fields are assigned the dynpro fields input1, input2, and input3. The function code of the pushbutton is EXECUTE. In the GUI status STATUS_100, the symbol Cancel (F12) is activated by the function code CANCEL with the function type E. Also, the F2 function key is assigned the CS function code with the function type S, and the F8 function key is assigned the EXECUTE function code without a special function type. The dynpro flow logic is as follows:

PROCESS BEFORE OUTPUT.
  MODULE init_screen_100.
PROCESS AFTER INPUT.
  MODULE cancel AT EXIT-COMMAND.
  CHAIN.
    FIELD: input1, input2.
    MODULE module_1 ON CHAIN-INPUT.
    FIELD  input3 MODULE module_* ON *-INPUT.
    MODULE module_2 ON CHAIN-REQUEST.
  ENDCHAIN.
  FIELD input1 MODULE c1 AT CURSOR-SELECTION.
  CHAIN.
    FIELD: input2, input3.
    MODULE c2 AT CURSOR-SELECTION.
  ENDCHAIN.
  MODULE cursor AT CURSOR-SELECTION.

The program uses information messages to show which modules are called following user interaction and which data is transported.

  • Whenever one of the input fields 1 or 2 is not initial, the system calls the module module_1 for any user interaction.
  • Whenever one of the three input fields is changed, the system calls the module module_2 for any user interaction.
  • If the * entry was made in input field 3, each user action calls the module module_*.
  • If the F2 function is chosen or if a text field of the dynpro is double-clicked, the module cursor is called.
  • If the F2 function is chosen or if the input field 1 is double-clicked, the module c1 is called.
  • If the F2 function is chosen or if input field 2 or 3 is double-clicked, the module cursor is called. The module c2 is never called, since the statement MODULE ... AT CURSOR SELECTION occurs twice, and only the latter instance is processed.





RFUMSV00 - Advance Return for Tax on Sales/Purchases   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 3417 Date: 20240427 Time: 022413     sap01-206 ( 62 ms )