5: -- ----------------------------------------------------------------------------
6: --
7: --
8: g_package varchar2(33) := ' ben_ext_person.'; -- Global package name
9: g_debug boolean := hr_utility.debug_enabled;
10:
11: TYPE t_number IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
12: TYPE t_varchar2_30 IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
13: TYPE t_varchar2_600 IS TABLE OF VARCHAR2(600) INDEX BY BINARY_INTEGER;
58: --
59: Begin
60: if g_debug then
61: l_proc := g_package||'get_pay_adv_crit_dates';
62: hr_utility.set_location('Entering'||l_proc, 5);
63: end if;
64:
65: l_cad_exist := 'N' ;
66: l_ced_exist := 'N' ;
67:
68: for i in c1
69: Loop
70:
71: hr_utility.set_location('oper cd '||i.oper_cd, 5);
72: hr_utility.set_location('crit_typ_cd cd '||i.crit_typ_cd, 5);
73:
74: l_from_date := ben_ext_util.calc_ext_date
75: (p_ext_date_cd => i.val_1,
68: for i in c1
69: Loop
70:
71: hr_utility.set_location('oper cd '||i.oper_cd, 5);
72: hr_utility.set_location('crit_typ_cd cd '||i.crit_typ_cd, 5);
73:
74: l_from_date := ben_ext_util.calc_ext_date
75: (p_ext_date_cd => i.val_1,
76: p_abs_date => p_effective_date,
145: p_act_from_dt := l_act_from_dt;
146: p_act_to_dt := l_act_to_dt ;
147: p_date_mode := 'C' ;
148:
149: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
150: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
151: hr_utility.set_location('Exiting for C eot bot '||l_proc, 15);
152:
153: Return ;
146: p_act_to_dt := l_act_to_dt ;
147: p_date_mode := 'C' ;
148:
149: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
150: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
151: hr_utility.set_location('Exiting for C eot bot '||l_proc, 15);
152:
153: Return ;
154: end if ;
147: p_date_mode := 'C' ;
148:
149: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
150: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
151: hr_utility.set_location('Exiting for C eot bot '||l_proc, 15);
152:
153: Return ;
154: end if ;
155:
159: p_act_from_dt := l_act_from_dt;
160: p_act_to_dt := l_act_to_dt ;
161: p_date_mode := 'C' ;
162:
163: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
164: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
165: hr_utility.set_location('Exiting for C no ced '||l_proc, 15);
166:
167: Return ;
160: p_act_to_dt := l_act_to_dt ;
161: p_date_mode := 'C' ;
162:
163: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
164: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
165: hr_utility.set_location('Exiting for C no ced '||l_proc, 15);
166:
167: Return ;
168:
161: p_date_mode := 'C' ;
162:
163: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
164: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
165: hr_utility.set_location('Exiting for C no ced '||l_proc, 15);
166:
167: Return ;
168:
169: end if ;
183: p_eff_from_dt := l_eff_from_dt;
184: p_eff_to_dt := l_eff_to_dt ;
185: p_date_mode := 'E' ;
186:
187: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
188: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
189: hr_utility.set_location('Exiting for E eot bot '||l_proc, 15);
190:
191: Return ;
184: p_eff_to_dt := l_eff_to_dt ;
185: p_date_mode := 'E' ;
186:
187: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
188: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
189: hr_utility.set_location('Exiting for E eot bot '||l_proc, 15);
190:
191: Return ;
192: end if ;
185: p_date_mode := 'E' ;
186:
187: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
188: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
189: hr_utility.set_location('Exiting for E eot bot '||l_proc, 15);
190:
191: Return ;
192: end if ;
193:
197: p_eff_from_dt := l_eff_from_dt;
198: p_eff_to_dt := l_eff_to_dt ;
199: p_date_mode := 'E' ;
200:
201: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
202: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
203: hr_utility.set_location('Exiting for no cad '||l_proc, 15);
204:
205: Return ;
198: p_eff_to_dt := l_eff_to_dt ;
199: p_date_mode := 'E' ;
200:
201: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
202: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
203: hr_utility.set_location('Exiting for no cad '||l_proc, 15);
204:
205: Return ;
206:
199: p_date_mode := 'E' ;
200:
201: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
202: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
203: hr_utility.set_location('Exiting for no cad '||l_proc, 15);
204:
205: Return ;
206:
207: end if ;
219:
220: End if ;
221:
222:
223: hr_utility.set_location('act_from_dt '|| p_act_from_dt , 15);
224: hr_utility.set_location('act_to_dt '|| p_act_to_dt , 15);
225: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
226: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
227:
220: End if ;
221:
222:
223: hr_utility.set_location('act_from_dt '|| p_act_from_dt , 15);
224: hr_utility.set_location('act_to_dt '|| p_act_to_dt , 15);
225: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
226: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
227:
228: hr_utility.set_location('node '|| p_date_mode , 15);
221:
222:
223: hr_utility.set_location('act_from_dt '|| p_act_from_dt , 15);
224: hr_utility.set_location('act_to_dt '|| p_act_to_dt , 15);
225: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
226: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
227:
228: hr_utility.set_location('node '|| p_date_mode , 15);
229: if g_debug then
222:
223: hr_utility.set_location('act_from_dt '|| p_act_from_dt , 15);
224: hr_utility.set_location('act_to_dt '|| p_act_to_dt , 15);
225: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
226: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
227:
228: hr_utility.set_location('node '|| p_date_mode , 15);
229: if g_debug then
230: hr_utility.set_location('Exiting'||l_proc, 15);
224: hr_utility.set_location('act_to_dt '|| p_act_to_dt , 15);
225: hr_utility.set_location('eff_from_dt '|| p_eff_from_dt , 15);
226: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
227:
228: hr_utility.set_location('node '|| p_date_mode , 15);
229: if g_debug then
230: hr_utility.set_location('Exiting'||l_proc, 15);
231: end if;
232:
226: hr_utility.set_location('eff_to_dt '|| p_eff_to_dt , 15);
227:
228: hr_utility.set_location('node '|| p_date_mode , 15);
229: if g_debug then
230: hr_utility.set_location('Exiting'||l_proc, 15);
231: end if;
232:
233: End get_pay_adv_crit_dates ;
234:
270:
271: begin
272: if g_debug then
273: l_proc := g_package||'Check_assg_info';
274: hr_utility.set_location('Entering'||l_proc, 5);
275: end if;
276:
277: open c_asg ;
278: fetch c_Asg into p_assignment_id ;
295:
296: end if ;
297:
298: if g_debug then
299: hr_utility.set_location('assignment_id : ' || p_assignment_id , 99 );
300: hr_utility.set_location('Exiting'||l_proc, 15);
301: end if;
302: end Check_assg_info;
303:
296: end if ;
297:
298: if g_debug then
299: hr_utility.set_location('assignment_id : ' || p_assignment_id , 99 );
300: hr_utility.set_location('Exiting'||l_proc, 15);
301: end if;
302: end Check_assg_info;
303:
304:
322: --
323: Begin
324: if g_debug then
325: l_proc := g_package||'init_assignment_id';
326: hr_utility.set_location('Entering'||l_proc, 5);
327: end if;
328: -- p_asg id param added to validate a particular id
329: if p_assignment_id is not null then
330: l_assignment_id := p_assignment_id ;
333: --if the assignment to use code is not defined then use
334: -- empl, benefit,applicant order
335:
336: if g_debug then
337: hr_utility.set_location('rqd '|| ben_ext_evaluate_inclusion.g_asg_to_use_rqd, 99 );
338: end if;
339: if ben_ext_evaluate_inclusion.g_asg_to_use_rqd = 'Y' then
340: l_asg_to_use_cd := ben_ext_evaluate_inclusion.g_asg_to_use_list(1) ;
341: if g_debug then
338: end if;
339: if ben_ext_evaluate_inclusion.g_asg_to_use_rqd = 'Y' then
340: l_asg_to_use_cd := ben_ext_evaluate_inclusion.g_asg_to_use_list(1) ;
341: if g_debug then
342: hr_utility.set_location('order by user '|| l_asg_to_use_cd, 99 );
343: end if;
344: end if ;
345:
346: if l_asg_to_use_cd is null then
347: l_asg_to_use_cd := 'EBAC' ; -- hardcoded default
348: -- Emp/BEN/Appl/Cont
349: end if ;
350: if g_debug then
351: hr_utility.set_location(' ass cd ' || l_asg_to_use_cd, 99 );
352: end if;
353:
354: ----determine the kind of assignment
355: if l_asg_to_use_cd = 'EAO' then
461: ---intialise the global assignment_id
462: g_assignment_id := l_assignment_id ;
463:
464: if g_debug then
465: hr_utility.set_location('assignment_id : ' || g_assignment_id , 99 );
466: hr_utility.set_location('Exiting'||l_proc, 15);
467: end if;
468:
469: End init_assignment_id ;
462: g_assignment_id := l_assignment_id ;
463:
464: if g_debug then
465: hr_utility.set_location('assignment_id : ' || g_assignment_id , 99 );
466: hr_utility.set_location('Exiting'||l_proc, 15);
467: end if;
468:
469: End init_assignment_id ;
470: --
581: Begin
582: --
583: if g_debug then
584: l_proc := g_package||'get_person_info';
585: hr_utility.set_location('Entering'||l_proc, 5);
586: end if;
587: --
588: open c_person_info;
589: fetch c_person_info into
687: if g_ext_global_flag = 'Y' then
688: ben_ext_person.g_business_group_id := l_business_group_id ;
689: ben_extract.g_business_group_name := l_business_group_name ;
690: end if ;
691: hr_utility.set_location('Global BG ' || ben_ext_person.g_business_group_id|| ' / ' ||ben_extract.g_proc_business_group_id,99) ;
692:
693: ---initalize the assignment_id as soon the person information avaialble
694: init_assignment_id(p_person_id =>p_person_id ,
695: p_effective_date =>p_effective_date );
694: init_assignment_id(p_person_id =>p_person_id ,
695: p_effective_date =>p_effective_date );
696:
697: if g_debug then
698: hr_utility.set_location('Tobacco Usage '||g_uses_tobacco_flag, 5);
699: hr_utility.set_location('Exiting'||l_proc, 15);
700: end if;
701: --
702: --
695: p_effective_date =>p_effective_date );
696:
697: if g_debug then
698: hr_utility.set_location('Tobacco Usage '||g_uses_tobacco_flag, 5);
699: hr_utility.set_location('Exiting'||l_proc, 15);
700: end if;
701: --
702: --
703: end get_person_info;
710: l_proc varchar2(72) := g_package||'get_pos_info';
711: --
712: begin
713: if g_debug then
714: hr_utility.set_location('Entering'||l_proc, 5);
715: end if;
716:
717: select
718: pos.name,
742: where pos.position_id = p_position_id
743: and p_effective_date between pos.EFFECTIVE_START_DATE and pos.EFFECTIVE_END_DATE ;
744:
745: if g_debug then
746: hr_utility.set_location('Exiting'||l_proc, 15);
747: end if;
748:
749: end get_pos_info ;
750:
756: l_proc varchar2(72) := g_package||'get_job_info';
757: --
758: begin
759: if g_debug then
760: hr_utility.set_location('Entering'||l_proc, 5);
761: end if;
762: select
763: j.name,
764: j.attribute1,
786: from per_jobs_vl j
787: where j.job_id = p_job_id;
788:
789: if g_debug then
790: hr_utility.set_location('Exiting'||l_proc, 15);
791: end if;
792:
793: end get_job_info ;
794:
801: l_proc varchar2(72) := g_package||'get_payroll_info';
802: --
803: begin
804: if g_debug then
805: hr_utility.set_location('Entering'||l_proc, 5);
806: end if;
807:
808: select
809: pay.payroll_name,
862:
863:
864:
865: if g_debug then
866: hr_utility.set_location('Exiting'||l_proc, 15);
867: end if;
868:
869: end get_payroll_info ;
870:
877: l_proc varchar2(72) := g_package||'get_grade_info';
878: --
879: begin
880: if g_debug then
881: hr_utility.set_location('Entering'||l_proc, 5);
882: end if;
883:
884:
885: select
909: from per_grades_vl g
910: where g.grade_id = p_grade_id;
911:
912: if g_debug then
913: hr_utility.set_location('Exiting'||l_proc, 15);
914: end if;
915:
916: end get_grade_info ;
917:
945:
946: --
947: begin
948: if g_debug then
949: hr_utility.set_location('Entering'||l_proc, 5);
950: end if;
951:
952: open c_org ;
953: fetch c_org into l_location_id ;
969:
970: close c_loc_info ;
971: end if ;
972: if g_debug then
973: hr_utility.set_location('Exiting'||l_proc, 15);
974: end if;
975:
976: end get_org_loc_info ;
977:
988: l_proc varchar2(72) := g_package||'get_loc_info';
989: --
990: begin
991: if g_debug then
992: hr_utility.set_location('Entering'||l_proc, 5);
993: end if;
994:
995: select
996: l.location_code,
1038: where l.location_id = p_location_id;
1039:
1040:
1041: if g_debug then
1042: hr_utility.set_location('Exiting'||l_proc, 15);
1043: end if;
1044:
1045: end get_loc_info ;
1046:
1132: l_assignment_id number ;
1133: Begin
1134: --
1135: if g_debug then
1136: hr_utility.set_location('Entering'||l_proc, 5);
1137: end if;
1138: --
1139: open c_asg_info (p_assignment_id);
1140: fetch c_asg_info into
1193:
1194: close c_asg_info;
1195:
1196: if g_debug then
1197: hr_utility.set_location('Payroll id '||g_payroll_id, 5);
1198: end if;
1199:
1200: begin
1201: if g_employee_grade_id is not null
1200: begin
1201: if g_employee_grade_id is not null
1202: then
1203: if g_debug then
1204: hr_utility.set_location('asg Grade'||g_employee_grade_id, 5);
1205: end if;
1206:
1207: get_grade_info (p_grade_id => g_employee_grade_id,
1208: p_effective_date => p_effective_date );
1210: end if;
1211:
1212: if g_location_id is not null then
1213: if g_debug then
1214: hr_utility.set_location('asg Location'||g_location_id , 5);
1215: end if;
1216: get_loc_info (p_location_id => g_location_id,
1217: p_effective_date => p_effective_date );
1218:
1219: end if;
1220:
1221: if g_position_id is not null then
1222: if g_debug then
1223: hr_utility.set_location('Asg Position'||g_position_id, 5);
1224: end if;
1225: get_pos_info (p_position_id => g_position_id,
1226: p_effective_date => p_effective_date ) ;
1227: end if;
1227: end if;
1228:
1229: if g_job_id is not null then
1230: if g_debug then
1231: hr_utility.set_location('Asg Job'||g_job_id, 5);
1232: end if;
1233: get_job_info (p_job_id => g_job_id,
1234: p_effective_date => p_effective_date );
1235: end if;
1235: end if;
1236:
1237: if g_payroll_id is not null then
1238: if g_debug then
1239: hr_utility.set_location('asg pay'||g_payroll_id, 5);
1240: end if;
1241:
1242: get_payroll_info (p_payroll_id => g_payroll_id,
1243: p_effective_date => p_effective_date );
1244: end if;
1245:
1246: if g_employee_organization_id is not null then
1247: if g_debug then
1248: hr_utility.set_location('Emp org '||g_employee_organization_id, 5);
1249: end if;
1250:
1251: get_org_loc_info (p_org_id => g_employee_organization_id,
1252: p_effective_date => p_effective_date );
1255:
1256: Exception
1257: When NO_DATA_FOUND then
1258: if g_debug then
1259: hr_utility.set_location('NO_DATA_FOUND IN ASG CHILD ', 5) ;
1260: end if;
1261: g_err_num := 94102 ;
1262: g_err_name := 'BEN_94102_EXT_ERROR_ON_ASG' ;
1263:
1265: Raise ;
1266:
1267: end;
1268: if g_debug then
1269: hr_utility.set_location('asg type '|| g_asg_type, 99 );
1270: hr_utility.set_location('Exiting'||l_proc, 15);
1271: end if;
1272: --
1273: --
1266:
1267: end;
1268: if g_debug then
1269: hr_utility.set_location('asg type '|| g_asg_type, 99 );
1270: hr_utility.set_location('Exiting'||l_proc, 15);
1271: end if;
1272: --
1273: --
1274: end get_assignment_info;
1299:
1300: Begin
1301: if g_debug then
1302: l_proc := g_package||'get_School_info';
1303: hr_utility.set_location('Entering'||l_proc, 15);
1304: end if;
1305: open c_school ;
1306: fetch c_school into g_ESTABLISHMENT_name ;
1307: if c_school%notfound then
1309: end if ;
1310: close c_school ;
1311:
1312: if g_debug then
1313: hr_utility.set_location('Exiting'||l_proc, 15);
1314: end if;
1315: end get_School_info;
1316:
1317:
1349:
1350: begin
1351: if g_debug then
1352: l_proc := g_package||'get_base_annual_salary_info_info';
1353: hr_utility.set_location('Entering'||l_proc, 15);
1354: end if;
1355:
1356: open c (p_person_id ) ;
1357: fetch c into lc ;
1357: fetch c into lc ;
1358: close c ;
1359: g_base_salary := lc.pay_annualization_factor * lc.proposed_salary_n ;
1360: if g_debug then
1361: hr_utility.set_location(' salary ' || g_base_salary , 936);
1362: hr_utility.set_location('Exiting'||l_proc, 15);
1363: end if;
1364: end get_base_annual_salary_info;
1365:
1358: close c ;
1359: g_base_salary := lc.pay_annualization_factor * lc.proposed_salary_n ;
1360: if g_debug then
1361: hr_utility.set_location(' salary ' || g_base_salary , 936);
1362: hr_utility.set_location('Exiting'||l_proc, 15);
1363: end if;
1364: end get_base_annual_salary_info;
1365:
1366:
1405:
1406: begin
1407: if g_debug then
1408: l_proc := g_package||'get_person_flex_credit';
1409: hr_utility.set_location('Entering'||l_proc, 15);
1410: end if;
1411:
1412: -- the fLex cedit calcualted in person level
1413: if g_debug then
1410: end if;
1411:
1412: -- the fLex cedit calcualted in person level
1413: if g_debug then
1414: hr_utility.set_location('entering to open flex credit ' ,160);
1415: end if;
1416: open flex_cred_info_c;
1417: fetch flex_cred_info_c into ben_ext_person.g_flex_credit_provided
1418: ,ben_ext_person.g_flex_credit_forfited
1422: nvl(ben_ext_person.g_flex_credit_forfited,0) -
1423: nvl(ben_ext_person.g_flex_credit_used,0);
1424: close flex_cred_info_c;
1425: if g_debug then
1426: hr_utility.set_location('provided amount '|| ben_ext_person.g_flex_credit_provided ,160);
1427: hr_utility.set_location('used amount '|| ben_ext_person.g_flex_credit_used ,160);
1428: hr_utility.set_location('Exiting'||l_proc, 15);
1429: end if;
1430:
1423: nvl(ben_ext_person.g_flex_credit_used,0);
1424: close flex_cred_info_c;
1425: if g_debug then
1426: hr_utility.set_location('provided amount '|| ben_ext_person.g_flex_credit_provided ,160);
1427: hr_utility.set_location('used amount '|| ben_ext_person.g_flex_credit_used ,160);
1428: hr_utility.set_location('Exiting'||l_proc, 15);
1429: end if;
1430:
1431: end get_person_flex_credit;
1424: close flex_cred_info_c;
1425: if g_debug then
1426: hr_utility.set_location('provided amount '|| ben_ext_person.g_flex_credit_provided ,160);
1427: hr_utility.set_location('used amount '|| ben_ext_person.g_flex_credit_used ,160);
1428: hr_utility.set_location('Exiting'||l_proc, 15);
1429: end if;
1430:
1431: end get_person_flex_credit;
1432:
1454: and effective_end_date ;
1455: begin
1456: if g_debug then
1457: l_proc := g_package||'get_supervisor_info';
1458: hr_utility.set_location('Entering'||l_proc, 15);
1459: end if;
1460:
1461: open c_sup_info ;
1462: fetch c_sup_info into
1464: g_sup_employee_number ;
1465: close c_sup_info ;
1466:
1467: if g_debug then
1468: hr_utility.set_location('Exiting'||l_proc, 15);
1469: end if;
1470: end get_supervisor_info;
1471:
1472:
1539: Begin
1540: --
1541: if g_debug then
1542: l_proc := g_package||'get_primary_address_info';
1543: hr_utility.set_location('Entering'||l_proc, 5);
1544: end if;
1545: --
1546: open c_prmy_address;
1547: fetch c_prmy_address into
1588: close c_prmy_address;
1589: --
1590: --
1591: if g_debug then
1592: hr_utility.set_location('Exiting'||l_proc, 15);
1593: end if;
1594: --
1595: end get_primary_address_info;
1596: --
1627: Begin
1628: --
1629: if g_debug then
1630: l_proc := g_package||'get_mailing_address_info';
1631: hr_utility.set_location('Entering'||l_proc, 5);
1632: end if;
1633: --
1634: open c_mail_address;
1635: fetch c_mail_address into
1647: --
1648: close c_mail_address;
1649: --
1650: if g_debug then
1651: hr_utility.set_location('Exiting'||l_proc, 15);
1652: end if;
1653: --
1654: end get_mailing_address_info;
1655: --
1708: Begin
1709: --
1710: if g_debug then
1711: l_proc := g_package||'get_comm_address_info';
1712: hr_utility.set_location('Entering'||l_proc, 5);
1713: end if;
1714: --
1715: --
1716: IF p_address_id is not null then
1784: close c_prim_rltd_address;
1785: --
1786: End if;
1787: if g_debug then
1788: hr_utility.set_location('Exiting'||l_proc, 15);
1789: end if;
1790: --
1791: end get_comm_address_info;
1792: --
1879: Begin
1880: --
1881: if g_debug then
1882: l_proc := g_package||'get_phone_info';
1883: hr_utility.set_location('Entering'||l_proc, 5);
1884: end if;
1885: --
1886: open c_phone;
1887: fetch c_phone into
1889: g_phone_work,
1890: g_phone_fax,
1891: g_phone_mobile
1892: ;
1893: hr_utility.set_location(' looking phone ' || g_phone_home , 99 );
1894: if c_phone%notfound or
1895: (g_phone_home is null and g_phone_work is null and g_phone_fax is null and g_phone_mobile is null) then
1896: hr_utility.set_location(' looking for related phone ' || p_person_id , 99 );
1897: -- get related person information
1892: ;
1893: hr_utility.set_location(' looking phone ' || g_phone_home , 99 );
1894: if c_phone%notfound or
1895: (g_phone_home is null and g_phone_work is null and g_phone_fax is null and g_phone_mobile is null) then
1896: hr_utility.set_location(' looking for related phone ' || p_person_id , 99 );
1897: -- get related person information
1898: open c_rltd_phone;
1899: fetch c_rltd_phone into
1900: g_phone_home,
1902: g_phone_fax,
1903: g_phone_mobile
1904: ;
1905: close c_rltd_phone;
1906: hr_utility.set_location(' home related phone ' || g_phone_home , 99 );
1907: end if ;
1908: --
1909: close c_phone;
1910: --
1908: --
1909: close c_phone;
1910: --
1911: if g_debug then
1912: hr_utility.set_location('Exiting'||l_proc, 15);
1913: end if;
1914: --
1915: end get_phone_info;
1916: --
1954: Begin
1955: --
1956: if g_debug then
1957: l_proc := g_package||'get_period_of_svc_info';
1958: hr_utility.set_location('Entering'||l_proc, 5);
1959: end if;
1960: --
1961: open c_period_of_svc;
1962: fetch c_period_of_svc into
1982: ;
1983: close c_period_of_svc;
1984: --
1985: if g_debug then
1986: hr_utility.set_location('Exiting'||l_proc, 15);
1987: end if;
1988: --
1989: end get_period_of_svc_info;
1990: --
2017: Begin
2018: --
2019: if g_debug then
2020: l_proc := g_package||'get_svc_area_info';
2021: hr_utility.set_location('Entering'||l_proc, 5);
2022: end if;
2023: --
2024: open c_prmy_svc_area;
2025: fetch c_prmy_svc_area into ben_ext_person.g_prim_addr_sva_id,
2026: ben_ext_person.g_prim_addr_service_area;
2027: close c_prmy_svc_area;
2028: --
2029: if g_debug then
2030: hr_utility.set_location('Exiting'||l_proc, 15);
2031: end if;
2032: --
2033: end get_svc_area_info;
2034: --
2071: Begin
2072: --
2073: if g_debug then
2074: l_proc := g_package||'get_started_ler_info';
2075: hr_utility.set_location('Entering'||l_proc, 5);
2076: end if;
2077: --
2078: open c_started_ler;
2079: fetch c_started_ler into
2094: g_ler_attr_10;
2095: close c_started_ler;
2096: --
2097: if g_debug then
2098: hr_utility.set_location('Exiting'||l_proc, 15);
2099: end if;
2100: --
2101: end get_started_ler_info;
2102: --
2126: Begin
2127: --
2128: if g_debug then
2129: l_proc := g_package||'get_bnfts_group_info';
2130: hr_utility.set_location('Entering'||l_proc, 5);
2131: end if;
2132: --
2133: open c_bnfts_group;
2134: fetch c_bnfts_group into
2145: g_bng_flex_10;
2146: close c_bnfts_group;
2147: --
2148: if g_debug then
2149: hr_utility.set_location('Exiting'||l_proc, 15);
2150: end if;
2151: --
2152: end get_bnfts_group_info;
2153: --
2211: Begin
2212: --
2213: if g_debug then
2214: l_proc := g_package||'get_absence_info';
2215: hr_utility.set_location('Entering'||l_proc, 5);
2216: hr_utility.set_location('bug 4208'||p_person_id , 4208);
2217: end if;
2218: --
2219:
2212: --
2213: if g_debug then
2214: l_proc := g_package||'get_absence_info';
2215: hr_utility.set_location('Entering'||l_proc, 5);
2216: hr_utility.set_location('bug 4208'||p_person_id , 4208);
2217: end if;
2218: --
2219:
2220: open c_absence;
2250: g_abs_reason_cd; -- Bug 2841958, extra column in cursor
2251: close abs_reason;
2252: --
2253: if g_debug then
2254: hr_utility.set_location('Exiting'||l_proc, 15);
2255: end if;
2256: --
2257: end get_absence_info;
2258: --
2302: Begin
2303: --
2304: if g_debug then
2305: l_proc := g_package||'get_cobra_info';
2306: hr_utility.set_location('Entering'||l_proc, 5);
2307: end if;
2308: --
2309: -- get cobra information
2310: --
2330: end if;
2331: close cbra_info_c;
2332: --
2333: if g_debug then
2334: hr_utility.set_location('Exiting'||l_proc, 15);
2335: end if;
2336: --
2337: end get_cobra_info;
2338: --
2360: Begin
2361: --
2362: if g_debug then
2363: l_proc := g_package||'get_bnfts_bal_info';
2364: hr_utility.set_location('Entering'||l_proc, 5);
2365: end if;
2366: --
2367: -- Vacation
2368: --
2410: END IF;
2411: --
2412: --
2413: if g_debug then
2414: hr_utility.set_location('Exiting'||l_proc, 15);
2415: end if;
2416: --
2417: end get_bnfts_bal_info;
2418:
2428: l_proc varchar2(72);
2429:
2430: begin
2431:
2432: g_debug := hr_utility.debug_enabled;
2433: if g_debug then
2434: l_proc := g_package||' Extract_person_info';
2435: hr_utility.set_location('Entering'||l_proc, 5);
2436: end if;
2431:
2432: g_debug := hr_utility.debug_enabled;
2433: if g_debug then
2434: l_proc := g_package||' Extract_person_info';
2435: hr_utility.set_location('Entering'||l_proc, 5);
2436: end if;
2437:
2438:
2439: get_person_info (p_person_id => p_person_id,
2439: get_person_info (p_person_id => p_person_id,
2440: p_effective_date => g_person_ext_dt);
2441: --
2442: if g_debug then
2443: hr_utility.set_location('asg level ' || ben_extract.g_asg_csr,99);
2444: end if;
2445: if ben_extract.g_asg_csr = 'Y' then
2446: get_assignment_info (p_person_id => p_person_id,
2447: p_assignment_id => g_assignment_id,
2541:
2542:
2543: --
2544: if g_debug then
2545: hr_utility.set_location('Exiting'||l_proc, 15);
2546: end if;
2547: --
2548:
2549: End Extract_person_info ;
3123:
3124:
3125: Begin
3126: --
3127: g_debug := hr_utility.debug_enabled;
3128: if g_debug then
3129: l_proc := g_package||'process_ext_person';
3130: hr_utility.set_location('Entering'||l_proc, 5);
3131: end if;
3126: --
3127: g_debug := hr_utility.debug_enabled;
3128: if g_debug then
3129: l_proc := g_package||'process_ext_person';
3130: hr_utility.set_location('Entering'||l_proc, 5);
3131: end if;
3132:
3133: --
3134: -- Get general extract info
3242: l_chg_actl_strt_dt := ben_ext_thread.g_actual_start_date ;
3243: l_chg_actl_end_dt := ben_ext_thread.g_actual_end_date ;
3244: end if ;
3245:
3246: hr_utility.set_location( 'chg actl date ' || l_chg_actl_strt_dt || ' / ' || l_chg_actl_end_dt, 99 );
3247: hr_utility.set_location( 'chg eff date ' || l_chg_eff_strt_dt || ' / ' || l_chg_eff_end_dt , 99 );
3248: --
3249: if ben_ext_thread.g_chg_ext_from_ben = 'Y' then
3250: hr_utility.set_location( ' extract chg evt log included ' , 99 );
3243: l_chg_actl_end_dt := ben_ext_thread.g_actual_end_date ;
3244: end if ;
3245:
3246: hr_utility.set_location( 'chg actl date ' || l_chg_actl_strt_dt || ' / ' || l_chg_actl_end_dt, 99 );
3247: hr_utility.set_location( 'chg eff date ' || l_chg_eff_strt_dt || ' / ' || l_chg_eff_end_dt , 99 );
3248: --
3249: if ben_ext_thread.g_chg_ext_from_ben = 'Y' then
3250: hr_utility.set_location( ' extract chg evt log included ' , 99 );
3251: open c_changes_only_extract (l_chg_actl_strt_dt,
3246: hr_utility.set_location( 'chg actl date ' || l_chg_actl_strt_dt || ' / ' || l_chg_actl_end_dt, 99 );
3247: hr_utility.set_location( 'chg eff date ' || l_chg_eff_strt_dt || ' / ' || l_chg_eff_end_dt , 99 );
3248: --
3249: if ben_ext_thread.g_chg_ext_from_ben = 'Y' then
3250: hr_utility.set_location( ' extract chg evt log included ' , 99 );
3251: open c_changes_only_extract (l_chg_actl_strt_dt,
3252: l_chg_actl_end_dt,
3253: l_chg_eff_strt_dt,
3254: l_chg_eff_end_dt);
3350: --
3351: -- Not really sure what this hard coding is all about, should be investigated. th.
3352: --
3353: if g_debug then
3354: hr_utility.set_location(' Change Event Code ' || g_chg_evt_cd , 99 );
3355: end if;
3356: --BBurns Bug 1745274. Set context for AD and DD also on line below.
3357: /*
3358: CODE PRIOR TO WWBUG: 2008949
3405: g_previous_suffix := g_chg_old_val6;
3406: end if ;
3407:
3408: if g_debug then
3409: hr_utility.set_location(' l name ' || g_previous_last_name , 99 );
3410: hr_utility.set_location(' f name ' || g_previous_first_name , 99 );
3411: hr_utility.set_location(' m name ' || g_previous_middle_name , 99 );
3412: end if;
3413:
3406: end if ;
3407:
3408: if g_debug then
3409: hr_utility.set_location(' l name ' || g_previous_last_name , 99 );
3410: hr_utility.set_location(' f name ' || g_previous_first_name , 99 );
3411: hr_utility.set_location(' m name ' || g_previous_middle_name , 99 );
3412: end if;
3413:
3414: ELSIF g_chg_evt_cd = 'CONS' THEN
3407:
3408: if g_debug then
3409: hr_utility.set_location(' l name ' || g_previous_last_name , 99 );
3410: hr_utility.set_location(' f name ' || g_previous_first_name , 99 );
3411: hr_utility.set_location(' m name ' || g_previous_middle_name , 99 );
3412: end if;
3413:
3414: ELSIF g_chg_evt_cd = 'CONS' THEN
3415: g_previous_prefix := g_chg_old_val1 ;
3466: end if ; --- for extract chg logs
3467:
3468:
3469: if ben_ext_thread.g_chg_ext_from_pay = 'Y' then
3470: hr_utility.set_location( ' PAY event log included ' , 99 );
3471: -- Loop thorough all the assignment id for a person
3472: -- within the extract period
3473: --- get the primary assg as of effective date
3474: init_assignment_id(p_person_id => p_person_id ,
3482: If ben_ext_evaluate_inclusion.g_chg_actl_dt_incl_rqd = 'N' and
3483: ben_ext_evaluate_inclusion.g_chg_eff_dt_incl_rqd = 'N' and
3484: ben_ext_evaluate_inclusion.g_cmbn_incl_rqd = 'Y' then
3485:
3486: hr_utility.set_location('pay adv condition mode ' ||g_pay_adv_date_mode , 66 );
3487: if g_pay_adv_date_mode is null then
3488: hr_utility.set_location('pay adv condition exisit withoutot other criteria' , 66 );
3489: get_pay_adv_crit_dates(
3490: p_ext_crit_prfl_id => p_ext_crit_prfl_id,
3484: ben_ext_evaluate_inclusion.g_cmbn_incl_rqd = 'Y' then
3485:
3486: hr_utility.set_location('pay adv condition mode ' ||g_pay_adv_date_mode , 66 );
3487: if g_pay_adv_date_mode is null then
3488: hr_utility.set_location('pay adv condition exisit withoutot other criteria' , 66 );
3489: get_pay_adv_crit_dates(
3490: p_ext_crit_prfl_id => p_ext_crit_prfl_id,
3491: p_ext_dfn_id => p_ext_dfn_id,
3492: p_business_group_id => p_business_group_id,
3505: for pasg in c_pay_p_asg(p_person_id , nvl(l_chg_eff_strt_dt,nvl(l_chg_actl_strt_dt,p_effective_date)),
3506: nvl(l_chg_eff_end_dt,nvl(l_chg_actl_end_dt,p_effective_date))
3507: )
3508: Loop
3509: hr_utility.set_location(' pay assg id ' ||pasg.Assignment_id , 66 ) ;
3510:
3511: open c_pay_asg_date (pasg.Assignment_id) ;
3512: fetch c_pay_asg_date into l_pay_asg_eff_date ;
3513: close c_pay_asg_date ;
3510:
3511: open c_pay_asg_date (pasg.Assignment_id) ;
3512: fetch c_pay_asg_date into l_pay_asg_eff_date ;
3513: close c_pay_asg_date ;
3514: hr_utility.set_location(' pay assg date ' ||l_pay_asg_eff_date , 66 ) ;
3515: hr_utility.set_location(' pay actual start date ' ||l_chg_actl_strt_dt , 66 ) ;
3516:
3517: -- determine the assignment before call the interpreter
3518: init_assignment_id(p_person_id => p_person_id ,
3511: open c_pay_asg_date (pasg.Assignment_id) ;
3512: fetch c_pay_asg_date into l_pay_asg_eff_date ;
3513: close c_pay_asg_date ;
3514: hr_utility.set_location(' pay assg date ' ||l_pay_asg_eff_date , 66 ) ;
3515: hr_utility.set_location(' pay actual start date ' ||l_chg_actl_strt_dt , 66 ) ;
3516:
3517: -- determine the assignment before call the interpreter
3518: init_assignment_id(p_person_id => p_person_id ,
3519: p_effective_date => l_pay_asg_eff_date ,
3547: Begin
3548:
3549:
3550: if g_pay_adv_date_mode = 'B' or g_pay_adv_date_mode = 'E' then
3551: hr_utility.set_location('adv effective date mode '||g_pay_adv_eff_from_dt||'/'||
3552: g_pay_adv_eff_to_dt,99) ;
3553:
3554: l_eff_event_ecount := 0 ;
3555: l_eff_event_scount := 0 ;
3565: ,p_process_mode => 'ENTRY_EFFECTIVE_DATE'
3566: ,p_penserv_mode => p_penserv_mode -- vkodedal - changes for penserver -30-apr-2008
3567: );
3568:
3569: hr_utility.set_location( 'number of result ' ||l_pay_detail_tab.count, 99 ) ;
3570:
3571: -- get the starting count of total colection for comparison
3572: l_eff_event_scount := l_pay_tot_Srno ;
3573:
3575: -- collect all the information onto a table for process for a person
3576: FOR l_pay IN l_pay_detail_tab.FIRST..l_pay_detail_tab.LAST
3577: LOOP
3578:
3579: hr_utility.set_location(' insertining tot '|| l_pay_tot_Srno|| ' / '
3580: ||l_pay_detail_tab(l_pay).column_name,99) ;
3581:
3582: l_pay_detail_tot_tab(l_pay_tot_Srno).dated_table_id
3583: := l_pay_detail_tab(l_pay).dated_table_id ;
3615: if g_pay_adv_date_mode = 'B' or g_pay_adv_date_mode = 'C' then
3616: -- get the total count of srno for efficient comaprison
3617: l_eff_event_ecount := l_pay_detail_tot_tab.count ;
3618: l_pay_detail_tab.delete ;
3619: hr_utility.set_location('adv actual date mode '||g_pay_adv_act_from_dt||' / ' ||
3620: g_pay_adv_act_to_dt,99) ;
3621: ben_ext_util.entries_affected
3622: (p_assignment_id => l_pay_Assignment_id
3623: ,p_event_group_id => i.event_group_id
3632: );
3633:
3634:
3635:
3636: hr_utility.set_location( 'number of result ' ||l_pay_detail_tab.count, 99 ) ;
3637:
3638: if l_pay_detail_tab.count > 0 then
3639:
3640: -- collect all the information onto a table for process for a person
3682:
3683: --- if the entry is unique then create
3684: if l_g_c_found = 'N' then
3685:
3686: hr_utility.set_location(' insertining tot '|| l_pay_tot_Srno|| ' / '
3687: ||l_pay_detail_tab(l_pay).column_name,99) ;
3688:
3689: l_pay_detail_tot_tab(l_pay_tot_Srno).dated_table_id
3690: := l_pay_detail_tab(l_pay).dated_table_id ;
3720: end if;
3721: Exception
3722: WHEN hr_application_error THEN
3723: -- the exception handled only when thge pqp raise the error with the msg
3724: IF hr_utility.get_message = 'BEN_94629_NO_ASG_ACTION_ID' THEN
3725: hr_utility.set_location( 'Current assignment has no Assignment Action id. ' ,-9999);
3726: g_err_num := 94629 ;
3727: g_err_name := 'BEN_94629_NO_ASG_ACTION_ID' ;
3728: g_elmt_name:= null ;
3721: Exception
3722: WHEN hr_application_error THEN
3723: -- the exception handled only when thge pqp raise the error with the msg
3724: IF hr_utility.get_message = 'BEN_94629_NO_ASG_ACTION_ID' THEN
3725: hr_utility.set_location( 'Current assignment has no Assignment Action id. ' ,-9999);
3726: g_err_num := 94629 ;
3727: g_err_name := 'BEN_94629_NO_ASG_ACTION_ID' ;
3728: g_elmt_name:= null ;
3729: raise detail_restart_error ;
3727: g_err_name := 'BEN_94629_NO_ASG_ACTION_ID' ;
3728: g_elmt_name:= null ;
3729: raise detail_restart_error ;
3730: else
3731: hr_utility.set_location( 'unknow exception raised in pqp.',-9999);
3732: raise; -- to re-raise the exception
3733: end if ;
3734:
3735: End ;
3744: -- as per my understanding from PQP - ram
3745: -- since the actual date has the time stamp , the time stamp play the role in extracting info
3746: -- so the from date is truncated and to date is extended to the last second of the day
3747:
3748: hr_utility.set_location('pay actual dt mode '||trunc(l_chg_actl_strt_dt)||' / '||
3749: (trunc(l_chg_actl_end_dt)+0.99999) , 66 );
3750:
3751: ben_ext_util.entries_affected
3752: (p_assignment_id => l_pay_Assignment_id
3766: -- payroll exclude the from date data for proration purpose ,
3767: --the interpreter developerd for proration
3768: -- then used for reporting so the functionality remains the same
3769: -- we are passing -1 to make sure the from date data is included
3770: hr_utility.set_location(' pay effectivedt mode ' ||(l_chg_eff_strt_dt-1) || ' / ' ||
3771: l_chg_eff_end_dt , 66 ) ;
3772: ben_ext_util.entries_affected
3773: (p_assignment_id => l_pay_Assignment_id
3774: ,p_event_group_id => i.event_group_id
3784: end if ;
3785: Exception
3786: WHEN hr_application_error THEN
3787: -- the exception handled only when thge pqp raise the error with the msg
3788: IF hr_utility.get_message = 'BEN_94629_NO_ASG_ACTION_ID' THEN
3789: hr_utility.set_location( 'Current assignment has no Assignment Action id. ' ,-9999);
3790: g_err_num := 94629 ;
3791: g_err_name := 'BEN_94629_NO_ASG_ACTION_ID' ;
3792: g_elmt_name:= null ;
3785: Exception
3786: WHEN hr_application_error THEN
3787: -- the exception handled only when thge pqp raise the error with the msg
3788: IF hr_utility.get_message = 'BEN_94629_NO_ASG_ACTION_ID' THEN
3789: hr_utility.set_location( 'Current assignment has no Assignment Action id. ' ,-9999);
3790: g_err_num := 94629 ;
3791: g_err_name := 'BEN_94629_NO_ASG_ACTION_ID' ;
3792: g_elmt_name:= null ;
3793: raise detail_restart_error ;
3791: g_err_name := 'BEN_94629_NO_ASG_ACTION_ID' ;
3792: g_elmt_name:= null ;
3793: raise detail_restart_error ;
3794: else
3795: hr_utility.set_location( 'unknow exception raised in ben_ext_util.entries_affected.',-9999);
3796: raise; -- to re-raise the exception
3797: end if ;
3798: End ;
3799:
3796: raise; -- to re-raise the exception
3797: end if ;
3798: End ;
3799:
3800: hr_utility.set_location( 'number of result ' ||l_pay_detail_tab.count, 99 ) ;
3801: if l_pay_detail_tab.count > 0 then
3802:
3803: -- collect all the information onto a table for process for a person
3804: FOR l_pay IN l_pay_detail_tab.FIRST..l_pay_detail_tab.LAST
3803: -- collect all the information onto a table for process for a person
3804: FOR l_pay IN l_pay_detail_tab.FIRST..l_pay_detail_tab.LAST
3805: LOOP
3806:
3807: hr_utility.set_location(' insertining tot '|| l_pay_tot_Srno|| ' / ' ||
3808: l_pay_detail_tab(l_pay).column_name,99) ;
3809:
3810: l_pay_detail_tot_tab(l_pay_tot_Srno).dated_table_id := l_pay_detail_tab(l_pay).dated_table_id ;
3811: l_pay_detail_tot_tab(l_pay_tot_Srno).datetracked_event
3835: end if ;
3836: End loop ;
3837: -- if the value not already exist
3838: if l_g_c_found = 'N' then
3839: hr_utility.set_location('insertining GL '||l_pay_evt_srno||' / '||
3840: l_pay_detail_tab(l_pay).column_name,99) ;
3841: g_pay_evt_group_tab(l_pay_evt_srno).dated_table_id:=l_pay_detail_tab(l_pay).dated_table_id ;
3842: g_pay_evt_group_tab(l_pay_evt_srno).column_name := l_pay_detail_tab(l_pay).column_name ;
3843: g_pay_evt_group_tab(l_pay_evt_srno).event_group_id := i.event_group_id ;
3860: ben_ext_payroll_balance.sort_payroll_events
3861: (p_pay_events_tab => l_pay_detail_tot_tab ) ;
3862:
3863: -- process the collected nformation for a person
3864: hr_utility.set_location( 'number of sorted result ' ||g_pay_proc_evt_tab.count, 99 ) ;
3865: if g_pay_proc_evt_tab.count > 0 then
3866: FOR l_pay IN 1 .. g_pay_proc_evt_tab.count
3867: LOOP
3868: init_detail_globals;
3866: FOR l_pay IN 1 .. g_pay_proc_evt_tab.count
3867: LOOP
3868: init_detail_globals;
3869:
3870: hr_utility.set_location( ' column name ' ||g_pay_proc_evt_tab(l_pay).column_name
3871: ||' / '||g_pay_proc_evt_tab(l_pay).dated_table_id , 99 );
3872:
3873: l_dated_table_id := g_pay_proc_evt_tab(l_pay).dated_table_id ;
3874: g_chg_pay_column := g_pay_proc_evt_tab(l_pay).column_name ;
3882: g_chg_next_event_date := g_pay_proc_evt_tab(l_pay).next_evt_start_date ;
3883: g_chg_actl_dt := g_pay_proc_evt_tab(l_pay).actual_date ;
3884: g_chg_pay_evt_index := l_pay ;
3885:
3886: hr_utility.set_location(' pay chg index '||g_chg_pay_evt_index,99) ;
3887: hr_utility.set_location('date and end date '||g_person_id||'-'||g_chg_eff_dt||'/'||
3888: g_chg_next_event_date,99) ;
3889: g_chg_evt_source := 'PAY' ;
3890: ben_ext_util.get_ext_dates
3883: g_chg_actl_dt := g_pay_proc_evt_tab(l_pay).actual_date ;
3884: g_chg_pay_evt_index := l_pay ;
3885:
3886: hr_utility.set_location(' pay chg index '||g_chg_pay_evt_index,99) ;
3887: hr_utility.set_location('date and end date '||g_person_id||'-'||g_chg_eff_dt||'/'||
3888: g_chg_next_event_date,99) ;
3889: g_chg_evt_source := 'PAY' ;
3890: ben_ext_util.get_ext_dates
3891: (p_ext_dfn_id => p_ext_dfn_id,
3918: p_include => l_include);
3919: --
3920: end if; -- p_ext_crit_prfl_id is not null
3921: --
3922: hr_utility.set_location( ' Inclusion flag ' || l_include , 99 ) ;
3923: hr_utility.set_location( ' actual ' || g_chg_actl_dt , 99 ) ;
3924: hr_utility.set_location( ' efective ' || g_chg_eff_dt , 99 ) ;
3925:
3926: if l_include = 'Y' then
3919: --
3920: end if; -- p_ext_crit_prfl_id is not null
3921: --
3922: hr_utility.set_location( ' Inclusion flag ' || l_include , 99 ) ;
3923: hr_utility.set_location( ' actual ' || g_chg_actl_dt , 99 ) ;
3924: hr_utility.set_location( ' efective ' || g_chg_eff_dt , 99 ) ;
3925:
3926: if l_include = 'Y' then
3927: --
3920: end if; -- p_ext_crit_prfl_id is not null
3921: --
3922: hr_utility.set_location( ' Inclusion flag ' || l_include , 99 ) ;
3923: hr_utility.set_location( ' actual ' || g_chg_actl_dt , 99 ) ;
3924: hr_utility.set_location( ' efective ' || g_chg_eff_dt , 99 ) ;
3925:
3926: if l_include = 'Y' then
3927: --
3928:
3957: end if; -- l_include = 'Y'
3958: --
3959: if l_include = 'Y' THEN
3960: if g_debug then
3961: hr_utility.set_location(' Change Event Code ' || g_chg_evt_cd , 99 );
3962: end if;
3963: g_rcd_seq := 1;
3964: --
3965: if nvl(ben_extract.g_spcl_hndl_flag,'X') <> 'Y' then -- normal processing
4239: for l_cwb in c_cwb_extract
4240: Loop
4241: g_CWB_EFFECTIVE_DATE := l_cwb.effective_date ;
4242: g_CWB_LE_DT := l_cwb.LF_EVT_OCRD_DT ;
4243: hr_utility.set_location('cwb person ' || l_cwb.person_id , 99 ) ;
4244: ben_ext_util.get_ext_dates
4245: (p_ext_dfn_id => p_ext_dfn_id,
4246: p_data_typ_cd => p_data_typ_cd,
4247: p_effective_date => g_effective_date,
4569:
4570: END IF; -- extract type
4571:
4572: if g_debug then
4573: hr_utility.set_location('Exiting'||l_proc, 15);
4574: end if;
4575: --
4576: EXCEPTION
4577: --
4579: --
4580: ROLLBACK TO cur_transaction;
4581: l_err_message := ben_ext_fmt.get_error_msg(g_err_num,g_err_name,g_elmt_name ) ;
4582: if g_debug then
4583: hr_utility.set_location('err msg ' || l_err_message, 99.98 );
4584: end if;
4585: write_error(
4586: p_err_num => g_err_num,
4587: p_err_name => l_err_message,
4594:
4595: ROLLBACK TO cur_transaction;
4596: l_err_message := ben_ext_fmt.get_error_msg(g_err_num,g_err_name,g_elmt_name ) ;
4597: if g_debug then
4598: hr_utility.set_location('err msg ' || l_err_message, 99.98 );
4599: end if;
4600: write_error(
4601: p_err_num => g_err_num,
4602: p_err_name => l_err_message,
4693:
4694: --
4695: begin
4696: --
4697: g_debug := hr_utility.debug_enabled;
4698: if g_debug then
4699: l_proc := g_package||'process_ext_levels';
4700: hr_utility.set_location('Entering'||l_proc, 5);
4701: end if;
4696: --
4697: g_debug := hr_utility.debug_enabled;
4698: if g_debug then
4699: l_proc := g_package||'process_ext_levels';
4700: hr_utility.set_location('Entering'||l_proc, 5);
4701: end if;
4702: --
4703: -- Initialize rollback flag.
4704: --
4704: --
4705: l_rollback:=FALSE;
4706:
4707: if g_debug then
4708: hr_utility.set_location('ben_extract.g_per_lvl ' || ben_extract.g_per_lvl ,99 );
4709: end if;
4710: --
4711: IF ben_extract.g_per_lvl = 'Y' THEN
4712: --
4713: -- Process Personal Level Detail Records
4714: --
4715: --
4716: if g_debug then
4717: hr_utility.set_location(' ben_ext_fmt.process_ext_recs',99 );
4718: end if;
4719: ben_ext_fmt.process_ext_recs(p_ext_rslt_id => p_ext_rslt_id,
4720: p_ext_file_id => p_ext_file_id,
4721: p_data_typ_cd => p_data_typ_cd,
4742: IF (ben_extract.g_enrt_lvl = 'Y' OR ben_extract.g_dpnt_lvl = 'Y' OR ben_extract.g_bnf_lvl = 'Y' OR
4743: ben_extract.g_actn_lvl = 'Y' or ben_extract.g_prem_lvl = 'Y' ) THEN
4744: --
4745: if g_debug then
4746: hr_utility.set_location(' ben_ext_enrt.main',99 );
4747: end if;
4748: ben_ext_enrt.main(
4749: p_person_id => p_person_id,
4750: p_ext_rslt_id => p_ext_rslt_id,
4870:
4871: --- cwb
4872: if p_data_typ_cd = 'CW' THEN
4873:
4874: hr_utility.set_location( ' bdgt lvl ' || ben_extract.g_cwb_bdgt_lvl , 99 );
4875:
4876: if ben_extract.g_cwb_bdgt_lvl = 'Y' then
4877: ben_ext_cwb.extract_person_groups
4878: ( p_person_id => p_person_id,
4935: -- validate the mandatory for low level in sequenc
4936: FOR i in ben_extract.gtt_rcd_rqd_vals_seq.first .. ben_extract.gtt_rcd_rqd_vals_seq.last LOOP
4937: --
4938: If NOT ben_extract.gtt_rcd_rqd_vals_seq(i).rcd_found THEN
4939: hr_utility.set_location('Mandatory failed '||ben_extract.gtt_rcd_rqd_vals_seq(i).low_lvl_cd || ' '||
4940: ben_extract.gtt_rcd_rqd_vals_seq(i).seq_num , 15);
4941: l_rollback := TRUE; -- raise required_error;
4942: end if ;
4943: if ben_extract.gtt_rcd_rqd_vals_seq(1).low_lvl_cd <> 'NOREQDRCD' then
4950: RAISE required_error;
4951: END IF;
4952: --
4953: if g_debug then
4954: hr_utility.set_location('Exiting'||l_proc, 15);
4955: end if;
4956: --
4957: --
4958: End process_ext_levels;
4969: --
4970: --
4971: begin
4972: --
4973: g_debug := hr_utility.debug_enabled;
4974: if g_debug then
4975: l_proc := g_package||'init_detail_globals';
4976: hr_utility.set_location('Entering'||l_proc, 5);
4977: end if;
4972: --
4973: g_debug := hr_utility.debug_enabled;
4974: if g_debug then
4975: l_proc := g_package||'init_detail_globals';
4976: hr_utility.set_location('Entering'||l_proc, 5);
4977: end if;
4978: --
4979: --
4980: -- personal (25)
5491: -- subheader
5492: g_group_elmt_value1 := null ;
5493: g_group_elmt_value2 := null ;
5494: if g_debug then
5495: hr_utility.set_location('Exiting'||l_proc, 15);
5496: end if;
5497: --
5498: End init_detail_globals;
5499: --
5517: --
5518: --
5519: begin
5520: --
5521: g_debug := hr_utility.debug_enabled;
5522: if g_debug then
5523: l_proc := g_package||'write_error';
5524: hr_utility.set_location('Entering'||l_proc, 5);
5525: hr_utility.set_location('error message ' || p_err_name,99.97);
5520: --
5521: g_debug := hr_utility.debug_enabled;
5522: if g_debug then
5523: l_proc := g_package||'write_error';
5524: hr_utility.set_location('Entering'||l_proc, 5);
5525: hr_utility.set_location('error message ' || p_err_name,99.97);
5526: end if;
5527: --
5528: open err_cnt_c;
5521: g_debug := hr_utility.debug_enabled;
5522: if g_debug then
5523: l_proc := g_package||'write_error';
5524: hr_utility.set_location('Entering'||l_proc, 5);
5525: hr_utility.set_location('error message ' || p_err_name,99.97);
5526: end if;
5527: --
5528: open err_cnt_c;
5529: fetch err_cnt_c into l_err_num;
5554: --
5555: end if;
5556: --
5557: if g_debug then
5558: hr_utility.set_location('Exiting'||l_proc, 15);
5559: end if;
5560: --
5561: end write_error;
5562: --