1: Package Body per_pst_ins as
2: /* $Header: pepstrhi.pkb 115.6 2002/12/04 17:14:16 eumenyio noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' per_pst_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_pst_ins.g_position_structure_id_i := p_position_structure_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
223: Cursor C_Sel2 is
224: Select null
225: from per_position_structures
226: where position_structure_id =
227: per_pst_ins.g_position_structure_id_i;
228: --
229: l_proc varchar2(72) := g_package||'pre_insert';
230: l_exists varchar2(1);
231: --
231: --
232: Begin
233: hr_utility.set_location('Entering:'||l_proc, 5);
234: --
235: If (per_pst_ins.g_position_structure_id_i is not null) Then
236: --
237: -- Verify registered primary key values not already in use
238: --
239: Open C_Sel2;
251: --
252: -- Use registered key values and clear globals
253: --
254: p_rec.position_structure_id :=
255: per_pst_ins.g_position_structure_id_i;
256: per_pst_ins.g_position_structure_id_i := null;
257: Else
258: --
259: -- No registerd key values, so select the next sequence number
252: -- Use registered key values and clear globals
253: --
254: p_rec.position_structure_id :=
255: per_pst_ins.g_position_structure_id_i;
256: per_pst_ins.g_position_structure_id_i := null;
257: Else
258: --
259: -- No registerd key values, so select the next sequence number
260: --
412: );
413: --
414: -- Call the supporting pre-insert operation
415: --
416: per_pst_ins.pre_insert(p_rec);
417: --
418: -- Insert the row
419: --
420: per_pst_ins.insert_dml(p_rec);
416: per_pst_ins.pre_insert(p_rec);
417: --
418: -- Insert the row
419: --
420: per_pst_ins.insert_dml(p_rec);
421: --
422: -- Call the supporting post-insert operation
423: --
424: per_pst_ins.post_insert
420: per_pst_ins.insert_dml(p_rec);
421: --
422: -- Call the supporting post-insert operation
423: --
424: per_pst_ins.post_insert
425: (p_effective_date
426: ,p_rec
427: );
428: --
513: --
514: -- Having converted the arguments into the per_pst_rec
515: -- plsql record structure we call the corresponding record business process.
516: --
517: per_pst_ins.ins
518: (p_effective_date
519: ,l_rec
520: );
521: --
527: --
528: hr_utility.set_location(' Leaving:'||l_proc, 10);
529: End ins;
530: --
531: end per_pst_ins;