182: l_dummy varchar2(1);
183: --
184: cursor c1 is
185: select null
186: from ben_enrt_bnft a
187: where a.enrt_bnft_id = p_enrt_bnft_id;
188: --
189: Begin
190: --
199: <> nvl(ben_ecr_shd.g_old_rec.enrt_bnft_id,hr_api.g_number)
200: or not l_api_updating) and p_enrt_bnft_id is not null then
201: --
202: -- check if enrt_bnft_id value exists in
203: -- ben_enrt_bnft table
204: --
205: open c1;
206: --
207: fetch c1 into l_dummy;
208: if c1%notfound then
209: --
210: close c1;
211: --
212: -- raise error as FK does not relate to PK in ben_enrt_bnft
213: -- table.
214: --
215: ben_ecr_shd.constraint_error('BEN_ENRT_RT_FK3');
216: --