112: l_dummy varchar2(1);
113: --
114: cursor c1 is
115: select null
116: from hr_all_organization_units a
117: where a.organization_id = p_organization_id;
118: --
119: Begin
120: --
129: and nvl(p_organization_id,hr_api.g_number)
130: <> nvl(ben_cpo_shd.g_old_rec.organization_id,hr_api.g_number)
131: or not l_api_updating) then
132: --
133: -- check if organization_id value exists in hr_all_organization_units 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 hr_all_organization_units
143: -- table.
144: --
145: ben_cpo_shd.constraint_error('BEN_POPL_ORG_FK2');
146: --