Message class had been created using transaction SE91. To display a message repeatedly we will need to type the entire message again and again. To avoid this, we create a message class. in which a particular message is given the number. Now whenever we need to display that particular message we can call the message class and the message is displayed.
IF TOTAL GT 100.
MESSAGE I003(ZMSG_EAS).
MESSAGE I004(ZMSG_EAS).
INSERT ZPROJECT_DETAILS FROM TEMP_DETAILS.
MESSAGE I005(ZMSG_EAS).
message class created
Example code to show the use of message class:
ELSEIF USER_ID EQ
TEMP_ID AND PASSWORD EQ
' '.
MESSAGE I000(ZMSG_EAS).
ELSEIF USER_ID EQ TEMP_ID AND NOT PASSWORD EQ TEMP_PASS.
CLEAR PASSWORD.
MESSAGE I001(ZMSG_EAS).
ELSE.
CLEAR: USER_ID , PASSWORD.
MESSAGE I002(ZMSG_EAS).
CLEAR : TEMP_ID , TEMP_PASS.
MESSAGE I000(ZMSG_EAS).
ELSEIF USER_ID EQ TEMP_ID AND NOT PASSWORD EQ TEMP_PASS.
CLEAR PASSWORD.
MESSAGE I001(ZMSG_EAS).
ELSE.
CLEAR: USER_ID , PASSWORD.
MESSAGE I002(ZMSG_EAS).
CLEAR : TEMP_ID , TEMP_PASS.
IF TOTAL GT 100.
MESSAGE I003(ZMSG_EAS).
MESSAGE I004(ZMSG_EAS).
INSERT ZPROJECT_DETAILS FROM TEMP_DETAILS.
MESSAGE I005(ZMSG_EAS).