‎2007 Jun 15 6:03 PM
Dear gurus,
can anyone explain how messages are handled and created in ABAP and the parameters of a message like messageid,type,.......
thanks in advance.
‎2007 Jun 15 6:07 PM
‎2007 Jun 15 6:17 PM
Hi Ramu,
Follow this to use mesages inyour application.
1. GOTO SE91
2. CREATE MESSAGE CLASS <zmclass>.
3. select the messages option where you will get mesage numbers .
You may or may not provide the description of the messages here.
ACTIVATE THE MESSAGE CLASS .
nOW IN A PROGRAM .
1. report PROGRAM.
pROVIDE THE MESSAGECALSS NAME WITHIN REPORT STTEMENT.
REPORT Zreport message-id <msgcalss>.
Use message <msgtyp><msgnumber>.
msgtyp maybe ERROR---E
WARNING---W
INFORMATION----I
STATUS-----S
ABAORT/TERMINATE----X(NEVER USE THIS )
iF THE MESSAGE DESCRIPTION IS NOT PROVIDED THEN
Use message <msgtyp><msgnumber> WITH <text>.
for further notes ont his Press F1 on message statement .
Regards
Aneesh.
‎2007 Jun 15 7:01 PM
Hello Ramu,
Message are 5 types
1 A - Abort
2. I - Information message
3. E - Error message
4. S - Status message
5. W - Warning message
Depends on scenarion you use messages ,you can create message class in SE91 and each message class has 1000 messages
I - Information message - popup window will open and shows message
E- Error message - error message in status bar
W - Warning message - message on status bar
S - Suceess message - message on status bar
A - Abort - it will go out of the current screen and it will be at sap initial screen.
We use information message - to inform some message to user
E - Mainly for validation or should stop cursor there only
‎2007 Jun 15 11:11 PM
hi,
Messages allow you to communicate with users from your programs. They are mainly used when the user has made an invalid entry on a screen.
To send messages from a program, you must link it to a message class.
<b>All messages are stored in table T100. You create and edit them using Transaction SE91.</b>
You can display the messages for your program from the ABAP Editor by choosing <b>Goto----> Messages</b>. The Maintain Messages screen appears. By default, the system display the message class linked to the current program.
<b>You can also enter Transaction SE91.</b>
<b>To create a new message class from the ABAP Editor:</b>
1) Enter a message ID in the introductory statement to the program (like REPORT), or directly in a MESSAGE ID <id> statement. The name may be up to 20 characters long.
<b>REPORT <Name> MESSAGE-ID <messageclass>.</b>
2) Double-click the message ID.
If you specified a message ID that already exists, the system opens the Maintain Message dialog box. If this happens, you can simply enter another ID. If you entered a message ID that does not yet exist, a dialog box appears, in which you are asked whether you want to create a new message class.
3) Choose Yes.
The Maintain Message Class screen appears.
4) Enter a short text for the message class.
5) Choose Save.
You send messages using the ABAP statement MESSAGE. The statement specifies the message class, number, and type of the message.
The message class and number are used to identify the message in table T100. <b>The message type is one of A, E, I, S, W, or X,</b> and defines how the ABAP runtime should process the message.
Messages can either be displayed in modal dialog boxes, or in the status bar of the screen. How a message is processed depends on its type and on the context in which the MESSAGE statement occurs.
If the calling program does not handle the exception <exc> itself, the message is displayed, and the program continues processing in the manner appropriate to the message type and context. If the calling program handles the exception, the message is not displayed, but the exception is triggered. In this case, the message class,<b> message number, message type, and any values of placeholders are placed in the system fields SY-MSGID, SY-MSGNO, SY-MSGTY, and SY-MSGV1 to SY-MSGV4</b> in the calling program.
regards,
Ashokreddy.