Skip to Content
author's profile photo Former Member
Former Member

Get list of pernr's using company code

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2009 at 01:09 PM

    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'

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2009 at 01:04 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.