Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CREATION OF MESSAGE

HI

THIS IS RAVINDER

PLEASE HELP ME HOW TO CREATE MESSAGES.

THANK YOU

Tags:
Former Member
Former Member replied

Hi,

1 Goto Transaction code se91.

Give Message class name  creat message, 
2 Messages are defined in table T100.
in in programging ................



3. Syntax

Message xnnn

x is the type of message ( See: Types of messages )

nnn is the identifier of the message.

Example: message e001

4. Setting the message class

You set the message class for the whole program in the header of thje program:

report my_report message-id .

Setting the message class for a sigle message:

Message ID type number 

Example: message id ‘ZB’ type ‘W’ number ‘004’ with ‘Test’.

5. Types of messages

IInfoPress ENTER to continue
WWarningCorrection possible
EErrorCorrection required

AAbendTransaction terminated
XExitTransaction terminated with short dump
SSuccessMessage on next screen

6. Paramiterized messages

You can paramiterize messages, so that you can insert your own text programmatically
in messages.

When you define the message use & for the parameters:

This is a &1 message

When you call the message use the syntax

Message e001 with ‘bad’

The resulting message: This is a bad message

7. Writing message into a field

Sometimes you want to store e.g. an error message from a function module in a text field instead of displaying it.

Use this syntax to store the message to the field l_errror_text.

CALL FUNCTION … something

IF sy-subrc 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 into l_errror_text. ENDIF. 
  

*reward points if helpful*

Reagrds.

pankaj vashista

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question