Skip to Content
avatar image
Former Member

unique constraint violated exception

Hi all,

I am getting Unique Constraint Violation error on Direct Update as well as Standard ADSO while inserting 1.8 lakh records. I am sure that all the records are Unique for my composite primary key (Combination of 12 fields).

I am inserting the data using AMDP in platform edition.

Validated uniqueness of Records using this:

Select a, b, c, d from "Calculation View" group by a, b, c, d having count(*)>1: This query returns no row. My ADSO is currently not having any data.

Also validated using: Select Count(*) from (Select a, b, c, d from "Calculation View").

Select Count(*) from (Select distinct a, b, c, d from "Calculation View").

Count Is same in both the Queries.

Here is the error:

Error when executing the database procedure "ZFXX_VOLUME_REPORTING=>METH_INSERT_BMS_PIVOT". SQL error: "301". SQL message: "unique constraint violated: "SAPABAP1"."ZFXX_VOLUME_REPORTING=>METH_INSERT_BMS_PIVOT#stb2#20170616162711"": line 10 col 3 (at pos 253): "SAPABAP1"."ZFXX_VOLUME_REPORTING=>METH_INSERT_BMS_PIVOT": line 27 col 1 (at pos 903): [301] (range 3) unique constraint violated exception: unique constraint violated: TrexUpdate failed on table 'SAPABAP1:/BIC/AG9SC26ADU2' with error: unique constraint violation in self check for table SAPABAP1:/BIC/AG9SC26ADU2en, constraint='$trexexternalkey$', udiv='10,1030201703;6,201703;12,FR0010451260;2,20;4,FR04;6,DE1410;7,Managed;1,0;3,DIS;1,D;1,0;12,Alternatives', pos=195705, indexname=/BIC/AG9SC26ADU2~0, rc=55".

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

0 Answers