ARTICLE
Handling of messages at event PAI
If the statement FIELD in the event block on
PAI is linked with a MODULE
statement, then the statement controls the handling of
warnings and
error messages , which are send in the called module using the
statement MESSAGE .
Handling outside a processing chain
If FIELD is listed outside a processing chain that is introduced
with CHAIN , and if a warning or an error
message is sent in the dialog module specified after
MODULE , then the PAI processing
is interrupted and the screen is displayed
again without triggering the event PBO .
The input field belonging to dynp_field is the only field ready
for input on the current screen and can be overwritten by the user . If
the value in the input field is changed by the user, the PAI
processing is continued after an user action with the first FIELD
- or CHAIN -statement that is linked with the
dynpro field dynp_field . If the
value in the input field is not changed by the user, then the PAI
processing is continued again with the current FIELD statement.
Previous statements of the PAI event block are not processed
again.
Handling within a processing chain
If FIELD is listed within a processing chain, introduced by
CHAIN , and if a warning or an error message was
sent within a module that was called within the processing chain, then
the PAI processing is interrupted and the screen displayed again
without triggering the event PBO . All input fields of the dynpro
fields are ready for input, which are listed within the processing chain
after FIELD statements. If the value of at least on of these
input fields is changed by the user , then the PAI processing
continues after an user action at the first FIELD or CHAIN
statement that is linked with one of changed dynpro fields. If none of
the input fields is changed by the user, the PAI processing
continues again directly at the CHAIN statement of the current
processing chain. Previous statements of the PAI event block are
not processed again.
Note
If an error message occurs at user input, then the user must correct the
input values until no error message is sent, whereas after a warning,
the input values can be confirmed unchanged. The warning is not sent
again at the second execution of the MESSAGE
statement.
If warnings or error messages are sent in modules without reference to
FIELD or CHAIN , then the PAI processing is
interrupted and the screen is displayed again without triggering the
event PBO and without a field on the screen being ready for input
. In the event of an error message, the user must terminate the
processing. In order to do this, an according option must be created on
the user interface, otherwise the program can only be terminated from
outside.
User actions linked to function codes that set the
OK field also count as changes to
input fields. A prerequisite for this is that the OK field is
defined in the screen and that function codes are not read exclusively
by the system field sy-ucomm .
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved