109: l_dummy varchar2(1);
110: --
111: cursor c1 is
112: select null
113: from ben_elig_per_opt_f a
114: where a.elig_per_opt_id = p_elig_per_opt_id
115: and p_effective_date
116: between a.effective_start_date
117: and a.effective_end_date;
129: <> nvl(ben_egd_shd.g_old_rec.elig_per_opt_id,hr_api.g_number)
130: or not l_api_updating)
131: and p_elig_per_opt_id is not null then
132: --
133: -- check if elig_per_opt_id value exists in ben_elig_per_opt_f table
134: --
135: open c1;
136: --
137: fetch c1 into l_dummy;
138: if c1%notfound then
139: --
140: close c1;
141: --
142: -- raise error as FK does not relate to PK in ben_elig_per_opt_f
143: -- table.
144: --
145: ben_egd_shd.constraint_error('BEN_ELIG_DPNT_DT1');
146: --