1: Package Body ghr_cst_ins as
2: /* $Header: ghcstrhi.pkb 120.0 2005/05/29 03:05:29 appldev noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ghr_cst_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_cst_ins.g_compl_agency_cost_id_i := p_compl_agency_cost_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
179: Cursor C_Sel2 is
180: Select null
181: from ghr_compl_agency_costs
182: where compl_agency_cost_id =
183: ghr_cst_ins.g_compl_agency_cost_id_i;
184: --
185: l_proc varchar2(72) := g_package||'pre_insert';
186: l_exists varchar2(1);
187: --
187: --
188: Begin
189: hr_utility.set_location('Entering:'||l_proc, 5);
190: --
191: If (ghr_cst_ins.g_compl_agency_cost_id_i is not null) Then
192: --
193: -- Verify registered primary key values not already in use
194: --
195: Open C_Sel2;
207: --
208: -- Use registered key values and clear globals
209: --
210: p_rec.compl_agency_cost_id :=
211: ghr_cst_ins.g_compl_agency_cost_id_i;
212: ghr_cst_ins.g_compl_agency_cost_id_i := null;
213: Else
214: --
215: -- No registerd key values, so select the next sequence number
208: -- Use registered key values and clear globals
209: --
210: p_rec.compl_agency_cost_id :=
211: ghr_cst_ins.g_compl_agency_cost_id_i;
212: ghr_cst_ins.g_compl_agency_cost_id_i := null;
213: Else
214: --
215: -- No registerd key values, so select the next sequence number
216: --
315: );
316: --
317: -- Call the supporting pre-insert operation
318: --
319: ghr_cst_ins.pre_insert(p_rec);
320: --
321: -- Insert the row
322: --
323: ghr_cst_ins.insert_dml(p_rec);
319: ghr_cst_ins.pre_insert(p_rec);
320: --
321: -- Insert the row
322: --
323: ghr_cst_ins.insert_dml(p_rec);
324: --
325: -- Call the supporting post-insert operation
326: --
327: ghr_cst_ins.post_insert
323: ghr_cst_ins.insert_dml(p_rec);
324: --
325: -- Call the supporting post-insert operation
326: --
327: ghr_cst_ins.post_insert
328: (p_effective_date
329: ,p_rec
330: );
331: --
372: --
373: -- Having converted the arguments into the ghr_cst_rec
374: -- plsql record structure we call the corresponding record business process.
375: --
376: ghr_cst_ins.ins
377: (p_effective_date
378: ,l_rec
379: );
380: --
386: --
387: hr_utility.set_location(' Leaving:'||l_proc, 10);
388: End ins;
389: --
390: end ghr_cst_ins;