‎2011 Oct 27 4:58 PM
Hi Experts,
I had z table in which i had made three fields as primary key combination , i also had a custom program in which i am inserting values into the z table using Insert statement. during the execution of the program it is going for a short dump giving "SAPSQL_ARRAY_INSERT_DUPREC" With Exception CX_SY_OPEN_SQL_DB.
The Delivery Class of the Table is "C".
The thing is that i want if 1st field is "ORG ID" second Field is "Material" & the third field is "Type Id". then the system should allow entries like
-
ORG ID | Material Id | Type Id |
-
|"0001" | "100'' | "R1" |
-
"0001" | "100'' | "R2" |
-
|"0001" | "100'' | "R3" |
-
"0001" | "100'' | "R4" |
-
Is there any OSS note for Corrections.
Thanks & regards
Priyesh Shah.
‎2011 Oct 27 5:03 PM
Did u check if the table already has the entries that you are trying to insert? You cannot insert a new row with the same key.
‎2011 Oct 27 5:18 PM
‎2011 Oct 27 5:22 PM
Then the internal table that you are using to do the inserts has duplicate entries.
Rob
‎2011 Oct 27 5:24 PM
Did you check the internal table in your program at the time of insert? Maybe the internal table has multiple entries with the same primary key.
‎2011 Oct 27 5:27 PM
Hi All,
The internal Table that i am using is having the same entries that i had given in the example only the Type Id field is different else
Org Id & Material Id Fields are same .
Also i would like to Correct Every body here that the Table has a key field combination made up of these three fields.
Edited by: priyeshosi on Oct 27, 2011 9:58 PM
‎2011 Oct 27 5:29 PM
‎2011 Oct 27 5:38 PM
‎2011 Oct 27 5:41 PM
Ensure that Type id is character and at least three characters. And make sure the domain does not have a conversion exit.
Rob
‎2011 Oct 27 5:42 PM
Not Using any Coversion Exit or Routines & Type Id is only 2 Character Long field
Edited by: priyeshosi on Oct 27, 2011 10:12 PM
‎2011 Oct 27 6:34 PM
Sorry - meant two bytes.
Well, the error messatge is self explanatory. You are trying to insert duplicates.
Rob
‎2011 Oct 27 6:42 PM
Guys i had already checked the internal Table doesnot have any duplicate entries.
‎2011 Oct 27 6:51 PM
Hi
Are you sure your table has those 3 fields as key fields?
I means you make sure the fields: ORG ID, Material Id, Type Id are key fields.
If you are sure the internal table has not duplicated records and your z-table is empty: It can only suppose some field is not a key.
If you have made some modification, try to check the database defination of your z-table is equal to dictionary defination
Max
‎2011 Oct 27 7:14 PM
Hi All,
Thanks for all of your Quick Update, really Appreciate that.
I had looped the internal Table into a work area with an insert statement inside it.
problem solved.
‎2011 Oct 27 7:17 PM
Ok
That's a solution in order to avoid the dump, but probably some insert will fail
Max
‎2011 Oct 27 7:15 PM