75: and pil.business_group_id=p_business_group_id
76: and pil.per_in_ler_stat_cd not in ('VOIDD','BCKDT');
77: --
78: l_actn varchar2(80);
79: l_cache ben_batch_utils.g_comp_obj_table := ben_batch_utils.g_cache_comp;
80: l_cache_cnt binary_integer := ben_batch_utils.g_cache_comp_cnt;
81: l_category varchar2(30);
82: l_chg boolean;
83: l_detail varchar2(132) := 'Default election asigned - ' ||
76: and pil.per_in_ler_stat_cd not in ('VOIDD','BCKDT');
77: --
78: l_actn varchar2(80);
79: l_cache ben_batch_utils.g_comp_obj_table := ben_batch_utils.g_cache_comp;
80: l_cache_cnt binary_integer := ben_batch_utils.g_cache_comp_cnt;
81: l_category varchar2(30);
82: l_chg boolean;
83: l_detail varchar2(132) := 'Default election asigned - ' ||
84: 'no current elections changed' ;
99: --
100: l_category := 'ERROR_C';
101: l_detail := 'Error occur while closing enrollment';
102: --
103: ben_batch_utils.write_rec(p_typ_cd => l_category
104: ,p_text => l_detail);
105: --
106: end if;
107: --
167: end if;
168: --
169: end if;
170: --
171: l_actn := 'Calling ben_batch_utils.write_rec (DEFAULT)...';
172: --
173: ben_batch_utils.write_rec(p_typ_cd => l_category
174: ,p_text => l_detail);
175: end if;
169: end if;
170: --
171: l_actn := 'Calling ben_batch_utils.write_rec (DEFAULT)...';
172: --
173: ben_batch_utils.write_rec(p_typ_cd => l_category
174: ,p_text => l_detail);
175: end if;
176: --
177: if p_audit_log = 'Y' then
252: exception
253: --
254: when others then
255: --
256: ben_batch_utils.rpt_error(p_proc => l_proc
257: ,p_last_actn => l_actn
258: ,p_rpt_flag => TRUE);
259: --
260: raise;
282: hr_utility.set_location ('Entering '||l_proc,05);
283: --
284: if p_cnt > 0 then
285: --
286: ben_batch_utils.write
287: (ben_batch_utils.ret_str('Program name', 30) ||
288: ben_batch_utils.ret_str('Plan name', 30) ||
289: ben_batch_utils.ret_str('Cls_to_use_cd', 15) ||
290: ben_batch_utils.ret_str('Enrt_perd_strt', 15) ||
283: --
284: if p_cnt > 0 then
285: --
286: ben_batch_utils.write
287: (ben_batch_utils.ret_str('Program name', 30) ||
288: ben_batch_utils.ret_str('Plan name', 30) ||
289: ben_batch_utils.ret_str('Cls_to_use_cd', 15) ||
290: ben_batch_utils.ret_str('Enrt_perd_strt', 15) ||
291: ben_batch_utils.ret_str('Enrt_perd_end', 15) ||
284: if p_cnt > 0 then
285: --
286: ben_batch_utils.write
287: (ben_batch_utils.ret_str('Program name', 30) ||
288: ben_batch_utils.ret_str('Plan name', 30) ||
289: ben_batch_utils.ret_str('Cls_to_use_cd', 15) ||
290: ben_batch_utils.ret_str('Enrt_perd_strt', 15) ||
291: ben_batch_utils.ret_str('Enrt_perd_end', 15) ||
292: ben_batch_utils.ret_str('Procd_end_date', 15) ||
285: --
286: ben_batch_utils.write
287: (ben_batch_utils.ret_str('Program name', 30) ||
288: ben_batch_utils.ret_str('Plan name', 30) ||
289: ben_batch_utils.ret_str('Cls_to_use_cd', 15) ||
290: ben_batch_utils.ret_str('Enrt_perd_strt', 15) ||
291: ben_batch_utils.ret_str('Enrt_perd_end', 15) ||
292: ben_batch_utils.ret_str('Procd_end_date', 15) ||
293: ben_batch_utils.ret_str('Deflt_apply_dt', 15) ||
286: ben_batch_utils.write
287: (ben_batch_utils.ret_str('Program name', 30) ||
288: ben_batch_utils.ret_str('Plan name', 30) ||
289: ben_batch_utils.ret_str('Cls_to_use_cd', 15) ||
290: ben_batch_utils.ret_str('Enrt_perd_strt', 15) ||
291: ben_batch_utils.ret_str('Enrt_perd_end', 15) ||
292: ben_batch_utils.ret_str('Procd_end_date', 15) ||
293: ben_batch_utils.ret_str('Deflt_apply_dt', 15) ||
294: ben_batch_utils.ret_str('Elcn_made_date', 15) ||
287: (ben_batch_utils.ret_str('Program name', 30) ||
288: ben_batch_utils.ret_str('Plan name', 30) ||
289: ben_batch_utils.ret_str('Cls_to_use_cd', 15) ||
290: ben_batch_utils.ret_str('Enrt_perd_strt', 15) ||
291: ben_batch_utils.ret_str('Enrt_perd_end', 15) ||
292: ben_batch_utils.ret_str('Procd_end_date', 15) ||
293: ben_batch_utils.ret_str('Deflt_apply_dt', 15) ||
294: ben_batch_utils.ret_str('Elcn_made_date', 15) ||
295: ben_batch_utils.ret_str('Dflt_asgn_date', 15) ||
288: ben_batch_utils.ret_str('Plan name', 30) ||
289: ben_batch_utils.ret_str('Cls_to_use_cd', 15) ||
290: ben_batch_utils.ret_str('Enrt_perd_strt', 15) ||
291: ben_batch_utils.ret_str('Enrt_perd_end', 15) ||
292: ben_batch_utils.ret_str('Procd_end_date', 15) ||
293: ben_batch_utils.ret_str('Deflt_apply_dt', 15) ||
294: ben_batch_utils.ret_str('Elcn_made_date', 15) ||
295: ben_batch_utils.ret_str('Dflt_asgn_date', 15) ||
296: ben_batch_utils.ret_str('Enrt status', 10)
289: ben_batch_utils.ret_str('Cls_to_use_cd', 15) ||
290: ben_batch_utils.ret_str('Enrt_perd_strt', 15) ||
291: ben_batch_utils.ret_str('Enrt_perd_end', 15) ||
292: ben_batch_utils.ret_str('Procd_end_date', 15) ||
293: ben_batch_utils.ret_str('Deflt_apply_dt', 15) ||
294: ben_batch_utils.ret_str('Elcn_made_date', 15) ||
295: ben_batch_utils.ret_str('Dflt_asgn_date', 15) ||
296: ben_batch_utils.ret_str('Enrt status', 10)
297: );
290: ben_batch_utils.ret_str('Enrt_perd_strt', 15) ||
291: ben_batch_utils.ret_str('Enrt_perd_end', 15) ||
292: ben_batch_utils.ret_str('Procd_end_date', 15) ||
293: ben_batch_utils.ret_str('Deflt_apply_dt', 15) ||
294: ben_batch_utils.ret_str('Elcn_made_date', 15) ||
295: ben_batch_utils.ret_str('Dflt_asgn_date', 15) ||
296: ben_batch_utils.ret_str('Enrt status', 10)
297: );
298: --
291: ben_batch_utils.ret_str('Enrt_perd_end', 15) ||
292: ben_batch_utils.ret_str('Procd_end_date', 15) ||
293: ben_batch_utils.ret_str('Deflt_apply_dt', 15) ||
294: ben_batch_utils.ret_str('Elcn_made_date', 15) ||
295: ben_batch_utils.ret_str('Dflt_asgn_date', 15) ||
296: ben_batch_utils.ret_str('Enrt status', 10)
297: );
298: --
299: for i in 1..p_cnt
292: ben_batch_utils.ret_str('Procd_end_date', 15) ||
293: ben_batch_utils.ret_str('Deflt_apply_dt', 15) ||
294: ben_batch_utils.ret_str('Elcn_made_date', 15) ||
295: ben_batch_utils.ret_str('Dflt_asgn_date', 15) ||
296: ben_batch_utils.ret_str('Enrt status', 10)
297: );
298: --
299: for i in 1..p_cnt
300: loop
304: else
305: l_status := 'Started';
306: end if;
307: --
308: l_pgm_name := ben_batch_utils.get_pgm_name
309: (p_pgm_id => p_rec(i).pgm_id
310: ,p_business_group_id => p_business_group_id
311: ,p_effective_date => p_effective_date);
312: --
309: (p_pgm_id => p_rec(i).pgm_id
310: ,p_business_group_id => p_business_group_id
311: ,p_effective_date => p_effective_date);
312: --
313: l_pl_name := ben_batch_utils.get_pl_name
314: (p_pl_id => p_rec(i).pl_id
315: ,p_business_group_id => p_business_group_id
316: ,p_effective_date => p_effective_date);
317: --
314: (p_pl_id => p_rec(i).pl_id
315: ,p_business_group_id => p_business_group_id
316: ,p_effective_date => p_effective_date);
317: --
318: ben_batch_utils.write
319: (ben_batch_utils.ret_str(l_pgm_name,30) ||
320: ben_batch_utils.ret_str(l_pl_name, 30) ||
321: ben_batch_utils.ret_str(p_rec(i).cls_enrt_dt_to_use_cd, 15) ||
322: ben_batch_utils.ret_str(p_rec(i).enrt_perd_strt_dt, 15) ||
315: ,p_business_group_id => p_business_group_id
316: ,p_effective_date => p_effective_date);
317: --
318: ben_batch_utils.write
319: (ben_batch_utils.ret_str(l_pgm_name,30) ||
320: ben_batch_utils.ret_str(l_pl_name, 30) ||
321: ben_batch_utils.ret_str(p_rec(i).cls_enrt_dt_to_use_cd, 15) ||
322: ben_batch_utils.ret_str(p_rec(i).enrt_perd_strt_dt, 15) ||
323: ben_batch_utils.ret_str(p_rec(i).enrt_perd_end_dt, 15) ||
316: ,p_effective_date => p_effective_date);
317: --
318: ben_batch_utils.write
319: (ben_batch_utils.ret_str(l_pgm_name,30) ||
320: ben_batch_utils.ret_str(l_pl_name, 30) ||
321: ben_batch_utils.ret_str(p_rec(i).cls_enrt_dt_to_use_cd, 15) ||
322: ben_batch_utils.ret_str(p_rec(i).enrt_perd_strt_dt, 15) ||
323: ben_batch_utils.ret_str(p_rec(i).enrt_perd_end_dt, 15) ||
324: ben_batch_utils.ret_str(p_rec(i).procg_end_dt, 15) ||
317: --
318: ben_batch_utils.write
319: (ben_batch_utils.ret_str(l_pgm_name,30) ||
320: ben_batch_utils.ret_str(l_pl_name, 30) ||
321: ben_batch_utils.ret_str(p_rec(i).cls_enrt_dt_to_use_cd, 15) ||
322: ben_batch_utils.ret_str(p_rec(i).enrt_perd_strt_dt, 15) ||
323: ben_batch_utils.ret_str(p_rec(i).enrt_perd_end_dt, 15) ||
324: ben_batch_utils.ret_str(p_rec(i).procg_end_dt, 15) ||
325: ben_batch_utils.ret_str(p_rec(i).dflt_enrt_dt, 15) ||
318: ben_batch_utils.write
319: (ben_batch_utils.ret_str(l_pgm_name,30) ||
320: ben_batch_utils.ret_str(l_pl_name, 30) ||
321: ben_batch_utils.ret_str(p_rec(i).cls_enrt_dt_to_use_cd, 15) ||
322: ben_batch_utils.ret_str(p_rec(i).enrt_perd_strt_dt, 15) ||
323: ben_batch_utils.ret_str(p_rec(i).enrt_perd_end_dt, 15) ||
324: ben_batch_utils.ret_str(p_rec(i).procg_end_dt, 15) ||
325: ben_batch_utils.ret_str(p_rec(i).dflt_enrt_dt, 15) ||
326: ben_batch_utils.ret_str(p_rec(i).elcns_made_dt, 15) ||
319: (ben_batch_utils.ret_str(l_pgm_name,30) ||
320: ben_batch_utils.ret_str(l_pl_name, 30) ||
321: ben_batch_utils.ret_str(p_rec(i).cls_enrt_dt_to_use_cd, 15) ||
322: ben_batch_utils.ret_str(p_rec(i).enrt_perd_strt_dt, 15) ||
323: ben_batch_utils.ret_str(p_rec(i).enrt_perd_end_dt, 15) ||
324: ben_batch_utils.ret_str(p_rec(i).procg_end_dt, 15) ||
325: ben_batch_utils.ret_str(p_rec(i).dflt_enrt_dt, 15) ||
326: ben_batch_utils.ret_str(p_rec(i).elcns_made_dt, 15) ||
327: ben_batch_utils.ret_str(p_rec(i).dflt_asnd_dt, 15) ||
320: ben_batch_utils.ret_str(l_pl_name, 30) ||
321: ben_batch_utils.ret_str(p_rec(i).cls_enrt_dt_to_use_cd, 15) ||
322: ben_batch_utils.ret_str(p_rec(i).enrt_perd_strt_dt, 15) ||
323: ben_batch_utils.ret_str(p_rec(i).enrt_perd_end_dt, 15) ||
324: ben_batch_utils.ret_str(p_rec(i).procg_end_dt, 15) ||
325: ben_batch_utils.ret_str(p_rec(i).dflt_enrt_dt, 15) ||
326: ben_batch_utils.ret_str(p_rec(i).elcns_made_dt, 15) ||
327: ben_batch_utils.ret_str(p_rec(i).dflt_asnd_dt, 15) ||
328: ben_batch_utils.ret_str(l_status,10)
321: ben_batch_utils.ret_str(p_rec(i).cls_enrt_dt_to_use_cd, 15) ||
322: ben_batch_utils.ret_str(p_rec(i).enrt_perd_strt_dt, 15) ||
323: ben_batch_utils.ret_str(p_rec(i).enrt_perd_end_dt, 15) ||
324: ben_batch_utils.ret_str(p_rec(i).procg_end_dt, 15) ||
325: ben_batch_utils.ret_str(p_rec(i).dflt_enrt_dt, 15) ||
326: ben_batch_utils.ret_str(p_rec(i).elcns_made_dt, 15) ||
327: ben_batch_utils.ret_str(p_rec(i).dflt_asnd_dt, 15) ||
328: ben_batch_utils.ret_str(l_status,10)
329: );
322: ben_batch_utils.ret_str(p_rec(i).enrt_perd_strt_dt, 15) ||
323: ben_batch_utils.ret_str(p_rec(i).enrt_perd_end_dt, 15) ||
324: ben_batch_utils.ret_str(p_rec(i).procg_end_dt, 15) ||
325: ben_batch_utils.ret_str(p_rec(i).dflt_enrt_dt, 15) ||
326: ben_batch_utils.ret_str(p_rec(i).elcns_made_dt, 15) ||
327: ben_batch_utils.ret_str(p_rec(i).dflt_asnd_dt, 15) ||
328: ben_batch_utils.ret_str(l_status,10)
329: );
330: --
323: ben_batch_utils.ret_str(p_rec(i).enrt_perd_end_dt, 15) ||
324: ben_batch_utils.ret_str(p_rec(i).procg_end_dt, 15) ||
325: ben_batch_utils.ret_str(p_rec(i).dflt_enrt_dt, 15) ||
326: ben_batch_utils.ret_str(p_rec(i).elcns_made_dt, 15) ||
327: ben_batch_utils.ret_str(p_rec(i).dflt_asnd_dt, 15) ||
328: ben_batch_utils.ret_str(l_status,10)
329: );
330: --
331: end loop;
324: ben_batch_utils.ret_str(p_rec(i).procg_end_dt, 15) ||
325: ben_batch_utils.ret_str(p_rec(i).dflt_enrt_dt, 15) ||
326: ben_batch_utils.ret_str(p_rec(i).elcns_made_dt, 15) ||
327: ben_batch_utils.ret_str(p_rec(i).dflt_asnd_dt, 15) ||
328: ben_batch_utils.ret_str(l_status,10)
329: );
330: --
331: end loop;
332: --
355: if fnd_global.conc_request_id <> -1 then
356: --
357: if upper(p_audit_log) = 'Y' then
358: --
359: l_actn := 'Calling ben_batch_utils.batch_report (BENCLAUD)...';
360: --
361: ben_batch_utils.batch_report
362: (p_concurrent_request_id => fnd_global.conc_request_id
363: ,p_program_name => 'BENCLAUD'
357: if upper(p_audit_log) = 'Y' then
358: --
359: l_actn := 'Calling ben_batch_utils.batch_report (BENCLAUD)...';
360: --
361: ben_batch_utils.batch_report
362: (p_concurrent_request_id => fnd_global.conc_request_id
363: ,p_program_name => 'BENCLAUD'
364: ,p_request_id => l_request_id);
365: --
364: ,p_request_id => l_request_id);
365: --
366: end if;
367: --
368: l_actn := 'Calling ben_batch_utils.batch_report (BENCLSUM)...';
369: --
370: ben_batch_utils.batch_report
371: (p_concurrent_request_id => fnd_global.conc_request_id
372: ,p_program_name => 'BENCLSUM'
366: end if;
367: --
368: l_actn := 'Calling ben_batch_utils.batch_report (BENCLSUM)...';
369: --
370: ben_batch_utils.batch_report
371: (p_concurrent_request_id => fnd_global.conc_request_id
372: ,p_program_name => 'BENCLSUM'
373: ,p_request_id => l_request_id);
374: --
389: exception
390: --
391: when others then
392: --
393: ben_batch_utils.rpt_error(p_proc => l_proc
394: ,p_last_actn => l_actn
395: ,p_rpt_flag => p_rpt_flag);
396: --
397: raise;
479: exception
480: --
481: when others then
482: --
483: ben_batch_utils.rpt_error(p_proc=>l_proc, p_last_actn=>l_actn);
484: raise;
485: --
486: end update_per_in_ler;
487: --
788: -- 2205261 : CWB Change : Pass the persons business group
789: -- Which could be different from business group id on per in ler
790: -- for CWB data.
791: --
792: ben_batch_utils.person_header
793: (p_person_id => l_person_id
794: ,p_business_group_id => l_per_business_group_id
795: ,p_effective_date => p_effective_date);
796: --
793: (p_person_id => l_person_id
794: ,p_business_group_id => l_per_business_group_id
795: ,p_effective_date => p_effective_date);
796: --
797: ben_batch_utils.ini('COMP_OBJ');
798: --
799: end if;
800: --
801: --- Check the Enmrt Closeing date is between the min and max of enreollment period
869: l_pec_cnt := 0;
870:
871: if p_batch_flag then
872: --
873: ben_batch_utils.write( p_text =>
874: 'Life event is not closed due to pending approvals.');
875: --
876: end if;
877:
1399: ,p_effective_date => p_effective_date);
1400: --
1401: -- Calling write_comp...
1402: --
1403: ben_batch_utils.write_comp
1404: (p_business_group_id => p_business_group_id
1405: ,p_effective_date => p_effective_date);
1406: --
1407: if p_person_action_id is not null then
1434: --
1435: g_persons_errored := g_persons_errored + 1;
1436: --
1437: /* 666
1438: ben_batch_utils.write( p_text =>
1439: 'Life event is not closed due to pending approvals.');
1440: */
1441: write_pil_elctbl_popl
1442: (p_rec => l_pec_rec
1443: ,p_cnt => l_pec_cnt
1444: ,p_business_group_id => p_business_group_id
1445: ,p_effective_date => p_effective_date);
1446: --
1447: ben_batch_utils.write_comp
1448: (p_business_group_id => p_business_group_id
1449: ,p_effective_date => p_effective_date);
1450: --
1451: ben_batch_utils.write_error_rec;
1447: ben_batch_utils.write_comp
1448: (p_business_group_id => p_business_group_id
1449: ,p_effective_date => p_effective_date);
1450: --
1451: ben_batch_utils.write_error_rec;
1452: --
1453: ben_batch_utils.rpt_error(p_proc => l_proc
1454: ,p_last_actn => l_actn
1455: ,p_rpt_flag => false);
1449: ,p_effective_date => p_effective_date);
1450: --
1451: ben_batch_utils.write_error_rec;
1452: --
1453: ben_batch_utils.rpt_error(p_proc => l_proc
1454: ,p_last_actn => l_actn
1455: ,p_rpt_flag => false);
1456: --
1457: ben_batch_utils.write(p_text => benutils.g_banner_minus);
1453: ben_batch_utils.rpt_error(p_proc => l_proc
1454: ,p_last_actn => l_actn
1455: ,p_rpt_flag => false);
1456: --
1457: ben_batch_utils.write(p_text => benutils.g_banner_minus);
1458: --
1459: -- Update the person action status code to errored.
1460: --
1461: if p_person_action_id is not null then
1476: ,p_effective_date => p_effective_date);
1477: --
1478: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1479: --
1480: raise ben_batch_utils.g_record_error;
1481: --
1482: else
1483: fnd_message.raise_error;
1484: end if;
1603: --
1604: g_persons_procd := 0;
1605: g_persons_errored := 0;
1606: --
1607: ben_batch_utils.ini;
1608: --
1609: benutils.g_benefit_action_id := p_benefit_action_id;
1610: benutils.g_thread_id := p_thread_id;
1611: --
1622: end if;
1623: --
1624: -- Print the parameters to the log file.
1625: --
1626: ben_batch_utils.print_parameters
1627: (p_thread_id => p_thread_id
1628: ,p_benefit_action_id => p_benefit_action_id
1629: ,p_validate => p_validate
1630: ,p_business_group_id => p_business_group_id
1787: commit;
1788: --
1789: l_actn := 'Calling log_beneadeb_statistics...';
1790: --
1791: ben_batch_utils.write_logfile(p_num_pers_processed => g_persons_procd
1792: ,p_num_pers_errored => g_persons_errored);
1793: --
1794: hr_utility.set_location ('Leaving '||l_proc,70);
1795: --
1801: benutils.write(p_text => sqlerrm);
1802: --
1803: hr_utility.set_location('BENCLENR Super Error ' || l_proc, 10);
1804: --
1805: ben_batch_utils.rpt_error(p_proc => l_proc
1806: ,p_last_actn => l_actn
1807: ,p_rpt_flag => TRUE);
1808: --
1809: ben_batch_utils.write_logfile(p_num_pers_processed => g_persons_procd
1805: ben_batch_utils.rpt_error(p_proc => l_proc
1806: ,p_last_actn => l_actn
1807: ,p_rpt_flag => TRUE);
1808: --
1809: ben_batch_utils.write_logfile(p_num_pers_processed => g_persons_procd
1810: ,p_num_pers_errored => g_persons_errored);
1811: --
1812: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
1813: --
2051: --
2052: hr_utility.set_location ('Entering ' || l_proc, 10);
2053: -- Bug 5857493
2054: if p_audit_log ='Y' then
2055: ben_batch_utils.g_audit_flag := true;
2056: else
2057: ben_batch_utils.g_audit_flag := false;
2058: end if;
2059: --
2053: -- Bug 5857493
2054: if p_audit_log ='Y' then
2055: ben_batch_utils.g_audit_flag := true;
2056: else
2057: ben_batch_utils.g_audit_flag := false;
2058: end if;
2059: --
2060: -- Convert varchar2 dates to real dates
2061: -- 1) First remove time component
2120: end if;
2121: --
2122: -- Initialize the batch process.
2123: --
2124: ben_batch_utils.ini(p_actn_cd => 'PROC_INFO');
2125: --
2126: -- Get the parameters defined for the batch process.
2127: --
2128: benutils.get_parameter
2213: -- Check the person selection rule.
2214: --
2215: if p_person_selection_rl is not null then
2216: --
2217: l_person_ok := ben_batch_utils.person_selection_rule
2218: (p_person_id => l_perid_va(i)
2219: ,p_business_group_id => p_business_group_id
2220: ,p_person_selection_rule_id => p_person_selection_rl
2221: ,p_effective_date => l_effective_date);
2314: --
2315: hr_utility.set_location('Restarting for benefit action id : ' ||
2316: to_char(l_benefit_action_id), 10);
2317: --
2318: ben_batch_utils.create_restart_person_actions
2319: (p_benefit_action_id => p_benefit_action_id
2320: ,p_effective_date => l_effective_date
2321: ,p_chunk_size => l_chunk_size
2322: ,p_threads => l_threads
2363: ,argument6 => p_audit_log );
2364: --
2365: -- Store the request id of the concurrent request
2366: --
2367: ben_batch_utils.g_num_processes := ben_batch_utils.g_num_processes + 1;
2368: ben_batch_utils.g_processes_tbl(ben_batch_utils.g_num_processes)
2369: := l_request_id;
2370: commit;
2371: --
2364: --
2365: -- Store the request id of the concurrent request
2366: --
2367: ben_batch_utils.g_num_processes := ben_batch_utils.g_num_processes + 1;
2368: ben_batch_utils.g_processes_tbl(ben_batch_utils.g_num_processes)
2369: := l_request_id;
2370: commit;
2371: --
2372: end loop;
2374: elsif l_num_ranges = 0 then
2375: --
2376: -- No ranges got created. i.e. no people got selected. Error out.
2377: --
2378: ben_batch_utils.print_parameters
2379: (p_thread_id => 99
2380: ,p_benefit_action_id => l_benefit_action_id
2381: ,p_validate => p_validate
2382: ,p_business_group_id => p_business_group_id
2387: ,p_ler_id => p_ler_id
2388: ,p_mode => p_close_cd -- 1674123
2389: ,p_audit_log => p_audit_log);
2390: --
2391: ben_batch_utils.write(p_text =>
2392: 'No person got selected with above selection criteria.');
2393: --
2394: fnd_message.set_name('BEN','BEN_91769_NOONE_TO_PROCESS');
2395: fnd_message.set_token('PROC',l_proc);
2412: ,p_audit_log => p_audit_log);
2413: --
2414: -- Check if all the slave processes are finished.
2415: --
2416: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
2417: --
2418: -- End the process.
2419: --
2420: ben_batch_utils.end_process
2416: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
2417: --
2418: -- End the process.
2419: --
2420: ben_batch_utils.end_process
2421: (p_benefit_action_id => l_benefit_action_id
2422: ,p_person_selected => l_person_actn_cnt
2423: ,p_business_group_id => p_business_group_id);
2424: --
2431: exception
2432: --
2433: when others then
2434: --
2435: ben_batch_utils.rpt_error(p_proc => l_proc
2436: ,p_last_actn => l_actn
2437: ,p_rpt_flag => TRUE);
2438: --
2439: benutils.write(p_text => fnd_message.get);
2441: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
2442: --
2443: if l_num_ranges > 0 then
2444: --
2445: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
2446: --
2447: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
2448: ,p_person_selected => l_person_actn_cnt
2449: ,p_business_group_id => p_business_group_id);
2443: if l_num_ranges > 0 then
2444: --
2445: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
2446: --
2447: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
2448: ,p_person_selected => l_person_actn_cnt
2449: ,p_business_group_id => p_business_group_id);
2450: --
2451: submit_all_reports(p_audit_log => p_audit_log);