on 09-26-2013 10:20 AM
Dear All,
I have received 2 records from SQL server. One record is processed successfully by RFC receiver adapter. I am getting the following error while executing the 2nd record.
"" TYPE='E', Message (ID:M3, NUMBER:682): "Batch RMA of material SDCZ50-008G-B35 is already locked by XXXXXX", LOG_NO:, LOG_MSG_NO:000000 (PARAMETER:GOODSMVT_ITEM, ROW:1, FIELD:, SYSTEM:)""
I have received same material code for both the records. I have understood that this problem is with standard BAPI (BAPI_GOODSMVT_CREATE). While executing first record, second record with the same material code has tried to execute. With out changing existing BAPI, can I overcome this issue?
XML data from sender as follows
<row>
<CreatedOn>2013-09-25 12:11:56</CreatedOn>
<FromBranchCode>2200</FromBranchCode>
<SLoc>RLAM</SLoc>
<Quantity>1</Quantity>
<VendorCode>5020102785</VendorCode>
<ProductCode>SDCZ50-008G-B35</ProductCode>
<SerialNo/>
<NotificationId>174</NotificationId>
</row>
<row>
<CreatedOn>2013-09-25 12:11:56</CreatedOn>
<FromBranchCode>2200</FromBranchCode>
<SLoc>RLAM</SLoc>
<Quantity>1</Quantity>
<VendorCode>5020102785</VendorCode>
<ProductCode>SDCZ50-008G-B35</ProductCode>
<SerialNo/>
<NotificationId>175</NotificationId>
</row>
Thanks in advance..
Hi Ashok,
In RFC code, besides using the BAPI_TRANSACTION_COMMIT also use the function 'ENQUEUE_READ' to check if that object isn´t locked.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashok,
Material getting locked is a common scenario. Normally in live environment, scehduled batch jobs in production environment would re-process these messages and they will be taken care off.
However, I remember we used T code OMJI in ECC and used late exclusive block with a waiting time of 10 seconds to avoid such a scenario.
Please look into it and discuss with MM consultant in your project if there is no adverse impact.
Cheers,
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashok,
From my point of view, you can try two options:
1. Check BAPI transaction commit in the adapter. (BAPI_TRANSACTION_COMMIT http://help.sap.com/saphelp_nwpi71/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm?framese...)
2. Make a RFC to wrap the bapi and to make a COMMIT WORK after the bapi call in the abap code.
In this way you can avoid that any object keep blocked in the second call.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.