1: Package Body ghr_cca_ins as
2: /* $Header: ghccarhi.pkb 115.1 2003/01/30 19:25:04 asubrahm noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ghr_cca_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: ghr_cca_ins.g_compl_appeal_id_i := p_compl_appeal_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
227: Cursor C_Sel2 is
228: Select null
229: from ghr_compl_appeals
230: where compl_appeal_id =
231: ghr_cca_ins.g_compl_appeal_id_i;
232: --
233: l_proc varchar2(72) := g_package||'pre_insert';
234: l_exists varchar2(1);
235: --
235: --
236: Begin
237: hr_utility.set_location('Entering:'||l_proc, 5);
238: --
239: If (ghr_cca_ins.g_compl_appeal_id_i is not null) Then
240: --
241: -- Verify registered primary key values not already in use
242: --
243: Open C_Sel2;
255: --
256: -- Use registered key values and clear globals
257: --
258: p_rec.compl_appeal_id :=
259: ghr_cca_ins.g_compl_appeal_id_i;
260: ghr_cca_ins.g_compl_appeal_id_i := null;
261: Else
262: --
263: -- No registerd key values, so select the next sequence number
256: -- Use registered key values and clear globals
257: --
258: p_rec.compl_appeal_id :=
259: ghr_cca_ins.g_compl_appeal_id_i;
260: ghr_cca_ins.g_compl_appeal_id_i := null;
261: Else
262: --
263: -- No registerd key values, so select the next sequence number
264: --
387: );
388: --
389: -- Call the supporting pre-insert operation
390: --
391: ghr_cca_ins.pre_insert(p_rec);
392: --
393: -- Insert the row
394: --
395: ghr_cca_ins.insert_dml(p_rec);
391: ghr_cca_ins.pre_insert(p_rec);
392: --
393: -- Insert the row
394: --
395: ghr_cca_ins.insert_dml(p_rec);
396: --
397: -- Call the supporting post-insert operation
398: --
399: ghr_cca_ins.post_insert
395: ghr_cca_ins.insert_dml(p_rec);
396: --
397: -- Call the supporting post-insert operation
398: --
399: ghr_cca_ins.post_insert
400: (p_effective_date
401: ,p_rec
402: );
403: --
492: --
493: -- Having converted the arguments into the ghr_cca_rec
494: -- plsql record structure we call the corresponding record business process.
495: --
496: ghr_cca_ins.ins
497: (p_effective_date
498: ,l_rec
499: );
500: --
506: --
507: hr_utility.set_location(' Leaving:'||l_proc, 10);
508: End ins;
509: --
510: end ghr_cca_ins;