cancel
Showing results for 
Search instead for 
Did you mean: 

Enqueue service - common between J2EE / ABAP ?

Former Member
0 Kudos

Dear all,

As we know, SAP Loking concept is now available in SAP J2EE as well. Can anybody tell me whether the ABAP instance and J2EE instance of SAP share a common enqueque service. I mean, if an object is locked by ABAP, can it be changed by JAVA at the same time? If not, can anybody give me some reference document to refer the common enqueue service between J2EE and ABAP?

Thanks in advance,

Regards,

Pranav.

Accepted Solutions (0)

Answers (1)

Answers (1)

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

The enqueue service is NOT common between ABAP and Java.

Therefore you cannot access ABAP data with Java directly.

You have to use JCo/ related technolgy.

Regards,

Benny

Former Member
0 Kudos

Hi,

When we access ABAP data using JCo / related technology, ultimately, i'll be using a work process in ABAP engine. For example, change Document master using CV02N through SAP GUI or call BAPI_DOCUMENT_CHANGE2 through some JAVA code which uses JCo... both are TECHNICALLY same.

But think of a scenario where i am accessing Document Master using CV02N and at the same time i am trying to change the same document using EJB of SAP J2EE environment. How enqueue takes care of such cases?

Regards,

Pranav.

Former Member
0 Kudos

Hi Pranav,

under normal circumstances, the BAPI itself should try to enqueue the document on changing. If you edit the same document using CV02N at the same time, you should get an "already locked" error from the BAPI call just like you would get opening another SAP GUI modus and editing it there. If the document is not enqueued by the BAPI, you can enqueue and dequeue it by yourself by calling BAPI_ENQUEUE/DEQUEUE.

Hope that helps.

Regards,

Stefan

Former Member
0 Kudos

Hi Stefan,

In a typical web application, one would call display BAPI, construct the GUI for the user to edit. Change BAPI is called only when user hit the save/submit button. In such a situation, we cannot acquire lock when display BAPI is called and acquiring a lock during Change BAPI may be too late. This becomes more complicated, when we account for connection pooling.

IMHO it makes sense to have a synchronous ENQUEUE/DEQUEUE service between Java and ABAP.

Thanks,

Ravi.

Former Member
0 Kudos

Hi Benny,

Thank you very much for the answer. You are right. We have to use JCo, if we want to access ABAP objects from JAVA. Even if we use EJB, internally it uses JCo to update ABAP objects.

Thanks everybody,

Regards,

Pranav.

0 Kudos

<b>Ravi very good question</b>...

Ciao

Sam

Message was edited by: samuele barzaghi