119: lockmode => dbms_lock.x_mode,
120: release_on_commit => TRUE);
121: --
122: if (ret <> 0) then
123: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
124: hr_utility.set_message_token('LOCKNAME','PAY_PAYROLL_ACTIONS_'||pactid);
125: hr_utility.set_message_token('LOCKERR',ret);
126: hr_utility.raise_error;
127: end if;
120: release_on_commit => TRUE);
121: --
122: if (ret <> 0) then
123: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
124: hr_utility.set_message_token('LOCKNAME','PAY_PAYROLL_ACTIONS_'||pactid);
125: hr_utility.set_message_token('LOCKERR',ret);
126: hr_utility.raise_error;
127: end if;
128: --
121: --
122: if (ret <> 0) then
123: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
124: hr_utility.set_message_token('LOCKNAME','PAY_PAYROLL_ACTIONS_'||pactid);
125: hr_utility.set_message_token('LOCKERR',ret);
126: hr_utility.raise_error;
127: end if;
128: --
129: select pac.action_population_status
122: if (ret <> 0) then
123: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
124: hr_utility.set_message_token('LOCKNAME','PAY_PAYROLL_ACTIONS_'||pactid);
125: hr_utility.set_message_token('LOCKERR',ret);
126: hr_utility.raise_error;
127: end if;
128: --
129: select pac.action_population_status
130: into actpopstat
204: if(actpopstat = 'E') then
205: -- raise the error to cause death of thread
206:
207: rollback;
208: hr_utility.set_message(801,'HR_34988_TERMINATE_THREAD');
209: hr_utility.raise_error;
210:
211: else
212: chunk := NULL; -- nothing left to process.
205: -- raise the error to cause death of thread
206:
207: rollback;
208: hr_utility.set_message(801,'HR_34988_TERMINATE_THREAD');
209: hr_utility.raise_error;
210:
211: else
212: chunk := NULL; -- nothing left to process.
213: found := TRUE;
254: lockhandle => l_lckhandle,
255: lockmode => dbms_lock.x_mode,
256: release_on_commit => TRUE);
257: if (ret <> 0) then
258: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
259: hr_utility.set_message_token('LOCKNAME',
260: 'PAY_CHUNK_STATUS'||pactid||'_'||p_next_chunk);
261: hr_utility.set_message_token('LOCKERR',ret);
262: hr_utility.raise_error;
255: lockmode => dbms_lock.x_mode,
256: release_on_commit => TRUE);
257: if (ret <> 0) then
258: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
259: hr_utility.set_message_token('LOCKNAME',
260: 'PAY_CHUNK_STATUS'||pactid||'_'||p_next_chunk);
261: hr_utility.set_message_token('LOCKERR',ret);
262: hr_utility.raise_error;
263: end if;
257: if (ret <> 0) then
258: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
259: hr_utility.set_message_token('LOCKNAME',
260: 'PAY_CHUNK_STATUS'||pactid||'_'||p_next_chunk);
261: hr_utility.set_message_token('LOCKERR',ret);
262: hr_utility.raise_error;
263: end if;
264: --
265: /* OK we need to be careful here.
258: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
259: hr_utility.set_message_token('LOCKNAME',
260: 'PAY_CHUNK_STATUS'||pactid||'_'||p_next_chunk);
261: hr_utility.set_message_token('LOCKERR',ret);
262: hr_utility.raise_error;
263: end if;
264: --
265: /* OK we need to be careful here.
266: We are looping through the chunks
323: if(act_pop_status = 'E') then
324: -- raise the error to cause death of thread
325:
326: rollback;
327: hr_utility.set_message(801,'HR_34988_TERMINATE_THREAD');
328: hr_utility.raise_error;
329:
330: else
331: chunk := NULL; -- nothing left to process.
324: -- raise the error to cause death of thread
325:
326: rollback;
327: hr_utility.set_message(801,'HR_34988_TERMINATE_THREAD');
328: hr_utility.raise_error;
329:
330: else
331: chunk := NULL; -- nothing left to process.
332: p_found := TRUE;
390: lockmode => dbms_lock.x_mode,
391: release_on_commit => TRUE);
392: --
393: if (ret <> 0) then
394: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
395: hr_utility.set_message_token('LOCKNAME','PAY_PAYROLL_ACTIONS_'||pactid);
396: hr_utility.set_message_token('LOCKERR',ret);
397: hr_utility.raise_error;
398: end if;
391: release_on_commit => TRUE);
392: --
393: if (ret <> 0) then
394: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
395: hr_utility.set_message_token('LOCKNAME','PAY_PAYROLL_ACTIONS_'||pactid);
396: hr_utility.set_message_token('LOCKERR',ret);
397: hr_utility.raise_error;
398: end if;
399: --
392: --
393: if (ret <> 0) then
394: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
395: hr_utility.set_message_token('LOCKNAME','PAY_PAYROLL_ACTIONS_'||pactid);
396: hr_utility.set_message_token('LOCKERR',ret);
397: hr_utility.raise_error;
398: end if;
399: --
400: select
393: if (ret <> 0) then
394: hr_utility.set_message(801,'HR_289135_NO_LOCK_GAINED');
395: hr_utility.set_message_token('LOCKNAME','PAY_PAYROLL_ACTIONS_'||pactid);
396: hr_utility.set_message_token('LOCKERR',ret);
397: hr_utility.raise_error;
398: end if;
399: --
400: select
401: ppa.action_population_status
449: if(act_pop_status = 'E') then
450: -- raise the error to cause death of thread
451:
452: rollback;
453: hr_utility.set_message(801,'HR_34988_TERMINATE_THREAD');
454: hr_utility.raise_error;
455:
456: else
457: chunk := NULL; -- nothing left to process.
450: -- raise the error to cause death of thread
451:
452: rollback;
453: hr_utility.set_message(801,'HR_34988_TERMINATE_THREAD');
454: hr_utility.raise_error;
455:
456: else
457: chunk := NULL; -- nothing left to process.
458: found := TRUE;
712: curr_chunk := 0;
713: found := TRUE;
714: elsif (action_status = 'E') then
715: curr_chunk := 0;
716: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
717: hr_utility.raise_error;
718: elsif (action_status = 'P') then
719: --
720: declare
713: found := TRUE;
714: elsif (action_status = 'E') then
715: curr_chunk := 0;
716: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
717: hr_utility.raise_error;
718: elsif (action_status = 'P') then
719: --
720: declare
721: got_chunk boolean;
732: if (chk_pop_status = 'C') then
733: got_chunk := TRUE;
734: elsif (chk_pop_status = 'E') then
735: curr_chunk := 0;
736: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
737: hr_utility.raise_error;
738: end if;
739: --
740: if (got_chunk = TRUE) then
733: got_chunk := TRUE;
734: elsif (chk_pop_status = 'E') then
735: curr_chunk := 0;
736: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
737: hr_utility.raise_error;
738: end if;
739: --
740: if (got_chunk = TRUE) then
741: --
831: found := TRUE;
832: --
833: elsif (pact_act_status = 'E') then
834: --
835: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
836: hr_utility.raise_error;
837: --
838: elsif (pact_act_status = 'P') then
839: --
832: --
833: elsif (pact_act_status = 'E') then
834: --
835: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
836: hr_utility.raise_error;
837: --
838: elsif (pact_act_status = 'P') then
839: --
840: if (chk_status = 'U') then
869: found := TRUE;
870: --
871: elsif (act_pop_status = 'E') then
872: --
873: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
874: hr_utility.raise_error;
875: --
876: end if;
877: end if;
870: --
871: elsif (act_pop_status = 'E') then
872: --
873: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
874: hr_utility.raise_error;
875: --
876: end if;
877: end if;
878: --
936: found := TRUE;
937: --
938: elsif (pact_act_status = 'E') then
939: --
940: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
941: hr_utility.raise_error;
942: --
943: elsif (pact_act_status = 'P') then
944: --
937: --
938: elsif (pact_act_status = 'E') then
939: --
940: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
941: hr_utility.raise_error;
942: --
943: elsif (pact_act_status = 'P') then
944: --
945: if (chk_status = 'U') then
985: found := TRUE;
986: --
987: elsif (act_pop_status = 'E') then
988: --
989: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
990: hr_utility.raise_error;
991: --
992: end if;
993: end;
986: --
987: elsif (act_pop_status = 'E') then
988: --
989: hr_utility.set_message(801,'HR_6859_HRPROC_OTHER_PROC_ERR');
990: hr_utility.raise_error;
991: --
992: end if;
993: end;
994: --
5200: l_use_pop_person
5201: );
5202: else
5203: -- unrecognised action type.
5204: hr_utility.set_message(801,'HR_UNRECOGNISED_ACTION_TYPE');
5205: hr_utility.raise_error;
5206: end if;
5207: --
5208: -- we have processed the range, so delete the row.
5201: );
5202: else
5203: -- unrecognised action type.
5204: hr_utility.set_message(801,'HR_UNRECOGNISED_ACTION_TYPE');
5205: hr_utility.raise_error;
5206: end if;
5207: --
5208: -- we have processed the range, so delete the row.
5209: delete from pay_population_ranges rge
5302: fetch pact_details into l_act_status, l_act_type, l_rep_name;
5303: if pact_details%notfound then
5304: --
5305: close pact_details;
5306: hr_utility.set_message(801, 'PAY_33170_INVALID_PACT_ID');
5307: hr_utility.raise_error;
5308: --
5309: else
5310: close pact_details;
5303: if pact_details%notfound then
5304: --
5305: close pact_details;
5306: hr_utility.set_message(801, 'PAY_33170_INVALID_PACT_ID');
5307: hr_utility.raise_error;
5308: --
5309: else
5310: close pact_details;
5311: if l_act_status = 'P' then
5309: else
5310: close pact_details;
5311: if l_act_status = 'P' then
5312: --
5313: hr_utility.set_message(801, 'PAY_33171_PACT_PROCESSING');
5314: hr_utility.raise_error;
5315: elsif l_act_type = 'X' then
5316: --
5317: if l_rep_name is not null then
5310: close pact_details;
5311: if l_act_status = 'P' then
5312: --
5313: hr_utility.set_message(801, 'PAY_33171_PACT_PROCESSING');
5314: hr_utility.raise_error;
5315: elsif l_act_type = 'X' then
5316: --
5317: if l_rep_name is not null then
5318: --
5315: elsif l_act_type = 'X' then
5316: --
5317: if l_rep_name is not null then
5318: --
5319: hr_utility.set_message(801, 'PAY_33172_ARCH_REPORT');
5320: hr_utility.raise_error;
5321: end if;
5322: end if;
5323: end if;
5316: --
5317: if l_rep_name is not null then
5318: --
5319: hr_utility.set_message(801, 'PAY_33172_ARCH_REPORT');
5320: hr_utility.raise_error;
5321: end if;
5322: end if;
5323: end if;
5324: --