2.Function:
①Read the table RGDIR from the cluster CU
data: directory type table of pc261.
country like t001p-molga.
...
call function 'CU_READ_RGDIR'
exporting
PERSNR = PERNR-PERNR
importing
MOLGA = COUNTRY "country info
tables
IN_RGDIR = DIRECTORY.
②CD_READ_LAST,determines the current payroll result for a for-period to be evaluated.
data:number like pc261-seqnr.
call function 'cd_read_last'
exporting
begin_date = pn-begda
end_date = pn-endda
importing
out_seqnr = number
tables
rgdir = directory.
rx-key-pernr = pernr-pernr.
rx-key-seqnr = number.
rp-imp-c2-rx.
....
loop at rt.
...
endloop.
③cd_read_previous:Reads the record that preceds the payroll record
④cd_read_previous_original:Reads the last original result that precedes the original payroll result.
⑤PYXX_READ_PAYROLL_RESULT ,to read a complete payroll result from the DB PCL2 or buffer
data:payroll type pay99_result,
rt_line type line of hrpay99_rt.
..
call function 'pyxx_read_payroll_result'
exporting
clusterid = 'RX'
employeenumber = p0001-pernr
sequencenumber = number
read_only_buffer = ' '
read_only_international = ' '
check_read_authority = 'X'
...
changing
payroll_result = payroll
exceptions
...
loop at payroll-inter-rt into rt_line.
...
endloop.