309: hr_utility.set_location('Entering:'||l_proc, 5);
310: --
311: -- Ensure that all the mandatory arguments are not null
312: --
313: hr_api.mandatory_arg_error(p_api_name => l_proc
314: ,p_argument => 'effective_date'
315: ,p_argument_value => p_effective_date
316: );
317: --
314: ,p_argument => 'effective_date'
315: ,p_argument_value => p_effective_date
316: );
317: --
318: hr_api.mandatory_arg_error(p_api_name => l_proc
319: ,p_argument => 'datetrack_mode'
320: ,p_argument_value => p_datetrack_mode
321: );
322: --
319: ,p_argument => 'datetrack_mode'
320: ,p_argument_value => p_datetrack_mode
321: );
322: --
323: hr_api.mandatory_arg_error(p_api_name => l_proc
324: ,p_argument => 'status_processing_rule_id'
325: ,p_argument_value => p_status_processing_rule_id
326: );
327: --
324: ,p_argument => 'status_processing_rule_id'
325: ,p_argument_value => p_status_processing_rule_id
326: );
327: --
328: hr_api.mandatory_arg_error(p_api_name => l_proc
329: ,p_argument => 'object_version_number'
330: ,p_argument_value => p_object_version_number
331: );
332: --
331: );
332: --
333: -- Check to ensure the datetrack mode is not INSERT.
334: --
335: If (p_datetrack_mode <> hr_api.g_insert) then
336: --
337: -- We must select and lock the current row.
338: --
339: Open C_Sel1;
356: -- Providing we are doing an update and a comment_id exists then
357: -- we select the comment text.
358: --
359: If ((pay_ppr_shd.g_old_rec.comment_id is not null) and
360: (p_datetrack_mode = hr_api.g_update or
361: p_datetrack_mode = hr_api.g_correction or
362: p_datetrack_mode = hr_api.g_update_override or
363: p_datetrack_mode = hr_api.g_update_change_insert)) then
364: Open C_Sel3;
357: -- we select the comment text.
358: --
359: If ((pay_ppr_shd.g_old_rec.comment_id is not null) and
360: (p_datetrack_mode = hr_api.g_update or
361: p_datetrack_mode = hr_api.g_correction or
362: p_datetrack_mode = hr_api.g_update_override or
363: p_datetrack_mode = hr_api.g_update_change_insert)) then
364: Open C_Sel3;
365: Fetch C_Sel3 Into pay_ppr_shd.g_old_rec.comments;
358: --
359: If ((pay_ppr_shd.g_old_rec.comment_id is not null) and
360: (p_datetrack_mode = hr_api.g_update or
361: p_datetrack_mode = hr_api.g_correction or
362: p_datetrack_mode = hr_api.g_update_override or
363: p_datetrack_mode = hr_api.g_update_change_insert)) then
364: Open C_Sel3;
365: Fetch C_Sel3 Into pay_ppr_shd.g_old_rec.comments;
366: If C_Sel3%notfound then
359: If ((pay_ppr_shd.g_old_rec.comment_id is not null) and
360: (p_datetrack_mode = hr_api.g_update or
361: p_datetrack_mode = hr_api.g_correction or
362: p_datetrack_mode = hr_api.g_update_override or
363: p_datetrack_mode = hr_api.g_update_change_insert)) then
364: Open C_Sel3;
365: Fetch C_Sel3 Into pay_ppr_shd.g_old_rec.comments;
366: If C_Sel3%notfound then
367: --
410: --
411: -- We need to trap the ORA LOCK exception
412: --
413: Exception
414: When HR_Api.Object_Locked then
415: --
416: -- The object is locked therefore we need to supply a meaningful
417: -- error message.
418: --