cancel
Showing results for 
Search instead for 
Did you mean: 

How can we avoid duplication of records in database while inserting records

Former Member
0 Kudos

Hi,

In my scenerio,while inserting the same records through idoc duplication of records is happening in database.How can i avoid this.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Divya,

First its a wrong data, because you cannot have the same data for any condition. Probably its a data problem. Please check with the datbase team and ask them why is it so? They should handle on their end.

Anyways if the above dont work and if you ahve duplicate records then probably you need to come up with a query using select distinct. If this doesnot work then if the duplicates comes into mapping, you might selecting some fields which are common. So you can use a splitbyvalue(on value change) for those records, so even if there are three records it takes only one record. If you have 4 or 5 common values then you can concat them and then use the splitbyvalue change.

Else an adapter module should help you out in sender comm. channel after picking the records.

For an idea can you rajs response in this thread:

Regards,

---Satish

Answers (3)

Answers (3)

Former Member
0 Kudos

resolved

Former Member
0 Kudos

Hi diuya

Please check your data , something happend with the IDOC , once time I had a problem with Data PI generated duplicate record.

former_member188019
Active Participant
0 Kudos

may be by using insert_update query instead of plain insert query

if your table has primary keys, u can use in <key> elements.

http://help.sap.com/saphelp_nw04/Helpdata/EN/2e/96fd3f2d14e869e10000000a155106/content.htm