1 package body hrwsdpr as
2 /* $Header: pywsdpr1.pkb 115.0 99/07/17 06:50:29 porting ship $ */
3 procedure get_period_for_date (p_payroll_id number,
4 p_given_date date,
5 p_period IN OUT varchar2,
6 p_start_date IN OUT date,
7 p_end_date IN OUT date,
8 p_session_date date) is
9 cursor c is
10 select period_name, start_date, end_date
11 from per_time_periods ptp
12 where p_payroll_id = ptp.payroll_id
13 and p_given_date between ptp.start_date and ptp.end_date
14 and ptp.start_date <= p_session_date;
15 begin
16 open c;
17 fetch c into p_period, p_start_date, p_end_date;
18 if (c%notfound) then
19 close c;
20 hr_utility.set_message (801, 'HR_6552_PAY_OUTSIDE_PERIODS');
21 hr_utility.raise_error;
22 else
23 close c;
24 end if;
25 end get_period_for_date;
26
27 end hrwsdpr;