‎2009 Jul 09 6:08 PM
Hi Friends ,
I am calling function module where I have created Background Job and Submitted it . In Submit call I am updating the database table . In a LOOP am updating service entry sheets of one Purchase order . (1 PO consists of More than 1 Service entry sheets)
Here I am able to update only First SES when it is processing the Second Service Entry sheet the PO get Locked.
I have used the COMMIT and WAIT command after the updating the Service entry sheet.
Here I am getting PO LOCK error by Same USER.
Can u suggest me in this Scenario.
Thanks in advance.
Jagadeshwar.G
‎2009 Jul 10 10:05 AM
hi ,
i also had the alike issue.
i resolved it using this code
syntax:
wait up to 2 seconds.
commitwork.
thanks & regards,
kat
‎2009 Jul 09 6:15 PM
Hello,
Try using Lock object (Enqueue and Dequeue) while updating the database table.
Regards,
Jacky.
‎2009 Jul 09 6:17 PM
Hi,
Enqueue the Purchase order before updating the Purchase order and after updating the Purchase order Dequeue the Purchase order.
‎2009 Jul 09 6:52 PM
Hi Ja,
try to use parameter WAIT = 'X' when you calling the BAPI_COMMIT_WORK FM.
regards,
Rama
‎2009 Jul 09 7:03 PM
Use the BAPi - BAPI_PO_CHANGE to change the PO & BAPI_TRANSACTION_COMMIT to commit work.
‎2009 Jul 10 9:18 AM
The Actual Message User is getting is 'Purchase order is processing XX user' .
Thanks in advance.
‎2009 Jul 10 9:37 AM
Hi, put wait in the commit and after the commit bapi, use the dequeue inside the loop. Hope this helps.
Best Regards,
Benedict
‎2009 Jul 10 10:20 AM
‎2009 Jul 10 10:05 AM
hi ,
i also had the alike issue.
i resolved it using this code
syntax:
wait up to 2 seconds.
commitwork.
thanks & regards,
kat
‎2009 Jul 10 10:41 AM
Thanks for information .
Even i have coded as follows .
ITAB records as follows
S1 - Servcice Sheet
P1 PO
X - other flds
S1 P1 X X X
S2 P1 X X X
S3 p1 X X X
Loop at ITAB to WA.
UPDATE <ZTABLE> with .......
commit work and wait.
.............
...........
ENDLOOP.
Error Message : PO is already in process by XXXX.
- This program runs in Background .My problem is I can't test this prg in dev .
Could you please explain the situation u faced so that i can validate it . Thx in advance.
Thx