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

How to insert same data in key field

Former Member
0 Likes
1,301

Hi,

I need to insert the same record in key field... Is it possible..?

i've seen in EKPO the PO number will be repeating for line items even though it is key field..so i need the solution as it....can any one help me...

Hi,

I need to insert the same record in key field... Is it possible..?

i've seen in EKPO the PO number will be repeating for line items even though it is key field..so i need the solution as it....can any one help me...

9 REPLIES 9
Read only

Former Member
0 Likes
1,249

The <b>entire</b> key needs to be unique. Table EKPO also includes the line item (EBELP). So all combinations of PO and item number are unique in this table.

rob

Read only

0 Likes
1,249

so how to make it as unique for entire field...can u send me an example...my mail id is [email protected] need with screen shots....

Read only

0 Likes
1,249

What exactly is your problem?

Rob

Read only

0 Likes
1,249

hi,

i've to insert the same data which is already there in table....

is it possible..?

particularly the key field.....as in EKPO....

the data is,

0001 001 anand 2000

0001 002 mohan 3000

i've to insert like this....the first two field is key field....

is it possible...?

Read only

0 Likes
1,249

Well, you can't insert duplicate rows. As Naren said, you can create a new key field for the table.

Rob

Read only

Former Member
0 Likes
1,249

Hi,

Create another key for the table..

Thanks,

Naren

Read only

0 Likes
1,249

if i create another key field means it will get solved..?

ok i'l check it....

Read only

Former Member
0 Likes
1,249

Hey Mohan,

there might be more than one field under the PRIMARY KEY ....

suppose a table has fields A thro' K

and the primary key consists of fields A B C

now when u will insert values then values can be like follows

A B C

1 2 2

1 2 3

now u can consider A as ur PO number of EKPO table ... the combination of all the 3 fields should be different and should generate an unique entry

hope this will help

bbye tc

Ashwani

Read only

Former Member
0 Likes
1,249

Hi Mohan,

It is not possible to insert same value in a Primary Key field. Always, we can identify the unique records in the table only throught the primart key.It is impossible to violate Primary key definition.Even it is not possible to insert throught program.

Regards,

V.Raghavender.