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

synchronous asynchronous update

Former Member
0 Likes
1,983

what is difference between synch and asynch update???

how it affects database update???

4 REPLIES 4
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,037

Hi,

Synchronous update is as and when you call the update funtion module or say routine at the same time that procedure is executed.

Where as in the case of Asynchronous update you call the procedure but it will be xecuted only after the database commit.

For example: PERFORM ON COMMIT.

Best Regards,

Sesh

Read only

Former Member
0 Likes
1,037

Hi!

Asyncron update: COMMIT WORK.

COMMIT WORK also

Calls the subroutines specified by PERFORM ... ON COMMIT

Executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK) specified in these subroutines or started just before

Processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK

Resets the time slice counter to 0.

Ensures that the locks of the SAP locking concept are handled in accordance with its SCOPE Parameter.

Executes a database commit on all database connections

Closes all open database cursors (OPEN CURSOR) on all database connections

Releases all database locks on all database connections

Syncron update: COMMIT WORK AND WAIT.

The addition ... AND WAIT makes the program wait for the type V1 update (update with immediate start) to be executed.

We can say, in the synchron mode, you have to wait, until SAP syncronizes all database changes.

Regards

Tamá

Read only

Former Member
0 Likes
1,037

hi

good

Asynchronous Update – The program does not wait for the work process to finish the update. Commit Work.

Synchronous Update – The program wait for the work process to finish the update. Commit Work and Wait.

Asynchronous updating. In this mode, the called transaction does not wait for any updates it produces to be completed. It simply passes the updates to the SAP update service. Asynchronous processing therefore usually results in faster execution of your data transfer program.

Asynchronous processing is NOT recommended for processing any larger amount of data. This is because the called transaction receives no completion message from the update module in asynchronous updating. The calling data transfer program, in turn, cannot determine whether a called transaction ended with a successful update of the database or not.

If you use asynchronous updating, then you will need to use the update management facility (Transaction SM12) to check whether updates have been terminated abnormally during session processing. Error analysis and recovery is less convenient than with synchronous updating.

Synchronous updating. In this mode, the called transaction waits for any updates that it produces to be completed. Execution is slower than with asynchronous updating because called transactions wait for updating to be completed. However, the called transaction is able to return any update error message that occurs to your program. It is much easier for you to analyze and recover from errors.

thanks

mrutyun^

Read only

Former Member
0 Likes
1,037

hi,

For Update you have

A - asynchronus - does not wait for next update in the queue

S - Synchronus - waits until the previous update is completed before a new request is considered

L - Local update - Uses a different work process to trigger call function in update task.

In synchronus method until one record process takes place into database next record will not be processed.

In asynchronus immedate updation of data into database table.

Check this link for more detailed information:

http://fuller.mit.edu/tech/sync_asynchronous.html

'A', 'S' and 'L' are the update modes in CALL transaction method.

I will give you a simple example to explain this.

Suppose that there are 30 records in total and an error has occured in the 5th record.

In asynchronous, update is done for every 30 records while in synchronous one,

update is done only upto the 4th record.

So only after the record in the fifth one is eliminated, remaining others are processed.

Have a look at this URL from SAP Help:

http://help.sap.com/saphelp_46c/helpdata/en/41/7af4cba79e11d1950f0000e82de14a/frameset.htm

Regards

Reshma