‎2009 Sep 18 7:49 AM
Hello Experts,
I have a done report where I have made a bapi.
In this BAPI when Order number is passed I get the message. like order no 501 is saved
But when my order no is not relevant I need to get a meesage like:
Order No 50000 is not relevant.
Order no= itab-aufnr.
I am only writing message as:
MESSAGE 'ORDER NO NOT RELEVANT FOR BAPI' TYPE 'I'.
Over here how can I pass itab-aufnr is message?
Thanks and Regrds,
Nikhil.
‎2009 Sep 18 7:56 AM
Hi,
MESSAGE 'ORDER NO' itab-aufnr 'NOT RELEVANT FOR BAPI' TYPE 'I'.
-Rajneesh Gupta
‎2009 Sep 18 8:05 AM
Hi,
You can also pass '&' in text element .
ex: MESSAGE e999 WITH w_error1 w_error2 w_error3.
w_error1 = ' Order No."
w_error2 = itab-aufnr.
w_error3 = 'Not relevant for BAPI'.
Thanks,
Aravind
‎2009 Sep 18 7:57 AM
Hi,
Go to se91 and create a message in one of the existing message classes or create a new message class create message like below with '&' signs.
you cna have upto four "&" signs which are actual place holders for messages
then call message in your prorgam like below:
message i000(zz) with 'ORDER NO NOT RELEVANT FOR BAPI' itab-aufnr .
Try F1 help on key word message for more info
Regards,
Himanshu
‎2009 Sep 18 8:22 AM
Hi
Please check this.
DATA: mid TYPE sy-msgid VALUE 'SABAPDOCU',
mtype TYPE sy-msgty VALUE 'I',
num TYPE sy-msgno VALUE '014'.
MESSAGE ID mid itab-value TYPE mtype NUMBER num.
or
MESSAGE 'Message in a Method' itab-value TYPE 'I' RAISING exc1.
please try F1 help on 'Message' , you will surely get better options.
‎2009 Sep 18 8:28 AM
Hi
Which BAPI you are using for?
If you are using Standard BAPI,then BAPI itself will throw the error message if the BAPI contains the Exceptions section.
Regards,
Sreeram
‎2009 Sep 18 8:58 AM
Hi,
From abap editor se38->goto->messages.
create a message in zclass say ' Order No &1 is not relevant'.
write code as
here z_tezt- msg class,
000- msg number
w_str -order no.
message id 'Z_TEST' type 'I' number '000' with w_str .
Regards,
Deeba
‎2009 Sep 18 9:54 AM