A message appears at runtime in a message window with two buttons "Proceed" and "?". The help text can be filled in with the message long text.

Select the message, for example by double clicking from the ABAP program. Choose "Long text" from the menu to fill in the error's explanation text. When message variables (MESSAGE 123 WITH var1 var2) are used to call a message, their values can be included in the message. Message is e.g. "Order & not activated by suborder &". The message long text at runtime could be: "Your order 00001253 has not been activated because suborder 00001256 has an error status". This is maintained in the long text of the message as: "Your order &v1& has not been activated because suborder &v2& ...". Check out the menu when you are maintaining a long text. Menu option Include => Link will bring you to a popup with the options of what can be "linked into" the message.

An example: you're program generates an error because some customizing table does not contain the expected values or conflicts with something. You would want the end user to change the contents of a table using a customizing transaction. Goto the Include => Link menu and choose a Link target type "Transaction link". Type in the transaction code and the text you want to be inserted into your message text. A text will be inserted in your message text. Whenever the end user clicks on it, the transaction is started. Function module HELPSCREEN_NA_CREATE shows the message including longtext in a popup, as if the end user pressed the question mark for a certain message

Example: Pick up the longtext of a message

This routine fetches the longtext of a message as raw text (note that READ_TEXTcannot be used for this purpose)

DATA: l_dokhl like dokhl. 

concatenate messageClass messageNumber into l_DOKHL-OBJECT.
l_DOKHL-id = 'NA'.
l_DOKHL-langu = sy-LANGU.
l_DOKHL-dokversion = 0001.
l_DOKHL-typ = 'E'.

CALL FUNCTION 'DOCU_READ'
  EXPORTING
    ID                      = l_DOKHL-id
    LANGU                   = l_DOKHL-langu
    OBJECT                  = l_DOKHL-OBJECT
    TYP                     = l_DOKHL-typ
    VERSION                 = l_DOKHL-dokversion
  TABLES
    LINE                    = i_lines.