I have one custome fields in PO. When ever i change the Custom Fields it should change the Sales Order item shiping point Field.
i have writern the code in the BADI 'ME_PROCESS_PO_CUST ' in POST method to change the sales order shipping point value using BAPI_Salesorder_Change' BAPI.its working fine in some cases. but in some cases giving dulicate insert dump in some cases.
the Dump is 'SAPSQL_ARRAY_INSERT_DUPREC'
when i debug that i found before calling my BADI its calling one function module to update the VBEP table the Functiona Module is 'SD_PURCHASE_CHANGE_ORDERS'.
So it was not taken into account that in Third-party or Individual Purchase Order case a duplicate update takes place (with basically the same update tables). As soon as this update involves new records they will be updated by both programs. The first program is able to write them to the database, but during the second update the system finds that record is already on the database and issues a SAPSQL_ARRAY_INSERT_DUPREC runtime error.
is there any alternate solution for this.
if yes let me know the steps involved.