cancel
Showing results for 
Search instead for 
Did you mean: 

Java Calling BAPI

Former Member
0 Kudos

We are writing a Java web application that accesses BAPIs using SAP JCo.

We are facing a problem when we have multiple simultaneous calls from different web users using the same BAPI with the same parameters. Some of them get a message saying that "the material is locked by user XXX", where XXX is the SAP user used in JCo to connect to SAP.

I am not sure whether this is an SAP issue, or a Java issue, or if we should handle this by implementing some kind of JMS queue, so that we will never have two users calling the same BAPI with the same parameters at the

same time.

Does any of you have ever had this kind of problem?

Thank you

Dov

Accepted Solutions (1)

Accepted Solutions (1)

JiriEhrlich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

it is a standard functionality of the business logic implemented in SAP Material Management BPI - master data of materials are locked during warehouse operations.

You can send more parallel synchronize BAPI requests via JCo and ABAP Engine is able to process them in parallel - with described locks.

You have to take care of it on the JCo side or use asynchronous processing via qRFC or standard iDoc.

The queue is necessary - want to process your operations in the same order like in the non-SAP system.

Jiri

JiriEhrlich
Product and Topic Expert
Product and Topic Expert
0 Kudos

BPI -> BAPI

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

could be a SAP problem: Some BAPIs have a parameter "Scenario". This parameter defines wether accessed data will be locked during BAPI execution. I think "00" as aparmeter value will notlock anything but please refer to the BAPI documentation.

Arne