Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Call transaction in IDOC

Former Member
0 Kudos

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

2 REPLIES 2

SimoneMilesi
Active Contributor
0 Kudos

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)

Juwin
Active Contributor
0 Kudos

Simple answer = No.

Thanks,

Juwin