1: Package Body per_pso_ins as
2: /* $Header: pepsorhi.pkb 115.1 2002/12/04 16:50:05 eumenyio noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' per_pso_ins.'; -- Global package name
9: --
10: -- The following global variables are only to be used by
11: -- the set_base_key_value and pre_insert procedures.
12: --
22: --
23: Begin
24: hr_utility.set_location('Entering:'||l_proc, 10);
25: --
26: per_pso_ins.g_security_organization_id_i := p_security_organization_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
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';
178: l_exists varchar2(1);
179: --
179: --
180: Begin
181: hr_utility.set_location('Entering:'||l_proc, 5);
182: --
183: If (per_pso_ins.g_security_organization_id_i is not null) Then
184: --
185: -- Verify registered primary key values not already in use
186: --
187: Open C_Sel2;
199: --
200: -- Use registered key values and clear globals
201: --
202: p_rec.security_organization_id :=
203: per_pso_ins.g_security_organization_id_i;
204: per_pso_ins.g_security_organization_id_i := null;
205: Else
206: --
207: -- No registerd key values, so select the next sequence number
200: -- Use registered key values and clear globals
201: --
202: p_rec.security_organization_id :=
203: per_pso_ins.g_security_organization_id_i;
204: per_pso_ins.g_security_organization_id_i := null;
205: Else
206: --
207: -- No registerd key values, so select the next sequence number
208: --
307: hr_multi_message.end_validation_set;
308: --
309: -- Call the supporting pre-insert operation
310: --
311: per_pso_ins.pre_insert(p_rec);
312: --
313: -- Insert the row
314: --
315: per_pso_ins.insert_dml(p_rec);
311: per_pso_ins.pre_insert(p_rec);
312: --
313: -- Insert the row
314: --
315: per_pso_ins.insert_dml(p_rec);
316: --
317: -- Call the supporting post-insert operation
318: --
319: per_pso_ins.post_insert
315: per_pso_ins.insert_dml(p_rec);
316: --
317: -- Call the supporting post-insert operation
318: --
319: per_pso_ins.post_insert
320: (p_rec
321: );
322: --
323: -- Call to raise any errors on multi-message list
357: --
358: -- Having converted the arguments into the per_pso_rec
359: -- plsql record structure we call the corresponding record business process.
360: --
361: per_pso_ins.ins
362: (l_rec
363: );
364: --
365: -- As the primary key argument(s)
370: --
371: hr_utility.set_location(' Leaving:'||l_proc, 10);
372: End ins;
373: --
374: end per_pso_ins;