on 06-22-2011 7:04 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pete,
Thanks for your response. Generally I would do the same as you suggest.
My question was meant to be more about ( perhaps I was not explicit enough, my bad ), the nature of the BAPI BAPI_ALM_NOTIF_SAVE and its behaviour regarding the need for a commit regardless of results otherwise further changes are not possible as per the bapi documentation and that there is no mention of rollback.
If the save fails does the bapi clean itself up so there is no need to rollback?
cheers
Julian
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.