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: 

How to obtain PERNR list?

Former Member
0 Kudos

Hi,

Can any one help me find a logic to retrieve a list all the PERNR under a payroll area?...Thanks , Ragesh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ragesh,

You can retrieve it by directly selecting it from PA0001 table.

also have a look on the following blog:

Hope this will help.

Regards,

Nitin.

8 REPLIES 8

Former Member
0 Kudos

Hi Ragesh,

You can retrieve it by directly selecting it from PA0001 table.

also have a look on the following blog:

Hope this will help.

Regards,

Nitin.

0 Kudos

Hi ,

I want the entire list of PERNR under a payroll area by passing payroll area and period?

thanks

0 Kudos

hi,

use this transaction.

S_AHR_61016369 - Employee List

Former Member
0 Kudos

Hi Ragesh,

The infotype for payroll status is PA0003. Write a select statement as follows :

Select pernr 
    from pa0003
    into  itab
  where <cond>.

Regards,

Swapna.

0 Kudos

Hi ,

The data has to be taken from the cluster table PCL2 and not infotype .Can you suggest me a logic?

Thanks , Ragesh

Former Member
0 Kudos

Hi Ragesh,

You can use BAPI HR_READ_INFOTYPE for this purpose.

For this, just go through the following thread:

Hope this will help.

Regards,

Nitin.

Former Member
0 Kudos

Dear Rajesh ,

You can use macro rp-imp-c2-cu to import the data from cluster PCL2.

Here I have given sample code..Just have a look at it. I hope it will be useful .

DATA: BEGIN OF RX-KEY. "Cluster Key

INCLUDE STRUCTURE PC200.

DATA: END OF RX-KEY.

DATA: BEGIN OF RGDIR OCCURS 100.

INCLUDE STRUCTURE PC261.

DATA: END OF RGDIR.

  • table to store employee based on payroll area

data : begin of itab_empdetails occurs 0.

data : pernr like pa0001-pernr,

ABKRS like pa0001-ABKRS.

data : end of itab_empdetails.

data w_fpper(6) type c. "For Payroll Period

rp-imp-c2-cu.

check rp-imp-cd-subrc = 0.

clear rx-key.

rx-key-pernr = itab_empdetails-pernr.

  • Fill internal tables from cluster results to be displayed

loop at rgdir

where fpper = w_fpper

and inper = w_fpper

and void is initial

and abkrs in pnpabkrs.

rx-key-seqno = rgdir-seqnr.

rx-key-pernr = itab_empdetails-pernr.

rp-imp-c2-in.

  • Successful import of cluster results

  • RETURN CODE FROM IMPORT.

if rp-imp-in-subrc <> 0.

continue.

endif.

Former Member
0 Kudos

Thank You all but i am still need of a solution . The Pernr has to be fetched from the cluster PCL2.

A function module or any other logic should do .

The code provided is showing syntax error.

Edited by: ragesh venugopalan on Sep 17, 2008 5:39 AM