570: hr_utility.set_location('Entering:'||l_proc, 5);
571: --
572: -- Ensure that all the mandatory arguments are not null
573: --
574: hr_api.mandatory_arg_error(p_api_name => l_proc
575: ,p_argument => 'effective_date'
576: ,p_argument_value => p_effective_date
577: );
578: --
575: ,p_argument => 'effective_date'
576: ,p_argument_value => p_effective_date
577: );
578: --
579: hr_api.mandatory_arg_error(p_api_name => l_proc
580: ,p_argument => 'datetrack_mode'
581: ,p_argument_value => p_datetrack_mode
582: );
583: --
580: ,p_argument => 'datetrack_mode'
581: ,p_argument_value => p_datetrack_mode
582: );
583: --
584: hr_api.mandatory_arg_error(p_api_name => l_proc
585: ,p_argument => 'element_entry_id'
586: ,p_argument_value => p_element_entry_id
587: );
588: --
585: ,p_argument => 'element_entry_id'
586: ,p_argument_value => p_element_entry_id
587: );
588: --
589: hr_api.mandatory_arg_error(p_api_name => l_proc
590: ,p_argument => 'object_version_number'
591: ,p_argument_value => p_object_version_number
592: );
593:
596: --
597: -- Check to ensure the datetrack mode is not INSERT.
598: --
599:
600: If (p_datetrack_mode <> hr_api.g_insert) then
601: --
602: -- We must select and lock the current row.
603: --
604: Open C_Sel1;
623: -- Providing we are doing an update and a comment_id exists then
624: -- we select the comment text.
625: --
626: If ((pay_ele_shd.g_old_rec.comment_id is not null) and
627: (p_datetrack_mode = hr_api.g_update or
628: p_datetrack_mode = hr_api.g_correction or
629: p_datetrack_mode = hr_api.g_update_override or
630: p_datetrack_mode = hr_api.g_update_change_insert)) then
631: Open C_Sel3;
624: -- we select the comment text.
625: --
626: If ((pay_ele_shd.g_old_rec.comment_id is not null) and
627: (p_datetrack_mode = hr_api.g_update or
628: p_datetrack_mode = hr_api.g_correction or
629: p_datetrack_mode = hr_api.g_update_override or
630: p_datetrack_mode = hr_api.g_update_change_insert)) then
631: Open C_Sel3;
632: Fetch C_Sel3 Into pay_ele_shd.g_old_rec.comments;
625: --
626: If ((pay_ele_shd.g_old_rec.comment_id is not null) and
627: (p_datetrack_mode = hr_api.g_update or
628: p_datetrack_mode = hr_api.g_correction or
629: p_datetrack_mode = hr_api.g_update_override or
630: p_datetrack_mode = hr_api.g_update_change_insert)) then
631: Open C_Sel3;
632: Fetch C_Sel3 Into pay_ele_shd.g_old_rec.comments;
633: If C_Sel3%notfound then
626: If ((pay_ele_shd.g_old_rec.comment_id is not null) and
627: (p_datetrack_mode = hr_api.g_update or
628: p_datetrack_mode = hr_api.g_correction or
629: p_datetrack_mode = hr_api.g_update_override or
630: p_datetrack_mode = hr_api.g_update_change_insert)) then
631: Open C_Sel3;
632: Fetch C_Sel3 Into pay_ele_shd.g_old_rec.comments;
633: If C_Sel3%notfound then
634: --
699: --
700: -- We need to trap the ORA LOCK exception
701: --
702: Exception
703: When HR_Api.Object_Locked then
704: --
705: -- The object is locked therefore we need to supply a meaningful
706: -- error message.
707: --