‎2007 Oct 16 1:07 PM
hi all,
i have created ZTABLE with MANDT key and Maintenance View. i have entered one record through Maintenance View. while trying to save second record it is giving error 'An entry already exists with the same key'. my ztable is
Field Key Initial Type
MANDT X X MANDT
FIELD1
FIELD2
FIELD3
No Primary Key except MANDT. but it is giving error while saving 2nd record.
pl. give me solution any one.
Thanks.
‎2007 Oct 16 1:14 PM
hi,
you have declared mandt as primary key thats why when you are trying to save second record mandt is same and as it is primary it cant be duplicate, so u have to declare one more field as primary key,
if you dont have any field for primary key use serial no.1,2,3 etc.
now u have to create table again and do tale maintenance also, cos u cant make changes in fields once maintenance generation is done.
‎2007 Oct 16 1:11 PM
hi,
try giving one more field as the key field.
are u entering MANDT in the maintenace view while entering records?
‎2007 Oct 16 1:12 PM
Hi,
I think you should have another primary key in your ztable.
As mandt will always be same for every entry.
Regards,
Pritha.
‎2007 Oct 16 1:14 PM
hi,
you have declared mandt as primary key thats why when you are trying to save second record mandt is same and as it is primary it cant be duplicate, so u have to declare one more field as primary key,
if you dont have any field for primary key use serial no.1,2,3 etc.
now u have to create table again and do tale maintenance also, cos u cant make changes in fields once maintenance generation is done.
‎2007 Oct 17 6:11 AM
‎2007 Oct 17 5:47 AM
hI
THE PROBLEM WITH UR TABLE IS
YOU HAD DECLARED <b>MANDT</b> AS THE PRIMARY KEY AND THERE IS NO OTHER KEY IN UR TABLE
WHEN YOU ENTER THE DATA IN YOUR TABLE IT WILL ACCEPT UR 1ST RECORD DATA
WHEN YOUR TRYING TO PUT ANOTHER RECORD THEN AT THAT TIME THE MANDT VALUE IS SAME THAT WHY IT IS SHOWING THE ERROR MESSAGE
<b>SO TRY TO PUT ONE MORE FIELD AS THE PRIMARY KEY SO THAT YOUR PROBLEM WILL SOLVE VERY EASILY</b>
MANDT VALUE ALLWAYS DEPENDS ON THE CLIENT
IF YOU ENTER IN THE 800 CLIENT THEN FOR THAT TABLE THE 800 VALUE IS SAME FOR ALL RECORDS
<b>REWARD IF USEFUL</b>