83: p_rec.object_version_number := 1; -- Initialise the object version
84: --
85: per_pso_shd.g_api_dml := true; -- Set the api dml status
86: --
87: -- Insert the row into: per_security_organizations
88: --
89: insert into per_security_organizations
90: (organization_id
91: ,security_profile_id
85: per_pso_shd.g_api_dml := true; -- Set the api dml status
86: --
87: -- Insert the row into: per_security_organizations
88: --
89: insert into per_security_organizations
90: (organization_id
91: ,security_profile_id
92: ,entry_type
93: ,object_version_number
165: Procedure pre_insert
166: (p_rec in out nocopy per_pso_shd.g_rec_type
167: ) is
168: --
169: Cursor C_Sel1 is select per_security_organizations_s.nextval from sys.dual;
170: --
171: Cursor C_Sel2 is
172: Select null
173: from per_security_organizations
169: Cursor C_Sel1 is select per_security_organizations_s.nextval from sys.dual;
170: --
171: Cursor C_Sel2 is
172: Select null
173: from per_security_organizations
174: where security_organization_id =
175: per_pso_ins.g_security_organization_id_i;
176: --
177: l_proc varchar2(72) := g_package||'pre_insert';
191: --
192: -- The primary key values are already in use.
193: --
194: fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
195: fnd_message.set_token('TABLE_NAME','per_security_organizations');
196: fnd_message.raise_error;
197: End If;
198: Close C_Sel2;
199: --
276: --
277: when hr_api.cannot_find_prog_unit then
278: --
279: hr_api.cannot_find_prog_unit_error
280: (p_module_name => 'PER_SECURITY_ORGANIZATIONS'
281: ,p_hook_type => 'AI');
282: --
283: end;
284: --