1: Package Body pqh_cgn_ins as
2: /* $Header: pqcgnrhi.pkb 115.7 2002/11/27 04:43:27 rpasapul noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' pqh_cgn_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: pqh_cgn_ins.g_case_group_id_i := p_case_group_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
193: Cursor C_Sel2 is
194: Select null
195: from pqh_de_case_groups
196: where case_group_id =
197: pqh_cgn_ins.g_case_group_id_i;
198: --
199: l_proc varchar2(72) := g_package||'pre_insert';
200: l_exists varchar2(1);
201: --
201: --
202: Begin
203: hr_utility.set_location('Entering:'||l_proc, 5);
204: --
205: If (pqh_cgn_ins.g_case_group_id_i is not null) Then
206: --
207: -- Verify registered primary key values not already in use
208: --
209: Open C_Sel2;
221: --
222: -- Use registered key values and clear globals
223: --
224: p_rec.case_group_id :=
225: pqh_cgn_ins.g_case_group_id_i;
226: pqh_cgn_ins.g_case_group_id_i := null;
227: Else
228: --
229: -- No registerd key values, so select the next sequence number
222: -- Use registered key values and clear globals
223: --
224: p_rec.case_group_id :=
225: pqh_cgn_ins.g_case_group_id_i;
226: pqh_cgn_ins.g_case_group_id_i := null;
227: Else
228: --
229: -- No registerd key values, so select the next sequence number
230: --
355: hr_multi_message.end_validation_set;
356: --
357: -- Call the supporting pre-insert operation
358: --
359: pqh_cgn_ins.pre_insert(p_rec);
360: --
361: -- Insert the row
362: --
363: pqh_cgn_ins.insert_dml(p_rec);
359: pqh_cgn_ins.pre_insert(p_rec);
360: --
361: -- Insert the row
362: --
363: pqh_cgn_ins.insert_dml(p_rec);
364: --
365: -- Call the supporting post-insert operation
366: --
367: pqh_cgn_ins.post_insert
363: pqh_cgn_ins.insert_dml(p_rec);
364: --
365: -- Call the supporting post-insert operation
366: --
367: pqh_cgn_ins.post_insert
368: (p_effective_date
369: ,p_rec
370: );
371: --
429: --
430: -- Having converted the arguments into the pqh_cgn_rec
431: -- plsql record structure we call the corresponding record business process.
432: --
433: pqh_cgn_ins.ins
434: (p_effective_date
435: ,l_rec
436: );
437: --
443: --
444: hr_utility.set_location(' Leaving:'||l_proc, 10);
445: End ins;
446: --
447: end pqh_cgn_ins;