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 296: --hr_utility.trace_on(null,'oracle');

292: FOR UPDATE of next_value NOWAIT;
293: --
294: --
295: BEGIN
296: --hr_utility.trace_on(null,'oracle');
297:
298: hr_utility.set_location('Entering: '||c_proc_name,1);
299: hr_utility.trace('Parameters:');
300: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));

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

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

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

295: BEGIN
296: --hr_utility.trace_on(null,'oracle');
297:
298: hr_utility.set_location('Entering: '||c_proc_name,1);
299: hr_utility.trace('Parameters:');
300: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));
301: hr_utility.trace(' person type = '||p_person_type);
302:
303: --

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

296: --hr_utility.trace_on(null,'oracle');
297:
298: hr_utility.set_location('Entering: '||c_proc_name,1);
299: hr_utility.trace('Parameters:');
300: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));
301: hr_utility.trace(' person type = '||p_person_type);
302:
303: --
304: BEGIN

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

297:
298: hr_utility.set_location('Entering: '||c_proc_name,1);
299: hr_utility.trace('Parameters:');
300: hr_utility.trace(' business_group_id = '||to_char(p_business_group_id));
301: hr_utility.trace(' person type = '||p_person_type);
302:
303: --
304: BEGIN
305: -- Lock per_all_people_f to ensure person records are not created/updated/deleted

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

303: --
304: BEGIN
305: -- Lock per_all_people_f to ensure person records are not created/updated/deleted
306: --
307: hr_utility.set_location(c_proc_name,2);
308: l_rows_updated := 0;
309: l_organization_id := p_business_group_id;
310: l_use_sequence := Global_person_numbering(p_person_type);
311:

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

316: fetch csr_method into l_rec_per_bg_groups;
317:
318: if csr_method%FOUND then
319:
320: hr_utility.set_location(c_proc_name,5);
321: if l_use_sequence then
322: l_continue_flag := TRUE;
323: hr_utility.set_location(c_proc_name,7);
324: else

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

319:
320: hr_utility.set_location(c_proc_name,5);
321: if l_use_sequence then
322: l_continue_flag := TRUE;
323: hr_utility.set_location(c_proc_name,7);
324: else
325: open csr_next_value(p_business_group_id, p_person_type);
326: fetch csr_next_value into l_organization_id;
327: l_continue_flag := csr_next_value%FOUND;

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

328: end if;
329:
330: if l_continue_flag then
331:
332: hr_utility.set_location(c_proc_name,10);
333: -- -------------------------------------------------------------+
334: -- Processing Applicants +
335: -- -------------------------------------------------------------+
336: if p_person_type = 'APL' then

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

334: -- Processing Applicants +
335: -- -------------------------------------------------------------+
336: if p_person_type = 'APL' then
337:
338: hr_utility.set_location(c_proc_name,12);
339: l_max_num_found := get_max_applicant_number(p_business_group_id);
340:
341: UPDATE HR_ORGANIZATION_INFORMATION
342: SET Org_information3 = g_automatic_method -- method_of_generation_apl_num

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

342: SET Org_information3 = g_automatic_method -- method_of_generation_apl_num
343: WHERE organization_id = l_organization_id
344: AND ORG_INFORMATION_CONTEXT = g_bg_context_name;
345:
346: hr_utility.set_location(c_proc_name,14);
347: l_rows_updated := SQL%ROWCOUNT;
348:
349: -- -------------------------------------------------------------+
350: -- Processing Employees +

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

350: -- Processing Employees +
351: -- -------------------------------------------------------------+
352: elsif p_person_type = 'EMP' then
353:
354: hr_utility.set_location(c_proc_name,16);
355: -- needs to check whether CWK method = 'Based on Employee'
356: -- if yes, then need to greatest(empno, cwkno)
357: --
358: if l_rec_per_bg_groups.cwk_method = 'E' then

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

355: -- needs to check whether CWK method = 'Based on Employee'
356: -- if yes, then need to greatest(empno, cwkno)
357: --
358: if l_rec_per_bg_groups.cwk_method = 'E' then
359: hr_utility.set_location(c_proc_name,17);
360:
361: l_max_num_found := greatest(get_max_employee_number(p_business_group_id)
362: ,get_max_cwk_number(p_business_group_id));
363: else

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

368: SET Org_information2 = g_automatic_method -- method_of_generation_emp_num
369: WHERE organization_id = l_organization_id
370: AND ORG_INFORMATION_CONTEXT = g_bg_context_name;
371:
372: hr_utility.set_location(c_proc_name,18);
373: l_rows_updated := SQL%ROWCOUNT;
374: -- -------------------------------------------------------------+
375: -- Processing Contingent Workers +
376: -- -------------------------------------------------------------+

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

375: -- Processing Contingent Workers +
376: -- -------------------------------------------------------------+
377: elsif p_person_type = 'CWK' then
378:
379: hr_utility.set_location(c_proc_name,20);
380: -- needs to check whether CWK method = 'Based on Employee'
381: -- if yes, then need to greatest(empno, cwkno)
382: --
383: if l_rec_per_bg_groups.cwk_method = 'E' then

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

380: -- needs to check whether CWK method = 'Based on Employee'
381: -- if yes, then need to greatest(empno, cwkno)
382: --
383: if l_rec_per_bg_groups.cwk_method = 'E' then
384: hr_utility.set_location(c_proc_name,21);
385:
386: l_max_num_found := greatest(get_max_employee_number(p_business_group_id)
387: ,get_max_cwk_number(p_business_group_id));
388: else

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

393: SET Org_information16 = g_automatic_method -- method_of_generation_cwk_num
394: WHERE organization_id = l_organization_id
395: AND ORG_INFORMATION_CONTEXT = g_bg_context_name;
396:
397: hr_utility.set_location(c_proc_name,22);
398: l_rows_updated := SQL%ROWCOUNT;
399: end if;
400: -- -------------------------------------------------------------+
401: -- Update NEXT VALUE +

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

403: if (l_max_num_found + 1 > g_max_person_number)
404: or (l_use_sequence and l_max_num_found > g_max_global_person_num)
405: then
406:
407: hr_utility.set_message(800,'PER_289925_MAX_VALUE');
408: hr_utility.raise_error;
409: else
410: if l_rows_updated > 0 and l_max_num_found is not null then
411: hr_utility.set_location(c_proc_name,24);

Line 408: hr_utility.raise_error;

404: or (l_use_sequence and l_max_num_found > g_max_global_person_num)
405: then
406:
407: hr_utility.set_message(800,'PER_289925_MAX_VALUE');
408: hr_utility.raise_error;
409: else
410: if l_rows_updated > 0 and l_max_num_found is not null then
411: hr_utility.set_location(c_proc_name,24);
412:

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

407: hr_utility.set_message(800,'PER_289925_MAX_VALUE');
408: hr_utility.raise_error;
409: else
410: if l_rows_updated > 0 and l_max_num_found is not null then
411: hr_utility.set_location(c_proc_name,24);
412:
413: if l_use_sequence then
414: -- alter sequence
415: hr_utility.set_location(c_proc_name,25);

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

411: hr_utility.set_location(c_proc_name,24);
412:
413: if l_use_sequence then
414: -- alter sequence
415: hr_utility.set_location(c_proc_name,25);
416: set_global_sequence(p_person_type,l_max_num_found);
417: else
418: hr_utility.set_location(c_proc_name,26);
419: UPDATE per_number_generation_controls

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

414: -- alter sequence
415: hr_utility.set_location(c_proc_name,25);
416: set_global_sequence(p_person_type,l_max_num_found);
417: else
418: hr_utility.set_location(c_proc_name,26);
419: UPDATE per_number_generation_controls
420: SET next_value = l_max_num_found + 1
421: WHERE business_group_id = l_organization_id
422: and type = p_person_type;

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

426: end if;
427: end if;
428: end if;
429:
430: hr_utility.set_location(c_proc_name,27);
431:
432: end if; -- continue flag?
433:
434: end if; -- csr_method cursor

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

432: end if; -- continue flag?
433:
434: end if; -- csr_method cursor
435: --
436: hr_utility.set_location(c_proc_name,28);
437: hr_utility.trace(' MAX value found = '||to_char(l_max_num_found));
438: --
439: close csr_method;
440: EXCEPTION

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

433:
434: end if; -- csr_method cursor
435: --
436: hr_utility.set_location(c_proc_name,28);
437: hr_utility.trace(' MAX value found = '||to_char(l_max_num_found));
438: --
439: close csr_method;
440: EXCEPTION
441: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then

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

438: --
439: close csr_method;
440: EXCEPTION
441: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then
442: hr_utility.set_location(c_proc_name,29);
443: -- The required resources are used by some other process.
444:
445: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
446: hr_utility.raise_error;

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

441: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then
442: hr_utility.set_location(c_proc_name,29);
443: -- The required resources are used by some other process.
444:
445: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
446: hr_utility.raise_error;
447:
448: END; -- Lock table
449: hr_utility.set_location('Leaving: '||c_proc_name,35);

Line 446: hr_utility.raise_error;

442: hr_utility.set_location(c_proc_name,29);
443: -- The required resources are used by some other process.
444:
445: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
446: hr_utility.raise_error;
447:
448: END; -- Lock table
449: hr_utility.set_location('Leaving: '||c_proc_name,35);
450: --hr_utility.trace_off;

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

445: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
446: hr_utility.raise_error;
447:
448: END; -- Lock table
449: hr_utility.set_location('Leaving: '||c_proc_name,35);
450: --hr_utility.trace_off;
451:
452: END convert_to_auto_gen_method;
453: -- -------------------------------------------------------------------------- +

Line 450: --hr_utility.trace_off;

446: hr_utility.raise_error;
447:
448: END; -- Lock table
449: hr_utility.set_location('Leaving: '||c_proc_name,35);
450: --hr_utility.trace_off;
451:
452: END convert_to_auto_gen_method;
453: -- -------------------------------------------------------------------------- +
454: -- -------------------------------------------------------------------------- +

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

497: -- added owner condition for fix of bug 3385104
498: --
499: BEGIN -- main set_global_sequence
500: if g_debug then
501: hr_utility.trace('Entering :'||c_proc_name);
502: end if;
503: -- -------------------------------------------+
504: -- get the sequence name based on person type |
505: -- -------------------------------------------+

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

544: l_mynextval := l_mynextval - 1;
545: l_currval := l_mynextval; -- store this value in case of a rollback
546: --
547: if g_debug then
548: hr_utility.trace('Current Value = '||to_char(l_mynextval));
549: end if;
550: -- ---------------------------------------+
551: -- calculate the increment |
552: -- ---------------------------------------+

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

555:
556: l_seq_increment := p_last_number - l_mynextval -1;
557: --
558: if g_debug then
559: hr_utility.trace('Altering sequence increment to ' || l_seq_increment);
560: end if;
561: --
562: l_string := 'ALTER SEQUENCE ' || l_seq_owner || '.' || l_seq_name
563: || ' INCREMENT BY ' ||

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

568: -- -----------------------------------------------------+
569: -- force the update of the sequence into the new range |
570: -- -----------------------------------------------------+
571: if g_debug then
572: hr_utility.trace('Forcing sequence increment');
573: end if;
574: --
575: l_string := 'SELECT ' || l_seq_owner || '.' || l_seq_name ||
576: '.nextval FROM sys.dual';

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

580: -- ---------------------------------------+
581: -- return sequence to previous settings |
582: -- ---------------------------------------+
583: if g_debug then
584: hr_utility.trace('Reseting sequence increment');
585: end if;
586:
587: EXECUTE IMMEDIATE l_PrevSettings;
588: l_alterflag := l_alterflag + 1;

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

588: l_alterflag := l_alterflag + 1;
589: --
590: end if; -- l_mynextval < p_last_number
591: if g_debug then
592: hr_utility.trace('Leaving : '||c_proc_name);
593: end if;
594: EXCEPTION
595: when others then
596: --

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

610: EXECUTE IMMEDIATE l_string INTO l_mynextval;
611: -- return to previous settings
612: EXECUTE IMMEDIATE l_PrevSettings;
613: if g_debug then
614: hr_utility.trace('Leaving: sequence rollback done =>'||c_proc_name);
615: end if;
616: end if;
617: --
618: --

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

676: if Global_person_numbering(p_person_type) then
677: --
678: -- profile option is already set
679: --
680: hr_utility.set_message(800,'PER_289182_GLOBALNUM_SET');
681: l_message := fnd_message.get();
682:
683: Write_Log(l_message);
684: retcode := 1; -- raise warning

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

684: retcode := 1; -- raise warning
685: else
686: l_max_number := 1;
687: if g_debug then
688: hr_utility.set_location('Entering: '||c_proc_name,1);
689: end if;
690: -- Lock per_all_people_f to ensure person records are not created/updated/deleted
691: --
692: LOCK TABLE per_all_people_f

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

730: if Get_PersonNumber_Formula(p_person_type,l_session_date) is not null then
731: --
732: -- custom algorithm is enabled
733: --
734: hr_utility.set_message(800,'PER_449102_NUMGEN_FF_SET');
735: l_message := fnd_message.get();
736:
737: Write_Log(l_message);
738: retcode := 1; -- raise warning

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

738: retcode := 1; -- raise warning
739: end if;
740: end if; -- profile option set?
741: if g_debug then
742: hr_utility.set_location('Leaving: '||c_proc_name,35);
743: end if;
744: --
745: EXCEPTION
746: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then

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

744: --
745: EXCEPTION
746: when TIMEOUT_ON_RESOURCE OR e_ResourceBusy then
747: if g_debug then
748: hr_utility.set_location(c_proc_name,29);
749: end if;
750: -- The required resources are used by some other process.
751:
752: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');

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

748: hr_utility.set_location(c_proc_name,29);
749: end if;
750: -- The required resources are used by some other process.
751:
752: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
753: hr_utility.raise_error;
754:
755: when e_ProfileUpdFailed then
756:

Line 753: hr_utility.raise_error;

749: end if;
750: -- The required resources are used by some other process.
751:
752: hr_utility.set_message(800,'PER_289849_RESOURCE_BUSY');
753: hr_utility.raise_error;
754:
755: when e_ProfileUpdFailed then
756:
757: hr_utility.set_message(800,'PER_289181_SEQUENCE_FAIL'); -- change message

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

753: hr_utility.raise_error;
754:
755: when e_ProfileUpdFailed then
756:
757: hr_utility.set_message(800,'PER_289181_SEQUENCE_FAIL'); -- change message
758: hr_utility.raise_error;
759:
760: END convert_to_global_sequence;
761: -- ---------------------------------------------------------------------------+

Line 758: hr_utility.raise_error;

754:
755: when e_ProfileUpdFailed then
756:
757: hr_utility.set_message(800,'PER_289181_SEQUENCE_FAIL'); -- change message
758: hr_utility.raise_error;
759:
760: END convert_to_global_sequence;
761: -- ---------------------------------------------------------------------------+
762: -- Global_person_numbering: |

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

856: from dual;
857:
858: end if;
859: if g_debug then
860: hr_utility.set_location(c_proc_name,20);
861: end if;
862: return (l_next_value);
863: END GetGlobalPersonNum;
864: --

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

932: l_invalid_message fnd_new_messages.message_text%TYPE;
933: l_person_number varchar2(30);
934: e_WrongParameters exception;
935: BEGIN
936: hr_utility.set_location('Entering: '||l_proc,1);
937: --
938: -- Initalize the formula.
939: --
940: ff_exec.init_formula

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

942: ,p_effective_date => p_effective_date
943: ,p_inputs => l_inputs
944: ,p_outputs => l_outputs);
945:
946: hr_utility.set_location(l_proc, 45);
947:
948: --
949: -- Assign the inputs.
950: --

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

970: elsif l_inputs(i_input).name = 'NATIONAL_ID' then
971: l_inputs(i_input).value := p_national_id;
972:
973: else
974: hr_utility.trace('2020 name = '||l_inputs(i_input).name);
975: raise e_WrongParameters;
976: end if;
977: end loop;
978: hr_utility.set_location(l_proc,50);

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

974: hr_utility.trace('2020 name = '||l_inputs(i_input).name);
975: raise e_WrongParameters;
976: end if;
977: end loop;
978: hr_utility.set_location(l_proc,50);
979: --
980: -- Run the formula.
981: --
982: ff_exec.run_formula(l_inputs, l_outputs);

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

1010: -- truncated to 30 characters because that is the limit
1011: -- in the calling program.
1012: --
1013: if l_user_message = 'Y' then
1014: hr_utility.set_message(800, substr(l_invalid_message, 1, 30));
1015: hr_utility.raise_error;
1016: end if;
1017:
1018: hr_utility.set_location(l_proc,55);

Line 1015: hr_utility.raise_error;

1011: -- in the calling program.
1012: --
1013: if l_user_message = 'Y' then
1014: hr_utility.set_message(800, substr(l_invalid_message, 1, 30));
1015: hr_utility.raise_error;
1016: end if;
1017:
1018: hr_utility.set_location(l_proc,55);
1019:

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

1014: hr_utility.set_message(800, substr(l_invalid_message, 1, 30));
1015: hr_utility.raise_error;
1016: end if;
1017:
1018: hr_utility.set_location(l_proc,55);
1019:
1020: return l_person_number;
1021:
1022: exception

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

1025: --
1026: -- The inputs / outputs of the Fast Formula are incorrect
1027: -- so raise an error.
1028: --
1029: hr_utility.set_message(800,'HR_449943_BAD_FF_DEFINITION');
1030: hr_utility.raise_error;
1031:
1032: END EXECUTE_GET_PERSON_NUMBER_FF;
1033: --

Line 1030: hr_utility.raise_error;

1026: -- The inputs / outputs of the Fast Formula are incorrect
1027: -- so raise an error.
1028: --
1029: hr_utility.set_message(800,'HR_449943_BAD_FF_DEFINITION');
1030: hr_utility.raise_error;
1031:
1032: END EXECUTE_GET_PERSON_NUMBER_FF;
1033: --
1034: --