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

Differences between commit work and commit work & wait

former_member582701
Contributor
18,547

Hi people,

I have a theory question:

What differences are there between commit work and commit work & wait?

Thx

5 REPLIES 5
Read only

Former Member
9,551

Hi,

<b>COMMIT WORK:</b>

This statement will apply any outstanding database updates and wait until they have actually been put on the database before proceeding to the next statement.

An ordinary commit work will initiate the process to update the databases in a separate task and will press on in your abap.

COMMIT WORK: ( Asynchronous)

Your program does not wait for any acknowledgement. it just start executing the next statment after COMMIT WORK.

<b>COMMIT WORK and WAIT</b>: (Synchronous)

Whereas For <b>COMMIT WORK and WAIT</b>, the system waits for the acknowledgment, and then moves to the next statement.

Hope this resolves your query.

Reward all the helpful answers.

Regards

Read only

amit_khare
Active Contributor
0 Likes
9,551

An ordinary commit work will initiate the process to update the databases in a separate task and will press on in your abap.

COMMIT WORK: ( Asynchronous)

Your program does not wait for any acknowledgement. it just start executing the next statment after COMMIT WORK.

Using Wait will make it to halt for acknowledgement.

~As find in SDN

Regards,

Amit

Read only

Former Member
0 Likes
9,551
Read only

Former Member
0 Likes
9,551

Hi Manel

This i took from SAP help.

COMMIT WORK

This is the standard form, which specifies asynchronous processing. Your program does not wait for the requested functions to finish processing.

COMMIT WORK AND WAIT

This form specifies synchronous processing. The commit statement waits for the requested functions to finish processing. Control returns to your program after all high priority (V1) function modules have run successfully.

The AND WAIT form is convenient for switching old programs to synchronous processing without having to re-write the code. Functionally, using AND WAIT for update-task updates is just the same as dialog-task updates with PERFORM ON COMMIT.

Hope this helps !!!

Britto

Read only

Former Member
0 Likes
9,551

Hi Manel,

Commi work means until and unless your reuest complete control doesn't wait but commit worn & wait control should be wait.

Hope this helps you, reply for queries, Shall post you the updates.

Regards.

Kumar. .