68: --
69: -- Delete the where the effective start date is equal
70: -- to the validation end date.
71: --
72: delete from per_all_assignments_f
73: where assignment_id = p_rec.assignment_id
74: and effective_start_date = p_validation_start_date;
75: --
76: per_asg_shd.g_api_dml := false; -- Unset the api dml status
80: --
81: -- Delete the row(s) where the effective start date is greater than
82: -- or equal to the validation start date.
83: --
84: delete from per_all_assignments_f
85: where assignment_id = p_rec.assignment_id
86: and effective_start_date >= p_validation_start_date;
87: --
88: per_asg_shd.g_api_dml := false; -- Unset the api dml status
241: -- Cursor C_Sel1 select comments to be deleted
242: --
243: Cursor C_Sel1 is
244: select asg1.comment_id
245: from per_all_assignments_f asg1
246: where asg1.comment_id is not null
247: and asg1.assignment_id = p_rec.assignment_id
248: and asg1.effective_start_date <= p_validation_end_date
249: and asg1.effective_end_date >= p_validation_start_date
248: and asg1.effective_start_date <= p_validation_end_date
249: and asg1.effective_end_date >= p_validation_start_date
250: and not exists
251: (select 1
252: from per_all_assignments_f asg2
253: where asg2.comment_id = asg1.comment_id
254: and asg2.assignment_id = asg1.assignment_id
255: and (asg2.effective_start_date > p_validation_end_date
256: or asg2.effective_end_date < p_validation_start_date));
622: );
623: exception
624: when hr_api.cannot_find_prog_unit then
625: hr_api.cannot_find_prog_unit_error
626: (p_module_name => 'PER_ALL_ASSIGNMENTS_F'
627: ,p_hook_type => 'AD'
628: );
629: end;
630: -- End of API User Hook for post_delete.
775: Procedure del
776: (
777: p_rec in out nocopy per_asg_shd.g_rec_type,
778: p_effective_date in date,
779: p_effective_start_date OUT NOCOPY per_all_assignments_f.effective_start_date%TYPE,
780: p_effective_end_date OUT NOCOPY per_all_assignments_f.effective_end_date%TYPE,
781: -- p_validation_start_date out nocopy date,
782: -- p_validation_end_date out nocopy date,
783: p_datetrack_mode in varchar2,
776: (
777: p_rec in out nocopy per_asg_shd.g_rec_type,
778: p_effective_date in date,
779: p_effective_start_date OUT NOCOPY per_all_assignments_f.effective_start_date%TYPE,
780: p_effective_end_date OUT NOCOPY per_all_assignments_f.effective_end_date%TYPE,
781: -- p_validation_start_date out nocopy date,
782: -- p_validation_end_date out nocopy date,
783: p_datetrack_mode in varchar2,
784: p_validate in boolean default false,
965: -- |---------------------------------< del >----------------------------------|
966: -- ----------------------------------------------------------------------------
967: Procedure del
968: (p_validate IN boolean default false
969: ,p_assignment_id IN per_all_assignments_f.assignment_id%TYPE
970: ,p_effective_date IN DATE
971: ,p_datetrack_mode IN VARCHAR2
972: ,p_object_version_number IN OUT NOCOPY per_all_assignments_f.object_version_number%TYPE
973: ,p_effective_start_date OUT NOCOPY per_all_assignments_f.effective_start_date%TYPE
968: (p_validate IN boolean default false
969: ,p_assignment_id IN per_all_assignments_f.assignment_id%TYPE
970: ,p_effective_date IN DATE
971: ,p_datetrack_mode IN VARCHAR2
972: ,p_object_version_number IN OUT NOCOPY per_all_assignments_f.object_version_number%TYPE
973: ,p_effective_start_date OUT NOCOPY per_all_assignments_f.effective_start_date%TYPE
974: ,p_effective_end_date OUT NOCOPY per_all_assignments_f.effective_end_date%TYPE
975: ,p_loc_change_tax_issues OUT NOCOPY boolean
976: ,p_delete_asg_budgets OUT NOCOPY boolean
969: ,p_assignment_id IN per_all_assignments_f.assignment_id%TYPE
970: ,p_effective_date IN DATE
971: ,p_datetrack_mode IN VARCHAR2
972: ,p_object_version_number IN OUT NOCOPY per_all_assignments_f.object_version_number%TYPE
973: ,p_effective_start_date OUT NOCOPY per_all_assignments_f.effective_start_date%TYPE
974: ,p_effective_end_date OUT NOCOPY per_all_assignments_f.effective_end_date%TYPE
975: ,p_loc_change_tax_issues OUT NOCOPY boolean
976: ,p_delete_asg_budgets OUT NOCOPY boolean
977: ,p_org_now_no_manager_warning OUT NOCOPY boolean
970: ,p_effective_date IN DATE
971: ,p_datetrack_mode IN VARCHAR2
972: ,p_object_version_number IN OUT NOCOPY per_all_assignments_f.object_version_number%TYPE
973: ,p_effective_start_date OUT NOCOPY per_all_assignments_f.effective_start_date%TYPE
974: ,p_effective_end_date OUT NOCOPY per_all_assignments_f.effective_end_date%TYPE
975: ,p_loc_change_tax_issues OUT NOCOPY boolean
976: ,p_delete_asg_budgets OUT NOCOPY boolean
977: ,p_org_now_no_manager_warning OUT NOCOPY boolean
978: ,p_element_salary_warning OUT NOCOPY boolean