Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Program Layout →  Modularization Statements →  Dialog Modules 

MODULE

Quick Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


MODULE mod {OUTPUT|[INPUT]}. 
  ...
ENDMODULE.

Addition

... OUTPUT|[INPUT]

Effect

The statement MODULE defines a dialog module mod. The naming conventions apply to the name mod. The functions of a dialog module mod are implemented between the statements MODULE ad ENDMODULE.

A dialog module is called using the MODULE statement with the same name of the dynpro flow logic of any ABAP program dynpro.

Addition

... OUTPUT|[INPUT]

Effect

The additions OUTPUT and INPUT determine whether the dialog module can be called for the PBO event or for the PAI event. The addition INPUT is the default and can therefore also be omitted, although this is not recommended for the readability of the program. Two dialog modules with the same name can be defined in a program, if one of them has the addition OUTPUT and the other has the addition INPUT. This is also not recommended for reasons of readability.


Note

For data encapsulation reasons, it is recommended that very few functions are implemented in dialog modules and that procedures are called instead.


Example

PAI module for a dynpro with the dynpro number 100. The PAI module calls an instance method of a dedicated object and does not implement any functions.

MODULE user_command_0100 INPUT.
  screen_handler->user_command( ).
ENDMODULE.