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

Examples for Synchronous and asynchronous

Former Member
0 Likes
798

Hi all,

Please can any body give me the real time example for Synchronous and asynchronus

Ranjith

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
Read only

Former Member
0 Likes
557

Let us take example of calling a transaction for update:

Call Transaction

Synchronous calls are slower but should be used for transactions that are updating the database because control is not passed back to the program until a successful database commit (or rollback) has been executed. Note this the real SQL commit at the database level not the ABAP command COMMIT WORK. Synchronous calls will set the return code (sy-subrc) if an error is encountered. There are actually two synchrounous update modes:

'S', Synchronous update mode makes database entries describing the updates to be done and an update task (potentially running on a different computer) reads those database entries, does the update, and then deletes the entries describing the update task.

'L', Local update mode describes the updates to be done in the memory of the current process. No entries are made in and then deleted from the database describing the update task.

Asynchronous calls are the default if the UPDATE parameter is not specified. Asynchronous calls do not effect the return code (sy-subrc).

Note - This is opposite of how synchronous/asynchronous workflow tasks behave, in the sense that control is returned to the workflow in a synchronous step even if there is no commit or rollback encountered!

Prakash.

Message was edited by: Prakash Ramu

Read only

Former Member
0 Likes
557

Hi Ranjith,

Synchronous - Only after a particular transaction is completed you can do the next Transaction

Asynchronous - Any no of transactions can be done simultaneously without depending on the first job to get completed

Regards

Arun