Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Concurrent access

Former Member
0 Likes
814

Hi all,

I have created a BAPI which is working well.

However, if I call it more than one times at the same times through RFC (php call), it doesn't work correctly.

Can anyone help me about concurrent access like this ?

Thanks,

Smoltok

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
757

Hi,

Is your BAPI updating some table ?

if so use lock object, consurrent read will not give any error.

Regards

Bikas

6 REPLIES 6
Read only

Former Member
0 Likes
757

Therefore, a solution would be to have the possibility to make some sort of lock access... but how ?

Read only

Former Member
0 Likes
758

Hi,

Is your BAPI updating some table ?

if so use lock object, consurrent read will not give any error.

Regards

Bikas

Read only

0 Likes
757

Exactly, my BAPI update some table.

I have just created and activated one lock object.

Could you have example of how to use the enqueue/dequeue system ?

Read only

0 Likes
757

Hello,

Before the call to your BAPI, call the function module ENQUEUE_<name of the lock object> and pass the parameters to locjk the specific entry. Now all your BAPI amd once done unlock the entry by call the function module DEQUEUE_<name of the lock object>.

Regards,

Sachin

Read only

0 Likes
757

Is it possible to lock many entries at the same times ? with a widlcard caracter for instance ,

Read only

0 Likes
757

Yes, and you don't need to create another (custom) lock object. You can use ENQUEUE_E_TABLE and specify the table name as well as the full or partial key (in the VARKEY field) in order to lock the records and then DEQUEUE_E_TABLE or DEQUEUE_ALL to release the lock(s).