‎2007 Sep 06 3:52 PM
hi
"BAPIs can be called by applications synchronously or asynchronously"
syn & asyn ???? means how???
thanks & regards
sowjanya m
‎2007 Sep 06 4:21 PM
Hi,
BAPIs are usually called synchronously. An asynchronous BAPI call works through an IDoc Type that has been generated for the BAPI. This, in almost all scenarios, makes sense only for two SAP components talking to each other, not for external programs.
Also,
Synchronous BAPIs
Synchronous BAPIs are generally used to read data from a remote logical system, for example to display a customer list.
Before calling the BAPI, it is therefore necessary to determine the RFC destination of the remote system or the BAPI server. The application developer has access to an API for determining the RFC destination of the BAPI.
Asynchronous BAPIs
Asynchronous BAPIs are generally used for replicating data on one or more logical systems, for example to distribute article master data.
To implement an asynchronous data transfer with a BAPI, an ALE IDoc interface must be generated. This interface controls all of the data communication between logical systems using IDoc technology. The application then calls the generated ALE IDoc interface locally instead of the BAPIs.
As with synchronous BAPIs, the corresponding logical systems of the BAPI must be determined before you call the ALE-IDoc interface. These are transferred to the ALE-IDoc interface as input parameters.
Sri
‎2007 Sep 06 4:28 PM
Hi,
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.
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!
Question - Does a synchronous call transaction cause the ABAP to issue a COMMIT WORK AND WAIT command within the transaction?
http://help.sap.com/saphelp_nw04s/helpdata/en/e5/de86e735cd11d3acb00000e83539c3/content.htm
Regards
Sudheer