Messages are usually used to tell the user what is going on. The following types of messages are available in ABAP.
A Termination The message appears in a dialog box, and the program terminates. When the user has confirmed the message, control returns to the next-highest area menu.
E Error Depending on the program context, an error dialog appears or the program terminates.
I Status The message appears in a dialog box. Once the user has confirmed the message, the program continues immediately after the MESSAGE statement.
S Error The program continues normally after the MESSAGE statement, and the message is displayed in the status bar of the next screen.
W Warning Depending on the program context, an error dialog appears or the program terminates.
X Exit No message is displayed, and the program terminates with a short dump. Program terminations with a short dump normally only occur when a runtime error occurs.
The syntax for issuing a message is as follows.
MESSAGE <message> TYPE <message type>.
We can issue a status message as follows. Status message will be displayed in the status bar. After the message is displayed the program continues after the MESSAGE statement.
MESSAGE 'This is a status message' TYPE 'S'.
Information message will be displayed in a dialog box. Once the user has confirmed the message, the program continues immediately after the MESSAGE statement.
MESSAGE 'This is an information message' TYPE 'I'.
Error message in report programs will be displayed in the status bar and when the user press enter, the program terminates.
MESSAGE 'This is an error message' TYPE 'E'.
Warning message behaves similar to error message in report programs.
Exit Message – No message is displayed, and the program terminates with a short dump. Short
dumps can be viewed in t-code ST22.
MESSAGE 'This produces short dump' TYPE 'X'.
Termination Message appears in a dialog box, and the program terminates. When the user has confirmed the message, control returns to the next-highest area menu.
MESSAGE 'This is termination message' TYPE 'A'.
Instead of hardcode the message text in the program we can maintain the message text in text symbols. In order to maintain text symbols use the menu path Goto->Text Elements->Text Symbols in ABAP editor.
In the text symbols screen we can maintain the messages with a 3 character identifier.
Then use the following message statement.
MESSAGE text-001 TYPE 'I'.
Aspiring to go ahead with SAP ABAP certification. Was looking for complete SAP ABAP questions and material to go ahead with C_TAW12_750 certification. I found your blog with very nice piece of information and go ahead to follow. I found other good websites too, that will too help me.!!! Later I am looking for online SAP ABAP Certification C_TAW12_750 practice questions and exam to boost my confident to crack ASQ certification exam at first attempt
ReplyDeleteThank you. sir, Really I like your post on sap hana server access hyderabad.
ReplyDeleteSAP ABAP training is provided in CHENNAI.
ReplyDeleteTHE CREATING EXPERTS is one of the leading trainer in SAP who provides real time training
http://thecreatingexperts.com/sap-abap-training-in-chennai/
contact 8122241286
Thank you. It is such a wonderful post. it has great information it is very useful topic on sap hana server access.
ReplyDeleteIt has Wonderful Information on sap server access for training.
ReplyDeleteThankyou for wonderful article. It has more Information in Your Website sap video tutorials.
ReplyDeleteThank you. It is such a wonderful post. it has great information it is very useful for sap hana video tutorials.
ReplyDeleteThankyou for Sharing Great Information. It is Very Helpful Information on sap hana video tutorials.
ReplyDeleteIt was so nice article.I was really satisified by seeing this article sap video training.
ReplyDeleteThank you. sir, Really I like your post on sap video training.
ReplyDeleteThankyou for Sharing Great Information. It is Very Helpful Information on sap training video.
ReplyDeleteThank you. It is such a wonderful post. it has great information it is very useful for sap training video.
ReplyDeleteThankyou for Sharing Great Information. It is Very Helpful Information on sap hana training videos.
ReplyDeleteThank you. sir, Really I like your post on sap video learning.
ReplyDelete