01-30-2008 4:41 PM
01-30-2008 4:43 PM
Hi Swetha,
There are 6 types of normal messages,
They are,
Sno ->Notation->TYPE->DESCRIPTION->DILOG BEHAVIOUR->MESSAGE APPEARS IN
1. i ->Info Message->Program continues after Interruption->Model Dilog Box
2. s->Set Message->Program continues without Interruption->Status bar of next screen
3. w->Warning->Context Dependent->Status bar or model dilog box
4. e->Error->Context Dependent->Status bar or model dilog box
5. a->Abort->Program Cancelled->Model dilog box
6. x->Exit->Runtime error MESSAGE_TYPE_X triggered->Short dump
You use the MESSAGE statement to send dialog messages to the users of your
program. When you do this, you must specify the three digit message number
and the message class.
Message number and message class clearly identify the message to be displayed.
You use the message type to specify where the message is to be displayed. You
can test the display behavior for using the different message types by means of the
DEMO_MESSAGES demo program that is shipped in the SAP standard.
If the specified message contains placeholders, you can supply them with values
from your program by using the WITH addition. Instead of the placeholders, the
transferred values then appear in the displayed message text.
For further information on the syntactical alternatives to the MESSAGE statement,
refer to the keyword documentation.
Let me explain how to define messages in your program.
Prefix of the message specifies the message type eg. E for error message.
Using & we can include a max. of 4 variables in message text.
message i001 with var1 var2.
Message-id can be specified at
1. program xxxx message-id yyy.
2. message e001(yyy).
Kindly reward if useful.
Regards,
Jose
01-30-2008 4:43 PM
Hi Swetha,
Messages on Screens :
This context includes all situations where a screen is being processed, that is, the program is reacting to user input. In ABAP programs, this means all PAI modules.
Message Processing
Type Display Processing
A Dialog box Program terminates, and control returns to last area menu
E Status bar PAI processing is terminated, and control returns to the current screen. All of the screen fields for which there is a FIELD or CHAIN statement are ready for input. The user must enter a new value. The system then restarts PAI processing for the screen using the new values. Error messages are not possible in POH or POV processing. Instead, a runtime error occurs.
I Dialog box Program continues processing after the MESSAGE statement
S Status bar of next screen Program continues processing after the MESSAGE statement
W Status bar Like type E, but the user can confirm the message by pressing ENTER without having to enter new values. The system then resumes PAI processing directly after the MESSAGE statement. Warning messages are not possible in POH or POV processing. Instead, a runtime error occurs.
X None Triggers a runtime error with short dump
For further information about processing error messages and warnings in the PAI event, refer to Input Checks in Dialog Modules.
See this link:
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaabc35c111d1829f0000e829fbfe/frameset.htm
Plzz reward if it is useful,
Mahi.
01-30-2008 4:43 PM
Hi Swetha,
There are 6 types of normal messages,
They are,
Sno ->Notation->TYPE->DESCRIPTION->DILOG BEHAVIOUR->MESSAGE APPEARS IN
1. i ->Info Message->Program continues after Interruption->Model Dilog Box
2. s->Set Message->Program continues without Interruption->Status bar of next screen
3. w->Warning->Context Dependent->Status bar or model dilog box
4. e->Error->Context Dependent->Status bar or model dilog box
5. a->Abort->Program Cancelled->Model dilog box
6. x->Exit->Runtime error MESSAGE_TYPE_X triggered->Short dump
You use the MESSAGE statement to send dialog messages to the users of your
program. When you do this, you must specify the three digit message number
and the message class.
Message number and message class clearly identify the message to be displayed.
You use the message type to specify where the message is to be displayed. You
can test the display behavior for using the different message types by means of the
DEMO_MESSAGES demo program that is shipped in the SAP standard.
If the specified message contains placeholders, you can supply them with values
from your program by using the WITH addition. Instead of the placeholders, the
transferred values then appear in the displayed message text.
For further information on the syntactical alternatives to the MESSAGE statement,
refer to the keyword documentation.
Let me explain how to define messages in your program.
Prefix of the message specifies the message type eg. E for error message.
Using & we can include a max. of 4 variables in message text.
message i001 with var1 var2.
Message-id can be specified at
1. program xxxx message-id yyy.
2. message e001(yyy).
Kindly reward if useful.
Regards,
Jose
01-30-2008 4:56 PM
I -- Information.
E -- for error
W -- for warning
A -- for Abort
X -- for termination( it will go to dump)
we can put msg types in many ways.
message 'write our own message' type 'I/E/W/A/X'.
message I001(msg_cls_name). in this message class we write some message for 001.
message <text-element> type 'I'.
message I001 with text-element