CREATE OR REPLACE PROCEDURE xx_update_emp_reason (
p_assignment_id IN NUMBER,
p_change_reason IN VARCHAR2
)
AS
p_datetrack_update_mode VARCHAR2 (200);
p_effective_date DATE;
p_object_version_number NUMBER;
-------------
p_concatenated_segments VARCHAR2 (200);
p_soft_coding_keyflex_id NUMBER;
p_comment_id NUMBER;
p_effective_start_date DATE := NULL;
p_effective_end_date DATE := NULL;
p_no_managers_warning BOOLEAN;
p_other_manager_warning BOOLEAN;
BEGIN
BEGIN
SELECT pas.effective_start_date, pas.object_version_number
INTO p_effective_date, p_object_version_number
FROM per_all_assignments_f pas
WHERE pas.effective_end_date = TO_DATE ('12/31/4712', 'MM/DD/RRRR')
AND pas.assignment_id = p_assignment_id;
p_datetrack_update_mode := 'CORRECTION';
hr_assignment_api.update_emp_asg
(p_effective_date => p_effective_date,
p_datetrack_update_mode => p_datetrack_update_mode,
p_assignment_id => p_assignment_id,
p_object_version_number => p_object_version_number,
p_change_reason => p_change_reason,
p_concatenated_segments => p_concatenated_segments,
p_soft_coding_keyflex_id => p_soft_coding_keyflex_id,
p_comment_id => p_comment_id,
p_effective_start_date => p_effective_start_date,
p_effective_end_date => p_effective_end_date,
p_no_managers_warning => p_no_managers_warning,
p_other_manager_warning => p_other_manager_warning
);
EXCEPTION
WHEN OTHERS
THEN
p_datetrack_update_mode := NULL;
p_effective_date := NULL;
p_object_version_number := NULL;
p_concatenated_segments := NULL;
p_soft_coding_keyflex_id := NULL;
p_comment_id := NULL;
p_effective_start_date := NULL;
p_effective_end_date := NULL;
p_no_managers_warning := NULL;
p_other_manager_warning := NULL;
END;
COMMIT;
END;
p_assignment_id IN NUMBER,
p_change_reason IN VARCHAR2
)
AS
p_datetrack_update_mode VARCHAR2 (200);
p_effective_date DATE;
p_object_version_number NUMBER;
-------------
p_concatenated_segments VARCHAR2 (200);
p_soft_coding_keyflex_id NUMBER;
p_comment_id NUMBER;
p_effective_start_date DATE := NULL;
p_effective_end_date DATE := NULL;
p_no_managers_warning BOOLEAN;
p_other_manager_warning BOOLEAN;
BEGIN
BEGIN
SELECT pas.effective_start_date, pas.object_version_number
INTO p_effective_date, p_object_version_number
FROM per_all_assignments_f pas
WHERE pas.effective_end_date = TO_DATE ('12/31/4712', 'MM/DD/RRRR')
AND pas.assignment_id = p_assignment_id;
p_datetrack_update_mode := 'CORRECTION';
hr_assignment_api.update_emp_asg
(p_effective_date => p_effective_date,
p_datetrack_update_mode => p_datetrack_update_mode,
p_assignment_id => p_assignment_id,
p_object_version_number => p_object_version_number,
p_change_reason => p_change_reason,
p_concatenated_segments => p_concatenated_segments,
p_soft_coding_keyflex_id => p_soft_coding_keyflex_id,
p_comment_id => p_comment_id,
p_effective_start_date => p_effective_start_date,
p_effective_end_date => p_effective_end_date,
p_no_managers_warning => p_no_managers_warning,
p_other_manager_warning => p_other_manager_warning
);
EXCEPTION
WHEN OTHERS
THEN
p_datetrack_update_mode := NULL;
p_effective_date := NULL;
p_object_version_number := NULL;
p_concatenated_segments := NULL;
p_soft_coding_keyflex_id := NULL;
p_comment_id := NULL;
p_effective_start_date := NULL;
p_effective_end_date := NULL;
p_no_managers_warning := NULL;
p_other_manager_warning := NULL;
END;
COMMIT;
END;