117: l_exists varchar2(1);
118: --
119: cursor c1 is
120: select null
121: from hr_locations a
122: where a.location_id = p_location_id;
123: --
124: cursor c3 is
125: select null
145: and nvl(p_location_id,hr_api.g_number)
146: <> nvl(ben_ewl_shd.g_old_rec.location_id,hr_api.g_number)
147: or not l_api_updating) then
148: --
149: -- check if location_id value exists in hr_locations table
150: --
151: open c1;
152: --
153: fetch c1 into l_dummy;
154: if c1%notfound then
155: --
156: close c1;
157: --
158: -- raise error as FK does not relate to PK in hr_locations
159: -- table.
160: --
161: ben_ewl_shd.constraint_error('BEN_ELIG_WK_LOC_FK1');
162: --