Skip to Content
0
Former Member
Jul 28, 2016 at 08:50 AM

cannot CREATE UNIQUE INDEX; duplicate key found

1241 Views

Dear expert,

I have meet a problem during System Copy-import phase.the info and error is bellow

source system

OS:LINUX 11 SP3

DB:ORACLE 11.2.0.4

APP:ERP 6.0 EHP 7

target:

OS:LINUX 11 SP3

DB:HDB 1.0 SPS 11

APP:ERP 6.0 EHP 7

error is

ERROR exec_ddl_stmt: (DB) ERROR: DDL statement failed

(ALTER TABLE "BSIS" ADD CONSTRAINT "BSIS~0" PRIMARY KEY ( "MANDT", "BUKRS", "HKONT", "AUGDT", "AUGBL", "ZUONR", "GJAHR", "BELNR", "BUZEI" ) )

DbSlExecute: rc = 99

(SQL error 349)

error message returned by DbSl:

cannot CREATE UNIQUE INDEX; duplicate key found: [5] Several documents with the same ID exist in the index;SAPABAP1:BSIS.$trexexternalkey$ content not unique, cannot define unique constraint. rowCount != distinctCount

(DB) INFO: disconnected from DB

and also log is attached.

and I have check on source system,there is no duplicate key using the following SQL

select alldata.rowid, alldata.*

from SAPRPE.BSIS alldata,

(SELECT MANDT,BUKRS,HKONT,AUGDT,AUGBL,ZUONR,GJAHR,BELNR,BUZEI FROM SAPRPE.BSIS GROUP BY MANDT,BUKRS,HKONT,AUGDT,AUGBL,ZUONR,GJAHR,BELNR,BUZEI

HAVING COUNT(*) > 1) keydata

where alldata.MANDT=keydata.MANDT

and alldata.BUKRS=keydata.BUKRS

and alldata.HKONT=keydata.HKONT

and alldata.AUGDT=keydata.AUGDT

and alldata.AUGBL=keydata.AUGBL

and alldata.ZUONR=keydata.ZUONR

and alldata.GJAHR=keydata.GJAHR

and alldata.BELNR=keydata.BELNR

and alldata.BUZEI=keydata.BUZEI;

and cann't find the the table BSIS ON the target system.

can any one help me out?

Attachments

BSIS__DT.txt.zip (1.4 kB)