2004 Nov 05 3:37 PM
Class Based Exception Handling involves raising exception (RAISE EXCEPTION TYPE), catching it (CATCH within TRY/ENTRY block) and maybe execute GET_TEXT method to get the text for that exception.
Allowing exception texts be stored as part of exception classes, does that mean that SAP is moving away from using SAP Message Class (transaction SE91 messages) and relying now onwards upon storing texts in respective Exception Clases?
My understanding is that SE91 holds not only the texts for exceptions (or hard errors) but also informational and warning messages, and hence if program condition has to display an informational or warning message, there is not need to create an Exception Class for such a condition (and then get the TEXT for that informational message from that Exception Class). Right?
Pls explain. Thanks much.
Class Based Exception Handling involves raising exception (RAISE EXCEPTION TYPE), catching it (CATCH within TRY/ENTRY block) and maybe execute GET_TEXT method to get the text for that exception.
Allowing exception texts be stored as part of exception classes, does that mean that SAP is moving away from using SAP Message Class (transaction SE91 messages) and relying now onwards upon storing texts in respective Exception Clases?
My understanding is that SE91 holds not only the texts for exceptions (or hard errors) but also informational and warning messages, and hence if program condition has to display an informational or warning message, there is not need to create an Exception Class for such a condition (and then get the TEXT for that informational message from that Exception Class). Right?
Pls explain. Thanks much.
2004 Nov 09 4:44 PM
Hi Chetan,
Sap is not moving away from T100-based (SE91) messages at all.
In fact you do not store exceptions texts in exception classes but in the OTR (Online Text Repository) and still in T100. If an exception class implements the interface IF_T100_MESSAGE (as of Release 6.40), you can use the statement
MESSAGE excref TYPE ...
to display the message after
CATCH INTO excref.
It is recommended to use T100-messages for texts send to the user via MESSAGE and OTR-texts for texts not sent to the user but used internally, e.g. for writing into logs.
Regards
Horst
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |