Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

data base table duplicate keys

Former Member
0 Likes
498

Hi,

What happens when you try to insert duplicate records in a database table:a. One record at a timeb. From an internal table

3 REPLIES 3
Read only

Former Member
0 Likes
462

hi,

Obviously you get a short dump(Runtime error) saying Duplicate entries.

Regards:-

Santosh

Read only

Former Member
0 Likes
462

Hi sai,

1. The program will give error.

2. First the database gives error,

it reports to the r/3 system,

and then the r/3 system, gives a short dump.

3. As soon as the duplicate record is

being tried to inserted,

the error occurs.

4. Instead of using INSERT command,

we can use MODIFY statement.

5. MODIFY statement will AUTOMATICALLY

insert/update the records

based upon the primary key combination value

found/ not found in database.

regards,

amit m.

Read only

0 Likes
462

Just to add one more point to Amit's reply.

if you use the addition "ACCEPTING DUPLICATE KEYS" along with INSERT you can avoid the dump. if a duplicate key is found the system will just ignore the entry.

Regards

Raja