DBA Data[Home] [Help]

APPS.PER_BG_NUMBERING_METHOD_PKG dependencies on HR_UTILITY

Line 10: g_debug boolean := hr_utility.debug_enabled;

6: g_X_EMPprofileset boolean;
7: g_X_APLprofileset boolean;
8: g_X_CWKprofileset boolean;
9: --
10: g_debug boolean := hr_utility.debug_enabled;
11: g_pkg_name varchar2(30) := 'per_bg_numbering_method_pkg';
12: g_max_person_number number := 999999999999999999999999999999;
13: g_max_global_person_num number := 999999999999999999999999999;
14: --

Line 54: hr_utility.set_location(c_proc_name,1000);

50: WHEN OTHERS THEN
51: --
52: -- Exception raised whilst writing the log file...
53: --
54: hr_utility.set_location(c_proc_name,1000);
55: FND_FILE.PUT_LINE(FND_FILE.LOG,SQLERRM);
56: RAISE;
57: END Write_Log;
58: -- ---------------------------------------------------------------------------+

Line 290: --hr_utility.trace_on(null,'oracle');

286: FOR UPDATE of next_value NOWAIT;
287: --
288: --
289: BEGIN
290: --hr_utility.trace_on(null,'oracle');
291:
292: hr_utility.set_location('Entering: '||c_proc_name,1);
293: hr_utility.trace('Parameters:');
294: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));

Line 292: hr_utility.set_location('Entering: '||c_proc_name,1);

288: --
289: BEGIN
290: --hr_utility.trace_on(null,'oracle');
291:
292: hr_utility.set_location('Entering: '||c_proc_name,1);
293: hr_utility.trace('Parameters:');
294: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));
295: hr_utility.trace(' person type = '||p_person_type);
296:

Line 293: hr_utility.trace('Parameters:');

289: BEGIN
290: --hr_utility.trace_on(null,'oracle');
291:
292: hr_utility.set_location('Entering: '||c_proc_name,1);
293: hr_utility.trace('Parameters:');
294: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));
295: hr_utility.trace(' person type = '||p_person_type);
296:
297: --

Line 294: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));

290: --hr_utility.trace_on(null,'oracle');
291:
292: hr_utility.set_location('Entering: '||c_proc_name,1);
293: hr_utility.trace('Parameters:');
294: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));
295: hr_utility.trace(' person type = '||p_person_type);
296:
297: --
298: BEGIN

Line 295: hr_utility.trace(' person type = '||p_person_type);

291:
292: hr_utility.set_location('Entering: '||c_proc_name,1);
293: hr_utility.trace('Parameters:');
294: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));
295: hr_utility.trace(' person type = '||p_person_type);
296:
297: --
298: BEGIN
299: -- Lock per_all_people_f to ensure person records are not created/updated/deleted

Line 301: hr_utility.set_location(c_proc_name,2);

297: --
298: BEGIN
299: -- Lock per_all_people_f to ensure person records are not created/updated/deleted
300: --
301: hr_utility.set_location(c_proc_name,2);
302: l_rows_updated := 0;
303: l_organization_id := p_business_group_id;
304: l_use_sequence := Global_person_numbering(p_person_type);
305:

Line 314: hr_utility.set_location(c_proc_name,5);

310: fetch csr_method into l_rec_per_bg_groups;
311:
312: if csr_method%FOUND then
313:
314: hr_utility.set_location(c_proc_name,5);
315: if l_use_sequence then
316: l_continue_flag := TRUE;
317: hr_utility.set_location(c_proc_name,7);
318: else

Line 317: hr_utility.set_location(c_proc_name,7);

313:
314: hr_utility.set_location(c_proc_name,5);
315: if l_use_sequence then
316: l_continue_flag := TRUE;
317: hr_utility.set_location(c_proc_name,7);
318: else
319: open csr_next_value(p_business_group_id, p_person_type);
320: fetch csr_next_value into l_organization_id;
321: l_continue_flag := csr_next_value%FOUND;

Line 326: hr_utility.set_location(c_proc_name,10);

322: end if;
323:
324: if l_continue_flag then
325:
326: hr_utility.set_location(c_proc_name,10);
327: -- -------------------------------------------------------------+
328: -- Processing Applicants +
329: -- -------------------------------------------------------------+
330: if p_person_type = 'APL' then

Line 332: hr_utility.set_location(c_proc_name,12);

328: -- Processing Applicants +
329: -- -------------------------------------------------------------+
330: if p_person_type = 'APL' then
331:
332: hr_utility.set_location(c_proc_name,12);
333: l_max_num_found := get_max_applicant_number(p_business_group_id);
334:
335: UPDATE HR_ORGANIZATION_INFORMATION
336: SET Org_information3 = g_automatic_method -- method_of_generation_apl_num

Line 340: hr_utility.set_location(c_proc_name,14);

336: SET Org_information3 = g_automatic_method -- method_of_generation_apl_num
337: WHERE organization_id = l_organization_id
338: AND ORG_INFORMATION_CONTEXT = g_bg_context_name;
339:
340: hr_utility.set_location(c_proc_name,14);
341: l_rows_updated := SQL%ROWCOUNT;
342:
343: -- -------------------------------------------------------------+
344: -- Processing Employees +

Line 348: hr_utility.set_location(c_proc_name,16);

344: -- Processing Employees +
345: -- -------------------------------------------------------------+
346: elsif p_person_type = 'EMP' then
347:
348: hr_utility.set_location(c_proc_name,16);
349: -- needs to check whether CWK method = 'Based on Employee'
350: -- if yes, then need to greatest(empno, cwkno)
351: --
352: if l_rec_per_bg_groups.cwk_method = 'E' then

Line 353: hr_utility.set_location(c_proc_name,17);

349: -- needs to check whether CWK method = 'Based on Employee'
350: -- if yes, then need to greatest(empno, cwkno)
351: --
352: if l_rec_per_bg_groups.cwk_method = 'E' then
353: hr_utility.set_location(c_proc_name,17);
354:
355: l_max_num_found := greatest(get_max_employee_number(p_business_group_id)
356: ,get_max_cwk_number(p_business_group_id));
357: else

Line 366: hr_utility.set_location(c_proc_name,18);

362: SET Org_information2 = g_automatic_method -- method_of_generation_emp_num
363: WHERE organization_id = l_organization_id
364: AND ORG_INFORMATION_CONTEXT = g_bg_context_name;
365:
366: hr_utility.set_location(c_proc_name,18);
367: l_rows_updated := SQL%ROWCOUNT;
368: -- -------------------------------------------------------------+
369: -- Processing Contingent Workers +
370: -- -------------------------------------------------------------+

Line 373: hr_utility.set_location(c_proc_name,20);

369: -- Processing Contingent Workers +
370: -- -------------------------------------------------------------+
371: elsif p_person_type = 'CWK' then
372:
373: hr_utility.set_location(c_proc_name,20);
374: -- needs to check whether CWK method = 'Based on Employee'
375: -- if yes, then need to greatest(empno, cwkno)
376: --
377: if l_rec_per_bg_groups.cwk_method = 'E' then

Line 378: hr_utility.set_location(c_proc_name,21);

374: -- needs to check whether CWK method = 'Based on Employee'
375: -- if yes, then need to greatest(empno, cwkno)
376: --
377: if l_rec_per_bg_groups.cwk_method = 'E' then
378: hr_utility.set_location(c_proc_name,21);
379:
380: l_max_num_found := greatest(get_max_employee_number(p_business_group_id)
381: ,get_max_cwk_number(p_business_group_id));
382: else

Line 391: hr_utility.set_location(c_proc_name,22);

387: SET Org_information16 = g_automatic_method -- method_of_generation_cwk_num
388: WHERE organization_id = l_organization_id
389: AND ORG_INFORMATION_CONTEXT = g_bg_context_name;
390:
391: hr_utility.set_location(c_proc_name,22);
392: l_rows_updated := SQL%ROWCOUNT;
393: end if;
394: -- -------------------------------------------------------------+
395: -- Update NEXT VALUE +

Line 401: hr_utility.set_message(800,'PER_289925_MAX_VALUE');

397: if (l_max_num_found + 1 > g_max_person_number)
398: or (l_use_sequence and l_max_num_found > g_max_global_person_num)
399: then
400:
401: hr_utility.set_message(800,'PER_289925_MAX_VALUE');
402: hr_utility.raise_error;
403: else
404: if l_rows_updated > 0 and l_max_num_found is not null then
405: hr_utility.set_location(c_proc_name,24);

Line 402: hr_utility.raise_error;

398: or (l_use_sequence and l_max_num_found > g_max_global_person_num)
399: then
400:
401: hr_utility.set_message(800,'PER_289925_MAX_VALUE');
402: hr_utility.raise_error;
403: else
404: if l_rows_updated > 0 and l_max_num_found is not null then
405: hr_utility.set_location(c_proc_name,24);
406:

Line 405: hr_utility.set_location(c_proc_name,24);

401: hr_utility.set_message(800,'PER_289925_MAX_VALUE');
402: hr_utility.raise_error;
403: else
404: if l_rows_updated > 0 and l_max_num_found is not null then
405: hr_utility.set_location(c_proc_name,24);
406:
407: if l_use_sequence then
408: -- alter sequence
409: hr_utility.set_location(c_proc_name,25);

Line 409: hr_utility.set_location(c_proc_name,25);

405: hr_utility.set_location(c_proc_name,24);
406:
407: if l_use_sequence then
408: -- alter sequence
409: hr_utility.set_location(c_proc_name,25);
410: set_global_sequence(p_person_type,l_max_num_found);
411: else
412: hr_utility.set_location(c_proc_name,26);
413: UPDATE per_number_generation_controls

Line 412: hr_utility.set_location(c_proc_name,26);

408: -- alter sequence
409: hr_utility.set_location(c_proc_name,25);
410: set_global_sequence(p_person_type,l_max_num_found);
411: else
412: hr_utility.set_location(c_proc_name,26);
413: UPDATE per_number_generation_controls
414: SET next_value = l_max_num_found + 1
415: WHERE business_group_id = l_organization_id
416: and type = p_person_type;

Line 424: hr_utility.set_location(c_proc_name,27);

420: end if;
421: end if;
422: end if;
423:
424: hr_utility.set_location(c_proc_name,27);
425:
426: end if; -- continue flag?
427:
428: end if; -- csr_method cursor

Line 430: hr_utility.set_location(c_proc_name,28);

426: end if; -- continue flag?
427:
428: end if; -- csr_method cursor
429: --
430: hr_utility.set_location(c_proc_name,28);
431: hr_utility.trace(' MAX value found = '||to_char(l_max_num_found));
432: --
433: close csr_method;
434: EXCEPTION

Line 431: hr_utility.trace(' MAX value found = '||to_char(l_max_num_found));

427:
428: end if; -- csr_method cursor
429: --
430: hr_utility.set_location(c_proc_name,28);
431: hr_utility.trace(' MAX value found = '||to_char(l_max_num_found));
432: --
433: close csr_method;
434: EXCEPTION
435: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then

Line 436: hr_utility.set_location(c_proc_name,29);

432: --
433: close csr_method;
434: EXCEPTION
435: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then
436: hr_utility.set_location(c_proc_name,29);
437: -- The required resources are used by some other process.
438:
439: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
440: hr_utility.raise_error;

Line 439: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');

435: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then
436: hr_utility.set_location(c_proc_name,29);
437: -- The required resources are used by some other process.
438:
439: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
440: hr_utility.raise_error;
441:
442: END; -- Lock table
443: hr_utility.set_location('Leaving: '||c_proc_name,35);

Line 440: hr_utility.raise_error;

436: hr_utility.set_location(c_proc_name,29);
437: -- The required resources are used by some other process.
438:
439: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
440: hr_utility.raise_error;
441:
442: END; -- Lock table
443: hr_utility.set_location('Leaving: '||c_proc_name,35);
444: --hr_utility.trace_off;

Line 443: hr_utility.set_location('Leaving: '||c_proc_name,35);

439: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
440: hr_utility.raise_error;
441:
442: END; -- Lock table
443: hr_utility.set_location('Leaving: '||c_proc_name,35);
444: --hr_utility.trace_off;
445:
446: END convert_to_auto_gen_method;
447: -- -------------------------------------------------------------------------- +

Line 444: --hr_utility.trace_off;

440: hr_utility.raise_error;
441:
442: END; -- Lock table
443: hr_utility.set_location('Leaving: '||c_proc_name,35);
444: --hr_utility.trace_off;
445:
446: END convert_to_auto_gen_method;
447: -- -------------------------------------------------------------------------- +
448: -- -------------------------------------------------------------------------- +

Line 495: hr_utility.trace('Entering :'||c_proc_name);

491: -- added owner condition for fix of bug 3385104
492: --
493: BEGIN -- main set_global_sequence
494: if g_debug then
495: hr_utility.trace('Entering :'||c_proc_name);
496: end if;
497: -- -------------------------------------------+
498: -- get the sequence name based on person type |
499: -- -------------------------------------------+

Line 542: hr_utility.trace('Current Value = '||to_char(l_mynextval));

538: l_mynextval := l_mynextval - 1;
539: l_currval := l_mynextval; -- store this value in case of a rollback
540: --
541: if g_debug then
542: hr_utility.trace('Current Value = '||to_char(l_mynextval));
543: end if;
544: -- ---------------------------------------+
545: -- calculate the increment |
546: -- ---------------------------------------+

Line 553: hr_utility.trace('Altering sequence increment to ' || l_seq_increment);

549:
550: l_seq_increment := p_last_number - l_mynextval -1;
551: --
552: if g_debug then
553: hr_utility.trace('Altering sequence increment to ' || l_seq_increment);
554: end if;
555: --
556: l_string := 'ALTER SEQUENCE ' || l_seq_owner || '.' || l_seq_name
557: || ' INCREMENT BY ' ||

Line 566: hr_utility.trace('Forcing sequence increment');

562: -- -----------------------------------------------------+
563: -- force the update of the sequence into the new range |
564: -- -----------------------------------------------------+
565: if g_debug then
566: hr_utility.trace('Forcing sequence increment');
567: end if;
568: --
569: l_string := 'SELECT ' || l_seq_owner || '.' || l_seq_name ||
570: '.nextval FROM sys.dual';

Line 578: hr_utility.trace('Reseting sequence increment');

574: -- ---------------------------------------+
575: -- return sequence to previous settings |
576: -- ---------------------------------------+
577: if g_debug then
578: hr_utility.trace('Reseting sequence increment');
579: end if;
580:
581: EXECUTE IMMEDIATE l_PrevSettings;
582: l_alterflag := l_alterflag + 1;

Line 586: hr_utility.trace('Leaving : '||c_proc_name);

582: l_alterflag := l_alterflag + 1;
583: --
584: end if; -- l_mynextval < p_last_number
585: if g_debug then
586: hr_utility.trace('Leaving : '||c_proc_name);
587: end if;
588: EXCEPTION
589: when others then
590: --

Line 608: hr_utility.trace('Leaving: sequence rollback done =>'||c_proc_name);

604: EXECUTE IMMEDIATE l_string INTO l_mynextval;
605: -- return to previous settings
606: EXECUTE IMMEDIATE l_PrevSettings;
607: if g_debug then
608: hr_utility.trace('Leaving: sequence rollback done =>'||c_proc_name);
609: end if;
610: end if;
611: --
612: --

Line 674: hr_utility.set_message(800,'PER_289182_GLOBALNUM_SET');

670: if Global_person_numbering(p_person_type) then
671: --
672: -- profile option is already set
673: --
674: hr_utility.set_message(800,'PER_289182_GLOBALNUM_SET');
675: l_message := fnd_message.get();
676:
677: Write_Log(l_message);
678: retcode := 1; -- raise warning

Line 682: hr_utility.set_location('Entering: '||c_proc_name,1);

678: retcode := 1; -- raise warning
679: else
680: l_max_number := 1;
681: if g_debug then
682: hr_utility.set_location('Entering: '||c_proc_name,1);
683: end if;
684: -- Lock per_all_people_f to ensure person records are not created/updated/deleted
685: --
686: LOCK TABLE per_all_people_f

Line 728: hr_utility.set_message(800,'PER_449102_NUMGEN_FF_SET');

724: if Get_PersonNumber_Formula(p_person_type,l_session_date) is not null then
725: --
726: -- custom algorithm is enabled
727: --
728: hr_utility.set_message(800,'PER_449102_NUMGEN_FF_SET');
729: l_message := fnd_message.get();
730:
731: Write_Log(l_message);
732: retcode := 1; -- raise warning

Line 736: hr_utility.set_location('Leaving: '||c_proc_name,35);

732: retcode := 1; -- raise warning
733: end if;
734: end if; -- profile option set?
735: if g_debug then
736: hr_utility.set_location('Leaving: '||c_proc_name,35);
737: end if;
738: --
739: EXCEPTION
740: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then

Line 742: hr_utility.set_location(c_proc_name,29);

738: --
739: EXCEPTION
740: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then
741: if g_debug then
742: hr_utility.set_location(c_proc_name,29);
743: end if;
744: -- The required resources are used by some other process.
745:
746: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');

Line 746: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');

742: hr_utility.set_location(c_proc_name,29);
743: end if;
744: -- The required resources are used by some other process.
745:
746: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
747: hr_utility.raise_error;
748:
749: when e_ProfileUpdFailed then
750:

Line 747: hr_utility.raise_error;

743: end if;
744: -- The required resources are used by some other process.
745:
746: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
747: hr_utility.raise_error;
748:
749: when e_ProfileUpdFailed then
750:
751: hr_utility.set_message(800,'PER_289181_SEQUENCE_FAIL'); -- change message

Line 751: hr_utility.set_message(800,'PER_289181_SEQUENCE_FAIL'); -- change message

747: hr_utility.raise_error;
748:
749: when e_ProfileUpdFailed then
750:
751: hr_utility.set_message(800,'PER_289181_SEQUENCE_FAIL'); -- change message
752: hr_utility.raise_error;
753:
754: END convert_to_global_sequence;
755: -- ---------------------------------------------------------------------------+

Line 752: hr_utility.raise_error;

748:
749: when e_ProfileUpdFailed then
750:
751: hr_utility.set_message(800,'PER_289181_SEQUENCE_FAIL'); -- change message
752: hr_utility.raise_error;
753:
754: END convert_to_global_sequence;
755: -- ---------------------------------------------------------------------------+
756: -- Global_person_numbering: |

Line 854: hr_utility.set_location(c_proc_name,20);

850: from dual;
851:
852: end if;
853: if g_debug then
854: hr_utility.set_location(c_proc_name,20);
855: end if;
856: return (l_next_value);
857: END GetGlobalPersonNum;
858: --

Line 930: hr_utility.set_location('Entering: '||l_proc,1);

926: l_invalid_message fnd_new_messages.message_text%TYPE;
927: l_person_number varchar2(30);
928: e_WrongParameters exception;
929: BEGIN
930: hr_utility.set_location('Entering: '||l_proc,1);
931: --
932: -- Initalize the formula.
933: --
934: ff_exec.init_formula

Line 940: hr_utility.set_location(l_proc, 45);

936: ,p_effective_date => p_effective_date
937: ,p_inputs => l_inputs
938: ,p_outputs => l_outputs);
939:
940: hr_utility.set_location(l_proc, 45);
941:
942: --
943: -- Assign the inputs.
944: --

Line 968: hr_utility.trace('2020 name = '||l_inputs(i_input).name);

964: elsif l_inputs(i_input).name = 'NATIONAL_ID' then
965: l_inputs(i_input).value := p_national_id;
966:
967: else
968: hr_utility.trace('2020 name = '||l_inputs(i_input).name);
969: raise e_WrongParameters;
970: end if;
971: end loop;
972: hr_utility.set_location(l_proc,50);

Line 972: hr_utility.set_location(l_proc,50);

968: hr_utility.trace('2020 name = '||l_inputs(i_input).name);
969: raise e_WrongParameters;
970: end if;
971: end loop;
972: hr_utility.set_location(l_proc,50);
973: --
974: -- Run the formula.
975: --
976: ff_exec.run_formula(l_inputs, l_outputs);

Line 1008: hr_utility.set_message(800, substr(l_invalid_message, 1, 30));

1004: -- truncated to 30 characters because that is the limit
1005: -- in the calling program.
1006: --
1007: if l_user_message = 'Y' then
1008: hr_utility.set_message(800, substr(l_invalid_message, 1, 30));
1009: hr_utility.raise_error;
1010: end if;
1011:
1012: hr_utility.set_location(l_proc,55);

Line 1009: hr_utility.raise_error;

1005: -- in the calling program.
1006: --
1007: if l_user_message = 'Y' then
1008: hr_utility.set_message(800, substr(l_invalid_message, 1, 30));
1009: hr_utility.raise_error;
1010: end if;
1011:
1012: hr_utility.set_location(l_proc,55);
1013:

Line 1012: hr_utility.set_location(l_proc,55);

1008: hr_utility.set_message(800, substr(l_invalid_message, 1, 30));
1009: hr_utility.raise_error;
1010: end if;
1011:
1012: hr_utility.set_location(l_proc,55);
1013:
1014: return l_person_number;
1015:
1016: exception

Line 1023: hr_utility.set_message(800,'HR_449943_BAD_FF_DEFINITION');

1019: --
1020: -- The inputs / outputs of the Fast Formula are incorrect
1021: -- so raise an error.
1022: --
1023: hr_utility.set_message(800,'HR_449943_BAD_FF_DEFINITION');
1024: hr_utility.raise_error;
1025:
1026: END EXECUTE_GET_PERSON_NUMBER_FF;
1027: --

Line 1024: hr_utility.raise_error;

1020: -- The inputs / outputs of the Fast Formula are incorrect
1021: -- so raise an error.
1022: --
1023: hr_utility.set_message(800,'HR_449943_BAD_FF_DEFINITION');
1024: hr_utility.raise_error;
1025:
1026: END EXECUTE_GET_PERSON_NUMBER_FF;
1027: --
1028: --