Porblem in PYXX_READ_PAYROLL_RESULT
hi experts...!
i have problem in retrieving betrg amount basic pay 0001 from that moudule........some one help me....!
my code is
select info~pernr info~abkrs info~persg bas~endda bas~begda
into corresponding fields of table itab
from pa0001 as info inner join pa0008 as bas
on info~pernr eq bas~pernr
where
info~pernr in s_pernr and
info~abkrs in s_payrol and
info~persg in s_empgrp and
bas~begda ge s_begda and
bas~endda le s_endda .
sort itab by pernr.
loop at itab.
select single ename plans into (itab-ename, itab-plans)
from pa0001
where pernr eq itab-pernr.
translate itab-ename to upper case.
select single plstx into itab-plstx
from t528t
where plans eq itab-plans and
sprsl eq 'EN'.
translate itab-plstx to upper case.
modify itab.
endloop.
endform.
Edited by: BFawad26 on Aug 10, 2010 3:25 PM
data : p_inper like hrpy_rgdir-inper.
p_inper = st_date(6).
loop at itab where persg in s_empgrp.
select single * from hrpy_rgdir
where
fpbeg = itab-begda
and fpend = itab-endda
and pernr eq itab-pernr
and payty ne 'A'
and srtza = 'A'.
if sy-subrc eq 0.
call function 'PYXX_READ_PAYROLL_RESULT'
exporting
clusterid = 'RX'
employeenumber = itab-pernr
sequencenumber = hrpy_rgdir-seqnr
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.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
loop at ls_result-inter-rt into wa_rt.
case wa_rt-lgart.
when '/559'.
itab-payment = wa_rt-betrg.
when '0001'.
itab-basicpay = itab-basicpay + wa_rt-betrg.
"Wage Type 06 addition 30th July 2010 (Kamran)
when '0006'.
itab-basicpay = itab-basicpay + wa_rt-betrg.
when '/557'.
itab-payment = wa_rt-betrg.
endcase.
endloop.
append itab.
endif.
clear itab.
endloop.
endform.
Edited by: BFawad26 on Aug 10, 2010 3:27 PM
Similar Messages
-
Getting Dump while using PYXX_READ_PAYROLL_RESULT FM
I m trying to get the gross salary and ESI contribution amount for an indian based employee. While using the FM 'PYXX_READ_PAYROLL_RESULT' i m getting the following dump.
************************************************************************************************************************************************************An exception occurred that is explained in detail below.The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', wa not caught in procedure "PYXX_READ_PAYROLL_RESULT" "(FUNCTION)", nor was it propagated by RAISING clause.Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated. The reason for the exception is:
Call to FORM "IMPORT_RESULT" is incorrect:
The actual parameter no. 2 has a different data type in the
PERFORM than requested for the FORM "IMPORT_RESULT" in program %_T06K40".
and it is showing the dump result here
ELSE.
PERFORM import_client_spec IN PROGRAM (subroutine_pool-name)
USING client
key
payroll_result
import_subrc
pcl2_version_number
typepool_version_number
IF FOUND.
Pls help me to solve the issue as it very high priroty workHi Faisal,
Before the FM the Sy-Subrc is zero only and i have declared the exception part also..
IF sy-subrc = 0.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = 'IN'
employeenumber = P0001-pernr
sequencenumber = it_rgdir-seqnr
filter_cumulations = ''
CHANGING
payroll_result = it_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.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Endif.
Thanks! -
ABAP HR - PYXX_READ_PAYROLL_RESULT not fetching results
My first 2 FM's are fetching the correct values . Now I am passing the SEQNR(00005 in my case) returned by 2nd FM to the 3rd FM ( PYXX_READ_PAYROLL_RESULT ) , the table payroll remains empty.I checked in debug mode also that payroll-INTER-RT is empty whereas in debugger mode i can see that SEQNR has been set correctly by the 2nd FM. Below is my code
TABLES : PERNR.
TYPES: BEGIN OF RGDIR.
INCLUDE STRUCTURE PC261.
TYPES: END OF RGDIR.
DATA: RGDIR TYPE TABLE OF RGDIR WITH HEADER LINE,
SEQNR LIKE PC261-SEQNR,
payroll TYPE pay99_result,
rt_line TYPE LINE OF hrpay99_rt.
GET PERNR.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = PERNR-PERNR
TABLES
IN_RGDIR = RGDIR
CALL FUNCTION 'CD_READ_LAST'
EXPORTING
BEGIN_DATE = PN-BEGDA
END_DATE = PN-ENDDA
IMPORTING
OUT_SEQNR = SEQNR
TABLES
RGDIR = RGDIR.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
CLUSTERID = 'RX'
EMPLOYEENUMBER = PERNR-PERNR
SEQUENCENUMBER = SEQNR
CHANGING
PAYROLL_RESULT = payroll
LOOP AT payroll-INTER-RT INTO rt_line.
write:/ rt_line-LGART.
ENDLOOP.amber22 wrote:
I made the following changes as u suggested.The GET_RELID function is fetching value of rel_id as 'IN' which i think should be correct since I am executing Indian Payroll. But the last FM gives runtime error "illegal type'. I tried passing the value of clusterid as constant "IN" but still it gives the same error. Only when i give its value as 'RX' , it doesnt give error but then it doenst fetches any result also.
>
>
>
rel_id LIKE PCL2-RELID..
>
> CALL FUNCTION 'PYXX_GET_RELID_FROM_PERNR'
> EXPORTING
> EMPLOYEE = PERNR-PERNR
> IMPORTING
> RELID = rel_id.
>
> CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
> EXPORTING
> CLUSTERID = rel_id
> EMPLOYEENUMBER = PERNR-PERNR
> SEQUENCENUMBER = SEQNR
> CHANGING
> PAYROLL_RESULT = payroll.
>
> LOOP AT payroll-INTER-RT INTO rt_line.
> write:/ rt_line-LGART.
> ENDLOOP.
Since you are reading the payroll results of India, you have to change the declaration of 'payroll' as below
DATA:
payroll TYPE payin_result,
the current declaration
DATA:
payroll TYPE pay99_result,
would only give you the international part of the payroll and you have to inform the FM that you only want to read the international part through the importing parameter 'READ_ONLY_INTERNATIONAL'.
and 'CLUSTERID' is a optional parameter of the FM, if you don't feed any value to that it itself determines its value.
-Rajesh. -
Dump in calling PYXX_READ_PAYROLL_RESULT
Hi,
I am trying to get the last active payroll record of transaction pc_payresult.
I am calling the function PYXX_READ_PAYROLL_RESULT but getting a dump.
The code is as below
DATA: wa_result type pay99_result,
it_rgdir type standard table of pc261,
wa_rgdir type pc261,
v_num type CDSEQ,
wa_result type pay99_result,
p_pernr type PERNR_D.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = pernr-pernr
BUFFER =
NO_AUTHORITY_CHECK = ' '
IMPORTING
MOLGA =
tables
in_rgdir = it_rgdir
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
delete it_rgdir where srtza <> 'A' or payty <> space.
describe table it_rgdir lines v_num.
READ table it_rgdir into wa_rgdir index v_num.
p_pernr = pernr-pernr.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
CLUSTERID = ' '
employeenumber = p_pernr
sequencenumber = wa_rgdir-seqnr
READ_ONLY_BUFFER = ' '
READ_ONLY_INTERNATIONAL = ' '
ARC_GROUP = ' '
CHECK_READ_AUTHORITY = 'X'
FILTER_CUMULATIONS = 'X'
CLIENT =
IMPORTING
VERSION_NUMBER_PAYVN =
VERSION_NUMBER_PCL2 =
changing
payroll_result = wa_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
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Do I need to pass the Cluster ID? If so,then what id to pass.
Please help in this matter.
Thanks&Regards
AnanyaHi
Yes, you need to pass the cluster id. It is nothing but the relid. For the country grouping, get the relid from the check table of molga. I think it is t500l.
This is the only reason for getting dump as for getting any payroll result, the key should contain pernr, seqnr and relid. As you have not passed the relid (signifying the cluster for specific country) it will go for dump.
select relid from t500l for the country grouping you get from the FM.
Regards
Navneet
Message was edited by:
Navneet Saraogi -
Internal error in Salary Statement service: PYXX_READ_PAYROLL_RESULT
Dear Expert,
Anyone have idea to PYXX_READ_PAYROLL_RESULT error. I am getting this error when my user try to view their payslip online.
Thanks
Regards,
BryanHi Brian!
Please, check if you are use the correctly parameter at clausule PAYROLL_RESULT.
This parameter can change from country to country. In your case, i suggest you use the default structure to international payroll: PAY99_RESULT.
You can check the country group configuration used inside your configuration to Payroll (molga field).
Best regards and good luck.
ML -
when i used my itunes to report porblem, it send me to http://www.apple.com/support/itunes/
That's correct. Click the Contact Support which leads you to Express Lane, provide necessary information before it will provide Contact Options.
-
How can use FM PYXX_READ_PAYROLL_RESULT very Urgent
Hi
how can I get related pernr's pay results in rt and crt cluster.
I couldn't use referrred Fm any suggestions I need all information about related personal for example rt /101 etc..
Select single pernr from pa0000 into lv_pernr where pernr in s_pernr .
Thanks in advance ..
Message was edited by:
yusuf tunay çilesizHi yusuf,
1. U want the remuneration (monthly salary )
2. U won't get it DIRECTLY from any table.
(Its stored in cluster format)
3. Use this logic and FM.
DATA: myseqnr LIKE hrpy_rgdir-seqnr.
DATA : mypy TYPE payin_result.
DATA : myrt LIKE TABLE OF pc207 WITH HEADER LINE.
SELECT SINGLE seqnr FROM hrpy_rgdir
INTO myseqnr
WHERE pernr = mypernr
AND fpper = '200409'
AND srtza = 'A'.
IF sy-subrc = 0.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = 'IN'
employeenumber = mypernr
sequencenumber = myseqnr
CHANGING
payroll_result = mypy
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.
myrt[] = mypy-inter-rt.
READ TABLE myrt WITH KEY lgart = '1899'.
4. the internal table myrt
will contain what u require.
regards,
amit m. -
Import error from FM PYXX_READ_PAYROLL_RESULT
Hello,
while running it is giving dump.
*error at import object from buffer into payroll result.
when program calls this subrout, it dumps
IF read_only_international IS INITIAL.
IF client IS INITIAL.
PERFORM import_result IN PROGRAM (subroutine_pool-name)
can u tell me solution.
Thanks.Hi Rita,
FM PYXX_READ_PAYROLL_RESULT
Posted: Dec 16, 2008 7:22 PM E-mail this message Reply
Hello,
Can you please follow below steps to identify the issue.
PERFORM import_result IN PROGRAM (subroutine_pool-name)
Identify which program is called in the variables (subroutine_pool-name) and in the subroutine
import_result check parameters expected, find out there data types.
Check what is being passed from the function module. I am sure you can identify there must be data type conflict between function module data type with subroutine in the program.
Regards,
Krishna -
Regarding FM 'PYXX_READ_PAYROLL_RESULT'
Dear SAP Gurus,
from SE37, i am not able to run the FM 'PYXX_READ_PAYROLL_RESULT'.
I am giving the following Import parameters
CLUSTERID = IN
EMPLOYEENUMBER = 281
SEQUENCENUMBER = 996
READ_ONLY_INTERNATIONAL = X.
after executing it is asking for the input parameter PAYROLL_RESULT. I am not giving anything there and pressing enter. the function module is giving dump.
can any please tell me how to see the result through this function module.
Thanks and Regards,
Pavan.BHi Pavan,
The changing parameter "PAYROLL_RESULT" is mandatory.
call function 'PYXX_READ_PAYROLL_RESULT'
exporting
clusterid = IN
employeenumber = 281
sequencenumber = 996
READ_ONLY_INTERNATIONAL = X
changing
payroll_result = result
exceptions
Take Payroll_result into some variable & run it. You will not get dump.
Regards,
Sudhakar Rayala -
FM PYXX_READ_PAYROLL_RESULT not reading wagetype
Hi All,
After customizing Total Compensation statement (TCS) form, PYXX_READ_PAYROLL_RESULT is not reading /4xx wage types in it.
Its showing in all standard reports/forms.
Please advice..
Thanks,
AmitHi Sameer,
Thanks for the response.
This FM works on PERNR, SEQNR & CLUSTERID.
Passing the same values to a standard report, fetching proper result where as in this form its not showing some standard wagetypes.
There is no customization involved in FM. It the layout of the form which is altered.
Regards,
Amit -
Running PYXX_READ_PAYROLL_RESULT through SE37.
Hi all. How are you?
I'm trying to run the function PYXX_READ_PAYROLL_RESULT through SE37 in order to make some tests. If it's possible to run the function by SE37, I would save the time that I spend running this function by the Interface.
I would like to know what to fill in the parameter PAYROLL_RESULT. The function returns a dump when I execute it passing a empty value in that parameter. I don't know why it occurs because PAYROLL_RESULT is the table where the function stores the employee's payroll data and not a input parameter necessarily - it's what I think.
I believe that it there may be some kind of string to be inputed when this function is executed from SE37.
Thanks in advance.
Tiago.Hi Renata,
Thanks for your reply.
I think it is not possible too. I haven't found another way to run this function due to restriction you mentioned.
Regards,
Tiago. -
Problem when using function module PYXX_READ_PAYROLL_RESULT giving dump.
When i am using PYXX_READ_PAYROLL_RESULT function module to get HR cluster data. I am getting following dump.
So,can any one help me to solve this issue.I want this function data.
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught in
procedure "PYXX_READ_PAYROLL_RESULT" "(FUNCTION)", nor was it propagated by a
RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
Call to FORM "IMPORT_RESULT" is incorrect:
The actual parameter no. 2 has a different data type in the
PERFORM than requested for the FORM "IMPORT_RESULT" in program "%_T0LJ20".
Program SAPLHRPAY99_IMPEXP
Include LHRPAY99_IMPEXPU02
Row 1
Module type (FUNCTION)
Module Name PYXX_READ_PAYROLL_RESULT
Program SAPLHRPAY99_IMPEXP
Include LHRPAY99_IMPEXPU02
Row 137
Module type (FUNCTION)
Module Name PYXX_READ_PAYROLL_RESULTFind below is my code can u tell me wch type is not true .i tried but not able to find prob solution.
Plz help me waiting for reply.
TYPE-POOLS: SLIS.
DATA : FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid,
gt_events TYPE slis_t_event,
gd_prntparams TYPE slis_print_alv,
it_eve TYPE slis_t_event,
V_LAYOUT TYPE SLIS_LAYOUT_ALV.
wa_eve TYPE slis_alv_event.
*DATA header TYPE slis_t_listheader WITH HEADER LINE.
*DATA: ls_fcat TYPE slis_t_fieldcat_alv,
l_lin TYPE i.
*DATA: ls_event TYPE slis_alv_event.
DATA : WA_COLNO(2) TYPE N VALUE '1'.
DATA : REPID LIKE SY-REPID.
TABLES: PA0001,PA0002,T001P,T528T,T527X,T503T.
DATA:BEGIN OF IT_PA0002 OCCURS 0,
PERNR LIKE PA0002-PERNR,
END OF IT_PA0002.
DATA:BEGIN OF IT_PA0001 OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
PLANS LIKE PA0001-PLANS,
WERKS LIKE PA0001-WERKS,
BTRTL LIKE PA0001-BTRTL,
ORGEH LIKE PA0001-ORGEH,
PERSK LIKE PA0001-PERSK,
END OF IT_PA0001.
DATA: BEGIN OF IT_T528T OCCURS 0,
PLANS LIKE T528T-PLANS,
PLSTX LIKE T528T-PLSTX,
END OF IT_T528T.
DATA: BEGIN OF IT_T001P OCCURS 0,
WERKS LIKE T001P-WERKS,
BTRTL LIKE T001P-BTRTL,
BTEXT LIKE T001P-BTEXT,
END OF IT_T001P.
DATA: BEGIN OF IT_T527X OCCURS 0,
ORGEH LIKE T527X-ORGEH,
ORGTX LIKE T527X-ORGTX,
END OF IT_T527X.
DATA: BEGIN OF IT_T503T OCCURS 0,
PERSK LIKE T503T-PERSK,
PTEXT LIKE T503T-PTEXT,
END OF IT_T503T.
DATA:BEGIN OF IT_FINAL OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
PLSTX LIKE T528T-PLSTX,
BTEXT LIKE T001P-BTEXT,
ORGTX LIKE T527X-ORGTX,
PTEXT LIKE T503T-PTEXT,
END OF IT_FINAL.
*DATA: WI_RT LIKE LINE OF PAYROLL-INTER-RT,
*DATA: WI_RGDIR LIKE STANDARD TABLE OF PC261 WITH HEADER LINE,
DATA: IT_EVP TYPE HRPY_TT_RGDIR,
ls_evp LIKE LINE OF IT_EVP,
WI_RGDIR LIKE STANDARD TABLE OF PC261 WITH HEADER LINE,
WI_PAYRESULT TYPE PAY99_RESULT.
WI_PAYRESULT TYPE STANDARD TABLE OF PAYUS_RESULT WITH HEADER LINE.
DATA WG_MOLGA LIKE T500L-MOLGA.
SELECTION-SCREEN BEGIN OF BLOCK B1.
SELECT-OPTIONS: S_PERNR FOR PA0001-PERNR,
S_BTRTL FOR PA0001-BTRTL,
S_ORGEH FOR PA0001-ORGEH.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM BUILD_FIELD_CATLOG.
PERFORM DISPLAY_DATA.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM GET_DATA .
SELECT PERNR
INTO CORRESPONDING FIELDS OF TABLE IT_PA0002
FROM PA0002
WHERE PERNR IN S_PERNR.
IF IT_PA0002[] IS NOT INITIAL.
SELECT PERNR ENAME PLANS WERKS BTRTL ORGEH PERSK
INTO CORRESPONDING FIELDS OF TABLE IT_PA0001
FROM PA0001
FOR ALL ENTRIES IN IT_PA0002
WHERE PERNR = IT_PA0002-PERNR
AND BTRTL IN S_BTRTL
AND ORGEH IN S_ORGEH.
ENDIF.
IF IT_PA0001[] IS NOT INITIAL.
SELECT PLANS PLSTX
INTO CORRESPONDING FIELDS OF TABLE IT_T528T
FROM T528T
FOR ALL ENTRIES IN IT_PA0001
WHERE PLANS = IT_PA0001-PLANS
AND SPRSL = 'EN'.
SELECT WERKS BTRTL BTEXT
INTO CORRESPONDING FIELDS OF TABLE IT_T001P
FROM T001P
FOR ALL ENTRIES IN IT_PA0001
WHERE WERKS = IT_PA0001-WERKS
AND BTRTL = IT_PA0001-BTRTL.
SELECT ORGEH ORGTX
INTO CORRESPONDING FIELDS OF TABLE IT_T527X
FROM T527X
FOR ALL ENTRIES IN IT_PA0001
WHERE ORGEH = IT_PA0001-ORGEH
AND SPRSL = 'EN'.
SELECT PERSK PTEXT
INTO CORRESPONDING FIELDS OF TABLE IT_T503T
FROM T503T
FOR ALL ENTRIES IN IT_PA0001
WHERE PERSK = IT_PA0001-PERSK
AND SPRSL = 'EN'.
ENDIF.
*DELETE ADJACENT DUPLICATES FROM IT_PA0001 COMPARING PERNR.
LOOP AT IT_PA0001.
MOVE IT_PA0001-ENAME TO IT_FINAL-ENAME.
READ TABLE IT_PA0002 WITH KEY PERNR = IT_PA0001-PERNR.
IF SY-SUBRC = 0.
MOVE IT_PA0002-PERNR TO IT_FINAL-PERNR.
ENDIF.
READ TABLE IT_T528T WITH KEY PLANS = IT_PA0001-PLANS.
IF SY-SUBRC = 0.
MOVE IT_T528T-PLSTX TO IT_FINAL-PLSTX.
ENDIF.
LOOP AT IT_T001P WHERE WERKS = IT_PA0001-WERKS AND BTRTL = IT_PA0001-BTRTL.
MOVE IT_T001P-BTEXT TO IT_FINAL-BTEXT.
ENDLOOP.
READ TABLE IT_T527X WITH KEY ORGEH = IT_PA0001-ORGEH.
IF SY-SUBRC = '0'.
MOVE IT_T527X-ORGTX TO IT_FINAL-ORGTX.
ENDIF.
READ TABLE IT_T503T WITH KEY PERSK = IT_PA0001-PERSK.
IF SY-SUBRC = '0'.
MOVE IT_T503T-PTEXT TO IT_FINAL-PTEXT.
ENDIF.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = IT_FINAL-PERNR
BUFFER
NO_AUTHORITY_CHECK = ' '
IMPORTING
MOLGA = WG_MOLGA
TABLES
IN_RGDIR = WI_RGDIR
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2 .
CLEAR WG_SUM.
LOOP AT WI_RGDIR INTO ls_evp.
IF ( WI_RGDIR-FPEND BETWEEN P_STDATE AND P_ENDATE AND
WI_RGDIR-SRTZA = 'A' ) .
IF Wg_MOLGA = '10'.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
CLUSTERID = 'IN'
EMPLOYEENUMBER = IT_FINAL-PERNR
SEQUENCENUMBER = ls_evp-SEQNR
READ_ONLY_INTERNATIONAL = ''
CHANGING
PAYROLL_RESULT = WI_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.
endif.
ENDLOOP.
APPEND IT_FINAL.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM IT_FINAL COMPARING ALL FIELDS.
ENDFORM. " GET_DATA
*& Form BUILD_FIELD_CATLOG
text
--> p1 text
<-- p2 text
FORM BUILD_FIELD_CATLOG .
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'PERNR'.
FIELDCATALOG-SELTEXT_M = 'Emp Code'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 9.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'ENAME'.
FIELDCATALOG-SELTEXT_M = 'Emp Name'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 40.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'PLSTX'.
FIELDCATALOG-SELTEXT_M = 'Position'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 26.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'BTEXT'.
FIELDCATALOG-SELTEXT_M = 'Work Location'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 15.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'ORGTX'.
FIELDCATALOG-SELTEXT_M = 'Dept. Description'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 25.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'PTEXT'.
FIELDCATALOG-SELTEXT_M = 'Grade Set Code'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 21.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
ENDFORM. " BUILD_FIELD_CATLOG
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM DISPLAY_DATA .
REPID = SY-CPROG.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'ALV_BACKGROUND'
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = 'X'
IT_FIELDCAT = FIELDCATALOG[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_DATA -
System Dump running PYXX_READ_PAYROLL_RESULT
I am trying to extract total gross pay for an employee in the US on ECC 6.0. I extract RGDIR data and feed the the info into the function module PYXX_READ_PAYROLL_RESULT. I get a system dump telling me: Call to FORM "IMPORT_RESULT" is incorrect: The actual parameter no. 2 has a different data type in the PERFORM than requested for the FORM "IMPORT_RESULT" in program "%_T04EE0".
The Cluster ID is RU, pernr, seqnr, read only international is blank since I am in the US and the Pay Result structure I am using is PAYUS_RESULT. I have run this through the debug process and have found that the program automatically replaces the cluster id "RU" with "RX".
What am I doing wrong?Did you try etracting this with international cluster?
PARAMETERS: pa_pernr TYPE persno.
DATA: gt_rgdir TYPE TABLE OF pc261 WITH HEADER LINE.
DATA: gt_results TYPE pay99_result.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = pa_pernr
TABLES
in_rgdir = gt_rgdir[]
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
READ TABLE gt_rgdir INDEX 1.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = 'RU'
employeenumber = pa_pernr
sequencenumber = gt_rgdir-seqnr
read_only_international = 'X'
CHANGING
payroll_result = gt_results
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.
Also you may try reading the same by means of macros. Please refer [this document|http://itchamps.files.wordpress.com/2007/12/hrcluster_edit.pdf]. All you need is to use include RPC2RUU0 and use macro RP-IMP-C2-RU instead
Regards
Marcin -
PYXX_READ_PAYROLL_RESULT problem
Hi People,
what is the Cluster ID for FM
PYXX_READ_PAYROLL_RESULT for US ?
I used RU but it is giving error
What happened?
The current ABAP/4 program "%_T005K0 " had to be terminated because
one of the statements could not be executed.
This is probably due to an error in the ABAP/4 program.
What can you do?
Note the actions and input that caused the error.
Inform your SAP system administrator.
You can print out this message by choosing "Print". Transaction ST22
allows you to display and manage termination messages, including keeping
them beyond their normal deletion date.
Error analysis
Call to FORM "IMPORT_INTERNATIONAL" is incorrect:
The actual parameter no. 2 has a different data type in the
PERFORM than requested by the FORM "IMPORT_INTERNATIONAL".
Please help.Hi Raj,
You can use the FM like below, as cluster ID is not mandatory.
call function 'PYXX_READ_PAYROLL_RESULT'
exporting
employeenumber = xsrtfdlow-pernr
sequencenumber = lv_seqno
read_only_international = 'X'
changing
payroll_result = lt_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.
else, below is the list of standard cluster ID's for each country, you can pass the ID for which you would like to read payroll results.
I hope this solve your issue. still if you have any issue , please reply back!!!
Regards
Sunil Kondoju
A2 Payroll results Argentina: Annual consolidation
AA Payroll Result (Saudi Arabia)
AB Payroll Result (Albania)
AD Payroll Result (Andorra)
AE Payroll results (garnishment)
AF Garnishment directory
AG Payroll Result (Antigua)
AH Payroll Result (Afghanistan)
AM Payroll Result (Armenia)
AN Payroll Result (Netherlands Antilles)
AO Payroll Result (Angola)
AR Payroll results (Argentina)
AW Payroll Result (Aruba)
AZ Payroll Result (Azerbaijan)
B2 PDC data (month)
BA Payroll Result (Bosnia and Herzegovina)
BB Payroll Result (Barbados)
BD Payroll Result (Bangladesh)
BF Payroll Result (Burkina Faso)
BG Payroll Result (Bulgaria)
BH Payroll Result (Bahrain)
BI Payroll Result (Burundi)
BJ Payroll Result (Benin)
BM Payroll Result (Bermuda)
BN Payroll Result (Brunei Darussalem)
BO Payroll Result (Bolivia)
BR Payroll results (Brazil)
BS Payroll Result (Bahamas)
BT Payroll Result (Bhutan)
BV Pension fund (Switzerland)
BW Payroll Result (Botswana)
BY Payroll Result (Belarus)
BZ Payroll Result (Belize)
CA Cluster directory (CU enhancement for archiving)
CD Cluster Directory (to 3.1I)
CF Payroll Result (Central African Republic)
CG Payroll Result (Congo)
CI Payroll Result (Ivory Coast)
CK Payroll Result (Cook Islands)
CL Payroll Result (Chile)
CM Payroll Result (Cameroon)
CN Payroll results (China)
CO Payroll Result (Colombia)
CR Payroll Result (Costa Rica)
CU Cluster directory
CV Payroll Result (Cape Verde)
CW Cluster directory for SI quarterly totals (Belgium)
CX Cluster directory for SI declaration (Belgium)
CY Cluster directory - BELCOTAX results (Belgium)
DB BAV-/Pension certificate (DE)
DG DUEVO messages - part-time employees (DE)
DJ Payroll Result (Djibouti)
DK DUEVO messages (DE)
DM Payroll Result (Dominica)
DO Payroll Result (Dominican Republic)
DP Garnishments (DE)
DQ Garnishment directory
DU DUEVO notifications, O record
DY Payroll Result (Algeria)
DZ DUEVO file number (Germany)
EC Payroll Result (Ecuador)
EE Payroll Result (Estonia)
EF Requests for refund (Austria)
EG Payroll Result (Egypt)
EI Payroll Result (Ethiopia)
EM Payroll Result (United Arab Emirates)
ER Payroll Result (Eritrea)
ES Payroll results (totals)
ET Payroll results (totals)
FI Payroll results (Finland)
FJ Payroll Result (Fiji)
FM Payroll Result (Micronesia)
FO Payroll Result (Faroe Islands)
GA Payroll Result (Gabon)
GD Payroll Result (Grenada)
GE Payroll Result (Georgia)
GF Payroll Result (French Guyana)
GH Payroll Result (Ghana)
GJ Cluster GJ (Santei/Geppen evaluation results)
GL Payroll Result (Greenland)
GM Payroll Result (Gambia)
GN Payroll Result (Guinea)
GP Payroll reconciliations (GB)
GQ Payroll Result (Equatorial Guinea)
GR Payroll Result (Greece)
GT Payroll Result (Guatemala)
GU Payroll Result (Guam)
GW Payroll Result (Guinea Bissau)
GY Payroll Result (Guyana)
HK Payroll results (HongKong)
HN Payroll Result (Honduras)
HR Payroll Result (Croatia)
HT Payroll Result (Haiti)
HZ Additional cluster for Hong Kong
IC Payroll Result (Iceland)
ID Interface toolbox - Directory for interface results
IE Payroll results (Ireland)
IF Payroll interface
IK KIDICAP interface
IL Payroll Result (Israel)
IN Payroll Results India
IQ Payroll Result (Iraq)
IR Payroll Result (Iran)
IS Payroll results (Indonesia)
JA Annual tax declaration (Austria)
JM Payroll Result (Jamaica)
JO Payroll Result (Jordan)
KE Payroll Result (Kenya)
KG Payroll Result (Kyrgyzstan)
KH Payroll Result (Cambodia)
KI Payroll Result (Kiribati)
KM Payroll Result (Comoros)
KO Payroll Result (Republic of the Congo)
KP Payroll Result (North Korea)
KR Payroll Result: Korea
KT Payroll Result (Saint Kitts and Nevis)
KU Payroll Result (Cuba)
KW Payroll Result (Kuwait)
KZ Payroll Result (Kazakhstan)
LC Payroll Result (Saint Lucia)
LE Payroll Result (Lebanon)
LI Payroll Result (Liechtenstein)
LK Payroll Result (Sri Lanka)
LO Payroll Result (Laos)
LR Payroll Result (Liberia)
LS Payroll Result (Lesotho)
LT Payroll Result (Lithuania)
LU Payroll Result (Luxembourg)
LV Payroll Result (Latvia)
LY Payroll Result (Libya)
LZ Payslip (Austria)
MA Payroll Result (Morocco)
MC Payroll Result (Monaco)
MD Payroll Result (Moldavia)
MG Payroll Result (Madagascar)
MH Payroll Result (Marshall Islands)
MK Payroll Result (Macedonia)
ML Payroll Result (Mali)
MM Payroll Result (Myanmar)
MN Payroll Result (Mongolia)
MP Payroll Result (Northern Mariana Islands)
MR Payroll Result (Mauritania)
MT Payroll Result (Malta)
MU Payroll Result (Mauritius)
MV Payroll Result (Maldives)
MW Payroll Result (Malawi)
MX Payroll results (Mexico)
MZ Payroll Result (Mozambique)
N1 Advance payments (New Zealand)
NA Payroll Result (Namibia)
NC Payroll Result (New Caledonia)
NE Payroll Result (Niger)
NG Payroll Result (Nigeria)
NP Payroll Result (Nepal)
NR Payroll Result (Nauru)
NZ Payroll results (New Zealand)
OD Civil service - staggered payment (directory)
OM Payroll Result (Oman)
PA Payroll Result (Panama)
PE Payroll Result (Peru)
PF Payroll Result (French Polynesia)
PG Payroll Result (Papua New Guinea)
PH Payroll Results Philippines
PK Payroll Result (Pakistan)
PL Payroll Result (Poland)
PO Payroll Result (Puerto Rico)
PS Schema
PT Schema
PU Payroll Result (Paraguay)
PW Payroll Result (Palau)
Q0 Statements (international)
Q1 Statements (batch comments - international)
Q3 Advance payments (Australia)
QA Payroll Result (Qatar)
RA Payroll results (Austria)
RB Payroll results (Belgium)
RC Payroll results (Switzerland), all data
RD Payroll results (Germany), all data
RE Payroll results (Spain)
RF Payroll results (France), all data
RG Payroll results (Britain)
RH Payroll Result (Hungary)
RI Payroll results (Italy)
RJ Payroll results (Japan)
RK Payroll results (Canada)
RL Payroll results (Malaysia)
RM Payroll results (Denmark)
RN Payroll results (Netherlands)
RO Payroll Result (Romania)
RP Payroll results (Portugal)
RQ Payroll results (Australia)
RR Payroll results (Singapore)
RS Payroll results (Sweden)
RT Payroll Result (Czech Republic)
RU Payroll results (USA)
RV Payroll results (Norway)
RW Payroll results (South Africa)
RX Payroll results (international), all data
SC Payroll Result (Seychelles)
SD Payroll Result (Sudan)
SI Payroll results Slovenia
SJ Social insurance - evaluation results (Japan)
SK Payroll Result (Slovak Republic)
SL Payroll Result (Sierra Leone)
SM Payroll Result (San Marino)
SN Payroll Result (Senegal)
SO Payroll Result (Somalia)
SP Statutory sickpay (Great Britain)
SR Payroll Result (Suriname)
SV Payroll Result (El Salvador)
SY Payroll Result (Syria)
SZ Payroll Result (Swaziland)
TD Payroll Result (Chad)
TG Payroll Result (Togo)
TH Payroll results (Thailand)
TJ Payroll Result (Tadjikistan)
TM Payroll Result (Tunisia)
TN Payroll results (Taiwan)
TO Payroll Result (Tonga)
TP Payroll Result (East Timor)
TR Payroll Result (Turkey)
TT Payroll Result (Trinidad and Tobago)
TU Payroll Result (Turkmenistan)
TV Payroll Result (Tuvalu)
TW Tax data South Africa
TZ Payroll Result (Tanzania)
UA Payroll Result (Ukraine)
UG Payroll Result (Uganda)
UN Payroll Result (United Nations)
UR Payroll Result (Russian Federation)
UY Payroll Result (Uruguay)
UZ Payroll Result (Uzbekistan)
VA Payroll Result (State of the Vatican City)
VC Payroll Result (Saint Vincent and the Grenadines)
VE Payroll results (Venezuela)
VN Payroll Result (Vietnam)
VU Payroll Result (Vanuatu)
WA Payroll Result (Rwanda)
WS Payroll Result (Samoa)
WW SI quarterly totals cluster - Belgian net pay
WX SI declaration cluster - Belgian net pay
WY BELCOTAX cluster results - Belgian net pay
XA Special run (Austria)
XD Payroll results (Germany), all data
XE Payroll results (Spain)
XM Payroll results (Denmark)
XY Special payments (Ireland)
YE Payroll Result (Yemen)
YJ Cluster YJ (year-end adjustment) (Japan)
YS Payroll Result (Solomon Islands)
YT Payroll Result (Sao Tome and Principe)
YU Payroll Result (Serbia and Montenegro)
ZA VBL/SPF average
ZD VBL/SPF tax/average
ZL Time wage types/work schedule
ZM Payroll Result (Zambia)
ZS VBL/SPF onetime payment
ZV SPF data
ZW Payroll Result (Zimbabwe)
ZY Payroll Result (Cyprus) -
'PYXX_READ_PAYROLL_RESULT'
hi all,
May i know
'PYXX_READ_PAYROLL_RESULT' this fm is used for what ? what things are commented and what not. what should be taken for cluster id and sequence number.
thanks.hi
Using FMs to read data from Payroll results based on selected period.
This is also a generalized program which can be used to pick the data from the RT (Result table). We can enhance the functionality of the program to pick the data from different cluster tables based on our requirement. In this program we will be using FMs CU_READ_RGDIR and PYXX_READ_PAYROLL_RESULT to get the desired payroll results.
Declaring Tables
TABLES: PERNR.
Declaring Internal Tables and Work areas
DATA: IN_RGDIR LIKE PC261 OCCURS 0 WITH HEADER LINE,
WA_RT LIKE PC207 OCCURS 0 WITH HEADER LINE,
SEQNR LIKE PC261-SEQNR,
RESULT TYPE PAY99_RESULT.
START-OF-SELECTION.
GET PERNR.
*This FM help us to get the Sequence number used for the
*employee on the payroll .
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = PERNR-PERNR
TABLES
IN_RGDIR = IN_RGDIR
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2.
*We read it using two dates, which corresponds to the month
READ TABLE IN_RGDIR WITH KEY FPBEG = PN_BEGDA
FPEND = PN_ENDDA.
SEQNR = IN_RGDIR-SEQNR.
*This FM actually reads the payroll and get the information
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
EMPLOYEENUMBER = PERNR-PERNR
SEQUENCENUMBER = SEQNR
READ_ONLY_INTERNATIONAL = 'X'
CHANGING
PAYROLL_RESULT = RESULT
*We just need to read the result table.
LOOP AT RESULT-INTER-RT INTO WA_RT.
CASE WA_RT-LGART .
Perform Calculations based on wage types
ENDCASE.
ENDLOOP.
END-OF-SELECTION.
Regards
Hitesh
Maybe you are looking for
-
How to edit the records in error stock.
Hi Experts, i have error records in error stack and the remaining records are loaded successfuly . here my doubt is how to edit the records in error stack because its not giving the edit option . i want to get the edit option means i nee
-
Hi all, I recently own E51 and tried to configure mailbox with POP3 settings, everything works perfect with wifi. But with help of GPRS from service provider I'm unable to download email, it says Incoming mail server not found.! Same problem persists
-
Dynamically reference :old.column_ name in trigger
Hi all, I am writing an application for which i would like to include a limited audit trail. I have a form that is based on a table with approx 100 columns and wish to write the :old.column_name value on fields that have been updated, along with user
-
ALV LIST with few checkboxes fields
Hi everyone, I want to create an ALV with 2 fields that are checkboxes. I am succeeding to create an ALV with one checkbox field. How do we do in order to create an ALV with 2 checkboxes fields using ALV LIST ? I know that we have to specify in the l
-
hi all, what excatly we check in ST04 and ST02.(Along with threshold values and minimum required values for the sap servers.) ECC6.0, oracle, windows 2003server. explaination and related will be links will be really appreciated. regards, bhupesh