1: Package Body pqh_rmr_ins as
2: /* $Header: pqrmrrhi.pkb 120.0 2005/05/29 02:34 appldev noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' pqh_rmr_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_rmr_ins.g_rate_matrix_rate_id_i := p_rate_matrix_rate_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
276: --
277: Begin
278: hr_utility.set_location('Entering:'||l_proc, 5);
279: --
280: pqh_rmr_ins.dt_insert_dml
281: (p_rec => p_rec
282: ,p_effective_date => p_effective_date
283: ,p_datetrack_mode => p_datetrack_mode
284: ,p_validation_start_date => p_validation_start_date
340: Cursor C_Sel2 is
341: Select null
342: from pqh_rate_matrix_rates_f
343: where rate_matrix_rate_id =
344: pqh_rmr_ins.g_rate_matrix_rate_id_i;
345: --
346: l_proc varchar2(72) := g_package||'pre_insert';
347: l_exists varchar2(1);
348: --
348: --
349: Begin
350: hr_utility.set_location('Entering:'||l_proc, 5);
351: --
352: If (pqh_rmr_ins.g_rate_matrix_rate_id_i is not null) Then
353: --
354: -- Verify registered primary key values not already in use
355: --
356: Open C_Sel2;
368: --
369: -- Use registered key values and clear globals
370: --
371: p_rec.rate_matrix_rate_id :=
372: pqh_rmr_ins.g_rate_matrix_rate_id_i;
373: pqh_rmr_ins.g_rate_matrix_rate_id_i := null;
374: Else
375: --
376: -- No registerd key values, so select the next sequence number
369: -- Use registered key values and clear globals
370: --
371: p_rec.rate_matrix_rate_id :=
372: pqh_rmr_ins.g_rate_matrix_rate_id_i;
373: pqh_rmr_ins.g_rate_matrix_rate_id_i := null;
374: Else
375: --
376: -- No registerd key values, so select the next sequence number
377: --
576: hr_utility.set_location('Entering:'||l_proc, 5);
577: --
578: -- Call the lock operation
579: --
580: pqh_rmr_ins.ins_lck
581: (p_effective_date => p_effective_date
582: ,p_datetrack_mode => l_datetrack_mode
583: ,p_rec => p_rec
584: ,p_validation_start_date => l_validation_start_date
599: hr_multi_message.end_validation_set;
600: --
601: -- Call the supporting pre-insert operation
602: --
603: pqh_rmr_ins.pre_insert
604: (p_rec => p_rec
605: ,p_effective_date => p_effective_date
606: ,p_datetrack_mode => l_datetrack_mode
607: ,p_validation_start_date => l_validation_start_date
609: );
610: --
611: -- Insert the row
612: --
613: pqh_rmr_ins.insert_dml
614: (p_rec => p_rec
615: ,p_effective_date => p_effective_date
616: ,p_datetrack_mode => l_datetrack_mode
617: ,p_validation_start_date => l_validation_start_date
619: );
620: --
621: -- Call the supporting post-insert operation
622: --
623: pqh_rmr_ins.post_insert
624: (p_rec => p_rec
625: ,p_effective_date => p_effective_date
626: ,p_datetrack_mode => l_datetrack_mode
627: ,p_validation_start_date => l_validation_start_date
681: -- Having converted the arguments into the pqh_rmr_rec
682: -- plsql record structure we call the corresponding record
683: -- business process.
684: --
685: pqh_rmr_ins.ins
686: (p_effective_date
687: ,l_rec
688: );
689: --
697: --
698: hr_utility.set_location(' Leaving:'||l_proc, 10);
699: End ins;
700: --
701: end pqh_rmr_ins;