Skip to Content

BAPI_ALM_NOTIF_SAVE to rollback or not

Hi Everyone,

When you use BAPI_ALM_NOTIF_SAVE and it returns errors do you need to use BAPI_TRANSACTION_ROLLBACK?

The documentation in SE37 implies that you need to run BAPI_TRANSACTION_COMMIT regardless of the result otherwise further changes are not possible. Does this mean that BAPI_ALM_NOTIF_SAVE effectively do a rollback internally?

regards

Julian

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jun 22, 2011 at 07:13 AM

    Julian,

    I have used this in the past:

    lv_subrc = 0.
      loop at yt_return into ls_return.
        if ls_return-type = 'A' or       "abort
           ls_return-type = 'X' or       "dump
           ls_return-type = 'E'.         "Error
          lv_subrc = 4.
          exit.
        endif.
      endloop.
    
      IF lv_subrc EQ 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      ENDIF.
    

    PeteA

    Add a comment
    10|10000 characters needed characters exceeded

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.