
MESSAGE
Use
MESSAGE ( <command interface> )
The MESSAGE command starts a MESSAGE…ENDMESSAGE block. All messages created by SAPGUI commands within the block are collected. At the end of the block, the messages are available in the command interface of the ENDMESSAGE command.
The command interface of the ENDMESSAGE command also contains the target system in which each message occurred. The command causing the message is noted in the log.
MESSAGE ( <message command interface> ).
SAPGUI ( <command interface 1> ).
…
SAPGUI ( <command interface n> ).
ENDMESSAGE ( <endmessage command interface> ).
MESSAGE Command Interface
In the command interface, you can define rules that specify how the test script should proceed after a message occurs. Each rule has the following fields:
|
Field |
Description |
|
MODE |
Message handling mode. |
|
EXIT |
If the EXIT field is initial, execution continues with the next eCATT command. If the EXIT field has the value X, execution skips to the ENDMESSAGE command. |
|
MSGTYP |
Message type. |
|
MSGID |
Message ID. |
|
MGSNR |
Message number. |
|
MSGV1 |
First variable part of a message. |
|
MSGV2 |
Second variable part of a message. |
|
MSGV3 |
Third variable part of a message. |
|
MSGV4 |
Fourth variable part of a message. |
A rule identifies a message by means of fields MSGTYP, MSGID, and MGSNR. You can specify values for any or none of these fields. For example, if MSGTYP is ‘A’, and MSGID and MGSNR are not specified, all messages of type ‘A’ are dealt with by that rule. If all the fields are empty, all messages will be dealt with according to that rule.
You can assign parameters to the MSGV fields. Each time a rule is satisfied by a message, these fields are overwritten.
The mode of a rule specifies whether the relevant eCATT command is marked as having an error.
|
Mode |
Description |
|
F |
Failure . The relevant command is marked as having an error. |
|
A |
Allowed . The relevant command is marked as not having an error. |
|
E |
Expected . By ENDMESSAGE, at least one expected message must have been collected by at least one rule. If not, ENDMESSAGE is marked as having an error. |
|
R |
Required . By ENDMESSAGE, every rule with this mode must have registered at least one message. If not, ENDMESSAGE is marked as having an error. |
Standard rules that require no specification in the command interface are:
|
MODE |
EXIT |
MSGTYP |
|
A |
S |
|
|
A |
I |
|
|
A |
W |
|
|
F |
C |
|
|
F |
X |
A |
|
F |
X |
E |
|
F |
X |
X |
Rules are evaluated in the order in which they are defined in the command interface. The standard rules are evaluated after those in the command interface.
When a message occurs, the rules are evaluated one after the other. If a message matches the selection criteria of a rule, the message is not checked against any remaining rules.