DBA Data[Home] [Help]

APPS.SSP_ERN_BUS dependencies on HR_UTILITY

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

33: and p_effective_date between p.effective_start_date and
34: p.effective_end_date;
35: c1_rec c1%ROWTYPE;
36: Begin
37: hr_utility.set_location('Entering:'||l_proc, 1);
38: open c1;
39: fetch c1 into c1_rec;
40: if c1%NOTFOUND then
41: fnd_message.set_name ('SSP' , 'SSP_35049_INV_PERSON_EFF_DATE' );

Line 45: hr_utility.set_location('Leaving :'||l_proc, 100);

41: fnd_message.set_name ('SSP' , 'SSP_35049_INV_PERSON_EFF_DATE' );
42: fnd_message.raise_error;
43: end if;
44: close c1;
45: hr_utility.set_location('Leaving :'||l_proc, 100);
46: End check_person_id;
47: --
48: --
49: -- ------------------------------------------------------------------------

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

68:
69: c2_rec c2%ROWTYPE;
70:
71: BEGIN
72: hr_utility.set_location('Entering:'||l_proc, 1);
73:
74: open c2;
75: fetch c2 into c2_rec;
76: if c2%NOTFOUND then

Line 81: hr_utility.set_location('Leaving :'||l_proc, 100);

77: fnd_message.set_name ('SSP' , 'SSP_35050_INV_EFFECTIVE_DATE' );
78: fnd_message.raise_error;
79: end if;
80: close c2;
81: hr_utility.set_location('Leaving :'||l_proc, 100);
82: END check_effective_date;
83: --
84: --
85: -- ------------------------------------------------------------------------

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

349: v_asg_status varchar2(100); -- bug 9411096
350: --
351: begin
352: --
353: hr_utility.set_location('Entering:'||l_proc,1);
354: --
355: l_payroll_id := null; -- bug 9411096
356: v_asg_status := null;
357:

Line 377: hr_utility.trace (l_proc||' finding the end of relevant period using the assignment id and not using the payroll id');

373: fetch csr_end_period_m into l_end_of_relevant_period;
374: close csr_end_period_m;
375:
376: if l_end_of_relevant_period is null then
377: hr_utility.trace (l_proc||' finding the end of relevant period using the assignment id and not using the payroll id');
378: open csr_end_period_m2;
379: fetch csr_end_period_m2 into l_end_of_relevant_period;
380: close csr_end_period_m2;
381: end if;

Line 389: hr_utility.trace (l_proc||' finding the end of relevant period using the assignment id and not using the payroll id');

385: fetch csr_end_period_s into l_end_of_relevant_period;
386: close csr_end_period_s;
387:
388: if l_end_of_relevant_period is null then
389: hr_utility.trace (l_proc||' finding the end of relevant period using the assignment id and not using the payroll id');
390: open csr_end_period_s2;
391: fetch csr_end_period_s2 into l_end_of_relevant_period;
392: close csr_end_period_s2;
393: end if;

Line 405: hr_utility.trace('v_asg_status IS: '||v_asg_status);

401:
402: /* Bug 9411096 start */
403: open get_asg_status;
404: fetch get_asg_status into v_asg_status;
405: hr_utility.trace('v_asg_status IS: '||v_asg_status);
406: close get_asg_status;
407: /* Bug 9411096 end */
408: --
409: --

Line 454: hr_utility.trace (l_proc||' start of relevant period = '

450: fetch csr_start_period into l_start_of_relevant_period;
451: close csr_start_period;
452: end if;
453: --
454: hr_utility.trace (l_proc||' start of relevant period = '
455: ||to_char (l_start_of_relevant_period));
456: hr_utility.trace (l_proc||' end of relevant period = '
457: ||to_char (l_end_of_relevant_period));
458: --

Line 456: hr_utility.trace (l_proc||' end of relevant period = '

452: end if;
453: --
454: hr_utility.trace (l_proc||' start of relevant period = '
455: ||to_char (l_start_of_relevant_period));
456: hr_utility.trace (l_proc||' end of relevant period = '
457: ||to_char (l_end_of_relevant_period));
458: --
459: hr_utility.set_location('Leaving :'||l_proc,100);
460: --

Line 459: hr_utility.set_location('Leaving :'||l_proc,100);

455: ||to_char (l_start_of_relevant_period));
456: hr_utility.trace (l_proc||' end of relevant period = '
457: ||to_char (l_end_of_relevant_period));
458: --
459: hr_utility.set_location('Leaving :'||l_proc,100);
460: --
461: end derive_relevant_period;
462: --
463: procedure get_payroll_frequency is

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

490: periods_per_fiscal_year number := 0;
491: --
492: begin
493: --
494: hr_utility.set_location('Entering:'||l_proc,1);
495: --
496: l_payroll_frequency := 'MONTHLY';
497: --
498: for each_payroll in csr_payroll_frequency loop

Line 504: hr_utility.trace ('l_payroll_frequency = '||l_payroll_frequency);

500: l_payroll_frequency := 'NOT MONTHLY';
501: end if;
502: end loop;
503: --
504: hr_utility.trace ('l_payroll_frequency = '||l_payroll_frequency);
505: --
506: hr_utility.set_location('Leaving :'||l_proc,100);
507: --
508: end get_payroll_frequency;

Line 506: hr_utility.set_location('Leaving :'||l_proc,100);

502: end loop;
503: --
504: hr_utility.trace ('l_payroll_frequency = '||l_payroll_frequency);
505: --
506: hr_utility.set_location('Leaving :'||l_proc,100);
507: --
508: end get_payroll_frequency;
509: --
510: procedure get_period_of_service is

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

526: hr_general.end_of_time);
527: --
528: begin
529: --
530: hr_utility.set_location('Entering:'||l_proc,1);
531: --
532: -- Get the period of service current as of the effective date
533: --
534: open csr_period_of_service;

Line 538: hr_utility.trace (l_proc||' l_period_of_service_id = '

534: open csr_period_of_service;
535: fetch csr_period_of_service into l_period_of_service_id, l_hire_date;
536: close csr_period_of_service;
537: --
538: hr_utility.trace (l_proc||' l_period_of_service_id = '
539: ||to_char (l_period_of_service_id));
540: hr_utility.trace (l_proc||' l_hire_date = '
541: ||to_char (l_hire_date));
542: --

Line 540: hr_utility.trace (l_proc||' l_hire_date = '

536: close csr_period_of_service;
537: --
538: hr_utility.trace (l_proc||' l_period_of_service_id = '
539: ||to_char (l_period_of_service_id));
540: hr_utility.trace (l_proc||' l_hire_date = '
541: ||to_char (l_hire_date));
542: --
543: hr_utility.set_location('Leaving :'||l_proc,100);
544: --

Line 543: hr_utility.set_location('Leaving :'||l_proc,100);

539: ||to_char (l_period_of_service_id));
540: hr_utility.trace (l_proc||' l_hire_date = '
541: ||to_char (l_hire_date));
542: --
543: hr_utility.set_location('Leaving :'||l_proc,100);
544: --
545: end get_period_of_service;
546: --
547: procedure check_payroll_installed is

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

557: payroll_not_found exception;
558: --
559: Begin
560: --
561: hr_utility.set_location('Entering:'||l_proc,1);
562: --
563: -- We need to determine if Payroll is installed.
564: if (fnd_installation.get(
565: --

Line 584: hr_utility.set_location('Leaving :'||l_proc,100);

580: else
581: raise payroll_not_found;
582: end If;
583: --
584: hr_utility.set_location('Leaving :'||l_proc,100);
585: --
586: exception
587: when payroll_not_found then
588: --

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

612: l_person_is_director boolean := FALSE;
613: --
614: begin
615: --
616: hr_utility.set_location('Entering:'||l_proc,1);
617: --
618: open csr_director;
619: fetch csr_director into l_dummy;
620: l_person_is_director := csr_director%found;

Line 637: hr_utility.set_location('Leaving :'||l_proc,100);

633: raise cannot_derive_earnings;
634: --
635: end if;
636: --
637: hr_utility.set_location('Leaving :'||l_proc,100);
638: --
639: end stop_if_a_director;
640: --
641: function gross_NIable_pay

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

651: l_gross_NIable_pay_acc number(18,8) := 0;
652: --
653: begin
654: --
655: hr_utility.set_location('Entering:'||l_proc,1);
656: --
657: for csr_Ne in csr_NIable_earnings ('NIable Pay')
658: loop
659: l_gross_NIable_pay_acc := csr_Ne.EARNINGS;

Line 663: hr_utility.trace('L_GROSS_NIABLE: '||l_gross_NIable_pay);

659: l_gross_NIable_pay_acc := csr_Ne.EARNINGS;
660: l_gross_NIable_pay := l_gross_NIable_pay_acc;
661: end loop;
662: --
663: hr_utility.trace('L_GROSS_NIABLE: '||l_gross_NIable_pay);
664: --
665: l_weekly_pay := l_gross_NIable_pay_acc * 6 / 52;
666: l_lel := SSP_SMP_SUPPORT_PKG.NI_Lower_Earnings_Limit(
667: L_END_OF_RELEVANT_PERIOD);

Line 668: hr_utility.trace('l_lel: '||l_lel);

664: --
665: l_weekly_pay := l_gross_NIable_pay_acc * 6 / 52;
666: l_lel := SSP_SMP_SUPPORT_PKG.NI_Lower_Earnings_Limit(
667: L_END_OF_RELEVANT_PERIOD);
668: hr_utility.trace('l_lel: '||l_lel);
669: --
670: if l_weekly_pay < l_lel
671: then
672: for csr_Ne in csr_NIable_earnings ('NIable Earnings 1B')

Line 677: hr_utility.trace('L_GROSS_NIABLE inc 1B: '||l_gross_NIable_pay);

673: loop
674: l_gross_NIable_pay_acc := l_gross_NIable_pay_acc+csr_Ne.EARNINGS;
675: l_gross_NIable_pay := l_gross_NIable_pay_acc;
676: --
677: hr_utility.trace('L_GROSS_NIABLE inc 1B: '||l_gross_NIable_pay);
678: end loop;
679: end if;
680: --
681: hr_utility.set_location('Leaving :'||l_proc,100);

Line 681: hr_utility.set_location('Leaving :'||l_proc,100);

677: hr_utility.trace('L_GROSS_NIABLE inc 1B: '||l_gross_NIable_pay);
678: end loop;
679: end if;
680: --
681: hr_utility.set_location('Leaving :'||l_proc,100);
682: --
683: return l_gross_NIable_pay;
684: --
685: end gross_NIable_pay;

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

695: l_proc varchar2 (72) := g_package||'do_monthly_calculation';
696: --
697: begin
698: --
699: hr_utility.set_location('Entering:'||l_proc,1);
700: --
701: -- Take the gross payments from the last 2 months, multiply by 6 for
702: -- the annual figure and divide by 52 for the weekly average
703: --

Line 707: hr_utility.trace (l_proc||' gross_NIable_pay = '

703: --
704: l_assignment_average :=
705: l_assignment_average + ((gross_NIable_pay * 6) / 52);
706: --
707: hr_utility.trace (l_proc||' gross_NIable_pay = '
708: ||to_char (gross_NIable_pay));
709: --
710: hr_utility.set_location('Leaving :'||l_proc,100);
711: --

Line 710: hr_utility.set_location('Leaving :'||l_proc,100);

706: --
707: hr_utility.trace (l_proc||' gross_NIable_pay = '
708: ||to_char (gross_NIable_pay));
709: --
710: hr_utility.set_location('Leaving :'||l_proc,100);
711: --
712: end do_monthly_calculation;
713: --
714: procedure do_standard_calculation is

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

790: expected_num_of_periods number := null;
791: --
792: begin
793: --
794: hr_utility.set_location('Entering:'||l_proc,1);
795: hr_utility.trace('days covered orig: '||l_days_covered);
796: --
797: -- Take the gross payments from the relevant period, divide by the
798: -- number of days the payments cover, and multiply by 7.

Line 795: hr_utility.trace('days covered orig: '||l_days_covered);

791: --
792: begin
793: --
794: hr_utility.set_location('Entering:'||l_proc,1);
795: hr_utility.trace('days covered orig: '||l_days_covered);
796: --
797: -- Take the gross payments from the relevant period, divide by the
798: -- number of days the payments cover, and multiply by 7.
799: --

Line 814: hr_utility.trace('NUMBER OF PAYMENTS: '||number_of_payments);

810: end if;
811:
812: total_number_payments := total_number_payments + number_of_payments;
813: user_ent_multi_reg_pays := TRUE;
814: hr_utility.trace('NUMBER OF PAYMENTS: '||number_of_payments);
815: end loop;
816:
817: hr_utility.trace('TOTAL NUM PAYMENTS: '||total_number_payments);
818: --

Line 817: hr_utility.trace('TOTAL NUM PAYMENTS: '||total_number_payments);

813: user_ent_multi_reg_pays := TRUE;
814: hr_utility.trace('NUMBER OF PAYMENTS: '||number_of_payments);
815: end loop;
816:
817: hr_utility.trace('TOTAL NUM PAYMENTS: '||total_number_payments);
818: --
819: if user_ent_multi_reg_pays then
820: --
821: payroll_freq := 0;

Line 830: hr_utility.trace('PAYROLL FREQ: '||payroll_freq);

826: close csr_number_of_days;
827: --
828: number_of_days := round(365/payroll_freq);
829: --
830: hr_utility.trace('PAYROLL FREQ: '||payroll_freq);
831: hr_utility.trace('NUMBER OF DAYS: '||number_of_days);
832: --
833: -- Next bit of code is for outputting the number of payments to the ssp entries
834: -- form. The value in form_variable is passed to the form via the function

Line 831: hr_utility.trace('NUMBER OF DAYS: '||number_of_days);

827: --
828: number_of_days := round(365/payroll_freq);
829: --
830: hr_utility.trace('PAYROLL FREQ: '||payroll_freq);
831: hr_utility.trace('NUMBER OF DAYS: '||number_of_days);
832: --
833: -- Next bit of code is for outputting the number of payments to the ssp entries
834: -- form. The value in form_variable is passed to the form via the function
835: -- number_of_periods. If the total_number_payments is 0 then then number of

Line 848: hr_utility.trace('expected num of periods '||expected_num_of_periods||

844: else
845: form_variable := expected_num_of_periods + total_number_payments;
846: end if;
847: --
848: hr_utility.trace('expected num of periods '||expected_num_of_periods||
849: ', form variable '||form_variable);
850: --
851: l_days_covered := l_days_covered +
852: (number_of_days * total_number_payments);

Line 859: hr_utility.trace('DAYS COVERED is eight weeks');

855:
856: if l_hire_date < l_end_of_relevant_period - 56 then
857: --if the person is hired before the 56 days period then
858: --the average should be calculated for the whole 56 days.
859: hr_utility.trace('DAYS COVERED is eight weeks');
860: l_days_covered := 56 ;
861: else
862: --if the person is hired within the 56 days period then
863: --the average should be calculated from hire date to end of relevant period,

Line 864: hr_utility.trace('DAYS COVERED will be less than eight weeks');

860: l_days_covered := 56 ;
861: else
862: --if the person is hired within the 56 days period then
863: --the average should be calculated from hire date to end of relevant period,
864: hr_utility.trace('DAYS COVERED will be less than eight weeks');
865: l_days_covered := l_end_of_relevant_period - l_hire_date;
866: end if;
867: --9819351 end
868: end if;

Line 869: hr_utility.trace('DAYS COVERED: '||l_days_covered);

865: l_days_covered := l_end_of_relevant_period - l_hire_date;
866: end if;
867: --9819351 end
868: end if;
869: hr_utility.trace('DAYS COVERED: '||l_days_covered);
870: --
871: if l_days_covered < 1 then
872: l_assignment_average := 0;
873: else

Line 881: hr_utility.trace('GROSS NIABLE PAY: '||gross_NIable_pay);

877: / l_days_covered)
878: * 7);
879: end if;
880: --
881: hr_utility.trace('GROSS NIABLE PAY: '||gross_NIable_pay);
882: hr_utility.trace ('l_days_covered = '||to_char (l_days_covered));
883: hr_utility.trace ('l_assignment_average = '
884: ||to_char (l_assignment_average));
885: --

Line 882: hr_utility.trace ('l_days_covered = '||to_char (l_days_covered));

878: * 7);
879: end if;
880: --
881: hr_utility.trace('GROSS NIABLE PAY: '||gross_NIable_pay);
882: hr_utility.trace ('l_days_covered = '||to_char (l_days_covered));
883: hr_utility.trace ('l_assignment_average = '
884: ||to_char (l_assignment_average));
885: --
886: hr_utility.set_location('Leaving :'||l_proc,100);

Line 883: hr_utility.trace ('l_assignment_average = '

879: end if;
880: --
881: hr_utility.trace('GROSS NIABLE PAY: '||gross_NIable_pay);
882: hr_utility.trace ('l_days_covered = '||to_char (l_days_covered));
883: hr_utility.trace ('l_assignment_average = '
884: ||to_char (l_assignment_average));
885: --
886: hr_utility.set_location('Leaving :'||l_proc,100);
887: --

Line 886: hr_utility.set_location('Leaving :'||l_proc,100);

882: hr_utility.trace ('l_days_covered = '||to_char (l_days_covered));
883: hr_utility.trace ('l_assignment_average = '
884: ||to_char (l_assignment_average));
885: --
886: hr_utility.set_location('Leaving :'||l_proc,100);
887: --
888: end do_standard_calculation;
889: --
890: begin

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

888: end do_standard_calculation;
889: --
890: begin
891: --
892: hr_utility.set_location('Entering:'||l_proc, 1);
893: hr_utility.trace('P_EFFECTIVE_DATE IS: '||p_effective_date);
894: --
895: check_payroll_installed;
896: stop_if_a_director;

Line 893: hr_utility.trace('P_EFFECTIVE_DATE IS: '||p_effective_date);

889: --
890: begin
891: --
892: hr_utility.set_location('Entering:'||l_proc, 1);
893: hr_utility.trace('P_EFFECTIVE_DATE IS: '||p_effective_date);
894: --
895: check_payroll_installed;
896: stop_if_a_director;
897: get_period_of_service;

Line 917: hr_utility.trace ('Employee is NEW');

913: if l_hire_date >= l_start_of_relevant_period
914: then
915: l_new_employee := TRUE;
916: --
917: hr_utility.trace ('Employee is NEW');
918: end if;
919: --
920: -- The calculation of average earnings is done differently depending upon the
921: -- payroll frequency. For new employees, we always treat them as if they were

Line 976: hr_utility.trace ('average earnings is '||to_char(l_person_average));

972: raise cannot_derive_earnings;
973: end if;
974: --
975: p_average_earnings_amount := nvl (round (l_person_average,2),0);
976: hr_utility.trace ('average earnings is '||to_char(l_person_average));
977: --
978: hr_utility.set_location('Leaving :'||l_proc, 100);
979: --
980: exception

Line 978: hr_utility.set_location('Leaving :'||l_proc, 100);

974: --
975: p_average_earnings_amount := nvl (round (l_person_average,2),0);
976: hr_utility.trace ('average earnings is '||to_char(l_person_average));
977: --
978: hr_utility.set_location('Leaving :'||l_proc, 100);
979: --
980: exception
981: when cannot_derive_earnings then
982: hr_utility.set_location ('Leaving :'||l_proc||', exception',999);

Line 982: hr_utility.set_location ('Leaving :'||l_proc||', exception',999);

978: hr_utility.set_location('Leaving :'||l_proc, 100);
979: --
980: exception
981: when cannot_derive_earnings then
982: hr_utility.set_location ('Leaving :'||l_proc||', exception',999);
983: --
984: p_average_earnings_amount := 0;
985: --
986: fnd_message.set_name ('SSP',ssp_smp_support_pkg.reason_for_no_earnings);

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

1005: function number_of_periods return number is
1006: --
1007: l_proc varchar2(72) := g_package||'number_of_periods';
1008: begin
1009: hr_utility.set_location('Entering:'||l_proc, 1);
1010: --
1011: return form_variable;
1012: hr_utility.set_location('Leaving:'||l_proc, 100);
1013: end;

Line 1012: hr_utility.set_location('Leaving:'||l_proc, 100);

1008: begin
1009: hr_utility.set_location('Entering:'||l_proc, 1);
1010: --
1011: return form_variable;
1012: hr_utility.set_location('Leaving:'||l_proc, 100);
1013: end;
1014: --
1015: -- ----------------------------------------------------------------------------
1016: -- |---------------------------< insert_validate >----------------------------|

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

1019: --
1020: l_proc varchar2(72) := g_package||'insert_validate';
1021: --
1022: Begin
1023: hr_utility.set_location('Entering:'||l_proc, 1);
1024: --
1025: -- Call all supporting business operations
1026: --
1027: -- Following two calls are to ensure that the mandatory columns

Line 1054: hr_utility.set_location('Leaving :'||l_proc, 100);

1050: p_rec.absence_category --DFoster 1305683
1051: );
1052: end if;
1053: --
1054: hr_utility.set_location('Leaving :'||l_proc, 100);
1055: End insert_validate;
1056: --
1057: -- ----------------------------------------------------------------------------
1058: -- |---------------------------< update_validate >----------------------------|

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

1061: --
1062: l_proc varchar2(72) := g_package||'update_validate';
1063: --
1064: Begin
1065: hr_utility.set_location('Entering:'||l_proc, 1);
1066: --
1067: -- Call all supporting business operations
1068: --
1069: -- Following two bits of code used to ensure that the argument values

Line 1105: hr_utility.set_location('Leaving :'||l_proc, 100);

1101: p_rec.absence_category --DFoster 1304683
1102: );
1103: end if;
1104: --
1105: hr_utility.set_location('Leaving :'||l_proc, 100);
1106: End update_validate;
1107: --
1108: -- ----------------------------------------------------------------------------
1109: -- |---------------------------< delete_validate >----------------------------|

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

1112: --
1113: l_proc varchar2(72) := g_package||'delete_validate';
1114: --
1115: Begin
1116: hr_utility.set_location('Entering:'||l_proc, 1);
1117: --
1118: -- Call all supporting business operations - there are none
1119: --
1120: hr_utility.set_location('Leaving :'||l_proc, 100);

Line 1120: hr_utility.set_location('Leaving :'||l_proc, 100);

1116: hr_utility.set_location('Entering:'||l_proc, 1);
1117: --
1118: -- Call all supporting business operations - there are none
1119: --
1120: hr_utility.set_location('Leaving :'||l_proc, 100);
1121: End delete_validate;
1122: --
1123: end ssp_ern_bus;