Purpose With Message you can display a special message in a separate popup screen from a GuiXT script or an InputScript
Example Message "Price change starting &[AEDAT]" Title="Please note new prices"
Format

Message "message text"

Message "message text" Title="Title"

The message "message text" which can be one or several lines long will be shown with title "Title".

If the message text starts with  "S: " or "E: " or "W: ", the message is shown as information or error message or warning message.

Options
-StatusLine The message  is displayed in the status line. An already existing SAP standard message is not shown in this case.

Example:

Message "E: Amount &V[amount] exceeds the limit of 50,000" -StatusLine

  • A title parameter is ignored in this case
-yesno The message popup is processed synchronously (modal dialog box).
The user is offered two answer options: Yes and No.

Example:

Message "Do you want to save" Title="Save Item" -yesno

if Q[ok]

// user clicked yes-button

   ...

else

// user clicked no-button

   ...

endif

-okcancel The message popup is processed synchronously (modal dialog box).
The user is offered two answer options: OK and Cancel.
 
-ok The message popup is processed synchronously (modal dialog box).
The user is offered an OK button.
 
id=
number=
type=
var1=
var2=
var3=
var1=
Instead of specifying the message text directly, you can refer to an SAP message text (SAP table T100) using id= and number=. The message is then read from the SAP system, using the user's logon language. With  type= you set the message type: "E" means error, "W" warning  and "S" success. In addition you can specify up to four message variables var1=, ..., var4= .

Example:

Message id="V1" number="302" var1="&V[aufnr]" type="E" -statusline

If the SAP system contains message relevant documentation, it is shown when the user clicks on the message line.  GuiXT does not yet support the variable replacement in the message documentation display.

Please observe: For this variant a valid RFC user is needed in GuiXT profile. The message text is read via the SAP function module BAPI_MESSAGE_GETDETAIL. The RFC user needs the authorization for function group BATG: Authorization S_RFC: RFC_TYPE=FUGR, RFC_NAME=BATG, ACTVT=16

Tips
 & Tricks
  • As always you can use variables in the message text and title
  • By inserting \n in your message you can create a carriage return in your message, by inserting \t you can create a tab
Components GuiXT