cancel
Showing results for 
Search instead for 
Did you mean: 

Get list of pernr's using company code

Former Member
0 Kudos

Hi All,

I have a situation wherey by I need to retrieve a list of employee numbers within a company code. As I can't use the function module 'HR_READ_INFOTYPE' to do this as pernr is a mandatory field, can anyone suggest another safe way to retrived the data I require.

Many thanks,

Liz.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

A straight SQL Select would do it. It wouldn't be very efficient unless you have an index on Company Code.

Select PERNR INTO ZPERNR

FROM PA0001

WHERE BUKRS = your company code

AND ENDDA = '99991231'

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Just write some code.

You can check FM BAPI_OUTEMPLOYEE_GETLIST for reference(List of employees in a payroll area).

This function module is used to get employee list by payroll area, you can just copy it and replace payroll area with company code.

Or just write code to select from PA0001 by company code and other condition...

Hope helps,

Chen Jian

Former Member
0 Kudos

Hi Chien,

Thanks for your suggestions. I will give them a try.

Regards,

Liz.