263: l_dummy varchar2(1);
264: --
265: cursor c1 is
266: select null
267: from ben_enrt_bnft a
268: where a.enrt_bnft_id = p_enrt_bnft_id;
269: --
270: Begin
271: --
280: <> nvl(ben_epr_shd.g_old_rec.enrt_bnft_id,hr_api.g_number)
281: or not l_api_updating) and
282: p_enrt_bnft_id is not null then
283: --
284: -- check if enrt_bnft_id value exists in ben_enrt_bnft table
285: --
286: open c1;
287: --
288: fetch c1 into l_dummy;
289: if c1%notfound then
290: --
291: close c1;
292: --
293: -- raise error as FK does not relate to PK in ben_enrt_bnft
294: -- table.
295: --
296: ben_epr_shd.constraint_error('BEN_ENRT_PREM_FK1');
297: --