PRP048 SQL error during timecard distribution
Issue/Symptom/Question
Error received during timecard distribution:
PRP048 -20091 ORA-20091: could not find rates for payroll class XXXXX, pay rate and effective date DD-MMM-YY
ORA-06512 at "PENTA.PK_UNIONRECIPROCITY", line XXX
ORA-06512 at "PENTA.PK_UNIONRECIPROCITY", line XXX
ORA-06512 at "PENTA.PK_RATELOOKUP", line XXXX
ORA-06512 at "PENTA.PK_RATELOOKUP", line XXX
ORA-06512 at "PENTA.PK_RATELOOKUP", line XXX
ORA-06512 at line XXX
Applies To
PENTA for Windows
Payroll > Payroll Check Processing > Distribute Timecards OR Centralized Payroll Check Processing > Centralized Timecard Distribution OR Timecard Distribution by Pay Group
Resolution/Fix/Answer
A few things that can be done if this error happens:
- Review the error that identifies the payroll class and effective date with any new changes to employee records - Run the PENTA Legacy Report - Employee Master Report, filtered by payroll class to identify any new changes
- In a database query tool, such as Golden, run the scripts listed below - this provides a list of potential employees and jobs which can then be reviewed
- The first script will locate the process where the error occurred
- For the second script, you will need to replace the <pr_num> (process request number) with the pr_num returned by the first script.
This script finds the pr_num of the process during which the error was generated:
select * from (
select r.descr,
(select max(step_num) from process_cmpl where process_req_num = p.process_req_num) MAX_STEP,
p.*
from process_request p, request_type r
where p.request_type_num = r.request_type_num(+)
and p.user_id = '&user_id'
order by p.ctrl_date desc, p.ctrl_time desc
)
where (max_step is null or max_step not in (999,499));
This script provides a list of potential employees and jobs.Â
- Reviewing the setup of the union reciprocity, the employee's home union and the work union should help to identify how to resolve this error.Â
- The <pr_num> is returned in the first script - replace the process_req_num with the value returned. Â
select distinct h.emp_id, l.d_distr_date, l.job_id, l.cost_type_cd, l.cc, l.reimb_num , l.pr_class_num,
pk_pr_rateLookup.f_getPayRtNum(
h.emp_id, l.d_distr_date, l.pr_class_num, 0, null, null, 'R', l.job_id, l.cost_type_cd, l.cc, null, 1, null, null ) pay_rt
from lab_tran l
join pr_chk_hist h
on h.pr_chk_sa_num = l.pr_chk_sa_num
where l.process_req_num = <pr_num>
and l.lab_tran_type_num = 26
3. Update the payroll class and pay rate in the Payroll > Setup > Pay Groups, Payroll Classes, and Workers Compensation > Payroll Classes
- Query the relevant payroll class
- Navigate to the Standard Charging tab
- Scroll down to the relevant pay rate #
- Verify the effective date is later than it should be
- Add a record with an earlier effective date (at least as early as the first date in the payroll period), using the same/correct hourly rateÂ
- Query the employee listed in the results from the query listed below in the Employee Information screen
- Navigate to the Pay Rate tab
- Verify the effective date assigned to the class and rate listed in the error is at least as early as the first day of the payroll periodÂ
- If not, create a new record with the earlier effective date, using the same/correct information as the replaced record.Â
If the above steps do not resolve the error or you need further assistance, please submit a Service Desk ticket and reference this article. Please provide the following information in your Service Desk ticket:
- User ID of the user experiencing the error
- Screenshot of the error
- Window that is being used to distribute timecards