What Does Message Class Mean?
A message class is a SAP entity used to hold different single text messages that are used, as needed, to communicate information, warnings or errors to users in different SAP objects (like programs, function modules, exits and enhancements) throughout the SAP system.
SAP provides different message classes which may be used across different modules. Messages found in a message class are identified with unique message numbers. Message classes provide SAP developers with the flexibility of reusing messages found in different message classes, which, in turn, helps prevent the hard coding of different information, errors or warnings, as required by the applications.
Techopedia Explains Message Class
Developers may reuse existing message class messages in their custom applications. SAP also provides the flexibility to create custom message classes and messages. The most used message areas are in error handling techniques, like validation of data provided in screens.
Messages, general screens and selection screens provide an easy way of communicating with users. They are mostly used for error handling during the processing of dialog based screens.
The syntax of a writing message is as follows:
MESSAGE <MESSAGE TYPE> <MESSAGE NUMBER> (<MESSAGE CLASS>).
The following types of messages are available in SAP:
- A: Used in the termination process
- E: Used to display an error dialog based on program context
- I: Used to display status information
- S: Special type of error message that allows display of a message in the subsequent screen’s status bar and process continuation, unlike message type E
- W: A warning message is prompted based on the program context.
- X: Used in exit processes, no message is displayed, but the program terminates with short dump. Normally used in runtime errors.
Using transaction SE91, message classes or messages may be created or modified. In turn, all messages are stored in SAP database table T100.