33: l_package varchar2(80) := g_package||'.rt_typ_calc';
34: --
35: BEGIN
36: --
37: -- hr_utility.set_location ('Entering '||l_package,10);
38: --
39: if p_val is null /*or p_val = 0 commented for 3497676*/then
40: --
41: -- hr_utility.set_location ('Leaving '||l_package,1);
37: -- hr_utility.set_location ('Entering '||l_package,10);
38: --
39: if p_val is null /*or p_val = 0 commented for 3497676*/then
40: --
41: -- hr_utility.set_location ('Leaving '||l_package,1);
42: return;
43: --
44: end if;
45: --
44: end if;
45: --
46: if p_val_2 is null /*or p_val_2 = 0 commented for 3497676*/then
47: --
48: -- hr_utility.set_location ('Leaving '||l_package,2);
49: return;
50: --
51: end if;
52: --
76: fnd_message.set_token('CODE1',p_rt_typ_cd);
77: fnd_message.raise_error;
78: end if;
79: --
80: -- hr_utility.set_location ('Leaving '||l_package,10);
81: --
82: END rt_typ_calc;
83: --
84: ------------------------------------------------------------------------
109: l_jurisdiction PAY_CA_EMP_PROV_TAX_INFO_F.JURISDICTION_CODE%type := null;
110: --
111: BEGIN
112: --
113: hr_utility.set_location('Entering '||l_package,20);
114: --
115: hr_utility.set_location('Floor/Ceiling Rule Checking'||l_package,30);
116: --
117: -- Bug 1949361 : jurisdiction code is fetched inside formula function
111: BEGIN
112: --
113: hr_utility.set_location('Entering '||l_package,20);
114: --
115: hr_utility.set_location('Floor/Ceiling Rule Checking'||l_package,30);
116: --
117: -- Bug 1949361 : jurisdiction code is fetched inside formula function
118: -- call.
119: --
171: p_jurisdiction_code => l_jurisdiction);
172: --
173: end if;
174: --
175: hr_utility.set_location('Floor/Ceiling Val Checking'||l_package,40);
176: --
177: if p_val > nvl(p_upr_lmt_val,p_val+1) then
178: --
179: p_val := p_upr_lmt_val;
193: p_val := l_lwr_outputs(l_lwr_outputs.first).value;
194: --
195: end if;
196: --
197: hr_utility.set_location('Leaving '||l_package,20);
198: --
199: END limit_checks;
200:
201: ------------------------------------------------------------------------
238: l_lookups c_lookups%rowtype;
239: --
240: begin
241: --
242: hr_utility.set_location('Entering:'||l_proc, 5);
243: --
244: -- First clear old cache
245: --
246: g_cache_lookup_object.delete;
248: -- Now load cache structure
249: --
250: open c_lookups;
251: --
252: hr_utility.set_location('open c_lookups: '||l_proc, 10);
253: --
254: loop
255: --
256: fetch c_lookups into l_lookups;
265: end loop;
266: --
267: close c_lookups;
268: --
269: hr_utility.set_location('Leaving:'||l_proc, 5);
270: --
271: end init_lookups;
272:
273: ------------------------------------------------------------------------
290: and pil.per_in_ler_stat_cd = 'STRTD';
291: --
292: begin
293: --
294: hr_utility.set_location('Entering:'||l_proc, 5);
295: --
296: open c_lf_evt_ocrd_dt;
297: --
298: fetch c_lf_evt_ocrd_dt into l_lf_evt_ocrd_dt;
298: fetch c_lf_evt_ocrd_dt into l_lf_evt_ocrd_dt;
299: --
300: close c_lf_evt_ocrd_dt;
301: --
302: hr_utility.set_location('Leaving:'||l_proc, 5);
303: --
304: return l_lf_evt_ocrd_dt;
305: --
306: end get_lf_evt_ocrd_dt;
332: ler.effective_start_date and ler.effective_end_date;
333: --
334: begin
335: --
336: hr_utility.set_location('Entering:'||l_proc, 5);
337: --
338: open c_per_in_ler_id;
339: --
340: fetch c_per_in_ler_id into l_per_in_ler_id;
340: fetch c_per_in_ler_id into l_per_in_ler_id;
341: --
342: close c_per_in_ler_id;
343: --
344: hr_utility.set_location('Leaving:'||l_proc, 5);
345: --
346: return l_per_in_ler_id;
347: --
348: end get_per_in_ler_id;
386: and ler.typ_cd = 'COMP';
387: --
388: begin
389: --
390: hr_utility.set_location('Entering:'||l_proc, 5);
391: --
392: open c_active_life_event;
393: --
394: fetch c_active_life_event into p_rec;
394: fetch c_active_life_event into p_rec;
395: --
396: close c_active_life_event;
397: --
398: hr_utility.set_location('Leaving:'||l_proc, 5);
399: --
400: end get_active_life_event;
401: -----------------------------------------------------------------------
402: -- get_per_in_ler_id
425: ler.effective_start_date and ler.effective_end_date;
426: --
427: begin
428: --
429: hr_utility.set_location('Entering:'||l_proc, 5);
430: --
431: open c_per_in_ler_id;
432: --
433: fetch c_per_in_ler_id into l_per_in_ler_id;
433: fetch c_per_in_ler_id into l_per_in_ler_id;
434: --
435: close c_per_in_ler_id;
436: --
437: hr_utility.set_location('Leaving:'||l_proc, 5);
438: return l_per_in_ler_id;
439: --
440: end get_per_in_ler_id;
441: ------------------------------------------------------------------------
475: and ler.typ_cd not in ('SCHEDDU', 'COMP', 'GSP', 'ABS', 'IREC');
476: --
477: begin
478: --
479: hr_utility.set_location('Entering:'||l_proc, 5);
480: --
481: open c_active_life_event;
482: --
483: fetch c_active_life_event into p_rec;
483: fetch c_active_life_event into p_rec;
484: --
485: close c_active_life_event;
486: --
487: hr_utility.set_location('Leaving:'||l_proc, 5);
488: --
489: end get_active_life_event;
490:
491: ------------------------------------------------------------------------
530: and pil.assignment_id = ben_manage_life_events.g_irec_ass_rec.assignment_id) ); -- iRec
531: --
532: begin
533: --
534: hr_utility.set_location('Entering:'||l_proc, 5);
535: --
536: open c_active_life_event;
537: --
538: fetch c_active_life_event into p_rec;
538: fetch c_active_life_event into p_rec;
539: --
540: close c_active_life_event;
541: --
542: hr_utility.set_location('Leaving:'||l_proc, 5);
543: --
544: end get_active_life_event;
545:
546:
566: and ler.effective_end_date;
567: --
568: begin
569: --
570: hr_utility.set_location('Entering:'||l_proc, 5);
571: --
572: open c_ler;
573: --
574: fetch c_ler into p_rec;
574: fetch c_ler into p_rec;
575: --
576: close c_ler;
577: --
578: hr_utility.set_location('Leaving:'||l_proc, 5);
579: --
580: end get_ler;
581: --
582: procedure get_ler(p_business_group_id in number,
603:
604: --
605: begin
606: --
607: hr_utility.set_location('Entering:'||l_proc, 5);
608: hr_utility.set_location('ACE p_typ_cd : ' || p_typ_cd, 5);
609: hr_utility.set_location('ACE p_lf_evt_oper_cd : ' || p_lf_evt_oper_cd, 5);
610: --
611: open c_ler;
604: --
605: begin
606: --
607: hr_utility.set_location('Entering:'||l_proc, 5);
608: hr_utility.set_location('ACE p_typ_cd : ' || p_typ_cd, 5);
609: hr_utility.set_location('ACE p_lf_evt_oper_cd : ' || p_lf_evt_oper_cd, 5);
610: --
611: open c_ler;
612: --
605: begin
606: --
607: hr_utility.set_location('Entering:'||l_proc, 5);
608: hr_utility.set_location('ACE p_typ_cd : ' || p_typ_cd, 5);
609: hr_utility.set_location('ACE p_lf_evt_oper_cd : ' || p_lf_evt_oper_cd, 5);
610: --
611: open c_ler;
612: --
613: fetch c_ler into p_rec;
613: fetch c_ler into p_rec;
614: --
615: close c_ler;
616: --
617: hr_utility.set_location('ACE p_rec.name : ' || p_rec.name, 5);
618: hr_utility.set_location('Leaving:'||l_proc, 5);
619: --
620: end get_ler;
621:
614: --
615: close c_ler;
616: --
617: hr_utility.set_location('ACE p_rec.name : ' || p_rec.name, 5);
618: hr_utility.set_location('Leaving:'||l_proc, 5);
619: --
620: end get_ler;
621:
622: ------------------------------------------------------------------------
640: and ptn.lf_evt_ocrd_dt = p_effective_date;
641: --
642: begin
643: --
644: hr_utility.set_location('Leaving:'||l_proc, 5);
645: --
646: open c_ptnl;
647: --
648: fetch c_ptnl into p_rec;
648: fetch c_ptnl into p_rec;
649: --
650: close c_ptnl;
651: --
652: hr_utility.set_location('Leaving:'||l_proc, 5);
653: --
654: end get_ptnl_ler;
655:
656: ------------------------------------------------------------------------
694: order by assignment_type desc, effective_start_date desc;
695: --
696: begin
697: --
698: hr_utility.set_location('Entering:'||l_proc, 5);
699: -- Perf changes
700: if hr_security.view_all = 'Y' and hr_general.get_xbg_profile = 'Y'
701: then
702: open c_all_assignment;
711: --
712: close c_assignment;
713: end if;
714: --
715: hr_utility.set_location('Leaving:'||l_proc, 5);
716: --
717: return l_assignment_id;
718: --
719: end get_assignment_id;
727: l_proc varchar2(80) := 'benutils.not_exists_in_hr_lookups';
728: --
729: begin
730: --
731: hr_utility.set_location('Entering:'||l_proc, 5);
732: --
733: -- Check if lookup type and lookup code can be found in cache structure
734: --
735: for l_count in g_cache_lookup_object.first..g_cache_lookup_object.last loop
736: --
737: if g_cache_lookup_object(l_count).lookup_type = p_lookup_type and
738: g_cache_lookup_object(l_count).lookup_code = p_lookup_code then
739: --
740: hr_utility.set_location('Leaving:'||l_proc, 3);
741: return false;
742: --
743: end if;
744: --
743: end if;
744: --
745: end loop;
746: --
747: hr_utility.set_location('Leaving:'||l_proc, 5);
748: return true;
749: --
750: end not_exists_in_hr_lookups;
751:
776: and ff.effective_end_date;
777: --
778: begin
779: --
780: hr_utility.set_location('Entering:'||l_proc, 5);
781: --
782: open c1;
783: --
784: fetch c1 into l_dummy;
784: fetch c1 into l_dummy;
785: if c1%notfound then
786: --
787: close c1;
788: hr_utility.set_location('Leaving:'||l_proc, 3);
789: return false;
790: --
791: end if;
792: --
791: end if;
792: --
793: close c1;
794: --
795: hr_utility.set_location('Leaving:'||l_proc, 5);
796: return true;
797: --
798: end formula_exists;
799:
833: l_proc varchar2(80) := 'benutils.set_cache_record_position';
834: --
835: begin
836: --
837: hr_utility.set_location('Entering:'||l_proc, 5);
838:
839: -- Set '_count' parms to indicate the last global record written
840: -- to each global table for a particular person.
841:
849: g_batch_commu_table_count := nvl(g_batch_commu_table_object.count,0);
850:
851: ben_warnings.g_oab_warnings_count := nvl(ben_warnings.g_oab_warnings.count, 0);
852: --
853: hr_utility.set_location('Leaving:'||l_proc, 5);
854: --
855: end set_cache_record_position;
856:
857: ------------------------------------------------------------------------
861: --
862: l_proc varchar2(80) := 'benutils.rollback_cache';
863: --
864: begin
865: hr_utility.set_location('Entering:'||l_proc, 5);
866:
867: -- The '_count' parms are set in set_cache_record_position above each
868: -- time we finish with a person. It indicates the last record written
869: -- for a person.
925: (ben_warnings.g_oab_warnings.count-
926: ben_warnings.g_oab_warnings_count);
927: end if;
928:
929: hr_utility.set_location('Leaving:'||l_proc, 5);
930: end rollback_cache;
931: --
932: procedure clear_down_cache is
933: --
996: pragma exception_init(table_full,-1653);
997: pragma exception_init(index_full,-1654);
998: begin
999: --
1000: hr_utility.set_location('Entering:'||l_proc, 5);
1001: --
1002: -- Loop through cache routine and write to ben_reporting table and
1003: -- to the output file
1004: --
1004: --
1005: if p_table = false and
1006: p_file = false then
1007: --
1008: hr_utility.set_location('Leaving:'||l_proc, 2);
1009: return;
1010: --
1011: end if;
1012:
1108: end loop;
1109: --
1110: if p_table then
1111: --
1112: hr_utility.set_location('BEN_REP Ins: '||l_proc, 6);
1113: l_table_name := 'BEN_REPORTING';
1114: forall l_count in 1..l_num_recs
1115: insert into ben_reporting
1116: (reporting_id,
1157: l_num15_col(l_count),
1158: l_num16_col(l_count),
1159: l_num17_col(l_count),
1160: l_num18_col(l_count));
1161: hr_utility.set_location('Dn BEN_REP Ins: '||l_proc, 7);
1162: --
1163: end if;
1164: --
1165: g_report_table_object.delete;
1166: --
1167: end if;
1168: --
1169: --
1170: hr_utility.set_location(l_proc||' Elig: ', 10);
1171: if nvl(g_batch_elig_table_object.count,0) > 0 then
1172: --
1173: if p_table then
1174: --
1256: g_batch_elig_table_object.delete;
1257: --
1258: end if;
1259: --
1260: hr_utility.set_location(l_proc||' Ler: ', 20);
1261: if nvl(g_batch_ler_table_object.count,0) > 0 then
1262: --
1263: if p_table then
1264: --
1402: g_batch_ler_table_object.delete;
1403: --
1404: end if;
1405: --
1406: hr_utility.set_location(l_proc||' Action: ', 30);
1407: if nvl(g_batch_action_table_object.count,0) > 0 then
1408: --
1409: if p_table then
1410: --
1439: g_batch_action_table_object.delete;
1440: --
1441: end if;
1442: --
1443: hr_utility.set_location(l_proc||' elctbl: ', 40);
1444: if nvl(g_batch_elctbl_table_object.count,0) > 0 then
1445: --
1446: if p_table then
1447: --
1565: g_batch_elctbl_table_object.delete;
1566: --
1567: end if;
1568: --
1569: hr_utility.set_location(l_proc||' rate: ', 50);
1570: if nvl(g_batch_rate_table_object.count,0) > 0 then
1571: --
1572: if p_table then
1573: --
1595: l_dat3_col.delete;
1596: l_dat4_col.delete;
1597: l_num_recs := g_batch_rate_table_object.count;
1598: --
1599: hr_utility.set_location('batch rate'||l_num_recs,3333);
1600: for l_count in 1..l_num_recs loop
1601: --
1602: l_num1_col.extend(1);
1603: l_num1_col(l_count) :=
1668: l_num14_col.extend(1);
1669: l_num14_col(l_count) :=
1670: g_batch_rate_table_object(l_count).old_val;
1671: --
1672: hr_utility.set_location(l_proc||' rate: ' ||
1673: g_batch_rate_table_object(l_count).old_val, 1111);
1674: end loop;
1675: --
1676: l_table_name :='BEN_BATCH_RATE_INFO';
1730: g_batch_rate_table_object.delete;
1731: --
1732: end if;
1733: --
1734: hr_utility.set_location(l_proc||' dpnt: ', 60);
1735: if nvl(g_batch_dpnt_table_object.count,0) > 0 then
1736: --
1737: if p_table then
1738: --
1833: g_batch_dpnt_table_object.delete;
1834: --
1835: end if;
1836: --
1837: hr_utility.set_location(l_proc||' commu: ', 70);
1838: if nvl(g_batch_commu_table_object.count,0) > 0 then
1839: --
1840: if p_table then
1841: --
1912: g_batch_commu_table_object.delete;
1913: --
1914: end if;
1915: --
1916: hr_utility.set_location('Leaving:'||l_proc, 5);
1917: --
1918: exception
1919: when table_full then
1920: fnd_message.set_name('BEN','BEN_92651_LOG_TABLE_FULL');
1940: l_count number := 1;
1941: --
1942: begin
1943: --
1944: -- hr_utility.set_location('Entering:'||l_proc, 5);
1945: -- hr_utility.set_location(substr(p_rec.text,1,100),10);
1946: --
1947: g_sequence := g_sequence +1;
1948: --
1941: --
1942: begin
1943: --
1944: -- hr_utility.set_location('Entering:'||l_proc, 5);
1945: -- hr_utility.set_location(substr(p_rec.text,1,100),10);
1946: --
1947: g_sequence := g_sequence +1;
1948: --
1949: g_report_table_object.extend(1);
1979: -- Reset p_rec to null
1980: --
1981: p_rec := l_rec;
1982: --
1983: -- hr_utility.set_location('Leaving:'||l_proc, 40);
1984: --
1985: end write;
1986: ------------------------------------------------------------------------
1987: -- get_batch_parameters
2041: where benefit_action_id = p_benefit_action_id;
2042: --
2043: begin
2044: --
2045: hr_utility.set_location('Entering:'||l_proc, 5);
2046: --
2047: if not g_batch_param_table_object.exists(1) then
2048: --
2049: open c1;
2066: p_rec := g_batch_param_table_object(1); /* Bug 5009662 */
2067: --
2068: end if;
2069: --
2070: hr_utility.set_location('Leaving:'||l_proc, 5);
2071: --
2072: end get_batch_parameters;
2073:
2074: ------------------------------------------------------------------------
2085: l_params g_batch_param_rec;
2086: --
2087: begin
2088: --
2089: -- hr_utility.set_location('Entering:'||l_proc, 5);
2090: --
2091: if g_benefit_action_id is null then
2092: return;
2093: end if;
2096: p_rec => l_params);
2097: --
2098: if l_params.audit_log_flag <> 'Y' then
2099: --
2100: -- hr_utility.set_location('Leaving:'||l_proc, 4);
2101: return;
2102: --
2103: end if;
2104: --
2137: -- Reset p_rec to null
2138: --
2139: p_rec := l_rec;
2140: --
2141: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2142: --
2143: end write;
2144: --
2145: procedure write(p_rec in out nocopy ben_type.g_batch_action_rec) is
2149: l_count number := 1;
2150: --
2151: begin
2152: --
2153: -- hr_utility.set_location('Entering:'||l_proc, 5);
2154: --
2155: g_batch_action_table_object.extend(1);
2156: l_count := g_batch_action_table_object.count;
2157: --
2164: -- Reset p_rec to null
2165: --
2166: p_rec := l_rec;
2167: --
2168: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2169: --
2170: end write;
2171: --
2172: procedure write(p_rec in out nocopy g_batch_elctbl_rec) is
2177: l_params g_batch_param_rec;
2178: --
2179: begin
2180: --
2181: -- hr_utility.set_location('Entering:'||l_proc, 5);
2182: --
2183: if g_benefit_action_id is null then
2184: return;
2185: end if;
2187: get_batch_parameters(p_benefit_action_id => g_benefit_action_id,
2188: p_rec => l_params);
2189: --
2190: if l_params.audit_log_flag <> 'Y' then
2191: -- hr_utility.set_location('Leaving:'||l_proc, 3);
2192: --
2193: return;
2194: --
2195: end if;
2222: -- Reset p_rec to null
2223: --
2224: p_rec := l_rec;
2225: --
2226: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2227: --
2228: end write;
2229: --
2230: procedure write(p_rec in out nocopy g_batch_rate_rec) is
2235: l_params g_batch_param_rec;
2236: --
2237: begin
2238: --
2239: -- hr_utility.set_location('Entering:'||l_proc, 5);
2240: --
2241: if g_benefit_action_id is null then
2242: return;
2243: end if;
2246: p_rec => l_params);
2247: --
2248: if l_params.audit_log_flag <> 'Y' then
2249: --
2250: -- hr_utility.set_location('Entering:'||l_proc, 3);
2251: return;
2252: --
2253: end if;
2254: --
2251: return;
2252: --
2253: end if;
2254: --
2255: -- hr_utility.set_location('Writing Rate Record:'||l_proc, 5);
2256: --
2257: g_batch_rate_table_object.extend(1);
2258: l_count := g_batch_rate_table_object.count;
2259: select ben_batch_rate_info_s.nextval into
2287: -- Reset p_rec to null
2288: --
2289: p_rec := l_rec;
2290: --
2291: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2292: -- hr_utility.set_location('Number of Rate Records:'||g_batch_rate_table_object.count,5);
2293: --
2294: end write;
2295: --
2288: --
2289: p_rec := l_rec;
2290: --
2291: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2292: -- hr_utility.set_location('Number of Rate Records:'||g_batch_rate_table_object.count,5);
2293: --
2294: end write;
2295: --
2296: procedure write(p_rec in out nocopy g_batch_dpnt_rec) is
2301: l_params g_batch_param_rec;
2302: --
2303: begin
2304: --
2305: -- hr_utility.set_location('Entering:'||l_proc, 5);
2306: --
2307: if g_benefit_action_id is null then
2308: return;
2309: end if;
2312: p_rec => l_params);
2313: --
2314: if l_params.audit_log_flag <> 'Y' then
2315: --
2316: -- hr_utility.set_location('Leaving:'||l_proc, 3);
2317: return;
2318: --
2319: end if;
2320: --
2342: -- Reset p_rec to null
2343: --
2344: p_rec := l_rec;
2345: --
2346: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2347: --
2348: end write;
2349: --
2350: procedure write(p_rec in out nocopy ben_type.g_batch_commu_rec) is
2354: l_count number := 1;
2355: --
2356: begin
2357: --
2358: -- hr_utility.set_location('Entering:'||l_proc, 5);
2359: --
2360: g_batch_commu_table_object.extend(1);
2361: l_count := g_batch_commu_table_object.count;
2362: select ben_batch_commu_info_s.nextval into
2375: -- Reset p_rec to null
2376: --
2377: p_rec := l_rec;
2378: --
2379: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2380: --
2381: end write;
2382: --
2383: procedure write(p_rec in out nocopy g_batch_ler_rec) is
2390: l_params g_batch_param_rec;
2391: --
2392: begin
2393: --
2394: -- hr_utility.set_location('Entering:'||l_proc, 5);
2395: --
2396: g_batch_ler_table_object.extend(1);
2397: l_count := g_batch_ler_table_object.count;
2398: select ben_batch_ler_info_s.nextval into
2423: -- Reset p_rec to null
2424: --
2425: p_rec := l_rec;
2426: --
2427: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2428: --
2429: end write;
2430: --
2431: procedure write(p_rec in out nocopy ben_type.g_batch_proc_rec) is
2437: l_count number := 1;
2438: --
2439: begin
2440: --
2441: -- hr_utility.set_location('Entering:'||l_proc, 5);
2442: --
2443: ben_batch_proc_info_api.create_batch_proc_info
2444: (p_validate => false
2445: ,p_batch_proc_id => l_batch_proc_id
2460: -- Reset p_rec to null
2461: --
2462: p_rec := l_rec;
2463: --
2464: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2465: --
2466: end write;
2467: --
2468: procedure write(p_text in varchar2,
2493: then
2494: --
2495: -- Assume no logging required
2496: --
2497: -- hr_utility.set_location('Leaving:'||l_proc, 4);
2498: return;
2499: --
2500: end if;
2501: --
2500: end if;
2501: --
2502: g_sequence := g_sequence +1;
2503: --
2504: -- hr_utility.set_location('Report Varray:'||l_proc, 5);
2505: g_report_table_object.extend(1);
2506: l_count := g_report_table_object.count;
2507: /*
2508: select ben_reporting_s.nextval into
2531: g_report_table_object(l_count).val := null;
2532: g_report_table_object(l_count).mo_num := null;
2533: g_report_table_object(l_count).yr_num := null;
2534: --
2535: -- hr_utility.set_location('Leaving:'||l_proc, 40);
2536: --
2537: end write;
2538:
2539: ------------------------------------------------------------------------
2545: l_proc varchar2(80) := 'benutils.update_life_event_cache';
2546: --
2547: begin
2548: --
2549: hr_utility.set_location('Entering:'||l_proc, 5);
2550: --
2551: -- Special case where we have to update the open_and_clsd_flag if the
2552: -- life event was created and not replaced
2553: --
2569: end if;
2570: --
2571: end if;
2572: --
2573: hr_utility.set_location('Entering:'||l_proc, 5);
2574: --
2575: end update_life_event_cache;
2576:
2577: ------------------------------------------------------------------------
2595: and bbp.business_group_id = p_business_group_id;
2596: --
2597: begin
2598: --
2599: hr_utility.set_location('Entering:'||l_proc, 5);
2600: --
2601: open c1;
2602: --
2603: fetch c1 into p_threads,
2622: end if;
2623: --
2624: close c1;
2625: --
2626: hr_utility.set_location(l_proc||'p_threads : '||p_threads, 5);
2627: hr_utility.set_location('Leaving:'||l_proc, 5);
2628: --
2629: end get_parameter;
2630:
2623: --
2624: close c1;
2625: --
2626: hr_utility.set_location(l_proc||'p_threads : '||p_threads, 5);
2627: hr_utility.set_location('Leaving:'||l_proc, 5);
2628: --
2629: end get_parameter;
2630:
2631: ------------------------------------------------------------------------
2638: l_proc varchar2(80) := 'benutils.iftrue';
2639: --
2640: begin
2641: --
2642: hr_utility.set_location('Entering:'||l_proc, 5);
2643: --
2644: if p_expression then
2645: --
2646: --hr_utility.set_location('Leaving:'||l_proc, 4);
2642: hr_utility.set_location('Entering:'||l_proc, 5);
2643: --
2644: if p_expression then
2645: --
2646: --hr_utility.set_location('Leaving:'||l_proc, 4);
2647: return p_true;
2648: --
2649: else
2650: --
2647: return p_true;
2648: --
2649: else
2650: --
2651: --hr_utility.set_location('Leaving:'||l_proc, 5);
2652: return p_false;
2653: --
2654: end if;
2655: --
2664: l_proc varchar2(80) := 'benutils.zero_to_null';
2665: --
2666: begin
2667: --
2668: --hr_utility.set_location('Entering:'||l_proc, 5);
2669: --
2670: l_value := iftrue(p_expression => p_value = 0,
2671: p_true => null,
2672: p_false => p_value);
2670: l_value := iftrue(p_expression => p_value = 0,
2671: p_true => null,
2672: p_false => p_value);
2673: --
2674: --hr_utility.set_location('Leaving:'||l_proc, 5);
2675: return l_value;
2676: --
2677: --
2678: end zero_to_null;
2700: l_proc varchar2(80) := 'benutils.get_bp_name';
2701: --
2702: begin
2703: --
2704: hr_utility.set_location('Entering:'||l_proc, 5);
2705: --
2706: -- Bug 3431740 Parameter l_oracle_schema added to cursor c1, the value is got by the
2707: -- following call
2708: l_return := fnd_installation.get_app_info(application_short_name => l_application_short_name,
2732: l_comments := 'BP_NOT_FOUND';
2733: --
2734: end if;
2735: --
2736: hr_utility.set_location('Leaving:'||l_proc, 5);
2737: return l_comments;
2738: --
2739: --
2740: end get_bp_name;
2747: l_proc varchar2(80) := 'benutils.part_of_pkey';
2748: --
2749: begin
2750: --
2751: --hr_utility.set_location('Entering:'||l_proc, 5);
2752: --
2753: -- Check if a column is part of the Primary Key
2754: --
2755: for l_counter in 1..g_primary_key_count loop
2755: for l_counter in 1..g_primary_key_count loop
2756: --
2757: if p_column_name = g_part_of_pkey(l_counter) then
2758: --
2759: --hr_utility.set_location('Leaving:'||l_proc, 3);
2760: return true;
2761: --
2762: end if;
2763: --
2762: end if;
2763: --
2764: end loop;
2765: --
2766: --hr_utility.set_location('Leaving:'||l_proc, 5);
2767: return false;
2768: --
2769: end part_of_pkey;
2770:
2800: l_proc varchar2(80) := 'benutils.define_primary_key';
2801: --
2802: begin
2803: --
2804: hr_utility.set_location('Entering:'||l_proc, 5);
2805: --
2806: -- Get the column if is part of the primary key.
2807: --
2808: -- Bug 3431740 Parameter l_oracle_schema added to cursor c1, the value is got by the
2831: close c1;
2832: --
2833: g_primary_key_count := l_number_of_columns;
2834: --
2835: hr_utility.set_location('Leaving:'||l_proc, 5);
2836: --
2837: end define_primary_key;
2838:
2839: ------------------------------------------------------------------------
2862: l_proc varchar2(80) := 'benutils.lookups_exist';
2863: --
2864: begin
2865: --
2866: --hr_utility.set_location('Entering:'||l_proc, 5);
2867: --
2868: -- Bug 3431740 Parameter l_oracle_schema added to cursor c1, the value is got by the
2869: -- following call
2870: l_return := fnd_installation.get_app_info(application_short_name => l_application_short_name,
2876: fetch c1 into l_dummy;
2877: if c1%found then
2878: --
2879: close c1;
2880: --hr_utility.set_location('Leaving:'||l_proc, 3);
2881: return true;
2882: --
2883: end if;
2884: --
2883: end if;
2884: --
2885: close c1;
2886: --
2887: --hr_utility.set_location('Leaving:'||l_proc, 5);
2888: return false;
2889: --
2890: end lookups_exist;
2891:
2918: order by c.position;
2919: --
2920: begin
2921: --
2922: --hr_utility.set_location('Entering:'||l_proc, 5);
2923: --
2924: -- Get the Primary Key for the table.
2925: --
2926: -- Bug 3431740 Parameter l_oracle_schema added to cursor c1, the value is got by the
2935: fetch c1 into l_primary_key;
2936: --
2937: close c1;
2938: --
2939: --hr_utility.set_location('Leaving:'||l_proc, 5);
2940: return l_primary_key;
2941: --
2942: end get_primary_key;
2943:
2964: l_proc varchar2(80) := 'benutils.business_group_exists';
2965: --
2966: begin
2967: --
2968: --hr_utility.set_location('Entering:'||l_proc, 5);
2969: --
2970: -- Bug 3431740 Parameter l_oracle_schema added to cursor c1, the value is got by the
2971: -- following call
2972: l_return := fnd_installation.get_app_info(application_short_name => l_application_short_name,
2985: end if;
2986: --
2987: close c1;
2988: --
2989: --hr_utility.set_location('Leaving:'||l_proc, 5);
2990: return l_result;
2991: --
2992: end business_group_exists;
2993:
2999: l_proc varchar2(80) := 'benutils.table_datetracked';
3000: --
3001: begin
3002: --
3003: --hr_utility.set_location('Entering:'||l_proc, 5);
3004: --
3005: if substr(p_tablename,length(p_tablename)-1,2) = '_F' then
3006: --hr_utility.set_location('Leaving:'||l_proc, 3);
3007: return true;
3002: --
3003: --hr_utility.set_location('Entering:'||l_proc, 5);
3004: --
3005: if substr(p_tablename,length(p_tablename)-1,2) = '_F' then
3006: --hr_utility.set_location('Leaving:'||l_proc, 3);
3007: return true;
3008: else
3009: --hr_utility.set_location('Leaving:'||l_proc, 5);
3010: return false;
3005: if substr(p_tablename,length(p_tablename)-1,2) = '_F' then
3006: --hr_utility.set_location('Leaving:'||l_proc, 3);
3007: return true;
3008: else
3009: --hr_utility.set_location('Leaving:'||l_proc, 5);
3010: return false;
3011: end if;
3012: --
3013: end table_datetracked;
3035: l_proc varchar2(80) := 'benutils.attributes_exist';
3036: --
3037: begin
3038: --
3039: --hr_utility.set_location('Entering:'||l_proc, 5);
3040: --
3041: -- See if attributes exist for the table
3042: --
3043: -- Bug 3431740 Parameter l_oracle_schema added to cursor c1, the value is got by the
3057: end if;
3058: --
3059: close c1;
3060: --
3061: --hr_utility.set_location('Leaving:'||l_proc, 5);
3062: return l_found;
3063: --
3064: end attributes_exist;
3065:
3085: l_proc varchar2(80) := 'benutils.get_pk_constraint_name';
3086: --
3087: begin
3088: --
3089: --hr_utility.set_location('Entering:'||l_proc, 5);
3090: --
3091: -- get the Primary Key constraint name for the table
3092: --
3093: -- Bug 3431740 Parameter l_oracle_schema added to cursor c1, the value is got by the
3102: fetch c1 into l_constraint_name;
3103: --
3104: close c1;
3105: --
3106: --hr_utility.set_location('Leaving:'||l_proc, 5);
3107: return l_constraint_name;
3108: --
3109: end get_pk_constraint_name;
3110: --
3115: if ((p_new_column = p_old_column)
3116: OR ((p_old_column IS NULL)
3117: AND (p_new_column IS NULL)))
3118: then
3119: hr_utility.set_location('FALSE',10);
3120: return FALSE;
3121: --
3122: -- Value MUST have changed
3123: -- so if any value chosen return true
3124: -- elsif specific value test for it
3125: -- being new value.
3126: elsif p_new_value = 'OABANY'
3127: then
3128: hr_utility.set_location('TRUE',10);
3129: return TRUE;
3130: elsif ((p_new_value = 'NULL')
3131: AND (p_new_column IS NULL)
3132: )
3130: elsif ((p_new_value = 'NULL')
3131: AND (p_new_column IS NULL)
3132: )
3133: then
3134: hr_utility.set_location('TRUE',10);
3135: return TRUE;
3136: elsif ((p_new_value = 'NULL')
3137: AND (p_new_column IS NOT NULL))
3138: then
3135: return TRUE;
3136: elsif ((p_new_value = 'NULL')
3137: AND (p_new_column IS NOT NULL))
3138: then
3139: hr_utility.set_location('FALSE',10);
3140: return FALSE;
3141: elsif ((p_new_column IS NOT NULL)
3142: AND (p_new_column = p_new_value)
3143: )
3141: elsif ((p_new_column IS NOT NULL)
3142: AND (p_new_column = p_new_value)
3143: )
3144: then
3145: hr_utility.set_location('TRUE',10);
3146: return TRUE;
3147: end if;
3148: hr_utility.set_location('FALSE',10);
3149: return FALSE;
3144: then
3145: hr_utility.set_location('TRUE',10);
3146: return TRUE;
3147: end if;
3148: hr_utility.set_location('FALSE',10);
3149: return FALSE;
3150: end;
3151:
3152: ------------------------------------------------------------------------
3155: function column_changed(p_old_column in date
3156: ,p_new_column in date
3157: ,p_new_value in varchar2) return boolean is
3158: begin
3159: hr_utility.set_location('In routine',10);
3160: if ((p_new_column = p_old_column)
3161: OR ((p_old_column IS NULL)
3162: AND (p_new_column IS NULL)))
3163: then
3160: if ((p_new_column = p_old_column)
3161: OR ((p_old_column IS NULL)
3162: AND (p_new_column IS NULL)))
3163: then
3164: hr_utility.set_location('FALSE1',10);
3165: return FALSE;
3166: --
3167: -- Value MUST have changed
3168: -- so if any value chosen return true
3175: -- Bug#2001857-null value must be treated differently as the condition above checks
3176: -- and both the values are null then false is returnedi-null condition masked
3177: if p_new_column = hr_api.g_eot then
3178: -- or p_new_column is null then
3179: hr_utility.set_location('FALSE2',10);
3180: return FALSE;
3181: else
3182: hr_utility.set_location('TRUE3',10);
3183: return TRUE;
3178: -- or p_new_column is null then
3179: hr_utility.set_location('FALSE2',10);
3180: return FALSE;
3181: else
3182: hr_utility.set_location('TRUE3',10);
3183: return TRUE;
3184: end if;
3185: elsif ((p_new_value = 'NULL')
3186: AND (p_new_column IS NULL or
3187: p_new_column = hr_api.g_eot)
3188: )
3189: then
3190: -- Bug 1167017, treat eot as null
3191: hr_utility.set_location('TRUE4',10);
3192: return TRUE;
3193: elsif ((p_new_value = 'NULL')
3194: AND (p_new_column IS NOT NULL) and
3195: p_new_column <> hr_api.g_eot)
3193: elsif ((p_new_value = 'NULL')
3194: AND (p_new_column IS NOT NULL) and
3195: p_new_column <> hr_api.g_eot)
3196: then
3197: hr_utility.set_location('FALSE5',10);
3198: return FALSE;
3199: elsif p_new_value = 'ENDTM' and p_new_column = hr_api.g_eot then
3200: hr_utility.set_location('TRUE5',10);
3201: return true;
3196: then
3197: hr_utility.set_location('FALSE5',10);
3198: return FALSE;
3199: elsif p_new_value = 'ENDTM' and p_new_column = hr_api.g_eot then
3200: hr_utility.set_location('TRUE5',10);
3201: return true;
3202: elsif ((p_new_column IS NOT NULL)
3203: AND (to_char(p_new_column) = p_new_value)
3204: )
3202: elsif ((p_new_column IS NOT NULL)
3203: AND (to_char(p_new_column) = p_new_value)
3204: )
3205: then
3206: hr_utility.set_location('TRUE6',10);
3207: return TRUE;
3208: end if;
3209: hr_utility.set_location('FALSE7',10);
3210: return FALSE;
3205: then
3206: hr_utility.set_location('TRUE6',10);
3207: return TRUE;
3208: end if;
3209: hr_utility.set_location('FALSE7',10);
3210: return FALSE;
3211: end;
3212: --
3213: function column_changed(p_old_column in number
3268: l_outputs ff_exec.outputs_t;
3269: --
3270: Begin
3271: --
3272: hr_utility.set_location('Entering:'||l_proc, 5);
3273: --
3274: if p_rounding_cd is null then
3275: --
3276: l_result := p_value;
3273: --
3274: if p_rounding_cd is null then
3275: --
3276: l_result := p_value;
3277: hr_utility.set_location('Leaving:'||l_proc, 5);
3278: return l_result;
3279: --
3280: elsif p_rounding_cd = 'RL' then
3281: --
3402: l_result:=l_value-l_modulus+l_rndg_fctr;
3403: --
3404: elsif l_rndg_type = 'DOWN' then
3405: --
3406: hr_utility.set_location('p_value:'||to_char(l_value), 5);
3407: hr_utility.set_location('l_modulus:'||to_char(l_modulus), 5);
3408: l_result:=l_value-l_modulus;
3409: hr_utility.set_location('l_result:'||l_result, 5);
3410: --
3403: --
3404: elsif l_rndg_type = 'DOWN' then
3405: --
3406: hr_utility.set_location('p_value:'||to_char(l_value), 5);
3407: hr_utility.set_location('l_modulus:'||to_char(l_modulus), 5);
3408: l_result:=l_value-l_modulus;
3409: hr_utility.set_location('l_result:'||l_result, 5);
3410: --
3411: else
3405: --
3406: hr_utility.set_location('p_value:'||to_char(l_value), 5);
3407: hr_utility.set_location('l_modulus:'||to_char(l_modulus), 5);
3408: l_result:=l_value-l_modulus;
3409: hr_utility.set_location('l_result:'||l_result, 5);
3410: --
3411: else
3412: --
3413: -- go for nearest
3434:
3435: ---bug 2083228
3436: if l_val_chg_flag = 'Y' then
3437: l_result:=l_result * -1 ;
3438: hr_utility.set_location(' negetive value ' || l_result, 199 );
3439: end if ;
3440: --
3441: hr_utility.set_location('Leaving:'||l_proc, 99);
3442: return l_result;
3437: l_result:=l_result * -1 ;
3438: hr_utility.set_location(' negetive value ' || l_result, 199 );
3439: end if ;
3440: --
3441: hr_utility.set_location('Leaving:'||l_proc, 99);
3442: return l_result;
3443: --
3444: end do_rounding;
3445:
3459: l_fractional number;
3460: --
3461: begin
3462: --
3463: hr_utility.set_location('Entering:'||l_proc, 5);
3464: hr_utility.set_location(' P_VALUE ' || p_value, 926);
3465: hr_utility.set_location(' P_max ' || p_max, 926);
3466: if p_value = 'LT_MIN' or
3467: p_value = 'GT_MIN' then
3460: --
3461: begin
3462: --
3463: hr_utility.set_location('Entering:'||l_proc, 5);
3464: hr_utility.set_location(' P_VALUE ' || p_value, 926);
3465: hr_utility.set_location(' P_max ' || p_max, 926);
3466: if p_value = 'LT_MIN' or
3467: p_value = 'GT_MIN' then
3468: --
3461: begin
3462: --
3463: hr_utility.set_location('Entering:'||l_proc, 5);
3464: hr_utility.set_location(' P_VALUE ' || p_value, 926);
3465: hr_utility.set_location(' P_max ' || p_max, 926);
3466: if p_value = 'LT_MIN' or
3467: p_value = 'GT_MIN' then
3468: --
3469: l_val := p_min;
3507: l_val := p_max ;
3508: --
3509: end if;
3510: --
3511: hr_utility.set_location( p_value||' '||l_val, 926);
3512: if p_uom = 'YR' then
3513: --
3514: l_value := add_months(p_date,l_val*12);
3515: --bug#4156125 - the add_months function takes only integer to add months
3549: raise ben_manage_life_events.g_record_error;
3550: --
3551: end if;
3552: --
3553: hr_utility.set_location(' calcualted return ' || l_value, 926);
3554: hr_utility.set_location('Leaving:'||l_proc, 99);
3555: return l_value;
3556: --
3557: end derive_date;
3550: --
3551: end if;
3552: --
3553: hr_utility.set_location(' calcualted return ' || l_value, 926);
3554: hr_utility.set_location('Leaving:'||l_proc, 99);
3555: return l_value;
3556: --
3557: end derive_date;
3558:
3567: l_proc varchar2(72) := 'benutils.do_uom';
3568: --
3569: begin
3570: --
3571: hr_utility.set_location('Entering:'||l_proc, 5);
3572: --
3573: -- Calculate details based on UOM
3574: --
3575: -- All values expressed as days
3611: else
3612: --
3613: -- Defensive programming
3614: --
3615: hr_utility.set_location('BEN_91342_UNKNOWN_CODE_1', 99);
3616: fnd_message.set_name('BEN','BEN_91342_UNKNOWN_CODE_1');
3617: fnd_message.set_token('PROC',l_proc);
3618: fnd_message.set_token('CODE1',p_uom);
3619: raise ben_manage_life_events.g_record_error;
3619: raise ben_manage_life_events.g_record_error;
3620: --
3621: end if;
3622: --
3623: hr_utility.set_location('Leaving:'||l_proc, 99);
3624: return l_value;
3625: --
3626: end do_uom;
3627:
3634: l_proc varchar2(80) := 'benutils.id';
3635: --
3636: begin
3637: --
3638: hr_utility.set_location('Entering:'||l_proc, 5);
3639: --
3640: if p_value is null then
3641: --
3642: hr_utility.set_location('Leaving:'||l_proc, 3);
3638: hr_utility.set_location('Entering:'||l_proc, 5);
3639: --
3640: if p_value is null then
3641: --
3642: hr_utility.set_location('Leaving:'||l_proc, 3);
3643: return null;
3644: --
3645: end if;
3646: --
3645: end if;
3646: --
3647: l_value := ' ('||p_value||')';
3648: --
3649: hr_utility.set_location('Leaving:'||l_proc, 5);
3650: return l_value;
3651: --
3652: end id;
3653:
3673: l_new_value number := p_new_value ;
3674: --
3675: begin
3676: --
3677: -- hr_utility.set_location ('Entering '||l_package,10);
3678: -- hr_utility.set_location ('Min '||p_min_value,10);
3679: -- hr_utility.set_location ('Max '||p_max_value,10);
3680: -- hr_utility.set_location ('Old Value '||p_old_value,10);
3681: -- hr_utility.set_location ('New Value '||p_new_value,10);
3674: --
3675: begin
3676: --
3677: -- hr_utility.set_location ('Entering '||l_package,10);
3678: -- hr_utility.set_location ('Min '||p_min_value,10);
3679: -- hr_utility.set_location ('Max '||p_max_value,10);
3680: -- hr_utility.set_location ('Old Value '||p_old_value,10);
3681: -- hr_utility.set_location ('New Value '||p_new_value,10);
3682: --
3675: begin
3676: --
3677: -- hr_utility.set_location ('Entering '||l_package,10);
3678: -- hr_utility.set_location ('Min '||p_min_value,10);
3679: -- hr_utility.set_location ('Max '||p_max_value,10);
3680: -- hr_utility.set_location ('Old Value '||p_old_value,10);
3681: -- hr_utility.set_location ('New Value '||p_new_value,10);
3682: --
3683: p_break := 'NONE';
3676: --
3677: -- hr_utility.set_location ('Entering '||l_package,10);
3678: -- hr_utility.set_location ('Min '||p_min_value,10);
3679: -- hr_utility.set_location ('Max '||p_max_value,10);
3680: -- hr_utility.set_location ('Old Value '||p_old_value,10);
3681: -- hr_utility.set_location ('New Value '||p_new_value,10);
3682: --
3683: p_break := 'NONE';
3684: --
3677: -- hr_utility.set_location ('Entering '||l_package,10);
3678: -- hr_utility.set_location ('Min '||p_min_value,10);
3679: -- hr_utility.set_location ('Max '||p_max_value,10);
3680: -- hr_utility.set_location ('Old Value '||p_old_value,10);
3681: -- hr_utility.set_location ('New Value '||p_new_value,10);
3682: --
3683: p_break := 'NONE';
3684: --
3685: if p_min_value is null then
3828: end if;
3829: --
3830: end if;
3831: --
3832: -- hr_utility.set_location ('Leaving '||l_package,10);
3833: --
3834: return l_return;
3835: --
3836: end min_max_breach;
3844: l_package varchar2(80) := 'benutils.eot_to_null';
3845: --
3846: begin
3847: --
3848: hr_utility.set_location ('Entering '||l_package,10);
3849: --
3850: if p_date = hr_api.g_eot then
3851: --
3852: l_date := null;
3856: l_date := p_date;
3857: --
3858: end if;
3859: --
3860: hr_utility.set_location ('Leaving '||l_package,10);
3861: return(l_date);
3862: --
3863: end eot_to_null;
3864: --
3868: l_package varchar2(80) := 'benutils.eot_to_null';
3869: --
3870: begin
3871: --
3872: hr_utility.set_location ('Entering '||l_package,5);
3873: --
3874: l_date := benutils.eot_to_null(to_date(p_date,'DD/MM/YYYY'));
3875: --
3876: hr_utility.set_location ('Leaving '||l_package,5);
3872: hr_utility.set_location ('Entering '||l_package,5);
3873: --
3874: l_date := benutils.eot_to_null(to_date(p_date,'DD/MM/YYYY'));
3875: --
3876: hr_utility.set_location ('Leaving '||l_package,5);
3877: return(to_char(l_date,'DD/MM/YYYY'));
3878: --
3879: end eot_to_null;
3880: --
3908: l_months number := 12;
3909: --
3910: begin
3911: --
3912: hr_utility.set_location ('Entering '||l_package,10);
3913: --
3914: -- Set to prev year
3915: --
3916: l_months := to_number(to_char(p_date,'MM'))+3;
3920: -- Set to first of month of October
3921: --
3922: l_date := last_day(l_date)+1;
3923: --
3924: hr_utility.set_location ('Leaving '||l_package,10);
3925: return l_date;
3926: --
3927: end set_to_oct1_prev_year;
3928:
4079: l_jurisdiction_code varchar2(150);
4080: --
4081: begin
4082: --
4083: -- hr_utility.set_location ('Entering '||l_package,10);
4084: --
4085: -- hr_utility.set_location ('Before Init Formula '||l_package,10);
4086: --
4087: -- Bug 1949361 : Get the jurisdiction code for US legislation only.
4081: begin
4082: --
4083: -- hr_utility.set_location ('Entering '||l_package,10);
4084: --
4085: -- hr_utility.set_location ('Before Init Formula '||l_package,10);
4086: --
4087: -- Bug 1949361 : Get the jurisdiction code for US legislation only.
4088: --
4089: open c_leg;
4117: (p_formula_id => p_formula_id,
4118: p_effective_date => p_effective_date,
4119: p_inputs => l_inputs,
4120: p_outputs => l_outputs);
4121: -- hr_utility.set_location ('After Init Formula '||l_package,10);
4122: --
4123: -- NOTE that we use special parameter values in order to state which
4124: -- array locations we put the values into, this is because of the caching
4125: -- mechanism that formula uses.
4123: -- NOTE that we use special parameter values in order to state which
4124: -- array locations we put the values into, this is because of the caching
4125: -- mechanism that formula uses.
4126: --
4127: -- hr_utility.set_location ('First Position'||l_inputs.first,10);
4128: -- hr_utility.set_location ('Last Position'||l_inputs.last,10);
4129: l_param_tab_count := p_param_tab.count;
4130: --
4131: -- Account for case where formula has no contexts or inputs
4124: -- array locations we put the values into, this is because of the caching
4125: -- mechanism that formula uses.
4126: --
4127: -- hr_utility.set_location ('First Position'||l_inputs.first,10);
4128: -- hr_utility.set_location ('Last Position'||l_inputs.last,10);
4129: l_param_tab_count := p_param_tab.count;
4130: --
4131: -- Account for case where formula has no contexts or inputs
4132: --
4131: -- Account for case where formula has no contexts or inputs
4132: --
4133: for l_count in nvl(l_inputs.first,0)..nvl(l_inputs.last,-1) loop
4134: --
4135: -- hr_utility.set_location ('Current Context'||l_inputs(l_count).name,10);
4136: --
4137: if l_inputs(l_count).name = 'BUSINESS_GROUP_ID' then
4138: --
4139: l_inputs(l_count).value := nvl(p_business_group_id, -1);
4226: --
4227: -- Note that you must pass the date as a string, that is because
4228: -- of the canonical date change of 11.5
4229: --
4230: -- hr_utility.set_location ('Date Earned '||to_char(p_effective_date),10);
4231: -- Still the fast formula does't accept the full canonical form.
4232: -- l_inputs(l_count).value := fnd_date.date_to_canonical(p_effective_date);
4233: l_inputs(l_count).value := to_char(p_effective_date, 'YYYY/MM/DD');
4234: --
4402: ff_exec.run_formula(p_inputs => l_inputs,
4403: p_outputs => l_outputs,
4404: p_use_dbi_cache => false); -- bug# 2430017
4405: --
4406: -- hr_utility.set_location ('Leaving '||l_package,10);
4407: return l_outputs;
4408: --
4409: end formula;
4410: --
4496: l_env ben_env_object.g_global_env_rec_type;
4497: --
4498: begin
4499: --
4500: hr_utility.set_location ('Entering '||l_package,10);
4501: --
4502: -- Bug : 1656320 : context assignment id is not available.
4503: -- Add environment init procedure
4504: -- Work out if we are being called from a concurrent program
4505: -- otherwise we need to initialize the environment to set the business_goup_id
4506: -- and effective_date in the cache, so that assignment get_object
4507: -- routines work fine.
4508: --
4509: hr_utility.set_location('p_ff_date '||p_effective_date ||
4510: ' p_leod ' || p_lf_evt_ocrd_dt,11);
4511: --
4512: -- if fnd_global.conc_request_id = -1 then
4513: -- bug 4947096
4559: --
4560: end if;
4561: */
4562: --
4563: hr_utility.set_location('assignment_id '||l_ass_rec.assignment_id , 13);
4564: l_outputs := benutils.formula
4565: (p_formula_id => p_formula_id,
4566: p_effective_date => nvl(p_lf_evt_ocrd_dt,p_effective_date),
4567: p_assignment_id => l_ass_rec.assignment_id,
4654: p_ret_val := 'Y';
4655: --
4656: end if;
4657: --
4658: hr_utility.set_location ('Leaving '||l_package,10);
4659: --
4660: end exec_rule;
4661: --
4662: --
4938: --
4939: --
4940: begin
4941: --
4942: --hr_utility.set_location('Entering ' ||l_package, 10);
4943: --hr_utility.set_location('p_elig_per_elctbl_chc_id ' || to_char(p_elig_per_elctbl_chc_id ), 20);
4944: --hr_utility.set_location('p_enrt_bnft_id ' || to_char(p_enrt_bnft_id ), 20);
4945: --hr_utility.set_location('p_effective_date ' || to_char(p_effective_date ), 20);
4946: --hr_utility.set_location('p_enrt_rt_id ' || to_char(p_enrt_rt_id ), 20);
4939: --
4940: begin
4941: --
4942: --hr_utility.set_location('Entering ' ||l_package, 10);
4943: --hr_utility.set_location('p_elig_per_elctbl_chc_id ' || to_char(p_elig_per_elctbl_chc_id ), 20);
4944: --hr_utility.set_location('p_enrt_bnft_id ' || to_char(p_enrt_bnft_id ), 20);
4945: --hr_utility.set_location('p_effective_date ' || to_char(p_effective_date ), 20);
4946: --hr_utility.set_location('p_enrt_rt_id ' || to_char(p_enrt_rt_id ), 20);
4947: --hr_utility.set_location('p_enrt_rt_id2 ' || to_char(p_enrt_rt_id2 ), 20);
4940: begin
4941: --
4942: --hr_utility.set_location('Entering ' ||l_package, 10);
4943: --hr_utility.set_location('p_elig_per_elctbl_chc_id ' || to_char(p_elig_per_elctbl_chc_id ), 20);
4944: --hr_utility.set_location('p_enrt_bnft_id ' || to_char(p_enrt_bnft_id ), 20);
4945: --hr_utility.set_location('p_effective_date ' || to_char(p_effective_date ), 20);
4946: --hr_utility.set_location('p_enrt_rt_id ' || to_char(p_enrt_rt_id ), 20);
4947: --hr_utility.set_location('p_enrt_rt_id2 ' || to_char(p_enrt_rt_id2 ), 20);
4948: --hr_utility.set_location('p_enrt_rt_id3 ' || to_char(p_enrt_rt_id3 ), 20);
4941: --
4942: --hr_utility.set_location('Entering ' ||l_package, 10);
4943: --hr_utility.set_location('p_elig_per_elctbl_chc_id ' || to_char(p_elig_per_elctbl_chc_id ), 20);
4944: --hr_utility.set_location('p_enrt_bnft_id ' || to_char(p_enrt_bnft_id ), 20);
4945: --hr_utility.set_location('p_effective_date ' || to_char(p_effective_date ), 20);
4946: --hr_utility.set_location('p_enrt_rt_id ' || to_char(p_enrt_rt_id ), 20);
4947: --hr_utility.set_location('p_enrt_rt_id2 ' || to_char(p_enrt_rt_id2 ), 20);
4948: --hr_utility.set_location('p_enrt_rt_id3 ' || to_char(p_enrt_rt_id3 ), 20);
4949: --hr_utility.set_location('p_enrt_rt_id4 ' || to_char(p_enrt_rt_id4 ), 20);
4942: --hr_utility.set_location('Entering ' ||l_package, 10);
4943: --hr_utility.set_location('p_elig_per_elctbl_chc_id ' || to_char(p_elig_per_elctbl_chc_id ), 20);
4944: --hr_utility.set_location('p_enrt_bnft_id ' || to_char(p_enrt_bnft_id ), 20);
4945: --hr_utility.set_location('p_effective_date ' || to_char(p_effective_date ), 20);
4946: --hr_utility.set_location('p_enrt_rt_id ' || to_char(p_enrt_rt_id ), 20);
4947: --hr_utility.set_location('p_enrt_rt_id2 ' || to_char(p_enrt_rt_id2 ), 20);
4948: --hr_utility.set_location('p_enrt_rt_id3 ' || to_char(p_enrt_rt_id3 ), 20);
4949: --hr_utility.set_location('p_enrt_rt_id4 ' || to_char(p_enrt_rt_id4 ), 20);
4950: --
4943: --hr_utility.set_location('p_elig_per_elctbl_chc_id ' || to_char(p_elig_per_elctbl_chc_id ), 20);
4944: --hr_utility.set_location('p_enrt_bnft_id ' || to_char(p_enrt_bnft_id ), 20);
4945: --hr_utility.set_location('p_effective_date ' || to_char(p_effective_date ), 20);
4946: --hr_utility.set_location('p_enrt_rt_id ' || to_char(p_enrt_rt_id ), 20);
4947: --hr_utility.set_location('p_enrt_rt_id2 ' || to_char(p_enrt_rt_id2 ), 20);
4948: --hr_utility.set_location('p_enrt_rt_id3 ' || to_char(p_enrt_rt_id3 ), 20);
4949: --hr_utility.set_location('p_enrt_rt_id4 ' || to_char(p_enrt_rt_id4 ), 20);
4950: --
4951: open c_pen_bnft_amt;
4944: --hr_utility.set_location('p_enrt_bnft_id ' || to_char(p_enrt_bnft_id ), 20);
4945: --hr_utility.set_location('p_effective_date ' || to_char(p_effective_date ), 20);
4946: --hr_utility.set_location('p_enrt_rt_id ' || to_char(p_enrt_rt_id ), 20);
4947: --hr_utility.set_location('p_enrt_rt_id2 ' || to_char(p_enrt_rt_id2 ), 20);
4948: --hr_utility.set_location('p_enrt_rt_id3 ' || to_char(p_enrt_rt_id3 ), 20);
4949: --hr_utility.set_location('p_enrt_rt_id4 ' || to_char(p_enrt_rt_id4 ), 20);
4950: --
4951: open c_pen_bnft_amt;
4952: fetch c_pen_bnft_amt into l_bnft_amt;
4945: --hr_utility.set_location('p_effective_date ' || to_char(p_effective_date ), 20);
4946: --hr_utility.set_location('p_enrt_rt_id ' || to_char(p_enrt_rt_id ), 20);
4947: --hr_utility.set_location('p_enrt_rt_id2 ' || to_char(p_enrt_rt_id2 ), 20);
4948: --hr_utility.set_location('p_enrt_rt_id3 ' || to_char(p_enrt_rt_id3 ), 20);
4949: --hr_utility.set_location('p_enrt_rt_id4 ' || to_char(p_enrt_rt_id4 ), 20);
4950: --
4951: open c_pen_bnft_amt;
4952: fetch c_pen_bnft_amt into l_bnft_amt;
4953: if c_pen_bnft_amt%found then
4951: open c_pen_bnft_amt;
4952: fetch c_pen_bnft_amt into l_bnft_amt;
4953: if c_pen_bnft_amt%found then
4954: --
4955: --hr_utility.set_location(' bnft amt found ' || to_char(l_bnft_amt), 30);
4956: p_bnft_amt := l_bnft_amt ;
4957: --
4958: end if;
4959: close c_pen_bnft_amt;
4989: end if;
4990: --
4991: end loop;
4992: --
4993: --hr_utility.set_location('Entering ' ||l_package, 10);
4994: --
4995: exception
4996: --
4997: when others then
5325: l_profile_value number ;
5326: l_defined Boolean ;
5327: --
5328: begin
5329: hr_utility.set_location('Entering '||l_proc, 999);
5330: --
5331: -- check if the profile is set with PAP group
5332: --
5333: fnd_profile.get_specific( name_z => 'ACTION_PARAMETER_GROUPS'
5336: ,application_id_z => fnd_global.resp_appl_id
5337: ,val_z => l_profile_value
5338: ,defined_z => l_defined );
5339:
5340: hr_utility.set_location('l_profile_value '||l_profile_value, 999);
5341: --
5342: -- If the profile is not set with PAP group then look for default
5343: --
5344: if (l_profile_value is null or l_defined = FALSE )
5346: open c_mode;
5347: fetch c_mode into l_mode;
5348: close c_mode;
5349: --
5350: hr_utility.set_location('l_profile_value not defined '||l_mode, 999);
5351: elsif ( l_profile_value is not null or l_defined = TRUE ) then
5352: --
5353: open c_pap_mode(l_profile_value );
5354: fetch c_pap_mode into l_mode;
5353: open c_pap_mode(l_profile_value );
5354: fetch c_pap_mode into l_mode;
5355: close c_pap_mode;
5356: --
5357: hr_utility.set_location('l_profile_value defined '||l_mode, 999);
5358: end if ;
5359: --
5360: if l_mode not in ('P','Y','N') then
5361: --
5364: else
5365: hr_general.g_data_migrator_mode := l_mode ;
5366: end if;
5367: --
5368: hr_utility.set_location('successful '||hr_general.g_data_migrator_mode, 999);
5369: hr_utility.set_location('Leaving '||l_proc, 999);
5370: exception
5371: --
5372: when others then
5365: hr_general.g_data_migrator_mode := l_mode ;
5366: end if;
5367: --
5368: hr_utility.set_location('successful '||hr_general.g_data_migrator_mode, 999);
5369: hr_utility.set_location('Leaving '||l_proc, 999);
5370: exception
5371: --
5372: when others then
5373: --
5372: when others then
5373: --
5374: hr_general.g_data_migrator_mode := 'N';
5375: --
5376: hr_utility.set_location('when others value '||hr_general.g_data_migrator_mode, 999);
5377: end set_data_migrator_mode;
5378: --
5379: -- Bug 2016857
5380: --
5828:
5829: --
5830: begin
5831: --
5832: hr_utility.set_location('Entering:'||l_proc, 5);
5833: --
5834: -- Get the last updated date from pil record for Unrestricted LE run
5835: --
5836: open c_pil_last_upd_date;
5849: --
5850: -- If session date is farther than the last Unrestricted run date,
5851: -- then also we need to run Unrest even if ssProcessUnrestricted flag is 'N'
5852: --
5853: hr_utility.set_location('p_effective_date = '||p_effective_date, 999);
5854: hr_utility.set_location('l_pil_lf_evt_ocrd_dt is '||l_pil_lf_evt_ocrd_dt, 999);
5855: --
5856: l_run_benmngle := true;
5857: --
5850: -- If session date is farther than the last Unrestricted run date,
5851: -- then also we need to run Unrest even if ssProcessUnrestricted flag is 'N'
5852: --
5853: hr_utility.set_location('p_effective_date = '||p_effective_date, 999);
5854: hr_utility.set_location('l_pil_lf_evt_ocrd_dt is '||l_pil_lf_evt_ocrd_dt, 999);
5855: --
5856: l_run_benmngle := true;
5857: --
5858: elsif (p_effective_date = l_pil_lf_evt_ocrd_dt
5864: open c_per_last_upd_date(l_pil_last_upd_date);
5865: fetch c_per_last_upd_date into l_per_last_upd_date;
5866: close c_per_last_upd_date;
5867: --
5868: hr_utility.set_location('l_per_last_upd_date is '||l_per_last_upd_date, 999);
5869: hr_utility.set_location('l_pil_last_upd_date is '||l_pil_last_upd_date, 999);
5870: --
5871: if (nvl(l_per_last_upd_date,l_pil_last_upd_date) > l_pil_last_upd_date) then
5872: --
5865: fetch c_per_last_upd_date into l_per_last_upd_date;
5866: close c_per_last_upd_date;
5867: --
5868: hr_utility.set_location('l_per_last_upd_date is '||l_per_last_upd_date, 999);
5869: hr_utility.set_location('l_pil_last_upd_date is '||l_pil_last_upd_date, 999);
5870: --
5871: if (nvl(l_per_last_upd_date,l_pil_last_upd_date) > l_pil_last_upd_date) then
5872: --
5873: -- If Person data has changed since the last Unrest LEOD then run benmngle
5884: --
5885: end if;
5886: close c_pil_last_upd_date;
5887: --
5888: hr_utility.set_location('Leaving:'||l_proc, 5);
5889: return l_run_benmngle;
5890: --
5891: end run_osb_benmngle_flag;
5892: --