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

Problem unlocking objects

danielpalacios3
Explorer
0 Likes
2,986

Hi

I've a problem trying to unlock some objects (TO, delivery and purchase orders). This is my scenario:

I begin confirming a TO on LT12. On this transaction TO and its delivery are locked (objects ELLTAKE and EVVBLKE). When pushing 'Save' button, process is ended and OT is supposed to be confirmed, but previously FM L_TA_QUITTIEREN is called IN UPDATE TASK, so other process is running as well and when I exit from LT12 I receive the next message: "Express document Update was terminated received from author... "

I've checked SM13, and now I know that the problem comes from an user-exit inside FM L_TA_QUITTIEREN. This exit tries to make a good receipt via BAPI BAPI_GOODSMVT_CREATE but it's not able because of related purchase order is locked previously on L_TA_QUITTIEREN. So I'm trying to unlock the purchase order and the delivery before calling BAPI (and locking them again after the calling) in order to avoid the error but locks are not released. I use the same objects than in locking: EVVBLKE for delivery and EMEKKOS for PO.

My code:

CALL FUNCTION 'DEQUEUE_EMEKKOS'

EXPORTING

MODE_EKKO = 'E'

MANDT = SY-MANDT

EBELN = wg_pedidos-vgbel.

CALL FUNCTION 'DEQUEUE_EVVBLKE'

EXPORTING

MODE_LIKP = 'E'

MANDT = SY-MANDT

VBELN = w_ltak-vbeln.

I've tryed passing parameter _SYNCHRON = 'X' but locks still remain set.

Does anybody know if is it possible to unlock these objects?

Thanks and regards

Dani

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,110

Hi,

can you try with the

CALL FUNCTION 'DEQUEUE_ALL'.

Regards!

5 REPLIES 5
Read only

Former Member
0 Likes
2,111

Hi,

can you try with the

CALL FUNCTION 'DEQUEUE_ALL'.

Regards!

Read only

0 Likes
2,110

I`ve tried this but still don´t work.

Any other idea?

Thanks

Read only

0 Likes
2,110

when i confirmed via idocs, we got the same issue, but, once in thousands, so, we overlloked and sent to production, bcoz of dead line. just try to search the OSS notes.

thanq

Read only

nagarajan_ramudu
Active Participant
0 Likes
2,110

Hi,

I had the same issue in my development and followed the below process to over come the locking issue.

(1) Call BDC LT06 (as per my requirement) to create the transfer order

(2) Wait for 3 seconds (with my analysis, I came up with 3 seconds)

(3) Call L_TO_CONFIRM to confirm the TO

(4) Commit work (Bapi transaction commit) if successful message from step 3 else Roll Back (Bapi transaction rollback)

Please try this option alternatively and let me know.

Thanks

Nagarajan

Read only

0 Likes
2,110

Hi Nagarajan,

Finally i solved this issue calling my FM inside the exit in mode STARTING NEW TASK. Therefore locks are released when BAPI_GOODSMVT_CREATE is executed and goods receipt can be done.

Thanks and regards