‎2008 Aug 21 6:45 PM
Hello gurus,
How can I give an error message in the INCLUDE program. I want to capture an error when run in the background.
Thank you,
Reeta
‎2008 Aug 21 7:08 PM
‎2008 Aug 21 7:08 PM
‎2008 Aug 21 7:12 PM
what is the error and what is the include program consists of..
Provide full details, then some one can respond.
‎2008 Aug 21 7:57 PM
Thanks for your response.
I basically want to provide an error message in the INCLUDE program just like we do in the reports. I could use popups in the foreground but am looking for a solution in the background for include. Ideally I want the job to cancel with an error message.
Thanks,
Reeta
‎2008 Aug 21 7:59 PM
You could generate a Spool list showing the errors...Easiest way I can think off...
Greetings,
Blag.
‎2008 Aug 21 8:16 PM
as suggested by Blag , if you can use messages then you can see those messages in the spool list.
‎2008 Aug 21 8:25 PM
So, do I understand this right, that there isn't anyway to cancel the job from an INCLUDE with a message when running in the background.
Writing to a spool will not cancel the job.
Thanks,
Reeta
‎2008 Aug 21 8:37 PM
what i mean is if you raise the error message then background job will stop, and the message will be written to spool.
i am telling you to write the messages to spool. ifyou raise the error messages then it automatically stopped and written to spool
‎2008 Aug 21 9:05 PM
Thanks again Vijay Babu,
I am not able to raise an error message from an INCLUDE.
Please provide me the code, if I am wrong, because when I do give any type of message, I get the following.
"MESSAGE-ID xx" is missing in the "REPORT" statement.
and since, it's not a report , I am not able to add the above statement. I can't activate it.
Thoughts?
‎2008 Aug 21 9:09 PM
various ways we can give that
message e000(zz) with 'error message'. "with message class ZZ
or
message with 'errormessage' type 'E'. with out any message class
‎2008 Aug 21 9:22 PM
That took care of it.
The one with the message class worked alright.
Thanks very much Vijay Babu. So much for messges yeah?... but it was good learning.
Thanks for all your time.
Reeta.
‎2008 Aug 21 9:40 PM
Hi,
you can use the FM BAPI_XBP_JOB_ABORT.
Thanks,
Kamesh Bathla
‎2008 Aug 21 7:38 PM
I dont think you can debug a program running in background, but you can check the dumps in trx. ST22