265: l_dummy varchar2(1);
266: --
267: cursor c1 is
268: select null
269: from per_abs_attendance_reasons abr
270: where abr.abs_attendance_reason_id = p_abs_attendance_reason_id
271: and abr.business_group_id = p_business_group_id;
272: --
273: Begin
285: or not l_api_updating)
286: and p_abs_attendance_reason_id is not null then
287: --
288: -- check if abs_attendance_reason_id value exists in
289: -- per_abs_attendance_reasons table
290: --
291: open c1;
292: --
293: fetch c1 into l_dummy;
295: --
296: close c1;
297: --
298: -- raise error as FK does not relate to PK in
299: -- per_abs_attendance_reasons table.
300: --
301: ben_elr_shd.constraint_error('BEN_ELIG_LOA_RSN_PRTE_F_FK3');
302: --
303: end if;