Message SAP /LIME/CORE081 - RAISE EXCEPTION with incorrect message type in &1 include &2 line &3

Diagnosis
A RAISE EXCEPTION was triggered but the message type is neither 'A'(termination) or 'E' (error).

Procedure for System Administration
In program &1 include &2 line &3, change the RAISE EXCEPTION statement.You have three options:

  • You want to work without a message, only using the TEXTID of the
  • exception class. In the RAISE EXCEPTION, do not transfer any parametersexcept (optional) TEXTID. The system interprets the exception as anerror message.
    • You want to issue an error message. In this case, transfer parameter
    • M_MSGTY = 'E' for the RAISE EXCEPTION.
      • You want to issue a warning. In this case, RAISE EXCEPTION is the wrong
      • statement. Use the following statement:
        DATA: l_refo_badi TYPE REF TO /LIME/CX_BADI,
        l_message TYPE bapiret2-message.
        * Replace xxx by message number and yy by message id
        MESSAGE Wxxx(yy) INTO l_message.
        CREATE OBJECT l_refo_badi
        EXPORTING m_msgty = sy-msgty
        m_msgno = sy-msgno
        m_msgid = sy-msgid
        * m_v1 = sy-msgv1
        m_msgtx = l_message.