This is an easy which demonstrate the different types of messages that can be displayed in an ABAP program.

    Success message (S)
        A success message appears along the SAP Logon footer (in green) and processing is not stop.

    Error message (E)
        Error message appears along the SAP Logon footer (in red) and processing is stopped.

    Warning message (W)
        Warning message is similar to error message, however depending on the context, error message may appear or program terminated.

    Information message (I)
        An information message appears in a popup window, processing halt. When the user close the information message, processing resume.

    Abend /Termination Message message (A)
        A termination message will stop processing and an exit button will appears which will exit the session.

    Exit message (X)

REPORT zdemomessages.




************************************************************************
* SELECTION SCREEN                                                     *
************************************************************************
PARAMETERS:
  rb_msg01 RADIOBUTTON GROUP msg DEFAULT 'X',   " Success Message
  rb_msg02 RADIOBUTTON GROUP msg,               " Error Message
  rb_msg03 RADIOBUTTON GROUP msg,               " Warning Message
  rb_msg04 RADIOBUTTON GROUP msg,               " Information Message
  rb_msg05 RADIOBUTTON GROUP msg,               " Abend/Termination Message
  rb_msg06 RADIOBUTTON GROUP msg.               " Exit Message


************************************************************************
* SAMPLE CODE LOGIC FOR DEMONSTRACTION PURPOSES                        *
************************************************************************
START-OF-SELECTION.

  CASE 'X'.

*   Success Message.
*   A success message appears along the SAP Logon footer (in green)
*   and processing is not stop.
    WHEN rb_msg01.

        MESSAGE 'This is an example of a SUCCESS message.' TYPE 'S'.

*   Error Message.
*   Error message appears along the SAP Logon footer (in red) and
*   processing is stopped.
    WHEN rb_msg02.

      MESSAGE 'This is an example of an ERROR message.' TYPE 'E'.

*   Warning Message.
*   Warning message is similar to error message, however depending
*   on the context, error message may appear or program terminated.
    WHEN rb_msg03.

      MESSAGE 'This is an example of a WARNING message.' TYPE 'W'.

*   Information Message.
*   An information message appears in a popup window, processing halt.
*   When the user close the information message, processing resume.
    WHEN rb_msg04.

      MESSAGE 'This is an example of an INFORMATION message.' TYPE 'I'.

*   Abend/Termination Message.
*   A termination message will stop processing and an exit button will
*   appears which will exit the session.
    WHEN rb_msg05.

      MESSAGE 'This is an example of a TERMINATION message.' TYPE 'A'.

*   Exit Message.
*   An exit message will normally terminated the program. Usually, a
*   stack dump for the state of the system is raised (can be viewed in ST22).
    WHEN rb_msg06.

      MESSAGE 'This is an example of an EXIT message.' TYPE 'X'.

  ENDCASE.


Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP S/4 HANA Logistics Consultant
Contact : serkurumsal@yandex.com