Application Development 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: 

synchronous and asynchronous

Former Member
0 Kudos

hello gurus....

can u give the definitions for synchronous and asynchronous updates.....

i mean how u have to answer the definition when asked in an interview...

Thnaks

Pavan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi..

Hi,

Check these threads

Reward points if useful

Regards

Ashu

8 REPLIES 8

Former Member
0 Kudos

Hi Pavan,

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.

DataBase Commit:

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 if useful.

Thanks

Aneesh.

kiran_k8
Active Contributor
0 Kudos

Pavan

Call Transaction can be Asynchronous or Synchronous whereas a Session is only Synchronous.

A Synchronous update is when the process waits for each and every record to get updated into the table.When a particular record gets updated then and then only it processes the next record,but an Asynchronous update doesn't.

SDN have some threads which are having answers beautifully explained by SDN experts.You can check the same for more on this.

K.Kiran.

Message was edited by:

Kiran K

Former Member
0 Kudos

hai Kiran....

u said that ...

SDN have some threads which are having answers beautifully explained by SDN experts.You can check the same for more on this.

if u are having them with u ...please do farward that to my mails id : kpavan07@rediffmail.com

Thnaks in advance....

Pavan

Former Member
0 Kudos

hai Kiran....

u said that ...

SDN have some threads which are having answers beautifully explained by SDN experts.You can check the same for more on this.

if u are having them with u ...please do farward that to my mails id : kpavan07@rediffmail.com

Thnaks in advance....

Pavan

Former Member
0 Kudos

hi..

Hi,

Check these threads

Reward points if useful

Regards

Ashu

Former Member
0 Kudos

Hi Pavan

A 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.

S 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

one simple example : You are creating sales order from file and also you want to update header text of sales order.

when you want to update sales order header text,you need to use save_text function module ,here you need to pass sales order number.

when you use call transaction update 'A', data will update transaction level and it goes to the next record,here it will not wait for database .

when you use call transaction update 'S',data will update transaction level and it will update database then it goes next record.

if you want to update header text,then you need to use sync update

database commit -

comitt work - it will update data in database sucessfully

roll back - it will not update in database.

Check these threads

Reward Points if it is helpful

Regards

Pavan

Former Member
0 Kudos

A 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.

S 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

one simple example : You are creating sales order from file and also you want to update header text of sales order.

when you want to update sales order header text,you need to use save_text function module ,here you need to pass sales order number.

when you use call transaction update 'A', data will update transaction level and it goes to the next record,here it will not wait for database .

when you use call transaction update 'S',data will update transaction level and it will update database then it goes next record.

if you want to update header text,then you need to use sync update

database commit -

comitt work - it will update data in database sucessfully

roll back - it will not update in database.

Reward Points if it is helpful

Thanks

Ravi

mohammed_moqeeth
Active Participant
0 Kudos

Hi pavan,

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

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

<u><b>Example: </b></u>

<b>Synchronous:</b> if u have 10 records to update and the processing is going on in a loop the Synchronous update will wait till each update is actually done in the data base and then it will move on the next record's updation.

<b>Asynchronous :</b> In This mode, the updates are lined one after the other and the system doesn't wait for the updates to actually happen. These updates are then triggered by an internally scheduled job which then actually updates the data in the databse.

Check the links for your kind reference -

Cheers !

Moqeeth.