cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI or IDOC

Former Member
0 Kudos

The XML PO data from the HTTP client is posted asynchronously to XI (using quality of service “Exactly Once”). The control is taken over by BPM and posts the BAPI synchronously into the R/3 system and upon receiving the BAPI response containing the PO number, BPM will send a message asynchronously to the legacy system, as a flat file.

In the above example can we go for using IDOCS instead of BAPIS. Can one plz explain when we need to go for IDOCS and when for BAPIS. What r their advantages.

Explanation would really be appreciated.

Thanks,

sneha

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi,

It really depends .

If there is already standard BAPI or Idoc exists, then it is prefer to go for that. In this case, as you expect Response i.e Synchrnous, then it is prefer to go for BAPI communication. But potential problem here, is if huge amount of data flow is there, then you need to check the performance as it is a synchrnous. Bottomline is to avoid synchronous call as much as possible. if so then automatically the choice is Idoc. And there are already error handling etc is taken care if it is standard idoc/rfcs

Just to give some more info-

/people/ravikumar.allampallam/blog/2005/08/14/choose-the-right-adapter-to-integrate-with-sap-systems

Regards,

Moorthy

Former Member
0 Kudos

Hi Krish,

In our practisce we went for a custom bapi which is wrapper of a standard bapi. I did not understand why went for a custom bapi when there is availability of standard bapi.

How to handle errors in the above case of synchronus bapi?

Thanks,

sneha

Former Member
0 Kudos

Avoid making multiple calls to the same BAPI / RFC, rather have a wrapper BAPI and send all the records in one time

In the above satement a bapi wrapper means combiing many bapi calls. Thts what i understood. can anybody plz correct me and explain the above statement correctly.

Thanks

sneha

bhavesh_kantilal
Active Contributor
0 Kudos

Sneha,

As you are using a BPM< you can wrap your Send , Receive and Trasnform Steps around an Exception Handler in the BPM and whenever any exception occurs, the steps defined in the Exception Handler will be triggered.

You can trigger Alerts, you can have reconcilation of messages and so on, depending on the actual error handling requirements.

Take a look at this link for Exception Handling in BPM,

http://help.sap.com/saphelp_nw04/helpdata/en/33/4a773f12f14a18e10000000a114084/content.htm

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Senha,

[><i>In the above satement a bapi wrapper means combiing many bapi calls. Thts what i understood. can anybody plz correct me and explain the above statement correctly.</i>

Synchronous Calls in XI should be avoided as much as possible. And so in your case, inorder to avoid making mutliple RFC calls, you are making a Single call using the wrapper BAPI. You have got your understanding correct.

Regards,

Bhavesh

moorthy
Active Contributor
0 Kudos

Hi,

<i>Avoid making multiple calls to the same BAPI / RFC, rather have a wrapper BAPI and send all the records in one time</i>

>>>Means, instead calling a RFC foreach message, you can call RFC/BAPI at a time. For this , you can make use of ABAP proxy and in the proxy you can call this RFC/BAPI.

Or make the BAPI input as a Table structure so automatically the occurence of the BAPI strutcure will be 0..n. So it can hold multiple RFC messages..

for e,g Did you work on posting multiple Idocs/package ? If so , in this case, with one call , you are posting multiple idocs with the help of package concept , i.e nothing but changing the idoc message type occurence from 1 to 1..n..

Regards,

Moorthy

Answers (0)