02-28-2007 6:59 AM
how the messages in abap programming is created and where it is applicable during programming?
02-28-2007 7:02 AM
u can create msgs from SE91 transaction code.
in general we use msg types E (error) S (success) I (information)
message E111(ZMSG).
E denotes msg as error type and 111 is msg number and ZMSG is the msg class in which the msg 111 is stored.
Regards
Gopi
02-28-2007 7:03 AM
Hi,
Messages help you to provide meaningful messages to the end user.
There can be Error messages or information messages.
You can define the messages in a message class which you can create in transaction se91.
Best Regards
Vandana
reward points if this is helpful
02-28-2007 7:06 AM
hi,
se91 is the tcode for message class creation
types of messages -
s- status
e- error
i- information
w- warning
x- abend
in program you can write like this -
message e001(zmsg)
where ,
e means error message,similarly u can write i,w,s or x
001 is the message id
zmsg is the message class what u created in se91
regards,
pankaj singh
reward points if helpful
02-28-2007 7:09 AM
Hi,
Refer the Demo program this iwll help
DEMO_MESSAGES
1. MESSAGE xnnn.
2. MESSAGE ID id TYPE mtype NUMBER n.
3. MESSAGE xnnn(mid).
Effect
Sends a message. Messages are stored in table T100, and can be maintained using Transaction SE91. They are fully integrated in the forward navigation of the ABAP Workbench.
The ABAP runtime environment handles messages according to the message type specified in the MESSAGE statement and the context in which the message is sent. There are six kinds of message type:
A (Abend)
Termination
E (Error)
Error
I (Info)
Information
S (Status)
Status message
W (Warning)
Warning
X (Exit)
Termination with short dump
Messages are used primarily to handle user input on screens. The following table shows how each message type behaves in different contexts. The numbers are explained at the end of the table.
A E I S W X
-
PAI module 1 2 3 4 5 6
PAI module at POH 1 7 3 4 7 6
PAI module at POV 1 7 3 4 7 6
-
AT SELECTION-SCREEN ... 1 8 3 4 9 6
AT SELECTION-SCREEN at POH 1 7 3 4 7 6
AT SELECTION-SCREEN at POV 1 7 3 4 7 6
AT SELECTION-SCREEN ON EXIT 1 7 3 4 7 6
-
AT LINE-SELECTION 1 10 3 4 10 6
AT PFn 1 10 3 4 10 6
AT USER-COMMAND 1 10 3 4 10 6
-
INITIALIZATION 1 11 3 4 11 6
START-OF-SELECTION 1 11 3 4 11 6
GET 1 11 3 4 11 6
END-OF-SELECTION 1 11 3 4 11 6
-
TOP-OF-PAGE 1 11 3 4 11 6
END-OF-PAGE 1 11 3 4 11 6
TOP-OF-PAGE DURING ... 1 10 3 4 10 6
-
LOAD-OF-PROGRAM 1 1 4 4 4 6
-
PBO module 1 1 4 4 4 6
AT SELECTION-SCREEN OUTPUT 1 1 4 4 4 6
02-28-2007 7:46 AM
hi,
goto SE91 , then give message class name(ZTEMP) & create
in the "Messages" Tab, give ur message description(FOR example 000 : & & & & ).
save & come out.
In the program, based on ur requirement you can use I/S/E
(information/success/error) type.
ex:
MESSAGE I000(ZTEMP) WITH 'here you can '
'pass four different'
'strings'.
if you provide I : info
E : error
S : success
sri
pls:award points
03-01-2007 11:23 AM
Hi Srinivasa Moorthy,
SE91 is the Transaction Code for message class creation.
There type the message Id and relevant messages which u want to give during calling in the program.
Various Types of messages are:
S - Status
E - Error
I - Information
W - Warning
X - Abend
While Calling in the program you can call the message as follows :
MESSAGE I001(Z_MESSPRGNAME) (Inside any loop such as If .Endif)
where ,
I means information message, (In the same way u can write other types also)
001 is the message id
ZMESSPRGNAME is the name of the message class which u have created in SE91
Regards,
Reward points if helpful.
03-09-2007 9:33 AM
Messages are used for easy understandability of end-users.
Messages can be created in transaction SE91 and then used in our program using
syntax-
MESSAGE <msg type><msg no> <msg class> WITH <palceholder's value>.
<placeholder's value> is optional.It is required if you want to display some value in your message.
Reward points if my answer helped you.
Regards,
Neha Bansal.
03-13-2007 6:31 AM
Hi Srinivasa,
We Can Create Messages Through SE91 transcation.
Different Types of Messages are
Status(S)
Error(E)
Information(I)
Warning(W)
& Abend (A) messages
In SE91 Transcation (Message Maintenance) ..
we can create a new message or use already exiated once..
If message you want to give doesn't exit.
Create your own message class and then Give The Short test Message..
Messages are single texts, stored in table T100, that you can maintain in Transaction SE91 or by forward navigation in the ABAP Workbench. T100 has the following structure:
Language key
Twenty-character message class
Message number
Message text (up to 72 characters)
i.e 1. each message is associated with language key (Eng,German) --the language
in which you want the message to be.
2. message class name,
3. Text .given..
4. message number
The above one is associated with Type of message ..(S,E,I,W,A)
example 1.
REPORT DEMO_MESSAGES_SIMPLE MESSAGE-ID SABAPDOCU.
MESSAGE I014.
MESSAGE S015.
WRITE text-001.
REPORT REP_NAME
MESSAGE-ID <id>.
ex2.
MESSAGE <t><num>.
ex3.
MESSAGE ID <id> TYPE <t> NUMBER <n>.
ex4.
MESSAGE <t><nnn>(<id>).
where <t> -message type
<id> - MESSAGE CLASS NAME
<n>,<num> - number
or without using message class , we can give as
MESSAGE 'there is an error...', type '<t>'.
<t> - type of message..
we have a report program <b>DEMO_MESSAGES</b> ,which gives a clear idea of
how different types of messages behave in different events.
The system behavior after sending a message of a specific message type depends on the context. It is shown in the following table for dialog modules and event blocks.
Processing block Message type
-
A E I S W X
-
PAI module 1 2 3 4 5 6
PAI module for POH 1 7 3 4 7 6
PAImodule for POV 1 7 3 4 7 6
-
AT SELECTION-SCREEN for PAI 1 8 3 4 9 6
AT SELECTION-SCREENfor POH 1 7 3 4 7 6
AT SELECTION-SCREENfor POV 1 7 3 4 7 6
AT SELECTION-SCREEN ON EXIT 1 7 3 4 7 6
-
AT LINE-SELECTION 1 10 3 4 10 6
AT PF## 1 10 3 4 10 6
AT USER-COMMAND 1 10 3 4 10 6
-
INITIALIZATION 1 11 3 4 11 6
START-OF-SELECTION 1 11 3 4 11 6
GET 1 11 3 4 11 6
END-OF-SELECTION 1 11 3 4 11 6
-
TOP-OF-PAGE 1 11 3 4 11 6
END-OF-PAGE 1 11 3 4 11 6
TOP-OF-PAGE DURING ... 1 10 3 4 10 6
-
LOAD-OF-PROGRAM 1 1 4 4 4 6
-
PBO module 1 1 4 4 4 6
AT SELECTION-SCREEN OUTPUT 1 1 4 4 4 6
-
The numbers in the individual column contents of A, E, I, S, W, and X have the following meaning:
1.
The message is displayed in a dialog box. After exiting the dialog box, the program terminates, the system returns to the call position of the first program of the current call sequence and all internal sessions of the call sequence are deleted.
2.
The message is displayed in the status bar. PAI processing terminates and the system returns to the current screen without triggering the event PBO. By default, the message is displayed in the status bar of the current window. When sending the error message in a dialog module that is called in the dynpro flow logic outside a processing chain defined by CHAIN behind a FIELD statement, the only field that is ready for input is the input field specified behind FIELD. When sending the error message in a dialog module that is called inside a processing chain defined by CHAIN, all input fields in the processing chain that are specified behind FIELD are ready for input. After a user action, the PAI processing continues at the position described under Handling of Messages for Event PAI.
3.
The message is displayed in a dialog box. After exiting the dialog box, the program continues using the statement that follows MESSAGE.
4.
The program continues using the statement that follows MESSAGE. In thenext screen, the message is displayed in the status bar of the current window.
5.
The PAI processing is interrupted and the system returns to the current screen without triggering the event PBO. By default, the message is displayed in the status bar of the current window. The fields decribed under item 2 are ready for input. If the user confirms the current field contents using the Enter key without entering new values, the program continues with the statement that follows MESSAGE. If the user enters one or more new values, the processing continues after a user action as described under item 2.
6.
The program terminates with the runtime error MESSAGE_TYPE_X, and the system displays its short dump which contains the message-ID and the short and long text of the message.
7.
During the POH processing, the POV processing, and the handling of the a function code of the type "E", the sending of error messages or warnings is not allowed. An exception that cannot be handled is raised.
8.
The selection screen processing is interrupted and the system return to the current selection screen with triggering the event AT SELECTION-SCREEN OUTPUT. By default, the message is displayed in the status bar of the current window. The input fields of the selection screen that have been specified using the additions of the statement AT SELECTION-SCREEN of the current event block are ready for input. The selection screen processing continues after a user action using the current selection screen event. Previous selection screen events are not triggered.
9.
The selection screen processing is interrupted and the system returns to the current selection screen without triggering the event AT SELECTION-SCREEN OUTPUT. By default, the message is displayed in the status bar of the current window. The fields decribed under item 8 are ready for input. If the user confirms the current field contents using the Enter key without entering new values, the program continues with the statement that follows MESSAGE. If the user enters one or more new values, the processing continues after a user action as described under item 8.
10.
The event block of the current list event is interrupted and the display of the list level on which the list event was triggered remains. By default, the message is displayed in the status bar of the current window.
11.
The program is interrupted and an empty screen with an empty GUI status is displayed. By default, the message is displayed in the status bar of the current window. The system returns to the call position of the program after a user action
Hope This May Help You.
Reward Points if Useful , and Close The Thread
OK Bye,
Satish Akkina.
03-13-2007 7:01 AM
Hi Srinivasa Moorthy,
Check this matter, it may prove helpful to you.
You can open a repair and change the message in Message class 00.
This can be done in transaction SE91 - Message Maintenance.
SE91 is the transaction code for message class creation
types of messages -
s- status
e- error
i- information
w- warning
x- abend
in program you can write like this -
message I001(ZMSGCALSS)
where ,
I means Information message,
001 is the message id
ZMSGCLASS is the message class what u created in SE91
Messages allow you to communicate with the 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.
Each message class has an ID, and usually contains a whole set of message. Each message has a single line of text, and may contain placeholders for variables (e.g. & & & - three variables).
All messages are stored in table T100.
Once you have created a message, you can use it in the MESSAGE statement in a program.
Hope this will resolve your query.
Reward all the helpful answers.
Regards
03-14-2007 7:51 AM
Hi,
Messages are created using the transaction SE91 here u will create meesages and u dsfine the message classes
E for Error.
I for Info.
S for Status etc.
These are useful for any user regarding user interaction or user selection if u did some mistakes in selection or the range is huge or something else u can didplsy a message if a particular condition is not satisfied These r helpful to program user friendly.
Regards,
Ravi Kumar
03-15-2007 7:27 PM
Hi Srinivasa Moorthy,
Messages are of primary importance in smooth functioning of any report/program.
as suggested by other friends.. its of 3different types. transaction code is se91
suggest you reward all useful replies !
Thanks
Janani
award points if helpful
03-15-2007 7:51 PM
Hi,
I hope you have asked 2 questions ...
1) Messages will be created through SE91, the messages data will be stored in T100 table.
2) The main purpose of the messages is, passing information to user very quickly. Mostly used for - Selection screen validations, transactions, Idoc status..etc.
Thanks
Satya.
**reward points, if its useful**
03-16-2007 4:25 AM
Hi Srinivasa Moorthy,
Check this documentation.
You can open a repair and change the message in Message class 00.
This can be done in transaction SE91 - Message Maintenance.
SE91 is the transaction code for message class creation
types of messages -
s- status
e- error
i- information
w- warning
x- abend
In program you can write like this -
message I001(ZMSGCALSS)
where ,
I means Information message,
001 is the message id
ZMSGCLASS is the message class what u created in SE91
Messages allow you to communicate with the users from your programs. They show the information regarding the status of our program.
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.
Each message class has an ID, and usually contains a whole set of message. Each message has a single line of text, and may contain placeholders for variables (e.g. & & & - three variables).
All messages are stored in table T100.
Once you have created a message, you can use it in the MESSAGE statement in a program.
Hope this resolves your query.
Reward all the helpful answers.
Regards
03-16-2007 6:54 AM
Hi
SE91 is the tcode for message class creation
types of messages -
S- status
E- error
I- information
W- warning
A- abend
in program you can write like this -
message E001(zname)
where ,
E means error message,similarly u can write i,w,s or A
001 is the message id
zname is the message class what u created in se91
This is very use full when u enter wrong data in the field. If user entered wrong data in field then it will show message in down. For that you have to write code in abap programming.
Thanks
Sasmita