SAP Program RPCSUPQ0_PVT - Superannuation Calculations Australia

Description
This program (or the 'SUPER' form within it) is called from the payroll- RPCALCQ0 - to do the calculations necessary for the superannuation.It will calculate both SGC (Superannuation Guarantee Contribution) andother type of superannuations as well as employees own contribution.
This program is called once per employee.
***
Super module first decides on the period dates and determines if it isthe beginning of a new calendar month, end of the calendar month or ifit is the first period of a new quarter. It then clears down the SMTHand SQTR tables if it is the first of the month or first of thequarter.
The program then loops at table QSUP and processes each fund that isthere. First, the exclusion flag is checked - the fund is notprocessed for the employee if the exclusion flag is on. Then theretirement age is checked for the fund. If the employee is above thenominated retirement age for the fund, then this fund is not processed.
The next step is to calculate the employee self-contribution amount.The employee can contribute by nominating an amount or a percentage. Ifit is by nominating an amount, the amount can be pro rata according tothe factoring method selectd at Infotype 220. If it is by nominating apercentage, the percentage will multiply the Super Period Salary Amountor the Ordinary Time Earnings Amount to determine the contributionamount. The percentage is defaulted from table T5QSF and it may beoverride at the Infotype 220. The Super Period Salary Amount can bepro rata according to the factoring method selected at Infotype 220.The employee contribution amount will then be output to the wage typenominated in table T5QSF.
Then depending on the type of fund - SGC or non-SGC, the fund isprocessed.
For non-SGC funds, table T5QSR (super fund rules) is checked to see ifthere are any additional rules for this fund. If there are, then theage of the employee is checked and rules for this age group are lookedat. If the minimum hours, minimum earnings and maximum earningsconditions are satisfied, then the percentage comes from this table.If the conditions are not satisfied, then the percentage is zero.
If there were no rules for that age group in table T5QSR, then thedefault percentage is the one from table T5QSF (fund details table).This is of course, if there was no percentage override on theemployee's infotype record. Once the percentage is known, then itcalculates that percent of the employee's Ordinary Time Earnings (fromthe wage type specified in T5QSF) or employee's 'Super Period SalaryAmount' (from the infotype).
For non-SGC funds, both tables T5QSF and T5QSR have Pro rata, Maximumand Minimum fields to restrict the calculated company contributionamount. For example, if the default company contribution percentage isused, then this percentage will multiply the Super Period Salary Amountor Ordinary Time Earnings Amount to determine the calculated companycontribution amount. The calculated company contribution amount isthen checked against tables T5QSF or T5QSR. It amy be pro rataaccording to the factoring method selected, and it must be within therange of the minimum and maximum amounts specified in the table.
If there was an override of contribution percentage with an amount oninfotype 0220, then the rules are not checked at all, and thecontribution amount is the one from infotype 0220. The contributionamount is written to the IT in payroll as an amount against a wagetype. The wage type comes from table T5QSF.
For SGC funds, table T5QSG is read to get the rules and defaults.Please note that SGC processing is only done at the last period of acalendar month and is only done if it is NOT a retrospective run.
First, the age of the employee is checked against the minimum agecondition. If they are under age, then the number of hours worked weekby week is looked up (from table SHRS). Any week that has at least therequired hours have their earnings added to the total month earnings.Please note that if the pay unit is not a weekly payroll, then theearnings per week is averaged.
The wage and salary earnings for the month are looked at (from tableSMTH) to determine if they satisfy the minimum monthly earningscondition.
The next step is to check employees earnings in the quarter year to theearning ceiling from table T5QSG. The employee earnings so far in thequarter is read from table SQTR. If the earnings are above theceiling, then the amount that it is over by will not be looked at whencalculating the minimum SGC requirement.
After all of the funds have been processed in the above manner, thenthe SGC shortfall is calculated. This is the amount between thecompany contributions via other super funds and the minimum SGCcontribution that the company must make. The minimum SGC is written tothe IT in payroll as an amount against wage type /SGC. The shortfall,which is the actual SGC amount is written to the IT as an amountagainst a wage type. This wage type comes from table T5QSF.
Throughout the program, if events occur which should highlight warningsto the user, they are written to the payroll log (if log is turned onby ON/SORT), to the MESSAGES table and to the QSUP table.

Precondition
In the payroll, a function called FUP0220 creates a table called QSUPwhich is used by this program.
This table must be filled from the infotype 0220 prior to this programbeing called (see structure PC23L for the layout of the QSUP table).

Output
Table QSUP will be updated with message numbers.
Table SMTH will be updated with month to date earnings and deductionsrelevant to superannuation.
Table SQTR will be updated with quarter to date earnings and deductionsrelevant to superannuation.
Table SHRS will be updated with week by week hours and earnings forunder age employees only.