2007 Aug 09 7:46 AM
Hi all,
Can anybody explain the me the difference between the synchrous update and asynchrous update with some example.
Thanks in advance
Ramya
2007 Aug 09 7:54 AM
Hi,
Synchronus data processing is that in which the program calling the update task waits for the update work process to finish the update before it continues processing.
In Asynchronus update the callng program does not wait for update work process to finish the update and continues as normal.
A BDC done with sessions is always synchronus.
A BDC with call transaction is by default asynchronus
unless you define it explicitly as
call transaction 'XXXX' ...... update 'S'.
( If you donot define update option it is defaulted to "A" ).
The update method is of importance when one transaction locks data which may be required by a subsequent transaction . The subsequent transaction will fail if data is locked from previous one. An example would be you are creating sales order for same material in succession ( with asynchronus update ). Quite likely that some of transactions would fail due to material locked.
For large volume of data Call Transaction will be faster but you have no restart capability here. Suppose from 1000 transactions 100 fails . You will have to run the BDC program again exclusing the ones which wrere successful. However with session method you have the option to process the error transactions again in SM35 . So if you are sure that errors will not occur use call transaction else use session method.
Regarsd,
Priyanka.
Hi all,
Can anybody explain the me the difference between the synchrous update and asynchrous update with some example.
Thanks in advance
Ramya
2007 Aug 09 7:50 AM
In synchronous method incase if there is any change in the table all the related tables will be changed accordingly and then sy-subrc will be returned.
In asynchronous method in case if there is any change in the table the s-subrc will be immediatel returned and then the related tables will be updated.
The diffrence between these two is in asynchronous even if the related tables are not updated the sy-subrc will still be returned as 0.
Regards,
Pavan
2007 Aug 09 7:50 AM
Hi Ramya,
<b>A Asynchronous updating: </b>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.
<b>S Synchronous updating: </b>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,
Vinay
2007 Aug 09 7:52 AM
Hi,
Message: 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.
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.
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.
L Local updating. If you update data locally, the update of the database will not be processed in a separate process, but in the process of the calling program. (See the ABAP keyword documentation on SET UPDATE TASK LOCAL for more information.)
Regards
2007 Aug 09 7:53 AM
Hi,
The synchronous update waits for acknowledgement for each record and it is sequential. If a record fails, the process stops.
The aysnchronous update doesnt wait for the updation of the previous records.
Regards,
Yogesh
2007 Aug 09 7:54 AM
Hi,
Synchronus data processing is that in which the program calling the update task waits for the update work process to finish the update before it continues processing.
In Asynchronus update the callng program does not wait for update work process to finish the update and continues as normal.
A BDC done with sessions is always synchronus.
A BDC with call transaction is by default asynchronus
unless you define it explicitly as
call transaction 'XXXX' ...... update 'S'.
( If you donot define update option it is defaulted to "A" ).
The update method is of importance when one transaction locks data which may be required by a subsequent transaction . The subsequent transaction will fail if data is locked from previous one. An example would be you are creating sales order for same material in succession ( with asynchronus update ). Quite likely that some of transactions would fail due to material locked.
For large volume of data Call Transaction will be faster but you have no restart capability here. Suppose from 1000 transactions 100 fails . You will have to run the BDC program again exclusing the ones which wrere successful. However with session method you have the option to process the error transactions again in SM35 . So if you are sure that errors will not occur use call transaction else use session method.
Regarsd,
Priyanka.
2007 Aug 09 7:54 AM
Synchronous Update: If suppose we have 100 records to be transferd in database through bdc then it will update the records one by one after getting response from database for each record.So it will execute cmmit Work and wait statement.If any any record contain error then updation would be halt and remaining record wouldn't ber updated.
Asnchronous Update:In this case whole records would be updated at same time leaving the record that contain error.
Rewards the point if helpful.
Mohit Khandelwal
2007 Aug 09 10:49 AM
Hi all,
Thanks a lot for your replies ..its clear
Can anybody clear my doubt through real time transaction.............as when will error occur..what happens if we give asynchrous or synchrous update
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |