Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

PA30 - Maintain HR Master Data - ITAB_DUPLICATE_KEY shoprt dump

Former Member
0 Kudos

Hello,

when I run PA30 transaction I immediately receive 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.

There are two records in PA0001 table, but they are on a different date ranges, so this should be OK.

PA0001 table content:

PERNR SUBTY OBJPS SPRPS ENDDA BEGDA SEQNR AEDTM UNAME

10001228 31.12.2008 01.09.2008 000 03.10.2008 MARTISB

10001228 31.12.9999 01.01.2009 000 03.10.2008 MARTISB

I suppose this happens when PA30 before showing screen to a user tries to read info of users used in last usage of PA30.

Maybe clear of SAP GUI cache should help? (Do you know how to cleare GUI cache on user's desktop?)

Maybe field SPRPS ("Lock Indicator for HR Master Data Record") should not be empty for the second record of PA0001 table?

Anyone know any solution for that or OSS note?

Kind regards

Marcin

3 REPLIES 3

former_member226519
Active Contributor
0 Kudos

put a break-point in FM HR_GET_TEXT_FOR_OBJECTS at line

IF NOT pernr_tab[] IS INITIAL.

and see why it dumps.

looks very strange.

To solve that I've run program RH_DELETE_USER_SETTINGS via se38 transaction. I've selected only first checkbox named: "Delete last object selection".

Now PA30 works fine.

Good luck and thanks!

Former Member
0 Kudos

I suppose mine solution is some kind of workaround....