Google Search - Blog...........

ABAP - Check The Message Types E,I,W,A,S

REPORT ZTEST MESSAGE-ID ZMSD.


PARAMETERS:ERR_MSG RADIOBUTTON GROUP G1,
WARN_MSG RADIOBUTTON GROUP G1,
INFO_MSG RADIOBUTTON GROUP G1 ,
SYST_MSG RADIOBUTTON GROUP G1 ,
abrt_MSG RADIOBUTTON GROUP G1 .

DATA: V_TEST TYPE I VALUE '10'.

IF ERR_MSG = 'X'.
IF V_TEST NE 12.
MESSAGE E000 WITH 'data not matched'.
ENDIF.
ELSEIF WARN_MSG = 'X'.
IF V_TEST NE 12.
MESSAGE W000 WITH 'data not working'.
ENDIF.
ELSEIF INFO_MSG = 'X'.
IF V_TEST NE 12.
MESSAGE I000 WITH 'data not matched'.
ENDIF.
ELSEIF syst_msg = 'X'.
IF V_TEST NE 12.
MESSAGE S000 WITH 'data not matched'.
ENDIF.

ELSEIF abrt_msg = 'X'.
IF V_TEST NE 12.
MESSAGE a000 WITH 'data not matched'.
ENDIF.

ENDIF.

2 comments:

  1. Nice example of the messages...He has Explained in a disciplined way...

    But Onething Remember, which is not mentioned here...

    Create the Message class - ZMSID .only then it will work properly..

    ReplyDelete
  2. Nice example of the messages...He has Explained in a disciplined way...

    But Onething Remember, which is not mentioned here...

    Create the Message class - ZMSID .only then it will work properly..

    ReplyDelete