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

commit after batch input call transaction

mark_fryu
Participant
0 Likes
2,302

when i call a batch input with call transaction CO02 without commit i see that works, but is it necessary to commit after the call transaction?

5 REPLIES 5
Read only

Jeansy
Active Contributor
2,109

Hi Mark,

it depends on which update mode you use for BatchInput.

A: Asynchronous
S: Synchronous
L: Local Update (explicit COMMIT needed)

Normally a COMMIT is needed to save the changes.

KR
Jens

Read only

0 Likes
2,109

La ringrazio per la risposta

I have 'S' but what's the difference with 'A' ?

I need it to finish all the updates, and then continue with the abap code, what should I use?

Read only

Jeansy
Active Contributor
0 Likes
2,109

The simple difference in Synchronous and Asynchronous is that:

In synchronous mode, the posting is done once and the system waits for its result before commiting for the next posting (assuming that the call transaction is done in a loop.) This would consume more time. But this is considered the safe option in most cases.

--> A synchronous Workflow task must be executed before control is passed to the next step. It is used for tasks that do not involve required updates, because once the workitem is executed, control is passed on to the next step without checking the success or failure of any update that might or might not have taken place.

-->An asynchronous Workflow task should be used when a successful update is required prior to control being passed to the next step. The task does not end when it is executed. The task ends when a terminating event is received. The terminating event requires a COMMIT WORK before it is triggered.

Unless otherwise you have a strong reason, please avoid the Asynchronous mode.

Reward points if you wish.

Read only

0 Likes
2,109

ok thank you, so if i'm using "synchronous" can i not put a commit after the batch input?

I take this opportunity to ask another question:

what is the difference between:

-commit

-commit and wait

I need the commit which "saves" everything before moving forward

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,109

No it's not needed. Transactions which need to update database should handle the commit themselves (save + commit work).