cancel
Showing results for 
Search instead for 
Did you mean: 

aborted due to duplicated key error

Former Member
0 Kudos

Hi folks,

Today one table in our SLT system keeps getting the error "

Z01_POS_PO_CREATE006: Run 0000000001 aborted due to DUPLICATE KEY on 20160620 at 105724

". This error happened when I update or delete a row in our source system(SYBASE). Table's name is SLT_TEST1.

I have followed the note 1919356 but it didn't help.

My detail steps:

first try:

1. update or delete a row in source system

2. find the errors and follow note 1919356

3. no help, so I stop and restart the replication

4. but the transfer behavior is 1 after the restart

Second try:

1. stop and restart replication

2. follow 1919356

3. update or delete a row in source system

4. the error happens...

This table's primary key was modified one week ago.

Anyway, I tested another table SLT_TEST2 with no errors.

So please suggest me how to resolve it or investigate the reason.

Thank you!

Chong

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hmm...This issue has been resolved.

The reason is that you have to make sure that the columns specified in the primary key should be the first N columns in the table. N is equal to the number of columns the primary key has.

Suppose you have a table call TEST1 with columns of col1, col2, col3, col4, col5. And you create a primary key on (col1, col4, col5). If you update on col2 or col3, or you delete a row, duplicate error will occur.

You have two options the fix it. one is to ask the db administrator of the source system to modify the table structure. one is to modify it in the SLT table settings(LTRS).

Chong

Former Member
0 Kudos

Hello Chong,

Thanks for the explanation, i have a doubt for the explanation. could you please let me know if we have primary keys on COL 1 col2 and col3 we will not have issues after updating the col4 n col5.

Amar

Former Member
0 Kudos

Hi Amar,

sorry for the late reply as i'm dealing with BO reports....

The table structure in the source system as below:

table structure with the above error:

Modify the table to below structure:

As the first picture, after the initial load, SLT is successful and table is created in HANA with a primary key with (ZRUNSA, MATNR, REC). But SLT will treat (ZRUNSA, DOC_TYPE, FLAGS) as a primary key when you update or delete on the source table. That will cause the duplicate key error.

This conclusion is just based on the results I tested. Need official explanation!

Regards,

Chong

Answers (1)

Answers (1)

Former Member
0 Kudos

Even I recreate the configuration , it still throws the same error.

so confusing..

Former Member
0 Kudos

Hi guys,

above error disappeared and a new error happened as below:

and ST22 snapshot:

And SM21 snapshot:

I found the line 126 of the program

But I don't know how to do next.

Anybody please give me suggestion

Thank you very much!

Chong

Former Member
0 Kudos

Hello Chong,

Please check SAP note 1919356 - Duplicate key error on System Landscape Transformation (SLT) system

Amar

Former Member
0 Kudos

Hello Amar,

Note 1919356 doesn't help.

Why duplicate key error occurs even if table has a primary key?

Chong