1

I am getting Unique Constraint Violation error on direct update as well as standard ADSO while inserting 180k 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 rows. My ADSO does not currently have 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 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$', div='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".

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Rajat
  • 85
  • 2
  • 7
  • Did you solve the issue? I have the same error in native HANA. And am investigating .. – Thorsten Niehues Aug 21 '17 at 06:34
  • Yes I did solve it. It was due to the fact that HANA was making error while comparing double spaces, such as 'Hello World' has two spaces. – Rajat Sep 21 '17 at 02:22

1 Answers1

0

Without deeper on system analysis it's close to impossible to see what's happening here. It's likely a bug, but to verify this, SAP support will have to review the system and the problematic ADSO and data source. I highly recommend opening a support incident.

Lars Br.
  • 9,949
  • 2
  • 15
  • 29