Application Development 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: 

How to insert same data in key field

former_member190818
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

so how to make it as unique for entire field...can u send me an example...my mail id is kj.mohanbabu@yahoo.com...i need with screen shots....

0 Kudos

What exactly is your problem?

Rob

0 Kudos

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...?

0 Kudos

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

Rob

Former Member
0 Kudos

Hi,

Create another key for the table..

Thanks,

Naren

0 Kudos

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

ok i'l check it....

Former Member
0 Kudos

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

Former Member
0 Kudos

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.