141: CURSOR c10 (
142: p_person_id NUMBER
143: ) IS
144: SELECT 1
145: FROM ben_per_in_org_unit_f
146: WHERE person_id = p_person_id;
147: CURSOR c5 (
148: p_person_id NUMBER
149: ) IS
773: --
774: CLOSE c9;
775:
776: --
777: -- Testing for values in BEN_PER_IN_ORG_UNIT_F
778: --
779: OPEN c10 (
780: p_person_id
781: );
789: 'BEN_94121_DT_CHILD_EXISTS'
790: );
791: fnd_message.set_token (
792: 'TABLE_NAME',
793: 'BEN_PER_IN_ORG_UNIT_F'
794: );
795: fnd_message.raise_error;
796: END IF;
797:
2489: CURSOR c43 (
2490: p_person_id NUMBER
2491: ) IS
2492: SELECT per_in_org_unit_id
2493: FROM ben_per_in_org_unit_f
2494: WHERE person_id = p_person_id
2495: FOR UPDATE OF per_in_org_unit_id;
2496:
2497: --
2903: CLOSE c42;
2904: OPEN c43 (
2905: p_person_id
2906: );
2907: <
2909: FETCH c43 INTO l_id;
2910: EXIT WHEN c43%NOTFOUND;
2911: DELETE FROM ben_per_in_org_unit_f
2907: <
2908: LOOP
2909: FETCH c43 INTO l_id;
2910: EXIT WHEN c43%NOTFOUND;
2911: DELETE FROM ben_per_in_org_unit_f
2912: WHERE CURRENT OF c43;
2913: END LOOP ben_per_in_org_unit_f;
2914: CLOSE c43;
2915:
2909: FETCH c43 INTO l_id;
2910: EXIT WHEN c43%NOTFOUND;
2911: DELETE FROM ben_per_in_org_unit_f
2912: WHERE CURRENT OF c43;
2913: END LOOP ben_per_in_org_unit_f;
2914: CLOSE c43;
2915:
2916: OPEN c44 (
2917: p_person_id