21: -- Comments cursor
22: --
23: cursor comments is
24: select h.rowid
25: from hr_comments h
26: , per_assignments_f paf
27: where h.comment_id = paf.comment_id
28: and paf.business_group_id + 0 = p_business_group_id
29: and paf.person_id = p_person_id
431: -- Comments cursor
432: --
433: cursor comments is
434: select h.rowid
435: from hr_comments h
436: , per_assignments_f paf
437: where h.comment_id = paf.comment_id
438: and paf.business_group_id + 0 = p_business_group_id
439: and paf.person_id = p_person_id
1301: -- comments cursor
1302: --
1303: cursor comments1 is
1304: select rowid
1305: from hr_comments h
1306: where exists (select 'comments exist'
1307: from per_all_assignments_f paf
1308: where h.comment_id = paf.comment_id
1309: and paf.business_group_id +0= p_business_group_id
1661: loop
1662: hr_utility.set_location('cancel_hire_or_apl.do_cancel_hire',220);
1663: fetch comments1 into p_rowid;
1664: exit when comments1%NOTFOUND;
1665: delete from hr_comments h
1666: where h.rowid = p_rowid;
1667: if sql%notfound then
1668: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1669: hr_utility.set_message_token('PROCEDURE','do_cancel_hire');
2178: -- Comments cursor
2179: --
2180: cursor comments2(p_assignment_id NUMBER) is
2181: select h.comment_id
2182: from hr_comments h
2183: , per_assignments_f paf
2184: where h.comment_id = paf.comment_id
2185: and paf.assignment_id = p_assignment_id;
2186: --
2278: -- person comments when apl cursor
2279: --
2280: cursor person_apl_comments2 is
2281: select distinct h.comment_id --fix for bug 7157204.
2282: from hr_comments h, per_people_f ppf
2283: where ppf.business_group_id = p_business_group_id
2284: and ppf.person_id = p_person_id
2285: and ppf.effective_start_date >= p_date_received
2286: and ppf.comment_id = h.comment_id;
2396: <
2397: loop
2398: fetch comments2 into l_pk_id;
2399: exit when comments2%NOTFOUND;
2400: delete from hr_comments h
2401: where h.comment_id = l_pk_id;
2402: if sql%notfound then
2403: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2404: hr_utility.set_message_token('PROCEDURE','do_cancel_appl');
2538: <
2539: loop
2540: fetch person_apl_comments2 into l_pk_id;
2541: exit when person_apl_comments2%NOTFOUND;
2542: delete from hr_comments h
2543: where h.comment_id = l_pk_id;
2544: if sql%notfound then
2545: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2546: hr_utility.set_message_token('PROCEDURE','do_cancel_appl');
3376: -- comments cursor
3377: --
3378: CURSOR csr_comments IS
3379: SELECT ROWID
3380: FROM hr_comments h
3381: WHERE EXISTS (SELECT 'comments exist'
3382: FROM per_all_assignments_f paf
3383: WHERE h.comment_id = paf.comment_id
3384: AND paf.business_group_id +0 = p_business_group_id
3605: FOR comments_rec IN csr_comments LOOP
3606: --
3607: hr_utility.set_location(l_proc,140);
3608: --
3609: DELETE FROM hr_comments h
3610: WHERE h.rowid = comments_rec.rowid;
3611: --
3612: IF SQL%NOTFOUND THEN
3613: --