on 10-31-2007 11:32 AM
I need to work on Payroll. Can anybody send me a very small report explaining step wise which extracts data from infotype 1 and cluster RT without using LDB's or any small example so that i can understand the payroll process. please urgent.
Regards
Yuktha
Hi yukhta_v,
allthough i assume, that you've got good reasons for bypassing ldb's, keep in mind that by doing so, no implicit authority-check will work.
For the infotype 1, all you have to do is a simple select statement on db-table PA0001. By inserting an authority-check statement on P_ORGIN or P_ORGINCON you can assertain that no unauthorized reading attempts get through.
For evaluating payroll results, there are several options of which I'll lay out two.
1. by standard function 'HR_GET_PAYROLL_RESULTS'
snip...
replace nn with your respective country module
data: lt_payroll_result type paynn_result occurs 0 with header line,
lwa_rt TYPE LINE OF payde_result-inter-rt,
call function 'HR_GET_PAYROLL_RESULTS'
exporting
pernr = p_pernr "e.g. from PA0001 selection loop
permo = '01' "for monthly payroll - replace if other
pabrj = l_pabrj "year to be evaluated
pabrp = l_pabrp "month to be evaluated
PABRJ_END = "not needed for monthly payroll
PABRP_END = " -"-
inper_lst = "if necessary to specify a result
inper_act = l_inper "when dealing with retrocalculated periods
actual = l_srtza "same here: A for actual, P for previous, O for other
waers = 'EUR' "or which ever currancy is needed
tables
result_tab = lt_payroll_result
exceptions
no_results = 4
others = 8.
if sy-subrc eq 0.
loop at lt_payroll_result.
Mark lt_payroll_result is a deeply nested structure
loop at lt_payroll_result-inter-rt into lwa_rt [where ...]
do some important stuff
endloop.
endloop.
endif.
snip...
2. The hard way, doing everything by your self
snip...
payroll directory
DATA: rgdir type PC261 occurs 0 with header line.
result table
DATA: rt type PC207 occurs 0 with header line.
structure composed of 8 digits personnel-id
and 5 digits sequence number
DATA: rx_key type PC200.
.
.
.
import rgdir from database PCL2(CU) id p_pernr.
if sy-subrc eq 0.
supply the p_id part of result key
rx_key-pernr = p_pernr
loop at rgdir [where condition]
each loop represents one result.
rx_key-seqno = rgdir-seqnr. "spelling is different!
again, replace nn with your countries rel-id
import rt [other components when needed] from database PCL2(nn) id rx_key.
if sy-subrc eq 0.
loop at rt [where condition]
do what need to be done
endloop.
endif.
endloop.
endif.
snip...
Hope that helps.
Regards
jw
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can better define the selection screen and extract the data from infotype one using function modules or a simple select statement.
For extracting payroll results you have to use eighter Macros or Function modules and develop a report accordingly.
If u need any help further dont hesitate to ask me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
i will brief the structure for payroll program
1.use logical database in the program atributes (say PNP)
2.Use declaration for infotypes like
INFOTYPES : 0001. " Org. Assignment
3.Use Get table name
GET PERNR.
4.for getting data from infotype 1 ,use macro
rp_provide_from_last p0001 space pn-begda pn-endda.
5.for getting the payroll data(cluster)
5.1) First use function module -CU_READ_RGDIR for getting all the
payroll sequence number.
5.2) then read table it_rgdir(table u get from above function module ) and get the sequence for your required month(month given in selection period)
CONCATENATE pn-pabrj pn-pabrp INTO w_date(variable)
READ TABLE it_rgdir INTO wa_rgdir WITH KEY fpper = w_date.
5.3) Using this sequence Number ,call Function Module
PYXX_READ_PAYROLL_RESULT,so u will get al the results in results table( say it_result)
5.4) then loop this table
LOOP at it_result-inter-rt INTO wa_rt.And populate all wagetypes(lgart ) and Amount(betrg).
Hope this will solve your problem.
Reward points if helpful.
Regards,
Manoj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please mention your requirement clearly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try usning the FM "PYXX_READ_LAST_CRT" to get the payroll results of an employee.
Hope this helps you.
Regards,
Subbu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Yuktha,
You can use function module HR_READ_INFOTYPE to read data from any Infotype.
Reward if helpful,
Regards,
Tomesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.