cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate key in standard table? (DUMP

marlon_frasson
Explorer
0 Kudos

Hello colleagues,

I'm getting this dump at our SOLMAN. Any help?

Category              ABAP Programming Error                                                     

Runtime Errors        ITAB_DUPLICATE_KEY                                                         

ABAP Program          CL_SPR_MASTERDATA_REPOSITORY==CP                                           

Application Component  SV-SMG                                                                     

Date and Time          17.02.2014 13:39:41                                                         

                                                                                                   

Short text                                                                                       
    There is already a line with the same key.                                                   

What happened?                                                                                   
    Error in the ABAP Application Program                                                       
   
    The current ABAP program "CL_SPR_MASTERDATA_REPOSITORY==CP" had to be                       
    terminated because it has                                                                   
    come across a statement that unfortunately cannot be executed.                               

What can you do?                                                                                 
    Note down which actions and inputs caused the error.                                         
   
   
    To process the problem further, contact you SAP system                                       
    administrator.                                                                               
   
    Using Transaction ST22 for ABAP Dump Analysis, you can look                                 
    at and manage termination messages, and you can also                                         
    keep them for a long time.                                                                   

Error analysis                                                                                   
    You tried to insert an entry into table                                                     
    "{O:1715*\CLASS=CL_SPR_MASTERDATA_REPOSITORY}\DATA=MERGE_MASTERDATA[19]-MTEXTS             
    ". However, updating                                                                         
    the unique table key "PRIMARY_KEY" resulted in a duplicate entry. The key                   
    concerned may be either the primary key or a secondary key.                                 
   
    The key components of the duplicate entry have the values "{2147483648-}"                   
    " " " " " ".                                                                                 
   
    With primary keys, the system may terminate while processing                                 
    block insert operations. The statements concerned are                                       
   
    (1) MOVE                                                                                     
   
    (2) INSERT/APPEND ... LINES OF ... INTO/TO                                                   
   
    (3) SELECT ... INTO/APPENDING ...                                                           
   
    With secondary keys, the system may also terminate while processing                         
    a single record insert operation. In particular, the following                               
    modifying statements may cause the system to terminate due to                               
    duplicate key values:                                                                       
   
    (1) "<fs> = ..." or "<fs>-comp = ...", if the assignment to                                 
    a field symbol or to a component of a field symbol modifies a                               
    component of a unique secondary key.                                                         
   
    (2) "ref->* = ..." or "ref->comp = ...", if the assignment to a field                       
    symbol or to a component of a field symbol modifies a component of                           
    a unique secondary key.                                                                     
   
    (3) "MODIFY ... [TRANSPORTING comp_1 ... comp_n] ...", if transporting                       
    the components to be changed modifies a component of a unique secondary                     
    key.                                                                                         
   
    (4) "COLLECT ... INTO ...", if adding up the columns of a numeric type                       
    modifies a component of a unique secondary key.                                             
   
    (5) "READ TABLE ... INTO <fs> ...[TRANSPORTING comp_1 ... comp_n] ...",                     
    if the field symbol points to a row of a table with unique secondary                         
    keys and transporting the values read modifies a component of a unique                       
    secondary key.                                                                               

How to correct the error                                                                         
    Probably the only way to eliminate the error is to correct the program.                     
   
    If the error occures in a non-modified SAP program, you may be able to                       
    find an interim solution in an SAP Note.                                                     
    If you have access to SAP Notes, carry out a search with the following                       
    keywords:                                                                                   
   
    "ITAB_DUPLICATE_KEY" " "                                                                     
    "CL_SPR_MASTERDATA_REPOSITORY==CP" or "CL_SPR_MASTERDATA_REPOSITORY==CM004"                 
    "COMPARE_MASTERDATA"                                                                         
   
    If you cannot solve the problem yourself and want to send an error                           
    notification to SAP, include the following information:                                     
   
    1. The description of the current problem (short dump)                                       
   
      To save the description, choose "System->List->Save->Local File                           
    (Unconverted)".                                                                             
   
    2. Corresponding system log                                                                 
   
      Display the system log by calling transaction SM21.                                       
      Restrict the time interval to 10 minutes before and five minutes                         
    after the short dump. Then choose "System->List->Save->Local File                           
    (Unconverted)".                                                                             
   
    3. If the problem occurs in a problem of your own or a modified SAP                         
    program: The source code of the program                                                     
      In the editor, choose "Utilities->More                                                   
    Utilities->Upload/Download->Download".                                                       
   
    4. Details about the conditions under which the error occurred or which                     
    actions and input led to the error.     

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member217141
Active Participant
0 Kudos

is there any solution ?

PavolF
Explorer
0 Kudos

Hi Marlon,

you should check the shortdump a bit more below to find a masterdata technical name in one of the variables(should be a string up to 9 characters). Then you can go to transaction rsd1 push there Repair Infoobjects button up in menu. In expert mode you can specify the Infoobject and then you switch to Execute Repair.

Hope it helps.

Cheers,

PAvol

marlon_frasson
Explorer
0 Kudos

Hello Pavel,

Thanks for the reply, but I'm having a hardtime finding this technnical name, could you be a bit more specific?

The dump is attached on the answer above.

PavolF
Explorer
0 Kudos

Hi Marlon,

check following Infoobjects if there will be any error in transaction RSD1:

0SPRSTPRO

0SPRSRCPR

0SPRSOLCT

0SPRMGST

0SPRMGPRI

Also in transaction RSA1 try to check Infocube 0SPR with a standard check button once you go inside.

If it does not help there are also following Infoobjects:

0SPRMPTEX

0SPRMGST

0SPRBPCUNO

0SPRIBASE

0SPRBPNO

0SPR_BP

Try to do it with "Only display Repair" option in the RSD1 transaction -> Repair Infoobjects.

Let me know if you found anything.

Thanks and good luck!

PavolF
Explorer
0 Kudos

Hmm now I would guess the duplicate could be 0SPRMGST so start from that...

marlon_frasson
Explorer
0 Kudos

Thanks for the help Pavol

I checked all these infoobjects and repaired it, but unfortunately it didn't solve the issue.

PavolF
Explorer
0 Kudos

So what are you doing when the dump occurs? Is it reoccuring? If you are transporting something please add also transport log.

Thanks.

marlon_frasson
Explorer
0 Kudos

Its is reoccuring as you can see below, I'm not doing any transporting or any other specific action. Just noted this by checking st22

PavolF
Explorer
0 Kudos

ok so if you go to transaction sm37 and enter the user id and time around one of the dumps and select Canceled jobs it should give you the job log. That would help.

Thanks.

PavolF
Explorer
0 Kudos

You can try to go into table spr_mdidx in se16 and search for a record with value SPR_MASTERDATA in field key1. WHen you find it there should be a source system for that key.

With this you should be able to check table SPR_MDATA and find records with selection:

RELID = SP

SOURCESYSTEM = <what you find in talbe spr_mdidx>

KEY1 = SPR_MASTERDATA

check if you can find any duplicates there.

marlon_frasson
Explorer
0 Kudos

Thanks for the reply and sorry for the delay

BUT

Unfortunately it didn't work.

Any other tip? We have an SAP message open already for almost 20 days without response from them.

Former Member
0 Kudos

Hi Marlon

can you explain me how you encounter this issue? what's you solman version and patches?

Let me know

cheers

a

marlon_frasson
Explorer
0 Kudos

Hi Andrea,

I found it via ST22, I think it is related to collector jobs for diagnosis (background). We are using solman 7.1 SP 12

I've searched for potential failed jobs for the user, but found none.

Former Member
0 Kudos

Hi Marlon

a little bit more effort, would you mind to upload the entire dump so I can analyze where is  the duplicated entry?

cheers

a

marlon_frasson
Explorer
0 Kudos

Hi Andrea!

Dump attached!