186:
187: IF get_tc_info%FOUND then
188:
189: if g_debug then
190: fnd_file.put_line (fnd_file.LOG,'Acquiring Locking for TC ID: '||p_lock_tcs_tab(i));
191: end if;
192:
193: hxc_lock_api.request_lock (p_process_locker_type => l_process_lock_type,
194: p_resource_id => l_resource_id,
207: if l_tc_lock_boolean then
208: t_locked_tcs(p_lock_tcs_tab(i)):= 'Y';
209:
210: if g_debug then
211: fnd_file.put_line (fnd_file.LOG,'Obtained lock for TC ID: '||p_lock_tcs_tab(i));
212: end if;
213: else
214: if g_debug then
215: fnd_file.put_line (fnd_file.LOG,'SKIPPING: The timecard seems to be locked by another process TC ID: '||p_lock_tcs_tab(i));
211: fnd_file.put_line (fnd_file.LOG,'Obtained lock for TC ID: '||p_lock_tcs_tab(i));
212: end if;
213: else
214: if g_debug then
215: fnd_file.put_line (fnd_file.LOG,'SKIPPING: The timecard seems to be locked by another process TC ID: '||p_lock_tcs_tab(i));
216: end if;
217: t_locked_tcs(p_lock_tcs_tab(i)):= 'N';
218: end if; -- l_tc_lock_boolean
219:
221:
222: t_locked_tcs(p_lock_tcs_tab(i)):= 'Y';
223:
224: if g_debug then
225: fnd_file.put_line (fnd_file.LOG,'The Timecard seems to be deleted. TC ID: '||p_lock_tcs_tab(i));
226: end if;
227:
228: end if; -- get_tc_info%FOUND
229:
254: AND status = 'COMPLETE';
255: exception
256: WHEN OTHERS THEN
257:
258: fnd_file.put_line(fnd_file.LOG,' The Latest Details Upgrade has not been completed ');
259: raise NO_LATEST_DETAILS_UPG;
260:
261: end;
262:
289: end;
290:
291: if l_pay_upg = 'N' and l_pa_upg = 'N' then
292:
293: fnd_file.put_line(fnd_file.LOG, 'Both Payroll and Projects upgrades have not been completed');
294: raise NO_UPG_DONE;
295:
296: end if;
297:
307:
308: exception
309: WHEN NO_DATA_FOUND THEN
310:
311: fnd_file.put_line(fnd_file.LOG,' No transaction id obtained from sequence hxc_transactions_s ');
312: raise ;
313:
314: end;
315:
313:
314: end;
315:
316: if g_debug then
317: fnd_file.put_line (fnd_file.LOG,'g_lock_transaction_id = '||g_lock_transaction_id);
318: end if;
319:
320:
321: if l_pay_upg = 'Y' then
320:
321: if l_pay_upg = 'Y' then
322:
323: if g_debug then
324: fnd_file.put_line (fnd_file.LOG,'******************************');
325: fnd_file.put_line (fnd_file.LOG,'STARTING WITH HXC_PAY_LATEST_DETAILS');
326: fnd_file.put_line (fnd_file.LOG,'******************************');
327: end if;
328:
321: if l_pay_upg = 'Y' then
322:
323: if g_debug then
324: fnd_file.put_line (fnd_file.LOG,'******************************');
325: fnd_file.put_line (fnd_file.LOG,'STARTING WITH HXC_PAY_LATEST_DETAILS');
326: fnd_file.put_line (fnd_file.LOG,'******************************');
327: end if;
328:
329: OPEN get_pay_attribute_info;
322:
323: if g_debug then
324: fnd_file.put_line (fnd_file.LOG,'******************************');
325: fnd_file.put_line (fnd_file.LOG,'STARTING WITH HXC_PAY_LATEST_DETAILS');
326: fnd_file.put_line (fnd_file.LOG,'******************************');
327: end if;
328:
329: OPEN get_pay_attribute_info;
330:
338:
339: EXIT WHEN ROW_ID_TAB.COUNT = 0;
340:
341: if g_debug then
342: fnd_file.put_line (fnd_file.LOG,'******************************');
343: fnd_file.put_line (fnd_file.LOG,'Getting a set of bulk data');
344: fnd_file.put_line (fnd_file.LOG,'******************************');
345: end if;
346:
339: EXIT WHEN ROW_ID_TAB.COUNT = 0;
340:
341: if g_debug then
342: fnd_file.put_line (fnd_file.LOG,'******************************');
343: fnd_file.put_line (fnd_file.LOG,'Getting a set of bulk data');
344: fnd_file.put_line (fnd_file.LOG,'******************************');
345: end if;
346:
347: TIMECARD_ID_STATUS:= get_locked_timecards(TIMECARD_ID_TAB);
340:
341: if g_debug then
342: fnd_file.put_line (fnd_file.LOG,'******************************');
343: fnd_file.put_line (fnd_file.LOG,'Getting a set of bulk data');
344: fnd_file.put_line (fnd_file.LOG,'******************************');
345: end if;
346:
347: TIMECARD_ID_STATUS:= get_locked_timecards(TIMECARD_ID_TAB);
348:
346:
347: TIMECARD_ID_STATUS:= get_locked_timecards(TIMECARD_ID_TAB);
348:
349: if g_debug then
350: fnd_file.put_line (fnd_file.LOG,'Updating hxc_pay_latest_details');
351: fnd_file.put_line (fnd_file.LOG,'ROW_ID_TAB.COUNT ='||ROW_ID_TAB.COUNT);
352: end if;
353:
354:
347: TIMECARD_ID_STATUS:= get_locked_timecards(TIMECARD_ID_TAB);
348:
349: if g_debug then
350: fnd_file.put_line (fnd_file.LOG,'Updating hxc_pay_latest_details');
351: fnd_file.put_line (fnd_file.LOG,'ROW_ID_TAB.COUNT ='||ROW_ID_TAB.COUNT);
352: end if;
353:
354:
355: begin
382:
383: if l_pa_upg = 'Y' then
384:
385: if g_debug then
386: fnd_file.put_line (fnd_file.LOG,'******************************');
387: fnd_file.put_line (fnd_file.LOG,'STARTING WITH HXC_PA_LATEST_DETAILS');
388: fnd_file.put_line (fnd_file.LOG,'******************************');
389: end if;
390:
383: if l_pa_upg = 'Y' then
384:
385: if g_debug then
386: fnd_file.put_line (fnd_file.LOG,'******************************');
387: fnd_file.put_line (fnd_file.LOG,'STARTING WITH HXC_PA_LATEST_DETAILS');
388: fnd_file.put_line (fnd_file.LOG,'******************************');
389: end if;
390:
391: OPEN get_pa_attribute_info;
384:
385: if g_debug then
386: fnd_file.put_line (fnd_file.LOG,'******************************');
387: fnd_file.put_line (fnd_file.LOG,'STARTING WITH HXC_PA_LATEST_DETAILS');
388: fnd_file.put_line (fnd_file.LOG,'******************************');
389: end if;
390:
391: OPEN get_pa_attribute_info;
392:
397: LIMIT 500;
398: EXIT WHEN ROW_ID_TAB.COUNT = 0;
399:
400: if g_debug then
401: fnd_file.put_line (fnd_file.LOG,'******************************');
402: fnd_file.put_line (fnd_file.LOG,'Getting a set of bulk data');
403: fnd_file.put_line (fnd_file.LOG,'******************************');
404: end if;
405:
398: EXIT WHEN ROW_ID_TAB.COUNT = 0;
399:
400: if g_debug then
401: fnd_file.put_line (fnd_file.LOG,'******************************');
402: fnd_file.put_line (fnd_file.LOG,'Getting a set of bulk data');
403: fnd_file.put_line (fnd_file.LOG,'******************************');
404: end if;
405:
406: TIMECARD_ID_STATUS := get_locked_timecards(TIMECARD_ID_TAB);
399:
400: if g_debug then
401: fnd_file.put_line (fnd_file.LOG,'******************************');
402: fnd_file.put_line (fnd_file.LOG,'Getting a set of bulk data');
403: fnd_file.put_line (fnd_file.LOG,'******************************');
404: end if;
405:
406: TIMECARD_ID_STATUS := get_locked_timecards(TIMECARD_ID_TAB);
407:
405:
406: TIMECARD_ID_STATUS := get_locked_timecards(TIMECARD_ID_TAB);
407:
408: if g_debug then
409: fnd_file.put_line (fnd_file.LOG,'Updating hxc_pa_latest_details');
410: fnd_file.put_line (fnd_file.LOG,'ROW_ID_TAB.COUNT ='||ROW_ID_TAB.COUNT);
411: end if;
412:
413:
406: TIMECARD_ID_STATUS := get_locked_timecards(TIMECARD_ID_TAB);
407:
408: if g_debug then
409: fnd_file.put_line (fnd_file.LOG,'Updating hxc_pa_latest_details');
410: fnd_file.put_line (fnd_file.LOG,'ROW_ID_TAB.COUNT ='||ROW_ID_TAB.COUNT);
411: end if;
412:
413:
414: begin
446: p_released_success => l_tc_lock_boolean
447: );
448:
449:
450: fnd_file.put_line (fnd_file.LOG,'******************************');
451: fnd_file.put_line (fnd_file.LOG,'List of skipped TC IDs');
452: fnd_file.put_line (fnd_file.LOG,'******************************');
453:
454: if t_locked_tcs.COUNT > 0 then
447: );
448:
449:
450: fnd_file.put_line (fnd_file.LOG,'******************************');
451: fnd_file.put_line (fnd_file.LOG,'List of skipped TC IDs');
452: fnd_file.put_line (fnd_file.LOG,'******************************');
453:
454: if t_locked_tcs.COUNT > 0 then
455: for i in t_locked_tcs.FIRST .. t_locked_tcs.LAST LOOP
448:
449:
450: fnd_file.put_line (fnd_file.LOG,'******************************');
451: fnd_file.put_line (fnd_file.LOG,'List of skipped TC IDs');
452: fnd_file.put_line (fnd_file.LOG,'******************************');
453:
454: if t_locked_tcs.COUNT > 0 then
455: for i in t_locked_tcs.FIRST .. t_locked_tcs.LAST LOOP
456:
457: if t_locked_tcs.EXISTS(i) then
458:
459: if t_locked_tcs(i) <>'Y' then
460:
461: fnd_file.put_line (fnd_file.LOG,i);
462: l_lock_warning :='Y';
463: end if; -- t_locked_tcs(i) <>'Y'
464:
465: end if;-- t_locked_tcs.EXISTS
466:
467: END LOOP; -- t_locked_tcs
468: end if; -- t_locked_tcs.COUNT
469:
470: fnd_file.put_line (fnd_file.LOG,'******************************');
471:
472: if (l_lock_warning = 'Y' ) then
473:
474: retcode:= 1;
471:
472: if (l_lock_warning = 'Y' ) then
473:
474: retcode:= 1;
475: fnd_file.put_line (fnd_file.LOG,' Warning: Some Timecards were locked. ');
476: fnd_file.put_line (fnd_file.LOG,' Please clear the locks, and retry the process');
477:
478: end if;
479:
472: if (l_lock_warning = 'Y' ) then
473:
474: retcode:= 1;
475: fnd_file.put_line (fnd_file.LOG,' Warning: Some Timecards were locked. ');
476: fnd_file.put_line (fnd_file.LOG,' Please clear the locks, and retry the process');
477:
478: end if;
479:
480:
480:
481: if (l_update_warning = 'Y') then
482:
483: retcode:= 1;
484: fnd_file.put_line (fnd_file.LOG,' Warning: Some Detail Records were locked. ');
485: fnd_file.put_line (fnd_file.LOG,' Please clear the locks, and retry the process');
486:
487: end if;
488:
481: if (l_update_warning = 'Y') then
482:
483: retcode:= 1;
484: fnd_file.put_line (fnd_file.LOG,' Warning: Some Detail Records were locked. ');
485: fnd_file.put_line (fnd_file.LOG,' Please clear the locks, and retry the process');
486:
487: end if;
488:
489: EXCEPTION
488:
489: EXCEPTION
490: WHEN NO_UPG_DONE then
491:
492: fnd_file.put_line(fnd_file.LOG, 'Both Payroll and Projects upgrades have not been completed');
493: retcode:=2;
494: RAISE;
495:
496: WHEN NO_LATEST_DETAILS_UPG then
494: RAISE;
495:
496: WHEN NO_LATEST_DETAILS_UPG then
497:
498: fnd_file.put_line(fnd_file.LOG, 'The Latest Details Upgrade has not been completed');
499: retcode:=2;
500: RAISE;
501:
502: WHEN OTHERS THEN
509: );
510:
511:
512:
513: fnd_file.put_line(fnd_file.LOG,' The Program has encountered an unexpected error');
514: fnd_file.put_line(fnd_file.LOG,' Tracing the error as follows - ');
515: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
516: fnd_file.put_line(fnd_file.LOG,dbms_utility.format_error_backtrace);
517: fnd_file.put_line(fnd_file.LOG,SQLERRM);
510:
511:
512:
513: fnd_file.put_line(fnd_file.LOG,' The Program has encountered an unexpected error');
514: fnd_file.put_line(fnd_file.LOG,' Tracing the error as follows - ');
515: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
516: fnd_file.put_line(fnd_file.LOG,dbms_utility.format_error_backtrace);
517: fnd_file.put_line(fnd_file.LOG,SQLERRM);
518: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
511:
512:
513: fnd_file.put_line(fnd_file.LOG,' The Program has encountered an unexpected error');
514: fnd_file.put_line(fnd_file.LOG,' Tracing the error as follows - ');
515: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
516: fnd_file.put_line(fnd_file.LOG,dbms_utility.format_error_backtrace);
517: fnd_file.put_line(fnd_file.LOG,SQLERRM);
518: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
519: retcode:=2;
512:
513: fnd_file.put_line(fnd_file.LOG,' The Program has encountered an unexpected error');
514: fnd_file.put_line(fnd_file.LOG,' Tracing the error as follows - ');
515: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
516: fnd_file.put_line(fnd_file.LOG,dbms_utility.format_error_backtrace);
517: fnd_file.put_line(fnd_file.LOG,SQLERRM);
518: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
519: retcode:=2;
520:
513: fnd_file.put_line(fnd_file.LOG,' The Program has encountered an unexpected error');
514: fnd_file.put_line(fnd_file.LOG,' Tracing the error as follows - ');
515: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
516: fnd_file.put_line(fnd_file.LOG,dbms_utility.format_error_backtrace);
517: fnd_file.put_line(fnd_file.LOG,SQLERRM);
518: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
519: retcode:=2;
520:
521: RAISE;
514: fnd_file.put_line(fnd_file.LOG,' Tracing the error as follows - ');
515: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
516: fnd_file.put_line(fnd_file.LOG,dbms_utility.format_error_backtrace);
517: fnd_file.put_line(fnd_file.LOG,SQLERRM);
518: fnd_file.put_line(fnd_file.LOG,'-------------------------------');
519: retcode:=2;
520:
521: RAISE;
522: