2007 Nov 14 11:08 AM
Hi Friends,
What are the function modules require to create country specific payrol report???
Regards
Naveen
2007 Nov 14 1:19 PM
Hi,
Payroll results can be extracted using the following methods:
If there is a need to do processing at individual steps:
1) Read cluster directory using CU_READ_RGDIR
2) Read valid period from cluster directory using CU_READ_LAST
3) Read payroll results using PYXX_READ_PAYROLL_RESULTusing SEQNO returned by CU_READ_LAST.
Otherwise:
1)Using function module PYXX_GET_EVALUATION_PERIODSor
2)Using function module HR_GET_PAYROLL_RESULTSto import current payroll results.
Lets discuss first solution for country PL (where I am from;) )
First you need to define country specific data object:
DATA:it_pay_result TYPE pay<b>pl</b>_result.
pay<b>pl</b>_result is the country specific payroll result type for Poland:
For different country use its abbreveation i.e. for NL - paynl_result etc.
Then define such structure:
DATA: BEGIN OF it_rgdir OCCURS 0.
INCLUDE STRUCTURE pc261.
DATA: END OF it_rgdir.
This one is to retrieve payroll clusters.
Now let's read the cluster for an employee.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = here you put personnel number
IMPORTING
molga = molga
TABLES
in_rgdir = it_rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
Now when we have <b>all</b>clusters taken for particular employee lets read all tables for one each payroll period.
Note! For each payroll period i.e. 07.2007 we have lots of tables to process, they keep differnet data. In it_rgdir we have clusters for all payroll periods which were run for this employee. Lest iterate thru them (alternatively we could just use FM 'CU_READ_LAST' to read the latest payroll run)
LOOP AT it_rgdir WHERE paydt BETWEEN start_date AND end_date.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = 'PL' "here put either NL, BE - your country abrev.
employeenumber = pernr
sequencenumber = it_rgdir-seqnr
CHANGING
payroll_result = it_pay_result
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
OTHERS = 8.
endloop.
Now you have deep structure which contains payroll result for polish employee for all payroll periods. Using 'CU_READ_LAST' you would have only last one.
If you have more doubts see this document:
http://www.melayu.plus.com/SAP%20HR%20Programming.pdf
Please reward if helpfull.
Cheers:)
2012 Oct 19 7:07 AM
2007 Nov 17 9:16 AM
Hi Friends,
Can anybody send some payroll objects to my mail: kusuma_naveen@yahoo.co.in
best answers points : 6.
Regards
Naveen
Message was edited by:
Naveen Kumar
2007 Nov 21 6:14 AM
2012 Jun 14 7:39 AM
can u please help me to calculate the income tax paid by particular employee for the selected fiscal year .. ??