99: and trunc(sysdate) between ppf.effective_start_date and ppf.effective_end_date
100: and (ppf.current_employee_flag = 'Y' Or ppf.current_npw_flag = 'Y') ;
101: exception
102: when no_data_found then
103: hr_utility.set_message(800,'HR_INVALID_PERSON_ID');
104: hr_utility.set_message_token('PERSON_ID', p_person_id);
105: hr_utility.raise_error;
106: end;
107:
100: and (ppf.current_employee_flag = 'Y' Or ppf.current_npw_flag = 'Y') ;
101: exception
102: when no_data_found then
103: hr_utility.set_message(800,'HR_INVALID_PERSON_ID');
104: hr_utility.set_message_token('PERSON_ID', p_person_id);
105: hr_utility.raise_error;
106: end;
107:
108: -- loop through each row. the rows are returned in an order which makes
101: exception
102: when no_data_found then
103: hr_utility.set_message(800,'HR_INVALID_PERSON_ID');
104: hr_utility.set_message_token('PERSON_ID', p_person_id);
105: hr_utility.raise_error;
106: end;
107:
108: -- loop through each row. the rows are returned in an order which makes
109: -- the last row selected the top most node of the chain.
119: and trunc(sysdate) between ppf.effective_start_date and ppf.effective_end_date
120: and (ppf.current_employee_flag = 'Y' Or ppf.current_npw_flag = 'Y');
121: exception
122: when no_data_found then
123: hr_utility.set_message(800,'HR_INVALID_PERSON_ID');
124: hr_utility.set_message_token('PERSON_ID', l_person_id);
125: hr_utility.raise_error;
126: end;
127: end loop;
120: and (ppf.current_employee_flag = 'Y' Or ppf.current_npw_flag = 'Y');
121: exception
122: when no_data_found then
123: hr_utility.set_message(800,'HR_INVALID_PERSON_ID');
124: hr_utility.set_message_token('PERSON_ID', l_person_id);
125: hr_utility.raise_error;
126: end;
127: end loop;
128: if p_forward_to_person_id = l_person_id then
121: exception
122: when no_data_found then
123: hr_utility.set_message(800,'HR_INVALID_PERSON_ID');
124: hr_utility.set_message_token('PERSON_ID', l_person_id);
125: hr_utility.raise_error;
126: end;
127: end loop;
128: if p_forward_to_person_id = l_person_id then
129: ------------add extra check to block auto approval---------------
165: and paf.assignment_type in ('E','C')
166: and paf.person_id = l_person_id
167: );
168:
169: hr_utility.set_message(800,'HR_INVALID_PERSON_ID');
170: hr_utility.set_message_token('PERSON_ID', l_disp_person_id);
171: hr_utility.raise_error;
172: end if;
173: exception
166: and paf.person_id = l_person_id
167: );
168:
169: hr_utility.set_message(800,'HR_INVALID_PERSON_ID');
170: hr_utility.set_message_token('PERSON_ID', l_disp_person_id);
171: hr_utility.raise_error;
172: end if;
173: exception
174: when no_data_found then
167: );
168:
169: hr_utility.set_message(800,'HR_INVALID_PERSON_ID');
170: hr_utility.set_message_token('PERSON_ID', l_disp_person_id);
171: hr_utility.raise_error;
172: end if;
173: exception
174: when no_data_found then
175: raise;