‎2008 Feb 06 1:26 PM
hi all
In my Function module,
i m testing my FM ,In a perform i m doing insertion in a database table
now the insertion goes fine but when i run the FM with the same parameters it creates a duplicate entry
beacuse of this insertion
any idea how i can handle this?
‎2008 Feb 06 1:28 PM
Hi,
Instead of INSERT use MODIFY statement.
If a record with the same key already exists, then it will modify that record in the DB table, else it will insert a new record.
Cheers,
Aditya
Edited by: Aditya Laud on Feb 6, 2008 8:29 AM
‎2008 Feb 06 1:29 PM
before inserting into the table in the FM write a select to
check if the entry already exists .. if no then only insert into
the table ...
‎2008 Feb 06 2:24 PM
‎2008 Feb 06 1:29 PM
‎2008 Feb 06 1:30 PM
May be in u r database tabel u are not set the Key fieldds.
other possible way is check the insert command containes the statement ALLOW DUPLICATES.