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 Class

Former Member
0 Kudos

Hi all,

I hv a doubt regardin msg class...I hv used the below statement in my report...

MESSAGE e901(ztst) with 'No data'.

whn I execute the report i'm gettin..

ZTST:901 No data

why I'm gettin the msgclss n no before the text...

If I give the msgshrt text it in SE91 as 901 No data, I'm not gettin it...

Cant v restrict it without gibvin text in se91..

I had seen previous threads but still I'm confused...

Can anyone clarify my doubt...

Thanks

1 ACCEPTED SOLUTION

peter_ruiz2
Active Contributor
0 Kudos

hi,

Take a look at your message class with number 901. The value on that message number is '&'.

The '&' operator in a message number acts as a parameter receiver. This will be replaced by the string you have included after the WITH addition in MESSAGE.

if your message number 901 has a value of '& &', this means that it accepts 2 parameters.

so, when you call your message, you have passed 'NO DATA' to the message and it replaces the '&'.

regards,

Peter

10 REPLIES 10

peter_ruiz2
Active Contributor
0 Kudos

hi,

Take a look at your message class with number 901. The value on that message number is '&'.

The '&' operator in a message number acts as a parameter receiver. This will be replaced by the string you have included after the WITH addition in MESSAGE.

if your message number 901 has a value of '& &', this means that it accepts 2 parameters.

so, when you call your message, you have passed 'NO DATA' to the message and it replaces the '&'.

regards,

Peter

Former Member
0 Kudos

try like this MESSAGE e901(ztst)

Former Member
0 Kudos

Thanx for ur replies...but I hvn't given anything in my msgclass..msg no 901 is blank in ztst....do v need to give & to all those no's for which v pass texts..??

Message e901(ztst) is workin fine, coz i hv hardcoded that text in se91...without hardcodin it in se91, cant v restrict that..???

0 Kudos

Hi Mamata,

Yes we can. In SE91 Just give & in the message text. This is the place holder. Now give the message like this.

Message e901(ztst) WITH 'No data'.

MESSAGE e901(ztst) WITH 'Order doesnot exist'.

MESSAGE e901(ztst) WITH 'Customer doesnot exist'.

So here u are using same message no with different texts

This & acts as place holder. U can pass dynamic values.

Check below example.

If u enter some wrong order number in screen then if u want to display a message like

Order 11111 does't exist.

Here order 11111 is dynamic based on user input.

Then u have to create a message with text as below.

Order & doesn't exist.

Now call the message like this.

MESSAGE e123(ZTST) WITH po_vbeln.

If u want to pass multiple dynamic values then give those many & symbols in message text.

Hope it is clear.

Thanks,

Vinod.

Edited by: Vinod Reddy Vemuru on Aug 26, 2008 6:26 PM

Former Member
0 Kudos

I hv tried givin like this...

901 & & & &

even then msg class n no is comin..

Can I use same msg no with different texts in diff progs..??

Former Member
0 Kudos

Thanq so much for clearin my doubt...

But one more doubt...do v need to give '&' to all those msg no's for which v r passing texts..??

0 Kudos

Hi Mamta,

If u need dynamic text/number in ur message then only u need that &(Place holder). Otherwise u can directly hard code ur message. Check example in my earlier post.

Thanks,

Vinod.

Former Member
0 Kudos

Hi,

Usually this happens when the system is not able to retrieve the message text from T100 tables...

Typically when text is maintained in other language...and you are executing the program in other logon language..

So you can check this as well..

~Piyush

Former Member
0 Kudos

Thanks to all of u...

Former Member
0 Kudos

actually u hvae used a msg without data .but the work of the e000(zmsg) is to raise a message.Like if i use e000(zmsg) which is used to raise the message.this statement is that raise an error message from zmsg message class.the message number to be raised is 000.

And each message can hold 1000 messages starting from 000 to 999.T-code for creation of message class is SE91.