cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI versus batch input import

Former Member
0 Kudos

Hi everyone,

I'm currently working at a project were we need to integrate R/3 with several systems using a message broker similar to XI. The interfaces will vary and some will be asynchronus and some synchronus. The data loads can also vary. For the synchronus calls the amount of data will most likely be quite small, but for the asynchronus calls we will do batch updates.

My question is, for the batch updates coming from the message broker, what is the best way to get the data in R/3? Lets say for instance we have to create 200 000 business partners, this information is sent to the message broker from an external system and further on to R/3, then I assume doing a BAPI call to create these business parters is not the best way... Should we create a batch input program? Can the batch input program be called externally via an RFC call and pick up a file or can it only be scheduled to execute and pick up the file already placed somewhere? Are there any other ways you recommend to solve this?

Also, can R/3 send large amounts of data (eg in XML format) to other systems? If so how can this be accomplished? We also need to send data from R/3 to external systems for updates, and we cant always initiate that communication from the external system, we might need R/3 to initiate the communication.

Thank you!

kind regards

Dionisios

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if you want to use batch input; you can write a batch-input not using a program but using a function.

Then you can make the function remote enabled.

So you can call it like calling a bapi.

If you need help about how to write a batch-input function uploading a file; I can send sample code.

P.S.:If it helps please not forget to give reward points.

Former Member
0 Kudos

Hi Fuat,

thank you for your post, it was helpful. We will most likely use that RFC solution in some cases. But I would also like to get some general guidelines as to what approach is best in different cases because we have several interfaces going in and out of R/3.

Thanks!!

kind regards,

Dionisios

PS. I've set reward points on your reply

Former Member
0 Kudos

Hi,

I think; when there is a BAPI, using it is a better solution.

- It runs faster.

- There is no problem like converting the dates and numbers for user settings. (As the display of numbers and dates may differ by user settings so the code for conversion of them also changes. Which makes the coding harder. And a batch-input running correctly for one user may return errors for other user.)

- The batch-input of some programs may be very hard and tiresome.

But I have no real guidelines to help you.

The document for XML also may be useful.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/from xml to abap data structures and back bridging the gap with xslt

Peter_Inotai
Active Contributor
0 Kudos

I agree that BAPI is better solution compare to batch input.

However you might consider Idoc based communication, depends on your scenario.

Peter

Answers (3)

Answers (3)

Former Member
0 Kudos

As the former reply, the benefits of Batch input import is 'much better in error tracking and error correcting by the department'.

But please aware that it is more slower compare to BAPI.

Batch Input isn't fit to the large amout case, even the importing is in the same sever.

My suggestion is using the IDOC for asynchorous case, using the BAPI for the synchorous case. As the asynchorous way, the caller don't care about the return info, so IDOC can meet the requirement.

I don't know which message broker you are using, but IDOC can be accepted smoothly by XI. If your message breaker support IDOC too, then it is a good choose for you, in my opinion.

Thanks

Former Member
0 Kudos

Hi everyone,

I actually have the same question as Dionisios. I have some further points to consider:

BAPI:

- faster

- screen independent

Batch-Input:

- much better in error tracking and error correcting by the department

- you are sure that every user-exit will run

Dionisios, because this posting is quite old, which solution are you using?

Kind regards

Hans Martin

Former Member
0 Kudos

I think you should really stick with the BAPI Solution because a lot of the transactions in SAP Rel. 46C upwards aint further batch input enabled.