Application Development 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: 

Function module to get actual salary paid for a particular period

Former Member
0 Kudos

Hi All,

I have a requirement to build a report on the monthly superannuation contributions the company makes to the employee [Australian Payroll], along with a few other information. We are on a weekly payroll and make super contributions once a month.

Is there any Function module or table that stores the pay results for a period [from which I can calculate the superannuation amount] or superannuation pay ?

Or is there an alternative way of approaching to get the information ?

Thank you,

Satish

4 REPLIES 4

Former Member
0 Kudos

Looks like this question was missed as it got "pushed" down by queries by other members.

0 Kudos

I may not be 100% accurate on this but my guess is theres no single FM aimed for that.

Salary is a result of processing data in payrol cluster - each month payrol lists are computed and if someone is present on a few lists (?) computing salay as a single amount may not be that easy - ill post some code to read the cluster data on monday. (namely the RT table).

0 Kudos

Thank you Jacek.

0 Kudos

I used table hrpy_rgdir to get sequence number for the given pernr, payroll area and dates.

Using the sequence number, I am calling Function PYXX_READ_PAYROLL_RESULT to extract the payroll results.

SELECT * INTO CORRESPONDING FIELDS OF TABLE it_hrpy_rgdir
  FROM hrpy_rgdir
  WHERE srtza = 'A'              
    AND paydt IN sopaydt
    AND abkrs IN soabkrs
    AND pernr IN sopernr.
 

 
LOOP AT it_hrpy_rgdir.
 
  PERFORM get_rt USING it_hrpy_rgdir-pernr it_hrpy_rgdir-seqnr.
   
ENDLOOP.
 
*&---------------------------------------------------------------------*
*&      Form  get_rt
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->PERNR      text
*      -->SEQNR      text
*----------------------------------------------------------------------*
FORM get_rt USING pernr seqnr.
  CLEAR: it_payroll_result.
  CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
    EXPORTING
      clusterid                    = 'RQ'
      employeenumber               = pernr
      sequencenumber               = seqnr
    CHANGING
      payroll_result               = it_payroll_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.
ENDFORM.                    

For any period, the function module just returns sy-subrc = 6 [no_record_found].

We are on Australian Payroll. Could you please let me know what I might be missing or is there an alternative way of getting the information ?

Thank you