2013 Jan 11 4:50 AM
Dear all,
I have written one bdc which will internally call another bdc for transaction : mb1a.
When i post 2 document having same article, then 1st document is successfully posted , but when 2nd document is posting , "Article is lock" this error is coming.
Bdc mode is 'S'.
I have use Wait statement , but it is not feasible bcoz it takes too much time , when i have lots of document for posting.
So , Is there any other solution?
Thanx.
Dear all,
I have written one bdc which will internally call another bdc for transaction : mb1a.
When i post 2 document having same article, then 1st document is successfully posted , but when 2nd document is posting , "Article is lock" this error is coming.
Bdc mode is 'S'.
I have use Wait statement , but it is not feasible bcoz it takes too much time , when i have lots of document for posting.
So , Is there any other solution?
Thanx.
2013 Jan 11 5:06 AM
hi,
there is a bapi available for mb1a. its BAPI_GOODSMVT_CREATE.
Please try to post document by this. use bapi_transaction_commit
and wait .
hope it helps,
vinoth
2013 Jan 11 5:15 AM
Thanx Vinoth..
Yes , You are right, but i am calling ztcode via bdc.
And In this ztcode , lots of another activity is perform and one of the activity is posting.
In that ztcode , one bdc is written for posting.
So , I am passing Document to this ztcode and this ztcode is posting document.
When I passed 2nd document , it gives me error.
If i use Wait statement then it working fine. But i don't want to use wait.
Thanx
Satyen.
2013 Jan 11 5:41 AM
hi,
to post the document system is taking some time that is why article is block error is coming when you are processing your second time meanwhile. So as per my concern wait is the only concern.
if you confirm about ENQUEUE/DEQUEUE process try that too.
hope it helps,
Vinoth
2013 Jan 11 5:24 AM
Use this lock object ur BDC Program.
"ENQUEUE_EMMBWL" / "DEQUEUE_EMMBWL"
Blocked key MB_CREATE_GOODS_MOVEMENT / MB_POST_GOODS_MOVE
Note : I think you know how to use ENQUEUE/DEQUEUE .
Regard's
Smruti
2013 Jan 11 5:31 AM
Reference Purpose
Sample Code "DEMO_TRANSACTION_ENQUEUE"
using Call Transaction .
Regard's
Smruti
2013 Jan 11 7:42 AM
As you get the lock error you should be able to identify the lock required. So instead of a single WAIT statement, use a call of the related ENQUEUE FM with _WAIT option set, and once every required material for the next execution are locked, DEQUEUE those and call your next BDC. The ENQUEUE will wait til the update tasks triggered by the BDC have released their locks.
(If you called a BAPI and not executed a BDC (so executed in another LUW) you could have removed the dequeue step)
Regards,
Raymond
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |