chapter 06_issuing messages
TRANSCRIPT
-
8/12/2019 Chapter 06_Issuing Messages
1/17
IBM Global Services
2005 IBM CorporationIssuing Messages | 6.06 March-2005
Issuing Messages
-
8/12/2019 Chapter 06_Issuing Messages
2/17
IBM Global Services
2005 IBM Corporation2 March-2005Issuing 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.
-
8/12/2019 Chapter 06_Issuing Messages
3/17
IBM Global Services
2005 IBM Corporation3 March-2005Issuing 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
XInstead of informing the
user on the second
screen that a recorddoes not exist, we wantto issue a message on
the first screen.
-
8/12/2019 Chapter 06_Issuing Messages
4/17
IBM Global Services
2005 IBM Corporation4 March-2005Issuing 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 [WITH ]. The MESSAGE statement is used to issue user messages
MESSAGE statement in PAI module offirst screen.
Message class (ID) must bespecified on PROGRAM
statement in Top Include.
-
8/12/2019 Chapter 06_Issuing Messages
5/17
IBM Global Services
2005 IBM Corporation5 March-2005Issuing Messages | 6.06
User Messages Table
T100User Messages
Language (key)
Message ID (key)
Message # (key)
Message Text
Logon language
Message ID specified onPROGRAM statement
Message # (nnn) specified inMESSAGE statement
The MESSAGE statement accesses user messages stored in the ABAPDictionary table T100.
Actual message displayed to theuser with the MESSAGE statement.
-
8/12/2019 Chapter 06_Issuing Messages
6/17
-
8/12/2019 Chapter 06_Issuing Messages
7/17
IBM Global Services
2005 IBM Corporation7 March-2005Issuing 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 messageis displayed at thebottom of the next
screen; therefore, theuser cannot
make any changes to
the values on thecurrent screen.
-
8/12/2019 Chapter 06_Issuing Messages
8/17
IBM Global Services
2005 IBM Corporation8 March-2005Issuing Messages | 6.06
MESSAGE I001.
PAI Module of 1st ScreenAcademy Awards
Year
Category
1910
PIC
Academy Awards
Year
Category
1910
PIC
i
i No record exists
Enter
Information Message
The INFORMATIONmessage is displayed
on the current screen ina dialog box. The user
cannot make anychanges to the valueson the current screen.
After clicking theEnter key on the
dialog box, the user willbe taken to the
next screen.
-
8/12/2019 Chapter 06_Issuing Messages
9/17
IBM Global Services
2005 IBM Corporation9 March-2005Issuing Messages | 6.06
PAI Module of 1st ScreenAcademy Awards
Year
Category
1910
PIC
Academy Awards
Year
Category
1910
PIC
No record exists
Enter
Abend Message
MESSAGE A001.
The ABEND message isdisplayed on the currentscreen in a dialog box.The user cannot make
any changes to thevalues on the current
screen. After clicking theEnter key on the dialogbox, the transaction will
be terminated.
-
8/12/2019 Chapter 06_Issuing Messages
10/17
IBM Global Services
2005 IBM Corporation10 March-2005Issuing Messages | 6.06
Academy Awards
Year
Category
1910
PIC
W: No record exists
Warning Message
PAI Module of 1st ScreenAcademy Awards
Year
Category
1910
PIC
Enter MESSAGE W001.
The WARNING message isdisplayed at the bottom of
the current screen. Theuser can make changes tothe values on the currentscreen, but does not have
to make any changes. Afterclicking the Enter key on
the current screen, theuser will be taken to the
next screen.
-
8/12/2019 Chapter 06_Issuing Messages
11/17
IBM Global Services
2005 IBM Corporation11 March-2005Issuing Messages | 6.06
Error Message
PAI Module of 1st ScreenAcademy Awards
Year
Category
1910
PIC
Academy Awards
Year
Category
1910
PIC
E: No record exists
EnterMESSAGE E001.
The ERROR message isdisplayed at the bottom of
the current screen. Theuser must make changes
to the values on the currentscreen. After clicking the
Enter key on the currentscreen, the user will betaken to the next screen
only if the appropriatecorrections were made.
-
8/12/2019 Chapter 06_Issuing Messages
12/17
IBM Global Services
2005 IBM Corporation12 March-2005Issuing 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, thesystem stops on the current screen to allow the user
to make corrections; however, these fields are notopen for input.
-
8/12/2019 Chapter 06_Issuing Messages
13/17
IBM Global Services
2005 IBM Corporation13 March-2005Issuing Messages | 6.06
Demonstration
Demonstrate the use of various types of messages.
-
8/12/2019 Chapter 06_Issuing Messages
14/17
IBM Global Services
2005 IBM Corporation14 March-2005Issuing Messages | 6.06
Practice
Demonstrate the use of various types of messages.
-
8/12/2019 Chapter 06_Issuing Messages
15/17
IBM Global Services
2005 IBM Corporation15 March-2005Issuing Messages | 6.06
Summary
The MESSAGE statement is used to issue user messages. The syntax of thisstatement is: MESSAGE [WITH ].
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. Afterclicking the Enter key on the dialog box, the transaction will be terminated.
-
8/12/2019 Chapter 06_Issuing Messages
16/17
IBM Global Services
2005 IBM Corporation16 March-2005Issuing Messages | 6.06
Summary (Contd.)
The EXIT message is identical to the ABEND message except that thetransaction is terminated with a short dump instead of seeing the message in adialog 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.
-
8/12/2019 Chapter 06_Issuing Messages
17/17
IBM Global Services
2005 IBM Corporation17 March-2005Issuing 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 INFORMATIONmessage?