1: Package Body ben_cwg_ins as
2: /* $Header: becwgrhi.pkb 120.0 2005/05/28 01:29:54 appldev noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ben_cwg_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: ben_cwg_ins.g_cwb_wksht_grp_id_i := p_cwb_wksht_grp_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
241: Cursor C_Sel2 is
242: Select null
243: from ben_cwb_wksht_grp
244: where cwb_wksht_grp_id =
245: ben_cwg_ins.g_cwb_wksht_grp_id_i;
246: --
247: l_proc varchar2(72) := g_package||'pre_insert';
248: l_exists varchar2(1);
249: --
249: --
250: Begin
251: hr_utility.set_location('Entering:'||l_proc, 5);
252: --
253: If (ben_cwg_ins.g_cwb_wksht_grp_id_i is not null) Then
254: --
255: -- Verify registered primary key values not already in use
256: --
257: Open C_Sel2;
269: --
270: -- Use registered key values and clear globals
271: --
272: p_rec.cwb_wksht_grp_id :=
273: ben_cwg_ins.g_cwb_wksht_grp_id_i;
274: ben_cwg_ins.g_cwb_wksht_grp_id_i := null;
275: Else
276: --
277: -- No registerd key values, so select the next sequence number
270: -- Use registered key values and clear globals
271: --
272: p_rec.cwb_wksht_grp_id :=
273: ben_cwg_ins.g_cwb_wksht_grp_id_i;
274: ben_cwg_ins.g_cwb_wksht_grp_id_i := null;
275: Else
276: --
277: -- No registerd key values, so select the next sequence number
278: --
449: hr_multi_message.end_validation_set;
450: --
451: -- Call the supporting pre-insert operation
452: --
453: ben_cwg_ins.pre_insert(p_rec);
454: --
455: -- Insert the row
456: --
457: ben_cwg_ins.insert_dml(p_rec);
453: ben_cwg_ins.pre_insert(p_rec);
454: --
455: -- Insert the row
456: --
457: ben_cwg_ins.insert_dml(p_rec);
458: --
459: -- Call the supporting post-insert operation
460: --
461: ben_cwg_ins.post_insert
457: ben_cwg_ins.insert_dml(p_rec);
458: --
459: -- Call the supporting post-insert operation
460: --
461: ben_cwg_ins.post_insert
462: (p_effective_date
463: ,p_rec
464: );
465: --
571: --
572: -- Having converted the arguments into the ben_cwg_rec
573: -- plsql record structure we call the corresponding record business process.
574: --
575: ben_cwg_ins.ins
576: (p_effective_date
577: ,l_rec
578: );
579: --
585: --
586: hr_utility.set_location(' Leaving:'||l_proc, 10);
587: End ins;
588: --
589: end ben_cwg_ins;