2015 Apr 29 12:20 PM
Hi Experts,
I have a requirement in HCM PAYROLL. The report has selection screen fields - PERNR and YEAR. The yearly W-2 gross to taxable report should display the taxable compensation, pre-tax reductions, additional taxable amounts processed in the payroll and shall be in the suggested format.
Based on input, need to fetch some details information about employee and company.With that CRT LGART, CRT BETRG also required to complete the requirement and here I am facing the problem to fetch CRT LGART & CRT BETRG. As I am new in HCM Payroll, I am facing this problem.
My question is - How could I get the CRT LGART and corresponding CRT BETRG from ECC system based on PERNR and YEAR available in selection screen?
I think these information available in CLUSTER table PCL2 or PCL3. Kindly correct me if I am wrong. If that, then kindly guide me how to get the CRT LGART & CRT BETRG from CLUSTER table.
Thanks in advanced!!!
Warm Regards,
Arindam Samanta.
2015 Apr 29 1:09 PM
Hi,
Use function module PYXX_READ_PAYROLL_RESULT to fetch the required data.
You will get LGART and BETRG in payroll_result-inter-crt.
Regards
2015 Apr 29 1:09 PM
Hi,
Use function module PYXX_READ_PAYROLL_RESULT to fetch the required data.
You will get LGART and BETRG in payroll_result-inter-crt.
Regards
2015 May 04 4:46 PM
Hi Harshal,
Thanks for your reply. I got your point. Just one doubt. I have two parameters in selection screen. In the parameter YEAR, user can give 2015 or 2014 and need to get LGART & BETRG for that particular year. Can I get the LGART & BETRG using this FM PYXX_READ_PAYROLL_RESULT for particular year?
I have checked payroll_result structure. There is BEGDA and ENDDA. I think i can use these fields for my requirement. Is it correct or there is some other way?
Kindly help me!
Thanks & Regards,
Arindam Samanta.
2015 May 05 12:08 PM
Hi Arindam,
1. You have to use FM CU_READ_RGDIR to read RGDIR.
2. Filter records in in_rgdir by comparing fpbeg with begda and ipend with endda.
3. Now loop into rgdir table and pass sequence number into PYXX_READ_PAYROLL_RESULT along with pernr and clusterid.
Regards,
Harshal
2015 May 13 11:25 AM
Hi Harshal,
Thanks for your kind help. Here is the new problem, I am facing. In SE37, I am executing the FM PYXX_READ_PAYROLL_RESULT. I am passing PERNR & SEQNR. But it is getting dump. Same thing happen in my ABAP code. Below is my code -
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
employeenumber = lv_pernr
sequencenumber = lv_seqnr
CHANGING
payroll_result = <payresult>
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
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10.
Dump exception is - CX_SY_DYN_CALL_ILLEGAL_TYPE. But actually coming from standard. The error analysis is like -
The FORM call "IMPORT_RESULT" is incorrect:
The actual parameter (number 2) has a different data type in the
PERFORM than requested by FORM "IMPORT_RESULT" in program "%_T001Z8".
In side the FM, one perform import_result available. Dump is coming from here.
Could you please help me out from this?
Thanks In Advanced!!
Warm Regards,
Arindam Samanta.
2015 May 13 11:34 AM
Hi Arindam,
Declare your changing parameter (PAYROLL_RESULT) as below
DATA : PAYRESULT TYPE PAY99_RESULT.
and in the exporting parameters pass 'X' to
READ_ONLY_INTERNATIONAL ..
Also try to pass CLUSTERID which can be obtained from FM PYXX_GET_RELID_FROM_PERNR .
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = 'IN'
employeenumber = pernr
sequencenumber = ls_rgdir-seqnr
read_only_international = 'X'
CHANGING
payroll_result = ls_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
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10.
Regards,
Harshal