Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Retrieving data from the table TCRT

Former Member
0 Likes
3,888

Hi experts ,

I am not able to retrieve data from the table TCRT.

I have used the functional module CU_READ_RGDIR to retrieve sequence number .

and PYXX_READ_PAYROLL_RESULT to get payroll result .

but this is not retrieving TCRT table alone .

Is there any function module which can retrieve data from TCRT table ?

Thanks

Kavitha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,732

hi..

Iam not able to find any dbtable named TCRT ..!!

Can u be clear on your query?

We are using ECC 6.0

Hi experts ,

I am not able to retrieve data from the table TCRT.

I have used the functional module CU_READ_RGDIR to retrieve sequence number .

and PYXX_READ_PAYROLL_RESULT to get payroll result .

but this is not retrieving TCRT table alone .

Is there any function module which can retrieve data from TCRT table ?

Thanks

Kavitha

11 REPLIES 11
Read only

Former Member
0 Likes
2,733

hi..

Iam not able to find any dbtable named TCRT ..!!

Can u be clear on your query?

We are using ECC 6.0

Read only

0 Likes
2,732

Hi ,

TCRT is cluster table and not a transparent database table . This is used to retrieve cumulative tax results for US payroll .

Read only

0 Likes
2,732

hi,

try this way.

data: seqnumber like pc261-seqnr,

payroll type payus_result,

rtline type line of hrpay99_rt.

CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'

EXPORTING

CLUSTERID = 'RU'

EMPLOYEENUMBER = PERNR

SEQUENCENUMBER = SEQNUMBER

  • 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 = PAYROLL

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 PAYROLL-INTER-tCRT INTO RTLINE.

WRITE: RTLINE-BETRG.

ENDLOOP.

It's working for me.

Regards,

Shankar.

Read only

0 Likes
2,732

Hi shankar ,

As mentioned earlier i am able to retrieve all the tables including RT and CRT using that function module .

I want data from TCRT table .The function module is not retrieveing the table TCRT.

Thanks

Read only

0 Likes
2,732

HI,

declare this in data statement.

data: seqnumber like pc261-seqnr,

payroll type payUS_result,

rtline type line of hrpayUS_TCrt.

here use that same function module with same parameters.

LOOP AT PAYROLL-NAT-TCRT INTO RTLINE.

write: rtline-betrg.

endl0op.

Regards,

Shankar.

Read only

0 Likes
2,732

hi kavitha,

Did u got the result.

Regards,

Shankar.

Read only

0 Likes
2,732

Hi shankar ,

It throws an error . It says TCRT does not exist inside the structure .

I have tried it already

Read only

0 Likes
2,732

hi,

I am sending total code. I hope it will surely solve ur problem.

REPORT ZSHAN_HR350_PAYRESULT_US.

data begin of rgdir occurs 10.

INCLUDE STRUCTURE pc261.

DATA end of rgdir.

DATA: WA_RGDIR LIKE LINE OF RGDIR.

data: country like t500l-molga.

data: seqnumber like pc261-seqnr,

payroll type payUS_result,

rtline type line of hrpayUS_TCRT.

data: itab_t512t like table of t512t with header line.

DATA: begin of final,

LGART LIKE PC23H-LGART,

LGTXT LIKE T512T-LGTXT,

BETRG LIKE PC23H-BETRG,

end of final.

DATA: RESULT_TAB LIKE TABLE OF FINAL WITH HEADER LINE.

parameters: pernr like pernr-pernr.

CALL FUNCTION 'CU_READ_RGDIR'

EXPORTING

PERSNR = PERNR

  • BUFFER =

  • NO_AUTHORITY_CHECK = ' '

IMPORTING

MOLGA = COUNTRY

TABLES

IN_RGDIR = 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.

SORT RGDIR DESCENDING BY SEQNR.

READ TABLE RGDIR INTO WA_RGDIR INDEX 1.

MOVE WA_RGDIR-SEQNR TO SEQNUMBER.

CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'

EXPORTING

CLUSTERID = 'RU'

EMPLOYEENUMBER = PERNR

SEQUENCENUMBER = SEQNUMBER

  • 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 = PAYROLL

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.

select * from t512t into table itab_t512t where molga eq '10'

AND sprsl eq 'E'.

sort itab_t512t ascending by lgart.

sort payroll-NAT-TCRT ascending by lgart.

LOOP AT PAYROLL-NAT-TCRT INTO RTLINE.

READ TABLE ITAB_T512T WITH KEY LGART = RTLINE-LGART.

MOVE RTLINE-LGART TO RESULT_TAB-LGART.

MOVE ITAB_T512T-LGTXT TO RESULT_TAB-LGTXT.

MOVE RTLINE-BETRG TO RESULT_TAB-BETRG.

APPEND RESULT_TAB.

ENDLOOP.

LOOP AT RESULT_TAB.

WRITE: / RESULT_TAB-LGART,RESULT_TAB-LGTXT, RESULT_TAB-BETRG.

ENDLOOP.

Regards,

Shankar.

Read only

Former Member
0 Likes
2,732

Hi Kavitha Arumugam,

Please have a look on below FM

HRF_READ_TCRT

Also see

HR_PL_D_US_TCRT

HR_CONVERT_TCRTA_TCRTB_US

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

Read only

Former Member
0 Likes
2,732

hi kavitha,

Did u got it..... If it is clear then close this thread.

Regards,

Shankar.

Read only

0 Likes
2,732

Hi Shankar . The problem is solved . I was doing a mistake in passing the parameters .

EXPORTING

clusterid = 'RU'

employeenumber = gw_pa0001-pernr

sequencenumber = gw_in_rgdir-seqnr

read_only_international = ' ' -


> This was earlier checked .

CHANGING

payroll_result = gt_payroll_result

Thats why it was throwing dump. I assume the problem is soved.

Edited by: kavitha arumugam on Sep 27, 2008 9:08 AM