cancel
Showing results for 
Search instead for 
Did you mean: 

Serialize BAPI/RFC executions to avoid locking issue

Former Member
0 Kudos

We have an XI interface that calls and executes a BAPI/RFC to create an invoice receipt against a purchase order in R/3.

While the BAPI/RFC is running, it locks the purchase order. If another XI call to the BAPI/RFC is initiated to create an invoice receipt against the same purchase order, the second BAPI/RFC call will fail in R/3 due to locking.

I have the following questions:

In XI, can we serialize the execution of the BAPI/RFC so the second call will start only after the execution of the first one is complete in R/3?

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

no and yes

no: not in standard

yes: there are workarounds - you can wrap the

BAPI in a RFC in which you can control it

(I used this solution and it works)

Regards,

michal

Former Member
0 Kudos

Hi,

Just an addition, please see that you put commit work after the call so that the present data is comitted to the database in the RFC before the next create is started.

It just helps in preventing the locking in case the server is slow at times.

Regards

Vijaya