SENDMESSAGE (SME)
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
SENDMESSAGE (<Expression>[, [<2nd expression>][, <Destination>]])
Description
Sends a message to the form.
Diagram
Returned value type
None
Parameters
Parameter | Description | |
<Expression> | Expression that returns the alpha or numeric value to be used as (the first part of the) message text. | |
<2nd expression> | Expression that returns the alpha or numeric value to be used as the second part of the message text. | |
<Destination> | Expression to specify where the message has to be sent. The destination must be specified between quotes ('') and takes one of the following values. | |
|
'ALL' | To send the message to all end users. |
'ODT' | To display the message instantly in the Alerts/messages screen of the Control Center. Using this option, the message will not be sent to the user application (AMT Screens). | |
'<Stationname>' | To send the message only to the specified station. | |
When empty, the message will only display to the current user. |
Remarks
If the system item 'ERROR' has been set to true and a message has been sent, the display_main section of the form will not be performed.
Overview of some properties of sme, smex, exit, refresh and sme + error.
SME | SMEX | EXIT | REFRESH() | SME + ERROR | |
System item error | Not changed | Set to true | Not changed | Set to true | Already true |
Ends current routine | No | Yes | Yes | No | No |
Repaints screen | No | No | No | Yes | No |
Perform display main | Yes | No | Yes | No | No |
When a report is started by another report using the Job Object of the
Task Object, messages sent by this report will not be shown in AMT Screens unless the station property
of the Job Object is set to the station running AMT Screens
with the command: myjob.station := si-initiator |
Example
sendmessage ('Invalid account parameters
specified!')
sme ('ERROR:', str-errormsg)
sendmessage ('*** Out of Paper ***',, 'nb-123')
sme ('ERROR:', str-errormsg)
sendmessage ('*** Out of Paper ***',, 'nb-123')