04-21-2008 10:01 PM
Hello all,
I want to select all pernr for processing.
But some time there r more than one time same pernr in table (pa0001,pa0000) but begda & endda varies.
i just want all pernrs.
can any body tell me ?
Thanks .
04-21-2008 10:02 PM
04-21-2008 10:02 PM
04-22-2008 3:13 PM
can u tell me from where i should select 'all pernr' from pa0001 or pa0000.
Thanks a lot.
04-22-2008 5:25 PM
When u use the LDB say PNP
and mention "get pernr "statement in your program
employees are processed one by one and ie it runs a kind of a loop with every employee being called one by one .
to take an example:
start of selection
get pernr
rp provide from_ last_p0001
statment 2
end of selection
any statement after get pernr and before end of selection would execute for every pernr or employee, so its a kind of loop ,
in this area you can get the information from various infotypes ( where different kind of data for employees is storted) when u get the data from infotypes say by using statement
rp-provide from last p0001 begda endda
it would get the data of only the current pernr from infotype p001 and would get the dta from subseqent pernrs when they are called automatically by statement get pernr
collect the data in work area and append that in the internal table, append the data collected in the work area to internal table in this area before end-of -selection.
please note : iam almost sure "end of selction" marks the end of loop for get pernr , please confirm this with someone.
04-21-2008 10:07 PM
Use thie statement.
>SELECT * from PA0001 INTO TABLE itab WHERE BEGDA LE SY-DATUM AND ENDDA GE SY-DATUM.
This will return only employees which are valid today. This will return only one record per employee.
If you are in HR module its recommended to user LDB PNP/PNPCE and user GET PERAS or GET PERNR statements.
A