Application Development 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: 

'Call Transaction' on same data repeated causes it to lock

Former Member
0 Kudos

Hi,

Has anyone come across a case where you use CALL TRANSACTION repeatedly on a tcode with the same input and sometimes you end up having a locked data?

I am calling CN22 repeated with the request to change the same network and I end up having locked data for no particular reason. Do I need to put a PAUSE between the call transaction?

Thanks,

Guan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

In what UPDATE are you doing CALL TRANSACTION? Do it in UPDATE <b>S</b>

Message was edited by: Sam

4 REPLIES 4

Former Member
0 Kudos

In what UPDATE are you doing CALL TRANSACTION? Do it in UPDATE <b>S</b>

Message was edited by: Sam

Former Member
0 Kudos

Hi Sam,

I am using update A.

So update S will solve the problem?

Thanks,

Guan

0 Kudos

I believe it should...try it...

manuel_bassani
Contributor
0 Kudos

Hi Guan,

yes it is possible. In fact if the transaction calls a FM in asyncronous mode (that locks an object), it may happend that when the statement CALL TRANSACTION ends, the async.FM has not release the lock yet.

you can ty to do the following (if you know the name of the locked object).


call transaction ...

* loop until the object is unlocked
do.
  call function 'ENQUEUE_<object name>'
  exporting 
    mode = 'E'
    <object key>.
  if sy-subrc = 0.
    exit.
  endif.
enddo.

call transaction ...

Regards, Manuel