07-30-2009 3:53 PM
Hi,
I have to pass a variable to an error message long text (i.e. in the message class, procedure) how to do that.
Thanks in Advance.
07-30-2009 3:58 PM
Hi,
In the long text choose Edit -> Command -> Insert command on the menu. In the pop-up enter &V1& in the Symbols field.
&V2& is variable &2 etc...
Regards,
Nick
07-30-2009 3:58 PM
Hi,
In the long text choose Edit -> Command -> Insert command on the menu. In the pop-up enter &V1& in the Symbols field.
&V2& is variable &2 etc...
Regards,
Nick
03-27-2014 6:46 AM
07-30-2009 4:25 PM
Hi,
try this way..
creating message class or add message to message class..
go to t-code -->se91 --> ZZZ(message class)->add 001 -- material & plant & combination does not exit.
call message in Program ...
select * marc where matnr = p_matnr and werks = p_werks.
if sy-subrc ne 0.
MESSAGE e001(ZZZ) WITH p_matnr p_plant.
endif.
the & represents Variable...
Prabhudas
07-30-2009 8:05 PM
hi saba,
& are the place holders of variables in the message classes.
so lets say you have a message class zsap. if not then create in SE91.
select a message number. give number like 000, 001, 999 etc.
in the message text
write like
company code & has & sales orders. ==>lets say you give message number 000 to this.
now these two & are the place where you will/can pass your values as variables.
when you need to call this message, use this:
message I000(ZSAP) gv_bukrs gv_lines.
now gv_bukrs and gv_lines will be replaced in the message number 000 at the & position respectively.
that means, the message now becomes :
company code <value of gv_bukrs> has <value of gv_lines> sales orders.
^ ^
| |
first & second &