cancel
Showing results for 
Search instead for 
Did you mean: 

Which method is better BAPI call or Idoc

Former Member
0 Kudos

Hi

I have a scenario where i have two options

1. file->XI->BAPI call

2. file->XI->Idoc

Which one will be better,Can anyone explain?

Thanks

Debraj Roy

Accepted Solutions (0)

Answers (4)

Answers (4)

stefan_grube
Active Contributor
0 Kudos

A file->R/3 scenario should always defined as asynchronous, as the file adapter cannot deal with the response of a synchronous call (the response would be lost).

Asynchronous call are done with IDOCs. BAPIs are designed for synchronous calls only.

http://help.sap.com/saphelp_nw04/helpdata/en/08/bef2dddb5311d1ad10080009b0fb56/frameset.htm

Regards

Stefan

former_member187339
Active Contributor
0 Kudos

Hi Debraj,

An IDoc data exchange is always an asynchronous process. The significant difference between simple RFC-calls (and hence BAPI's because they are a subset of the RFC-enabled function modules) and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.

For more info :

http://www.sap-img.com/abap/ale-bapi.htm

http://www.sap-img.com/fu033.htm

Hope this will be really helpful

Regards

Suraj

former_member91687
Active Contributor
0 Kudos

Hi Debraj,

BAPIs are supposed to be APIs provided by SAP that protect the interfacing with a particular application in SAP (say sales order). They encompass all the business logic of the corresponding online transactions. Advantages are that they are supported by SAP and their call interface is very stable. Disadvantage is that most of them are synchronous calls and if you are doing massive data conversions, this may be a resource drainer. Also, with BAPIs, you not only need to read the return messages for errors and take corrective action, but also, you need to code for storing the source data so that you want to reprocess it. Sometimes BAPIs may not provide all the features of an online transaction and so they may limit to what data they can store, like texts for instance. If your data requires you to store texts along with the object and the BAPI doesn't provide you with the parameters for passing the texts, then you may end up doing it in two steps.

Cheers,

Chandra

Former Member
0 Kudos

Hi Roy,

If u see concepts wise then both are equivalent almost.

If u r integrating different R/3 systems then IDOC is preferable.If u r integrating third party with R/3 systems then BAPI is preferable.In some scenarios,u must know where the data stores in the database tables for further proceddings and giving some input and expecting some defined output.In this case BAPI is flexible.In some cases,just u have to transfer data from system to other or vice versa, then IDOC is flexible.because it acts as a container for Application Data.

rgds

Sridhar Raju Mahali