166: CURSOR c19 (
167: p_person_id NUMBER
168: ) IS
169: SELECT 1
170: FROM ben_per_cm_f
171: WHERE person_id = p_person_id;
172: CURSOR c8 (
173: p_person_id NUMBER
174: ) IS
722: --
723: CLOSE c4;
724:
725: --
726: -- Testing for values in BEN_PER_CM_F
727: --
728: OPEN c19 (
729: p_person_id
730: );
738: 'BEN_94121_DT_CHILD_EXISTS'
739: );
740: fnd_message.set_token (
741: 'TABLE_NAME',
742: 'BEN_PER_CM_F'
743: );
744: fnd_message.raise_error;
745: END IF;
746:
1357: ) IS
1358: l_proc varchar2(100):= g_package||'delete_communications';
1359:
1360: --** C|c1
1361: --** CN|c4|Fetch the per_cm_id from ben_per_cm_f associated with a person_id.
1362: CURSOR c1 IS
1363: SELECT DISTINCT per_cm_id
1364: FROM ben_per_cm_f
1365: WHERE person_id = p_person_id
1360: --** C|c1
1361: --** CN|c4|Fetch the per_cm_id from ben_per_cm_f associated with a person_id.
1362: CURSOR c1 IS
1363: SELECT DISTINCT per_cm_id
1364: FROM ben_per_cm_f
1365: WHERE person_id = p_person_id
1366: and per_in_ler_id = nvl(p_per_in_ler_id,per_in_ler_id);
1367:
1368: --
2558: CURSOR c39 (
2559: p_person_id NUMBER
2560: ) IS
2561: SELECT per_cm_id
2562: FROM ben_per_cm_f
2563: WHERE person_id = p_person_id
2564: and per_in_ler_id = nvl(p_per_in_ler_id,per_in_ler_id)
2565: FOR UPDATE OF per_cm_id;
2566:
2951: end if;
2952: OPEN c39 (
2953: p_person_id
2954: );
2955: <
2957: FETCH c39 INTO l_id;
2958: EXIT WHEN c39%NOTFOUND;
2959: DELETE FROM ben_per_cm_f
2955: <
2956: LOOP
2957: FETCH c39 INTO l_id;
2958: EXIT WHEN c39%NOTFOUND;
2959: DELETE FROM ben_per_cm_f
2960: WHERE CURRENT OF c39;
2961: END LOOP ben_per_cm_f;
2962: CLOSE c39;
2963: if(p_per_in_ler_id is NULL) then
2957: FETCH c39 INTO l_id;
2958: EXIT WHEN c39%NOTFOUND;
2959: DELETE FROM ben_per_cm_f
2960: WHERE CURRENT OF c39;
2961: END LOOP ben_per_cm_f;
2962: CLOSE c39;
2963: if(p_per_in_ler_id is NULL) then
2964: OPEN c40 (
2965: p_person_id