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

Purpose of Commit work and wait

Former Member
0 Likes
585

Hi Friends,

Kindly let me know what is the Exact Purpose of Commit work and wait

Akshitha.

Hi Friends,

Kindly let me know what is the Exact Purpose of Commit work and wait

Akshitha.

3 REPLIES 3
Read only

Former Member
0 Likes
566

Hi akshitha,

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

Reward points if helpful.

Regards,

Hemant

Read only

Former Member
0 Likes
566

Hai,

<b>COMMIT WORK</b>

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

<b>COMMIT WORK AND WAIT</b>

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.

Regards,

Padmam.

Read only

MarcelloUrbani
Active Contributor
0 Likes
566

Whan you make changes to the database tables, nothing is actually done until you execute a COMMIT WORK statement (alternatively, you can cancel the changes with ROLLBACK WORK).

In ABAP it's possible to have some code executed authomatically after a commit, so:

Commit work and wait

means: save the changes and wait the code authomatically executed to finish its job.