‎2007 Sep 21 10:47 AM
Hi all,
Can anyone please tell me what is thedifference between " SYNCHRONOUS PROCESSING AND SYNCHRONOUS DATABSE UPDATE " IN BDC
Regards,
Karthi.
‎2007 Sep 21 10:52 AM
Hi,
<b>Synchronous Update:</b>
In synchronous update, you do not submit an update request using CALL FUNCTION... IN
UPDATE TASK. Instead, you use the ABAP statement COMMIT WORK AND WAIT. When the
update is finished, control passes back to the program. Synchronous update works in the same
way as bundling update requests in a subroutine (PERFORM ON COMMIT). This kind of update
is useful when you want to use both asynchronous and synchronous processing without having
to program the bundles in two separate ways.
The following is an example which you could use in asynchronous update:
DATA CONTEXT_NAME LIKE RS33F-FRMID.
CONTEXT_NAME = 'DOCU_TEST1'.
...
CALL FUNCTION 'CONTEXT_BUFFER_DELETE' IN UPDATE TASK
EXPORTING
CONTEXT_ID = CONTEXT_NAME
EXCEPTIONS
OTHERS = 0.
....
COMMIT WORK.
<b>Asynchronous Update:</b>
A typical R/3 installation contains dialog work processes and at least one update work process.
The update work processes are responsible for updating the database. When an ABAP program
reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN
UPDATE TASK statements are released for processing in an update work process. The dialog
process does not wait for the update to finish. This kind of update is called asynchronous update.
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.
Batch Session Interface: - Asynchronous processing means Transfers data for multiple transactions - Synchronous database update means during processing, no transaction is started until the previous transaction has been written to the database.
CALL TRANSACTION: - Synchronous processing means Transfers data for a single transaction. Synchronous and asynchronous database updating both possible The program specifies which kind of updating is desired. Separate LUW for the transaction The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
<b>Reward Points if Useful</b>
Regards
Gokul
‎2007 Sep 21 10:49 AM
In batch session interface: - Asynchronous processing means Transfers data for multiple transactions - Synchronous database update means during processing, no transaction is started until the previous transaction has been written to the database.
In CALL TRANSACTION: - Synchronous processing means Transfers data for a single transaction. Synchronous and asynchronous database updating both possible The program specifies which kind of updating is desired. Separate LUW for the transaction The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
‎2007 Sep 21 11:06 AM
kishan,
you have mentioned, in batch session synchronous processing means transferring data for multiple transaction and at the same time you have also mentioned in batch session only synchronous update is possible which means no transaction is started until current datas are transferred. don't you feel both this are contradictory?....
regards,
karthi
‎2007 Sep 21 10:52 AM
Hi,
<b>Synchronous Update:</b>
In synchronous update, you do not submit an update request using CALL FUNCTION... IN
UPDATE TASK. Instead, you use the ABAP statement COMMIT WORK AND WAIT. When the
update is finished, control passes back to the program. Synchronous update works in the same
way as bundling update requests in a subroutine (PERFORM ON COMMIT). This kind of update
is useful when you want to use both asynchronous and synchronous processing without having
to program the bundles in two separate ways.
The following is an example which you could use in asynchronous update:
DATA CONTEXT_NAME LIKE RS33F-FRMID.
CONTEXT_NAME = 'DOCU_TEST1'.
...
CALL FUNCTION 'CONTEXT_BUFFER_DELETE' IN UPDATE TASK
EXPORTING
CONTEXT_ID = CONTEXT_NAME
EXCEPTIONS
OTHERS = 0.
....
COMMIT WORK.
<b>Asynchronous Update:</b>
A typical R/3 installation contains dialog work processes and at least one update work process.
The update work processes are responsible for updating the database. When an ABAP program
reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN
UPDATE TASK statements are released for processing in an update work process. The dialog
process does not wait for the update to finish. This kind of update is called asynchronous update.
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.
Batch Session Interface: - Asynchronous processing means Transfers data for multiple transactions - Synchronous database update means during processing, no transaction is started until the previous transaction has been written to the database.
CALL TRANSACTION: - Synchronous processing means Transfers data for a single transaction. Synchronous and asynchronous database updating both possible The program specifies which kind of updating is desired. Separate LUW for the transaction The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
<b>Reward Points if Useful</b>
Regards
Gokul