AFTER DIALOG block
Syntax
AFTER DIALOG
instruction [...]
Usage
The AFTER DIALOG
block is executed one time as the last trigger when the
DIALOG
instruction terminates, when performing an ACCEPT DIALOG
instruction. Dialog finalization code can be implemented in this block.
The dialog terminates when an ACCEPT DIALOG
or EXIT DIALOG
control instruction is executed. However, the AFTER DIALOG
block is not
executed if an EXIT DIALOG
is performed.
If you execute one of the following control instructions in an AFTER DIALOG
block, the dialog will not terminate and it will give control back to the user:
NEXT FIELD
NEXT OPTION
CONTINUE DIALOG
In the next example, the AFTER DIALOG
block checks whether a field value is
correct and gives control back to the dialog if the value is wrong:
ON ACTION accept
ACCEPT DIALOG
...
AFTER DIALOG
IF NOT cust_is_valid_status(p_cust.cust_status) THEN
ERROR "Customer state is not valid"
NEXT FIELD cust_status
END IF