08-26-2008 1:33 PM
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
08-26-2008 1:37 PM
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
08-26-2008 1:37 PM
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
08-26-2008 1:38 PM
08-26-2008 1:49 PM
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..???
08-26-2008 1:55 PM
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
08-26-2008 1:52 PM
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..??
08-26-2008 2:04 PM
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..??
08-27-2008 7:42 AM
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.
08-26-2008 2:05 PM
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
08-27-2008 10:41 AM
08-27-2008 1:24 PM
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.