cancel
Showing results for 
Search instead for 
Did you mean: 

Extract all the Duplicate pernrs for the same employee

Former Member
0 Kudos

Hi All,

I have an issue where an employee has multiple pernrs. E.g. employee is terminated and the same employee comes back as an consultant or Non-employee. therefor has 2 pernrs now.

Example : Pat McGrath has 2 pernrs, but different first name and common last names(Pat vs. Patricia).

I need to get all the duplicate pernrs in the system. I need to know logic I need to use in SE16 PA0002 or query to extract all the duplicate pernrs. Pls advise.

Thanks in advance,

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

What about user name for both? Are you using infotype 0105, subtype 0001? If yes, in theory, both the records should have identical user name. Could you use that?

Hope this helps.

Donnie

Former Member
0 Kudos

yes we do populate 105 subtype 0001 but not for all, good thought.Tx.

ted_dinh
Active Contributor
0 Kudos

Multilple perns of the same employee are linked by central person. Therefore, you'll first need to query HRP1001 for otype 'P', plvar '01', rsign 'A', relat '209', objid = pernr to get central person number (in sobid).

You'll then need to query HRP1001 again like above criteria with the exception that instead of query objid, query sobid = central person found in first step. The return values in field objid are the perns of the same person.

Former Member
0 Kudos

Ted,

Thanks for yoor reply. I need the list of duplicate pernrs for same employee in the output either in SE16 or any SAP Query. so in SE16 for HRP1001 for pernr do you want me to run open ?

ted_dinh
Active Contributor
0 Kudos

Since the link is on the same table, and you can't create a join on the same table within SAP query, you either need to create an ABAP with above logic to retrieve mulitple perns or create a SAP query with custom field populated by again ABAP code with similar logic.

ted_dinh
Active Contributor
0 Kudos

If this is just a manual process, you can also view a list of perns sharing the same CP within PA20 by keying in pernr, then click on Extra - Country Assignment

Former Member
0 Kudos

I tried for one pernr for sure i know its a duplicate and get a message "No further contracts for employee xxxx. I am trying in PA0002 table but not quiet sure what logic to put in at the initail screen before executing, to get duplicate names or output with similar last names.

Former Member
0 Kudos

Since it doesn't appear that you have any sort of unique key, ad hoc query may be your only option.  I would pull all active employees with pernr, last name & first name.  Do a sort on last name/first name and eliminate those that are not duplicate as you go along.  Can't imagine that you would have that many employees with multiple PERNRs so it shouldn't be too bad of a manual process.

ted_dinh
Active Contributor
0 Kudos

It means that when this person was re-hired, HR did not create the pernr as reference to old pernr, and therefore, these perns don't share the same CP.

For this, you could have an ABAP program to report list of pernrs having a count of more than 1 for the combination of last name (PA0002-NACHN) and date of birth (PA0002-GBDAT). However, this still doesn't warranty correct result (e.g. ee was consultant prior, and bogus date of birth can be used when he/she was consultant).

Former Member
0 Kudos

In adhoc query i need both active and inactive pernr correct, as the previous pernr will be inactive.

Former Member
0 Kudos

yes, they don't share a same CP.

Former Member
0 Kudos

Yes, correct!  You would need both active and inactive.

Former Member
0 Kudos

Scott,

There are 15000 records and manually i am going thru each record, is there any other easier way in query where it can pull only who has similar last names?

Former Member
0 Kudos

Unfortunately, I haven't found that ad hoc query gives you that sort of functionality.  One option is to export your results to Excel.  Once there, download the Excel add-in called ASAP Utilities (there is a trial version).  It has some very powerful features that will make it fairly easy for you to sort, delete lines that are not similar, etc.  I know, not the ideal approach, but I am not sure what other options you have.  Hope this helps!

Former Member
0 Kudos

Thansk Scott.

Former Member
0 Kudos

Is SSN maintained whether an employee, consultant or non-employee?

Former Member
0 Kudos

Nope, SSN is not maintained.

Former Member
0 Kudos

They almost have same last name. ifrst names are different for some of them