38: --
39: cursor csr_leg_code is
40: select bg.legislation_code
41: from per_business_groups_perf bg,
42: ben_benefit_actions bba, ben_person_actions bpa
43: where bba.benefit_action_id = bpa.benefit_action_id
44: and bba.business_group_id = bg.business_group_id
45: and bpa.person_action_id = p_person_action_id;
46: --
183: l_dummy varchar2(1);
184: --
185: cursor c1 is
186: select null
187: from ben_benefit_actions a
188: where a.benefit_action_id = p_benefit_action_id;
189: --
190: Begin
191: --
199: and nvl(p_benefit_action_id,hr_api.g_number)
200: <> nvl(ben_act_shd.g_old_rec.benefit_action_id,hr_api.g_number)
201: or not l_api_updating) then
202: --
203: -- check if benefit_action_id value exists in ben_benefit_actions 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_benefit_actions
213: -- table.
214: --
215: ben_act_shd.constraint_error('BEN_PERSON_ACTIONS_FK1');
216: --