1: Package Body ame_aty_ins as
2: /* $Header: amatyrhi.pkb 120.4 2005/11/22 03:14 santosin noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ame_aty_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: ame_aty_ins.g_action_type_id_i := p_action_type_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
255: --
256: Begin
257: hr_utility.set_location('Entering:'||l_proc, 5);
258: --
259: ame_aty_ins.dt_insert_dml
260: (p_rec => p_rec
261: ,p_effective_date => p_effective_date
262: ,p_datetrack_mode => p_datetrack_mode
263: ,p_validation_start_date => p_validation_start_date
319: Cursor C_Sel2 is
320: Select null
321: from ame_action_types
322: where action_type_id =
323: ame_aty_ins.g_action_type_id_i;
324: --
325: l_proc varchar2(72) := g_package||'pre_insert';
326: l_exists varchar2(1);
327: --
327: --
328: Begin
329: hr_utility.set_location('Entering:'||l_proc, 5);
330: --
331: If (ame_aty_ins.g_action_type_id_i is not null) Then
332: --
333: -- Verify registered primary key values not already in use
334: --
335: Open C_Sel2;
347: --
348: -- Use registered key values and clear globals
349: --
350: p_rec.action_type_id :=
351: ame_aty_ins.g_action_type_id_i;
352: ame_aty_ins.g_action_type_id_i := null;
353: Else
354: --
355: -- No registerd key values, so select the next sequence number
348: -- Use registered key values and clear globals
349: --
350: p_rec.action_type_id :=
351: ame_aty_ins.g_action_type_id_i;
352: ame_aty_ins.g_action_type_id_i := null;
353: Else
354: --
355: -- No registerd key values, so select the next sequence number
356: --
538: hr_utility.set_location('Entering:'||l_proc, 5);
539: --
540: -- Call the lock operation
541: --
542: ame_aty_ins.ins_lck
543: (p_effective_date => p_effective_date
544: ,p_datetrack_mode => l_datetrack_mode
545: ,p_rec => p_rec
546: ,p_validation_start_date => l_validation_start_date
561: hr_multi_message.end_validation_set;
562: --
563: -- Call the supporting pre-insert operation
564: --
565: ame_aty_ins.pre_insert
566: (p_rec => p_rec
567: ,p_effective_date => p_effective_date
568: ,p_datetrack_mode => l_datetrack_mode
569: ,p_validation_start_date => l_validation_start_date
571: );
572: --
573: -- Insert the row
574: --
575: ame_aty_ins.insert_dml
576: (p_rec => p_rec
577: ,p_effective_date => p_effective_date
578: ,p_datetrack_mode => l_datetrack_mode
579: ,p_validation_start_date => l_validation_start_date
581: );
582: --
583: -- Call the supporting post-insert operation
584: --
585: ame_aty_ins.post_insert
586: (p_rec => p_rec
587: ,p_effective_date => p_effective_date
588: ,p_datetrack_mode => l_datetrack_mode
589: ,p_validation_start_date => l_validation_start_date
639: -- Having converted the arguments into the ame_aty_rec
640: -- plsql record structure we call the corresponding record
641: -- business process.
642: --
643: ame_aty_ins.ins
644: (p_effective_date
645: ,l_rec
646: );
647: --
655: --
656: hr_utility.set_location(' Leaving:'||l_proc, 10);
657: End ins;
658: --
659: end ame_aty_ins;