06-30-2016 2:24 PM
Dear All,
is possible rollback one or more call transaction in IDOC inbound function module when error occurs?
For example:
PERFORM CALL_FIRST_TCODE TABLE TI_ERROR_MESSAGES.
IF TI_ERROR_MESSAGES IS NOT INITIAL.
ROLLBACK
ELSE.
PERFORM CALL_SECOND_TCODE TABLE TI_ERROR_MESSAGES.
IF TI_ERROR_MESSAGES IS NOT INITIAL.
ROLLBACK
ELSE.
PERFORM CALL_SECOND_TCODE TABLE TI_ERROR_MESSAGES.
IF TI_ERROR_MESSAGES IS NOT INITIAL.
ROLLBACK
ENDIF.
ENDIF.
ENDIF.
I read this in help portal:
Process
If you use a function module to process a single IDoc, as described above, but the function module uses a call transaction to post the application data to the database, the application data is posted in a different logical unit of work from that in which the IDoc status data is posted. A call transaction does a 'commit work' when it has been successfully executed.
I can't use bapi, only call transaction!!!
Thanks in advance
06-30-2016 3:14 PM
You got your answer in the text you read and copied:
A call transaction does a 'commit work' when it has been successfully executed.
Only if the call transaction is successful a commit work is called, otherwise no data is updated (= rollback)
06-30-2016 3:41 PM