CANCEL DIALOG instruction

The CANCEL DIALOG statement terminates a procedural DIALOG block, after executing the AFTER INPUT/DISPLAY/CONSTRUCT control block of the current sub-dialog, and the AFTER DIALOG control block.

Note: When used in a declarative DIALOG block, the CANCEL DIALOG instruction does only make sense when the declarative dialog block is included in a procedural dialog block with the SUBDIALOG clause.

The CANCEL DIALOG instruction can be used from multiple dialogs to mimic the cancel default action of single dialogs.

The CANCEL DIALOG instruction makes the following:
  1. Set the INT_FLAG register to TRUE.
  2. If defined, execute the code in the AFTER INPUT, AFTER DISPLAY or AFTER CONSTRUCT block of the current sub-dialog.
  3. If defined, execute the code in the AFTER DIALOG block.

The statements appearing after the CANCEL DIALOG instruction will be skipped.

You typically code an CANCEL DIALOG in an ON ACTION cancel block:
ON ACTION cancel CANCEL DIALOG
Note: The default settings regarding action attributes for the cancel action define the validate attribute to "no", in order to avoid current field validation for this action. This is important when using the UNBUFFERED mode. For more details, see Actions configuration for field validation.