Maintain HR Master Data - ITAB_DUPLICATE_KEY Short Dump

This can happened to any SAP HR Transaction Codes like PA61, PA30 transaction.

System immediately give you a short dump ITAB_DUPLICATE_KEY with info as follows:

What happened?

Error in ABAP application program.

The current ABAP program "SAPLHRBAS00GENERICSELECTION" had to be terminated because one of the statements could not be executed.

This is probably due to an error in the ABAP program.

Error analysis

You wanted to add an entry to table

"\FUNCTION=HR_GET_TEXT_FOR_OBJECTS\DATA=L_PERNR_DATE_TAB", which you declared

with a UNIQUE KEY. However, there was already an entry with the same key.

This may have been in an INSERT or MOVE statement, or within a

SELECT ... INTO statement.

In particular, you cannot insert more than one initial line into a table with a unique key using the INSERT INITIAL LINE... statement.

User and Transaction

Language key........ "E"
Transaction......... "PA30 "
Program............. "SAPLHRBAS00GENERICSELECTION"
Screen.............. "SAPMP50A 1100"
Screen line......... 3
Information on where terminated

The termination occurred in the ABAP program "SAPLHRBAS00GENERICSELECTION" in

"HR_GET_TEXT_FOR_OBJECTS".

The main program was "SAPMP50A ".

The termination occurred in line 65 of the source code of the (Include)

program "LHRBAS00GENERICSELECTIONU17"

of the source code of program "LHRBAS00GENERICSELECTIONU17" (when calling the editor 650).

SourceCode

.........cut................
60     IF begda > endda.
61       RAISE wrong_dates.
62     ENDIF.
63
64     IF NOT pernr_tab[] IS INITIAL.
65       SELECT pernr ename AS name begda endda FROM pa0001
66         INTO CORRESPONDING FIELDS OF TABLE l_pernr_date_tab
67           FOR ALL ENTRIES IN pernr_tab
68             WHERE pernr = pernr_tab-pernr AND
69                   sprps EQ space.
70       CLEAR pernr_tab[].
71 *     ENAME contains allways the latest name, so we don't have to care
72 *     about the dates
73       LOOP AT l_pernr_date_tab INTO l_pernr_date_wa.

...........cut..............

This happens for a specific employee.

Solution:

To solve this ABAP dump, just run program RH_DELETE_USER_SETTINGS via SE38 transaction.

Fill in the SAP user name and just select only first checkbox named: "Delete last object selection".

Now, your HR tcode like PA61, PA30 will work fine.

SAP HR Tips

Also See
Probation In Personnel Action

SAP Human Resouce Books
SAP HR Books - Certification, Interview Questions and Configuration

SAP Human Resource Tips
SAP HR Tips and Human Resource Management

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.