Skip to Content
author's profile photo Former Member
Former Member

Handle Error After Commit Work

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2007 at 10: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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.