505: --
506: open c_pl_subj_frfs(p_effective_date);
507: fetch c_pl_subj_frfs into l_pl_subj_frfs;
508: close c_pl_subj_frfs;
509: benutils.write(' Plan : ' || l_pl_subj_frfs.name);
510: if sysdate > l_pl_subj_frfs.acpt_clm_rqsts_thru_dt or p_validate = 'Y' then
511: --
512: l_start_date := l_pl_subj_frfs.start_date;
513: l_end_date := l_pl_subj_frfs.end_date;
642: IF l_cntr_clf.rndg_cd IS NOT NULL
643: OR l_cntr_clf.rndg_rl IS NOT NULL THEN
644: --
645: l_per_cntr_val :=
646: benutils.do_rounding(p_rounding_cd=> l_cntr_clf.rndg_cd
647: ,p_rounding_rl => l_cntr_clf.rndg_rl
648: ,p_value => nvl(l_per_cntr_val, 0)
649: ,p_effective_date => p_effective_date);
650: --
728: IF l_distr_clf.rndg_cd IS NOT NULL
729: OR l_distr_clf.rndg_rl IS NOT NULL THEN
730: --
731: l_per_distr_val :=
732: benutils.do_rounding(p_rounding_cd=> l_distr_clf.rndg_cd
733: ,p_rounding_rl => l_distr_clf.rndg_rl
734: ,p_value => nvl(l_per_distr_val, 0)
735: ,p_effective_date => p_effective_date);
736: --
757: hr_utility.set_location(' effective date ' || p_effective_date , 99);
758:
759:
760: l_per_frfd_val := nvl(l_per_cntr_val, 0) - nvl(l_per_distr_val, 0) ;
761: benutils.write(' Name : ' || l_per_rec.full_name);
762: benutils.write(' Total Contributed = ' || to_char(nvl(l_per_cntr_val, 0)) );
763: benutils.write(' Total Distributed = ' || to_char(nvl(l_per_distr_val, 0)) );
764: benutils.write(' Total Forfeited = ' || to_char(nvl(l_per_frfd_val, 0)) );
765: --
758:
759:
760: l_per_frfd_val := nvl(l_per_cntr_val, 0) - nvl(l_per_distr_val, 0) ;
761: benutils.write(' Name : ' || l_per_rec.full_name);
762: benutils.write(' Total Contributed = ' || to_char(nvl(l_per_cntr_val, 0)) );
763: benutils.write(' Total Distributed = ' || to_char(nvl(l_per_distr_val, 0)) );
764: benutils.write(' Total Forfeited = ' || to_char(nvl(l_per_frfd_val, 0)) );
765: --
766: hr_utility.set_location(' Name : ' || l_per_rec.full_name, 9999);
759:
760: l_per_frfd_val := nvl(l_per_cntr_val, 0) - nvl(l_per_distr_val, 0) ;
761: benutils.write(' Name : ' || l_per_rec.full_name);
762: benutils.write(' Total Contributed = ' || to_char(nvl(l_per_cntr_val, 0)) );
763: benutils.write(' Total Distributed = ' || to_char(nvl(l_per_distr_val, 0)) );
764: benutils.write(' Total Forfeited = ' || to_char(nvl(l_per_frfd_val, 0)) );
765: --
766: hr_utility.set_location(' Name : ' || l_per_rec.full_name, 9999);
767: hr_utility.set_location(' Total Contributed = '
760: l_per_frfd_val := nvl(l_per_cntr_val, 0) - nvl(l_per_distr_val, 0) ;
761: benutils.write(' Name : ' || l_per_rec.full_name);
762: benutils.write(' Total Contributed = ' || to_char(nvl(l_per_cntr_val, 0)) );
763: benutils.write(' Total Distributed = ' || to_char(nvl(l_per_distr_val, 0)) );
764: benutils.write(' Total Forfeited = ' || to_char(nvl(l_per_frfd_val, 0)) );
765: --
766: hr_utility.set_location(' Name : ' || l_per_rec.full_name, 9999);
767: hr_utility.set_location(' Total Contributed = '
768: || to_char(l_per_cntr_val) , 9999);
803: g_rec.pl_typ_id := null;
804: g_rec.val := nvl(l_per_frfd_val, 0);
805: g_rec.ler_id := nvl(l_per_cntr_val, 0);
806: g_rec.related_person_id := nvl(l_per_distr_val, 0);
807: benutils.write(p_rec => g_rec);
808: end loop;
809:
810: benutils.write(' Plan : ' || l_pl_subj_frfs.name);
811: benutils.write(' Total Contributed = ' || to_char(l_tot_pl_cntr_val) );
806: g_rec.related_person_id := nvl(l_per_distr_val, 0);
807: benutils.write(p_rec => g_rec);
808: end loop;
809:
810: benutils.write(' Plan : ' || l_pl_subj_frfs.name);
811: benutils.write(' Total Contributed = ' || to_char(l_tot_pl_cntr_val) );
812: benutils.write(' Total Distributed = ' || to_char(l_tot_pl_distr_val) );
813: benutils.write(' Total Forfeited = ' || to_char(l_total_frfd_val) );
814: --
807: benutils.write(p_rec => g_rec);
808: end loop;
809:
810: benutils.write(' Plan : ' || l_pl_subj_frfs.name);
811: benutils.write(' Total Contributed = ' || to_char(l_tot_pl_cntr_val) );
812: benutils.write(' Total Distributed = ' || to_char(l_tot_pl_distr_val) );
813: benutils.write(' Total Forfeited = ' || to_char(l_total_frfd_val) );
814: --
815: hr_utility.set_location(' Total Contributed = ' || to_char(l_tot_pl_cntr_val) , 9999);
808: end loop;
809:
810: benutils.write(' Plan : ' || l_pl_subj_frfs.name);
811: benutils.write(' Total Contributed = ' || to_char(l_tot_pl_cntr_val) );
812: benutils.write(' Total Distributed = ' || to_char(l_tot_pl_distr_val) );
813: benutils.write(' Total Forfeited = ' || to_char(l_total_frfd_val) );
814: --
815: hr_utility.set_location(' Total Contributed = ' || to_char(l_tot_pl_cntr_val) , 9999);
816: hr_utility.set_location(' Total Distributed = ' || to_char(l_tot_pl_distr_val) , 9999);
809:
810: benutils.write(' Plan : ' || l_pl_subj_frfs.name);
811: benutils.write(' Total Contributed = ' || to_char(l_tot_pl_cntr_val) );
812: benutils.write(' Total Distributed = ' || to_char(l_tot_pl_distr_val) );
813: benutils.write(' Total Forfeited = ' || to_char(l_total_frfd_val) );
814: --
815: hr_utility.set_location(' Total Contributed = ' || to_char(l_tot_pl_cntr_val) , 9999);
816: hr_utility.set_location(' Total Distributed = ' || to_char(l_tot_pl_distr_val) , 9999);
817: hr_utility.set_location(' Total Forfeited = ' || to_char(l_total_frfd_val) , 9999);
827: g_rec.val := l_total_frfd_val;
828: g_rec.ler_id := nvl(l_tot_pl_cntr_val, 0);
829: g_rec.related_person_id := nvl(l_tot_pl_distr_val, 0);
830:
831: benutils.write(p_rec => g_rec);
832: --
833: if l_pl_subj_frfs.frfs_distr_mthd_cd = 'PRVDR' then
834: --
835: -- Write to table ben_pl_frfs_val_f
882:
883: fnd_message.set_name('BEN', 'BEN_92774_FORFEITURE_DATE');
884: fnd_message.set_token('PLAN', l_pl_subj_frfs.name);
885: l_err_message := fnd_message.get ;
886: benutils.write(' Error : ' || l_err_message);
887: end if ;
888: -- sysdate > l_pl_subj_frfs.acpt_clm_rqsts_thru_dt or p_validate = 'Y'
889: if (p_validate = 'Y') then
890: --
1001: dt_fndate.change_ses_date
1002: (p_ses_date => l_effective_date,
1003: p_commit => l_commit);
1004: --
1005: l_actn := 'Calling benutils.get_parameter...';
1006: --
1007: benutils.get_parameter(p_business_group_id => p_business_group_Id
1008: ,p_batch_exe_cd => 'BENFRCON'
1009: ,p_threads => l_threads
1003: p_commit => l_commit);
1004: --
1005: l_actn := 'Calling benutils.get_parameter...';
1006: --
1007: benutils.get_parameter(p_business_group_id => p_business_group_Id
1008: ,p_batch_exe_cd => 'BENFRCON'
1009: ,p_threads => l_threads
1010: ,p_chunk_size => l_chunk_size
1011: ,p_max_errors => g_max_errors_allowed);
1022: --
1023: l_actn := 'Calling ben_batch_utils.ini...';
1024: ben_batch_utils.ini; -- deletes g_cache_person, g_cache_comp, g_pgm_tbl etc.,
1025: --
1026: -- Copy benefit action id to global in benutils package
1027: --
1028: benutils.g_benefit_action_id := p_benefit_action_id;
1029: benutils.g_thread_id := p_thread_id;
1030: g_persons_errored := 0;
1024: ben_batch_utils.ini; -- deletes g_cache_person, g_cache_comp, g_pgm_tbl etc.,
1025: --
1026: -- Copy benefit action id to global in benutils package
1027: --
1028: benutils.g_benefit_action_id := p_benefit_action_id;
1029: benutils.g_thread_id := p_thread_id;
1030: g_persons_errored := 0;
1031: g_persons_processed := 0;
1032: open c_parameter;
1025: --
1026: -- Copy benefit action id to global in benutils package
1027: --
1028: benutils.g_benefit_action_id := p_benefit_action_id;
1029: benutils.g_thread_id := p_thread_id;
1030: g_persons_errored := 0;
1031: g_persons_processed := 0;
1032: open c_parameter;
1033: fetch c_parameter into l_parm;
1146: When others then
1147: g_persons_errored := g_persons_errored + 1;
1148: --
1149: -- Need to write to reporting tables as well
1150: -- by calling benutils.write(p_rec => g_rec);
1151: --
1152: update ben_person_actions
1153: set action_status_cd = 'E'
1154: where person_id = g_cache_person_process(l_cnt).person_id
1171: fnd_message.raise_error;
1172: End if;
1173:
1174: -- 9999 Write only if requested by the user.
1175: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1176: End loop;
1177:
1178: hr_utility.set_location('End of loops',70);
1179: -- 9999 Write only if requested by the user.
1176: End loop;
1177:
1178: hr_utility.set_location('End of loops',70);
1179: -- 9999 Write only if requested by the user.
1180: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1181: --
1182: l_actn := 'Calling Log_statistics...';
1183: ben_batch_utils.write_logfile(p_num_pers_processed => g_persons_processed
1184: ,p_num_pers_errored => g_persons_errored
1192: );
1193: ben_batch_utils.write_logfile(p_num_pers_processed => g_persons_processed
1194: ,p_num_pers_errored => g_persons_errored
1195: );
1196: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1197: hr_utility.set_location ('HR_6153_ALL_PROCEDURE_FAIL',05);
1198: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1199: fnd_message.set_token('PROCEDURE', l_proc);
1200: fnd_message.set_token('STEP',l_actn );
1356: rl_ret := 'N';
1357: elsif rl_ret = 'Y' and p_comp_selection_rule_id is not null then
1358: l_actn := 'found a comp object rule...';
1359: hr_utility.set_location('found a comp object rule',22);
1360: l_outputs := benutils.formula
1361: (p_formula_id => p_comp_selection_rule_id
1362: ,p_effective_date => l_effective_date
1363: ,p_pgm_id => l_pgm_id
1364: ,p_pl_id => l_pl_id
1587: ben_batch_utils.rpt_error(p_proc => l_proc
1588: ,p_last_actn => l_actn
1589: ,p_rpt_flag => TRUE );
1590: --
1591: benutils.write(p_text => fnd_message.get);
1592: benutils.write(p_text => sqlerrm);
1593: benutils.write(p_text => 'Big Error Occured');
1594: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1595: If (l_num_range > 0) then
1588: ,p_last_actn => l_actn
1589: ,p_rpt_flag => TRUE );
1590: --
1591: benutils.write(p_text => fnd_message.get);
1592: benutils.write(p_text => sqlerrm);
1593: benutils.write(p_text => 'Big Error Occured');
1594: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1595: If (l_num_range > 0) then
1596: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
1589: ,p_rpt_flag => TRUE );
1590: --
1591: benutils.write(p_text => fnd_message.get);
1592: benutils.write(p_text => sqlerrm);
1593: benutils.write(p_text => 'Big Error Occured');
1594: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1595: If (l_num_range > 0) then
1596: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
1597: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
1590: --
1591: benutils.write(p_text => fnd_message.get);
1592: benutils.write(p_text => sqlerrm);
1593: benutils.write(p_text => 'Big Error Occured');
1594: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1595: If (l_num_range > 0) then
1596: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
1597: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
1598: ,p_person_selected => l_person_cnt
1696: -- assure they are sensible.
1697: -- chunk_size between(10 and 100). If not in range, default to 20.
1698: -- threads between <1 and 100>. If not in range, default to 1
1699: --
1700: l_actn := 'Calling benutils.get_parameter...';
1701: benutils.get_parameter(p_business_group_id => p_business_group_Id
1702: ,p_batch_exe_cd => 'BENPRCON'
1703: ,p_threads => l_threads
1704: ,p_chunk_size => l_chunk_size
1697: -- chunk_size between(10 and 100). If not in range, default to 20.
1698: -- threads between <1 and 100>. If not in range, default to 1
1699: --
1700: l_actn := 'Calling benutils.get_parameter...';
1701: benutils.get_parameter(p_business_group_id => p_business_group_Id
1702: ,p_batch_exe_cd => 'BENPRCON'
1703: ,p_threads => l_threads
1704: ,p_chunk_size => l_chunk_size
1705: ,p_max_errors => g_max_errors_allowed);
1702: ,p_batch_exe_cd => 'BENPRCON'
1703: ,p_threads => l_threads
1704: ,p_chunk_size => l_chunk_size
1705: ,p_max_errors => g_max_errors_allowed);
1706: benutils.g_benefit_action_id := p_benefit_action_id;
1707: benutils.g_thread_id := 99;
1708: --
1709: -- Create benefit actions parameters in the benefit action table.
1710: -- Do not create is a benefit action already exists, in other words
1703: ,p_threads => l_threads
1704: ,p_chunk_size => l_chunk_size
1705: ,p_max_errors => g_max_errors_allowed);
1706: benutils.g_benefit_action_id := p_benefit_action_id;
1707: benutils.g_thread_id := 99;
1708: --
1709: -- Create benefit actions parameters in the benefit action table.
1710: -- Do not create is a benefit action already exists, in other words
1711: -- we are doing a restart.
1751: ,p_program_application_id => fnd_global.prog_appl_id
1752: ,p_program_id => fnd_global.conc_program_id
1753: ,p_program_update_date => sysdate
1754: );
1755: benutils.g_benefit_action_id := l_benefit_action_id;
1756: --
1757: -- Delete/clear ranges from ben_batch_ranges table
1758: --
1759: l_actn := 'Delete rows from ben_batch_ranges..';
1828: ben_batch_utils.rpt_error(p_proc => l_proc
1829: ,p_last_actn => l_actn
1830: ,p_rpt_flag => TRUE );
1831: --
1832: benutils.write(p_text => fnd_message.get);
1833: benutils.write(p_text => sqlerrm);
1834: benutils.write(p_text => 'Big Error Occured');
1835: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1836: /* 999 Temporarily commented.
1829: ,p_last_actn => l_actn
1830: ,p_rpt_flag => TRUE );
1831: --
1832: benutils.write(p_text => fnd_message.get);
1833: benutils.write(p_text => sqlerrm);
1834: benutils.write(p_text => 'Big Error Occured');
1835: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1836: /* 999 Temporarily commented.
1837: If (l_num_range > 0) then
1830: ,p_rpt_flag => TRUE );
1831: --
1832: benutils.write(p_text => fnd_message.get);
1833: benutils.write(p_text => sqlerrm);
1834: benutils.write(p_text => 'Big Error Occured');
1835: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1836: /* 999 Temporarily commented.
1837: If (l_num_range > 0) then
1838: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
1831: --
1832: benutils.write(p_text => fnd_message.get);
1833: benutils.write(p_text => sqlerrm);
1834: benutils.write(p_text => 'Big Error Occured');
1835: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1836: /* 999 Temporarily commented.
1837: If (l_num_range > 0) then
1838: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
1839: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id