2009 Feb 11 2:06 PM
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
2009 Feb 11 2:12 PM
2009 Feb 11 2:12 PM
2009 Feb 11 3:01 PM
2009 Feb 11 3:07 PM
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
2009 Feb 11 11:02 PM
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
2009 Feb 12 12:16 PM
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