Application Development and Automation 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: 
Read only

call transaction - rollback work

Former Member
0 Likes
1,845

Hi, how can I <b>undo all changes</b> made by a call transaction to a standard transaction?

I want to create several sales orders after the correct process of a call transaction, and if some error occurs in process when creating sales orders I want to undo all changes made with call transaction. Any idea?

I've sown in SAP Help that CALL TRANSACTION has the option:

<i>RACOMMIT

Successful end on COMMIT WORK</i>

But it seems not work.

1 ACCEPTED SOLUTION
Read only

sergey_korolev
Active Contributor
0 Likes
1,206

The only thing you can analyze after CALL TRANSACTION is sy-subrc. If it does not equal to zero then transaction was not successful and no data was updated. Otherwise it is successful and all the data have already updated in database with COMMIT WORK. And this update cannot be undone or Rolled back. If the requirement is very strict then you soul better use some BAPI instead of CALL TRANSACTION.

3 REPLIES 3
Read only

sergey_korolev
Active Contributor
0 Likes
1,207

The only thing you can analyze after CALL TRANSACTION is sy-subrc. If it does not equal to zero then transaction was not successful and no data was updated. Otherwise it is successful and all the data have already updated in database with COMMIT WORK. And this update cannot be undone or Rolled back. If the requirement is very strict then you soul better use some BAPI instead of CALL TRANSACTION.

Read only

0 Likes
1,206

I supose that.

Thanks Sergei.

Read only

Former Member
0 Likes
1,206

Hi Jorge,

When You are using a Call Transaction Method for creating

a Sales Order,You can use the structure GIT_CTU in the call transaction call which has the following options:

  • Parameter string for runtime of CALL TRANSACTION .

DATA: BEGIN OF git_ctu.

INCLUDE STRUCTURE ctu_params.

DATA: END OF git_ctu.

GIT_CTU-DISMODE = 'E'.

GIT_CTU-UPDMODE = 'A'.

GIT_CTU-RACOMMIT = 'X'.

Ex:

CALL TRANSACTION 'LQ02'

USING GIT_BDCDATA

options from git_ctu

MESSAGES INTO GIT_MESSTAB.

I think this will solve your problem.

Regards,

Rajeev.N