SAP Function SGPS_CALC_APE_AVG_DISCIPLINARY - Function Module for computing APE for Disciplinary Cases

Parameter Reference Type Length Default Optional Text
BDATE SYST-DATUM D 8 Begin Date
BPAYP PC261-INPER C 6 In-period for payroll (Begin)
EDATE SYST-DATUM D 8 End Date
EPAYP PC261-INPER C 6 In-period for payroll (End)
MOLGA T001P-MOLGA C 2 Country Grouping

Parameter Reference Type Length Text
APE_AMT P0495-APEAMT P 7 Pensions Scheme Annual Pensionable Emolument Amount
BS_AMT P0495-PBSAMT P 5 SG Public Sector Pensions Scheme Basic Salary Per Annum
MAPE_AMT P0495-APEAMT P 7 Monthly APE Amount
MBS_AMT P0495-PBSAMT P 5 Monthly Pensionable Salary
MPA_AMT P0495-PAAMT P 5 Monthly Pensionable Allowance
PA_AMT P0495-PAAMT P 5 SG PS Pensions Scheme Pensionable Allowance Per Annum

Parameter Reference Length Optional Text
TAB_0001 P0001 322 Internal Table of infotype 0001
TAB_T549Q T549Q 33 Internal Table of T549Q

Exception Text
FM_ERROR Error when performing 'HR_SGPBS_YRS_MTHS_DAYS'
NO_RGDIR No single entry of payroll results in RGDIR
RPIMP_ERROR Error when performing macro 'rp-imp-c2-rr'
SIM_ERROR Error when performing 'HR_PAYROLL_SIMULATION_SUBMIT'

Functionality
This function module helps to compute the Annual Pensionable Emolument(APE) of an employee for cases in which averaging of the the last 3years is required, due to a promotion(s) during the last 3 years priorto an employee's retirement.
It will first attempt to read from the payroll cluster the regularpayroll results of the employee. If no payroll result could be found,it shall simulate payroll run for the employee.
Afterwhich, it will retrieve from the results table the wage types /PENand /PEB (Pensions Scheme wage types customised based on ProcessingClass 86) to determine the APE amount, the Pensionable Salary Per Annumand the Pensionable Allowance Per Annum.
This function module employs the following formulaes:
(Total of Monthly PE in Period A) + (Total of Monthly PE in PeriodB)
3
It will also compute the last drawn salary immediately before anemployee's retirement and then compare to the above computed amountand take whichever is lesser.
One important point is that we use 31 days when deriving the period,ie. if it is 2 years, 10 months and 20 days, we divide 20 by 31 to geta month figure.