‎2007 Apr 04 10:39 PM
Hi,
Can I do an update and insert at same time using BAPI_SALESORDER_CHANGE. Becoz when I update a qty on a line item it is getting updated properly, when I try to insert a new line item it is updated properly.
But When do both insert and update at a time it goes to upadate termination saying SQL_ARRAY_DUPEC_REC_INSERTED.
Please help!
‎2007 Apr 04 10:44 PM
Are you inserting a new line that is not there currently on the sales order? I think you are not setting the line number of this new line correctly. You have to get the next available line number and use that for your new insert line. System is using existing line number and when it is trying to insert a line that already exists, you are getting this dump.
‎2007 Apr 05 7:52 AM
Hi priya,
As far as I know you should be using another BAPI: BAPI_SALESORDER_CREATEFROMDAT2
Generally these rules apply:
1. BAPI_SALESORDER_CREATEFROMDAT2 is used to create new orders or add line items to existing orders.
2. BAPI_SALESORDER_CHANGE is used to make amendments to existing orders.
hope it helps.
regards,
Gaurav