Show TOC

SAPAddMessageLocate this document in the navigation structure

With this API method, you can define messages and add them to the standard message dialog.

To call the method, use Application.Run and specify the following input parameters:

  • Message

    Enter the message text.

  • Severity

    You can enter one of the following severities: INFORMATION, WARNING, ERROR or CRITICAL. This parameter is optional. The default value is INFORMATION.

  • Details

    You can enter a long text with additional information to the message. This parameter is optional.

The system returns one of the following output parameters for each function execution:
  • 0 = execution failed.
  • 1 = execution successful.

Example

Dim lResult As Long

lResult= Application.Run("SAPAddMessage", "This is a new error message!", "ERROR")

The message 'This is a new error message' with severity Error is displayed in the message dialog.