Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: Need to convert payroll result(HR_PAYROLL) from buffer to respective payroll tables i.e. RT, WPBP, BT, CRT etc

$
0
0

Hi Jagan,

 

I have a requirement to International payroll data from PCL2 buffer, i have used the below logic to get the data. i got the data in PCL2 but i am unable to convert to RT[]. please suggest me how can i get RT data from PCL2.

 

*Run the payroll in simulation by function module HR_PAYROLL

       sim_pernr-pernr = pernr-pernr.

       APPEND sim_pernr.

       l_year = p0000-begda+0(4).

       l_month = p0000-begda+4(2).

       CALL FUNCTION 'HR_PAYROLL'

         EXPORTING

           payroll_area        = p0001-abkrs

           payroll_period      = l_month

           payroll_year        = l_year

           selection_variant   = 'VARIANT'

           program_name        = 'RPCALCX0'

           tst_on              = 'X'

         TABLES

           employee_numbers    = sim_pernr

           buffer              = tbuff

           buffer_directory    = buffer_dir

         EXCEPTIONS

           program_not_exist   = 1

           variant_not_exist   = 2

           missing_parameter   = 3

           wrong_parameter     = 4

           wrong_country_group = 5

           OTHERS              = 6.

       IF sy-subrc <> 0.

* Implement suitable error handling here

       ELSE.

         buffer-tbuff[] = tbuff[].

         buffer-buffer_dir[] = buffer_dir[].

 

         CALL FUNCTION 'CU_READ_RGDIR'

           EXPORTING

             persnr          = pernr-pernr

             buffer          = buffer

           TABLES

             in_rgdir        = rgdir

           EXCEPTIONS

             no_record_found = 1

             OTHERS          = 2.

         IF sy-subrc <> 0.

* Implement suitable error handling here

         ELSE.

           CALL FUNCTION 'CD_READ_LAST_RESULT_IN_RGDIR'

             IMPORTING

               ptx_rgdir_nv = rgdir_line

             TABLES

               pt_rgdir     = rgdir.

           IF sy-subrc = 0.

* CU Cluster have Table RGDIR which contains the directory of all of an Employee's Payroll results

             CLEAR rp-imp-cd-subrc.

             READ TABLE rgdir INDEX 1.

             cd-key-pernr = pernr-pernr."Fill the Key for reading CU cluster

             rp-imp-c2-cu.

             CHECK rp-imp-cd-subrc EQ 0.             "MACRO to Import CU Cluster

 

here i am not getting the RT table filled, please let me know how can i get it.

 

 

 


Thanks,

Siva N


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>