Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

message

Former Member
0 Kudos

hi to all experts,

when we write MESSAGE e208.

i.e. error messege with 208.

at this time system find the messege no 208 and display it

but when we write in this way.

MESSAGE e208(00) WITH 'Material Document No does not exist'.

here we dirctly given the message in single coat ('').

then why we need to given no (208).

and what is significance of (00).

and which one method is better and efficent.

thanks in advance and reward also.

regard : deep

5 REPLIES 5

Former Member
0 Kudos

in second one u do the hard coding always trying don't use any hardcode in program for better quality work.

kishan negi

Former Member
0 Kudos

hi sama

pls write like this

message e208(00) with text-001."material document is not exit.

or

message e208(zd) with text-001."material document is not exit.

zd is the message id.

regards

kk.

former_member194152
Contributor
0 Kudos

Hi Deep,

Actually 00 is tandard message class you can see message store on that class using TCODe SE91.so with the help of mesaage class u can reuse standard message and if u dont mention 00 or ur custom define message class then u have to declare message-id for that.

Hope this will help to understand u the concept.

Rewards for Regards...

Gagan

Former Member
0 Kudos

Hi

<b>MESSAGE</b>

MESSAGE { msg | text } [message_options].

This statement interrupts the program flow and either displays the short text of a message specified in msg in the logon language of the current user, or any text from text as news item. With the message-type it is specified how the text is displayed and how the program flow continues after the statement MESSAGE. With the statement message_options, you can change this behaviour and replace the placeholders in messages.

<b>System fieldes/></b>

Name Relevance

sy-msgid Contains the message-class after sending a message, and the the value "00" after sending any text.

sy-msgno Contains the message number after sending a message, and the the value "001" after sending any text.

sy-msgty Contains the identifier of the message type with which the message resp. the text was sent.

sy-msgv1 to sy-msgv4 Contain the content of the data objects specified after the addition WITH after sending a message. After sending any text, they contain the first 200 characters of the data object text.

Former Member
0 Kudos

hi deep,

In programming we should never do hard coding, hard coding is not preferable at all. so if u pass any messages the better way is:

message e208(vz) with text-001.

Here vz is the message id.

and in text-001 pass your text i.e 'Material Document doesnot exist'.

<b>please reward points if helpfull.</b>

with regards,

radhika kolluru.