Application Development and Automation 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: 
Read only

Function Module to find Reference Employee Number (PERNR)

former_member445996
Participant
0 Likes
3,213

Hi All,

Is there a FM to get employee's reference PERNR (employee number) in case employee was assigned a new employee number due to inter-company transfer or anyother reason.

Thanks

1 ACCEPTED SOLUTION
Read only

former_member445996
Participant
0 Likes
2,294

Hi Saquib,

Thanks for the suggestions. Can you please review the names of these objects as none of the mentioned objects (PA0709, HR_ME_SELECT_REF_PERNR, CLHRCCE_PERSON_READER) exist.

Thanks for your help.

Aurang

Hi Saquib,

Thanks for the suggestions. Can you please review the names of these objects as none of the mentioned objects (PA0709, HR_ME_SELECT_REF_PERNR, CLHRCCE_PERSON_READER) exist.

Thanks for your help.

Aurang

9 REPLIES 9
Read only

former_member181966
Active Contributor
0 Likes
2,294

You can do something like this ::

Select pernr into table emp_tab

from pa0709

where personid_ext = employee

and begda le begda

and endda ge endda.

Hope this’ll give you idea!!

<b>P.S award the points.</b>

Good luck

Thanks

Saquib Khan

"Some are wise and some are otherwise"

Read only

former_member181966
Active Contributor
0 Likes
2,294

You can also try FM

HR_ME_SELECT_REF_PERNR

Thanks

SK

Read only

former_member181966
Active Contributor
0 Likes
2,294

Class :CL_HRCCE_PERSON_READER

You can also see the method ...

METHOD get_other_pernr.

DATA l_personid TYPE personid.

CALL METHOD me->get_personid

EXPORTING

p_pernr = p_pernr

RECEIVING

p_personid = l_personid.

CALL METHOD me->get_pernr

EXPORTING

p_personid = l_personid

IMPORTING

p_pernr = p_rpernr.

ENDMETHOD.

Read only

former_member445996
Participant
0 Likes
2,295

Hi Saquib,

Thanks for the suggestions. Can you please review the names of these objects as none of the mentioned objects (PA0709, HR_ME_SELECT_REF_PERNR, CLHRCCE_PERSON_READER) exist.

Thanks for your help.

Aurang

Read only

0 Likes
2,294

Hi Aurang,

HR_ME_SELECT_REF_PERNR is a function module & you can test it in SE37.. pass a pERNr & it will you retrun you a Ref Pernr if there is one.. altaernately, you can also use the function module HR_READ_INFOTYPE to read the Infotype 0031 where the Ref pers no is maintained.

Regards,

Suresh Datti

Read only

0 Likes
2,294

<b>Table = PA0709 ( TR.SE11,SE16)

Function module = HR_ME_SELECT_REF_PERNR ( Tr.SE37)

Class = CLHRCCE_PERSON_READER ( TR.SE24)</b>

don`t forget to reward points .

Thanks

SK

Read only

former_member445996
Participant
0 Likes
2,294

Hi,

Are these objects for a specific release? We are on 4.6C and none of them seem to exist.

Thanks

Aurang

Read only

0 Likes
2,294

YES.. I guess they are only available from 47 & upward.. in your case, one option would be to do a SELECT on the Db table PA0031.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
2,294

Hi all,

Just wanted to make everyone aware, that a select on PA0031 might not give the results that one might expect. Depending on the system configuration, the central person is getting stored in PD Infotype 1001. The function module HR_READ_INFOTYPE is the right way to go in this case.

Just thought I want to share this, because I wondered PA0031 being empty although infotype 0031 records being present.

Cheers,

Rolf