‎2006 Sep 21 6:45 PM
Hello there,
This is more or less like a follow up to my previous post.
I was told that I can store the msg as text like this:
MESSAGE ID '5r' TYPE 'e' NUMBER '125' INTO err_msg.however, in the case of e125(5r), the error is
Error in write target file &
where after the & is supposed to be the file name.
My question is:
How can I pass in the file name to the code above so that the entire error msg and the file name would be stored in err_msg. Should I use a "with"?
Thanks a lot!
Regards,
Anyi
‎2006 Sep 21 6:47 PM
‎2006 Sep 21 6:47 PM
‎2006 Sep 21 6:48 PM
Hi
MESSAGE ID '5r' TYPE 'e' NUMBER '125' INTO err_msg.
Replace '&' with <filename> into err_msg.
or
MESSAGE ID '5r' TYPE 'e' NUMBER '125' WITH <filename> INTO err_msg.
Max
‎2006 Sep 21 6:50 PM
Hi Anyi,
MESSAGE statement with WITH clause.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH V_FILENAME.
In your case this will be
<b>MESSAGE ID '5r' TYPE 'e' NUMBER '125' WITH V_FILENAME INTO err_msg.</b>
In your messages You need to use & to replace with the content of V_FILENAME.
The message should be like this in your messages window.
<b>E125 &</b>
Check this link for MESSAGE statement.
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/message.htm
Thanks,
Vinay
‎2006 Sep 21 6:53 PM
Hi,
You need write like
MESSAGE ID '5r' TYPE 'E' NUMBER '125' WITH <File name> INTO err_msg.
Regards
Sudheer
‎2006 Sep 21 6:59 PM
Hi,
You can try like this.
MESSAGE ID '5r' TYPE 'e' NUMBER '125' WITH <filename> INTO err_msg.
Regards,
Ferry Lianto