You are on page 1of 17

IBM Global Services

2005 IBM Corporation Issuing Messages | 6.06 March-2005


Issuing Messages
IBM Global Services
2005 IBM Corporation 2 March-2005 Issuing Messages | 6.06
Objectives
The participants will be able to:
Issue custom messages, using the MESSAGE statement.
Recognize the functionality and use of each type of message.
IBM Global Services
2005 IBM Corporation 3 March-2005 Issuing Messages | 6.06
Overview
Academy Awards
Year
Category
1910
PIC
Academy Awards
Year
Category
1910
PIC
Winner
No record exists
Notes
Enter
Academy Awards
Year
Category
1910
PIC
E: No record exists
X
Instead of informing the
user on the second
screen that a record
does not exist, we want
to issue a message on
the first screen.
IBM Global Services
2005 IBM Corporation 4 March-2005 Issuing Messages | 6.06
MESSAGE Statement
** MZA02TOP - Top Include **
PROGRAM SAPMZA02 MESSAGE-ID ZA.
TABLES YMOVIE.
** MZA02I01 - PAI Modules **
MODULE SELECT_LISTING INPUT.
* code to select record from YMOVIE
IF SY-SUBRC <> 0.
YMOVIE-WINNER = No record exists.
MESSAGE E001.
ENDIF.
ENDMODULE.
t = message type
nnn = message number
--------------------------------------
var1 = message variable 1
var2 = message variable 2
var3 = message variable 3
var4 = message variable 4
MESSAGE <tnnn> [WITH <var1> <var2> <var3> <var4>].
The MESSAGE statement is used to issue user messages
MESSAGE statement in PAI module of
first screen.
Message class (ID) must be
specified on PROGRAM
statement in Top Include.
IBM Global Services
2005 IBM Corporation 5 March-2005 Issuing Messages | 6.06
User Messages Table
T100
User Messages
Language (key)
Message ID (key)
Message # (key)
Message Text
Logon language
Message ID specified on
PROGRAM statement
Message # (nnn) specified in
MESSAGE statement
The MESSAGE statement accesses user messages stored in the ABAP
Dictionary table T100.
Actual message displayed to the
user with the MESSAGE statement.
IBM Global Services
2005 IBM Corporation 6 March-2005 Issuing Messages | 6.06
Message Types
S: success
I: information
A: abend
X: exit
W: warning
E: error
i
X
A particular message text can be any
one of six message types
The message type
determines where the
message is displayed and
what action the user can or
must take on the current
screen.
IBM Global Services
2005 IBM Corporation 7 March-2005 Issuing Messages | 6.06
Success Message
Academy Awards
Year
Category
1910
PIC
Winner
Notes
No record exists
Academy Awards
Year
Category
1910
PIC
MESSAGE S001.
PAI Module of 1st Screen
Enter
The SUCCESS message
is displayed at the
bottom of the next
screen; therefore, the
user cannot
make any changes to
the values on the
current screen.
IBM Global Services
2005 IBM Corporation 8 March-2005 Issuing Messages | 6.06
MESSAGE I001.
PAI Module of 1st Screen
Academy Awards
Year
Category
1910
PIC
Academy Awards
Year
Category
1910
PIC
i
i
No record exists
Enter
Information Message
The INFORMATION
message is displayed
on the current screen in
a dialog box. The user
cannot make any
changes to the values
on the current screen.
After clicking the
Enter key on the
dialog box, the user will
be taken to the
next screen.
IBM Global Services
2005 IBM Corporation 9 March-2005 Issuing Messages | 6.06
PAI Module of 1st Screen
Academy Awards
Year
Category
1910
PIC
Academy Awards
Year
Category
1910
PIC
No record exists
Enter
Abend Message
MESSAGE A001.
The ABEND message is
displayed on the current
screen in a dialog box.
The user cannot make
any changes to the
values on the current
screen. After clicking the
Enter key on the dialog
box, the transaction will
be terminated.
IBM Global Services
2005 IBM Corporation 10 March-2005 Issuing Messages | 6.06
Academy Awards
Year
Category
1910
PIC
W: No record exists
Warning Message
PAI Module of 1st Screen
Academy Awards
Year
Category
1910
PIC
Enter
MESSAGE W001.
The WARNING message is
displayed at the bottom of
the current screen. The
user can make changes to
the values on the current
screen, but does not have
to make any changes. After
clicking the Enter key on
the current screen, the
user will be taken to the
next screen.
IBM Global Services
2005 IBM Corporation 11 March-2005 Issuing Messages | 6.06
Error Message
PAI Module of 1st Screen
Academy Awards
Year
Category
1910
PIC
Academy Awards
Year
Category
1910
PIC
E: No record exists
Enter
MESSAGE E001.
The ERROR message is
displayed at the bottom of
the current screen. The
user must make changes
to the values on the current
screen. After clicking the
Enter key on the current
screen, the user will be
taken to the next screen
only if the appropriate
corrections were made.
IBM Global Services
2005 IBM Corporation 12 March-2005 Issuing Messages | 6.06
Problem !!!
Academy Awards
Year
Category
1910
PIC
W: No record exists
Academy Awards
Year
Category
1910
PIC
E: No record exists
When we issue a WARNING or ERROR message, the
system stops on the current screen to allow the user
to make corrections; however, these fields are not
open for input.
IBM Global Services
2005 IBM Corporation 13 March-2005 Issuing Messages | 6.06
Demonstration
Demonstrate the use of various types of messages.
IBM Global Services
2005 IBM Corporation 14 March-2005 Issuing Messages | 6.06
Practice
Demonstrate the use of various types of messages.

IBM Global Services
2005 IBM Corporation 15 March-2005 Issuing Messages | 6.06
Summary
The MESSAGE statement is used to issue user messages. The syntax of this
statement is: MESSAGE <tnnn> [WITH <var1> <var2> <var3> <var4>].
A particular message text can be any one of six message types: S-success, I-
information, A-abend, X-exit, W-warning, E-error.
The SUCCESS message is displayed at the bottom of the next screen; therefore,
the user cannot make any changes to the values on the current screen.
The INFORMATION message is displayed on the current screen in a dialog box.
The ABEND message is displayed on the current screen in a dialog box. After
clicking the Enter key on the dialog box, the transaction will be terminated.
IBM Global Services
2005 IBM Corporation 16 March-2005 Issuing Messages | 6.06
Summary (Contd.)
The EXIT message is identical to the ABEND message except that the
transaction is terminated with a short dump instead of seeing the message in a
dialog box.
The WARNING message is displayed at the bottom of the current screen.
The ERROR message is displayed at the bottom of the current screen. The user
must make changes to the values on the current screen.
IBM Global Services
2005 IBM Corporation 17 March-2005 Issuing Messages | 6.06
Questions
What are the different types of screen messages ?
What is the difference between the ABEND and the EXIT message ?
What is the difference between the SUCCESS and the INFORMATION
message?

You might also like