Skip to Content

How to get errors from a function called IN BACKGROUND TASK AS SEPARATE UNIT ?

Nov 07, 2017 at 01:17 PM


avatar image

Hi gurus,

We have placed a call to a function IN BACKGROUND TASK AS SEPARATE UNIT in a user exit (SD Invoices). This function updates another document (SD Shipment).

The thing is that, sometimes, this update can not be done due to some reasons (Document is blocked for another user, authorizations...) and we would like to know how to get the error messages in this cases. The update is done via BAPI and we have the RETURN tab, but as it runs in background task, how to know that the BAPI returned error messages?

Is there a log (System log, RFC log...) where the errors are posted by the system?

Thanks in advance!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
AAH _ES Nov 16, 2017 at 08:22 AM

Nothing found for this. So I've added a bit of code to get the error messages returned from the BAPI called in Background and save them into a new custom table for later check.

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hi AAH...

I have not the solution, but instead creating custom table, why don't you use the BAL_LOG ?




You're are totally right. This was another option for us, but we decided to use the table cause it is easier to troubleshoot and hopefully in the future we we'll remove it.

Thanks for the suggestion!


Fred's idea is good but is there a mechanism that intimates the user about the error logs in SLG0/1.Usually,end users will not be having access to SLG0/1.



maybe a specific job that scan the BAL_LOG and send a mail in the Business Workplace of the corresponding user ...

sometimes people used IDOC to manage Background task / log / re-run ..