2017 Nov 07 1:17 PM
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!
2017 Nov 16 8: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.
2017 Nov 16 8: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.
2017 Nov 16 8:32 AM
Hi AAH...
I have not the solution, but instead creating custom table, why don't you use the BAL_LOG ?
https://wiki.scn.sap.com/wiki/display/Snippets/Application+Logging+in+SAP+Using+ABAP
regards
Fred
2017 Nov 16 8:35 AM
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!
2017 Nov 16 8:38 AM
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.
K.Kiran.
2017 Nov 16 8:46 AM
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 ..
fred