‎2007 Oct 18 11:05 PM
Hi,
I'd like to know if there is any way to get information about an error generated during the excution of some FM in update task.
I use the 'commit work and wait' statement which gives me a sy-subrc <> 0 in case of error during the update, but I need to retrieve information about the error. Is it possible ?
Thanks in advance.
‎2007 Oct 18 11:58 PM
I usually write a custom function module ( a wrapper ) with a return table parameter and call the standard function module inside the custom funciton module. Then I write any errrors from the Standard FM to the return table and email it to the user that ran the program.
‎2007 Oct 19 8:10 AM
Hi,
the problem is that once you call the FM IN UPDATE TASK you no longer have the chance to access that return table.
I know that an error has been reported if the sy-subrc after the "COMMIT WORK AND WAIT" is not initial. In SM13 I can see the error reported by the FM that failed, but I'd like to know if it is possible to retrieve that information in my ABAP program...
Thanks!
‎2007 Oct 19 3:42 PM
What I meant is you submit the wrapper FM in update task. When this wrapper FM runs, it will simply call the Standard function module and capture all the error messages into an internal table ( a return table) and email the contents of that table to the user that ran the program using the following funciton module SO_NEW_DOCUMENT_SEND_API1.
I did something like this and it has been working pretty good.