94: g_gre_tab num_tab;
95:
96:
97: /****************************************************************************
98: Name : HR_UTILITY_TRACE
99: Description : This procedure prints debug messages.
100: *****************************************************************************/
101: PROCEDURE HR_UTILITY_TRACE
102: (
97: /****************************************************************************
98: Name : HR_UTILITY_TRACE
99: Description : This procedure prints debug messages.
100: *****************************************************************************/
101: PROCEDURE HR_UTILITY_TRACE
102: (
103: P_TRC_DATA varchar2
104: ) AS
105: BEGIN
103: P_TRC_DATA varchar2
104: ) AS
105: BEGIN
106: IF g_debug THEN
107: hr_utility.trace(p_trc_data);
108: END IF;
109: END HR_UTILITY_TRACE;
110:
111:
105: BEGIN
106: IF g_debug THEN
107: hr_utility.trace(p_trc_data);
108: END IF;
109: END HR_UTILITY_TRACE;
110:
111:
112: /****************************************************************************
113: Name : PRINT_BLOB
197: ln_bus_grp_id number;
198: ln_legal_er number;
199: BEGIN
200: l_proc_name := g_proc_name || 'GET_START_DATE';
201: hr_utility_trace ('Entering '||l_proc_name);
202: hr_utility_trace ('p_trans_gre = '||p_trans_gre);
203:
204: OPEN csr_get_date_affl;
205: hr_utility_trace ('Fetching start date from last affiliation '||
198: ln_legal_er number;
199: BEGIN
200: l_proc_name := g_proc_name || 'GET_START_DATE';
201: hr_utility_trace ('Entering '||l_proc_name);
202: hr_utility_trace ('p_trans_gre = '||p_trans_gre);
203:
204: OPEN csr_get_date_affl;
205: hr_utility_trace ('Fetching start date from last affiliation '||
206: 'report run.');
201: hr_utility_trace ('Entering '||l_proc_name);
202: hr_utility_trace ('p_trans_gre = '||p_trans_gre);
203:
204: OPEN csr_get_date_affl;
205: hr_utility_trace ('Fetching start date from last affiliation '||
206: 'report run.');
207: FETCH csr_get_date_affl INTO l_start_date;
208: CLOSE csr_get_date_affl;
209:
207: FETCH csr_get_date_affl INTO l_start_date;
208: CLOSE csr_get_date_affl;
209:
210: IF l_start_date IS NULL THEN
211: hr_utility_trace ('Fetching start date from last DISPMAG run.');
212: OPEN csr_get_date_dispmag;
213: FETCH csr_get_date_dispmag INTO l_start_date;
214: CLOSE csr_get_date_dispmag;
215:
218: FETCH c_get_bus_grp_id INTO ln_bus_grp_id;
219: CLOSE c_get_bus_grp_id;
220: ln_legal_er := hr_mx_utility.get_legal_employer(ln_bus_grp_id,
221: p_trans_gre);
222: hr_utility_trace ('Fetching start date from legal employer.');
223: OPEN c_get_imp_date (ln_legal_er);
224: FETCH c_get_imp_date INTO l_start_date;
225: CLOSE c_get_imp_date;
226:
229: END IF;
230: END IF;
231: END IF;
232:
233: hr_utility_trace ('l_start_date = ' || l_start_date);
234: hr_utility_trace ('Leaving '||l_proc_name);
235:
236: RETURN (l_start_date);
237: END GET_START_DATE;
230: END IF;
231: END IF;
232:
233: hr_utility_trace ('l_start_date = ' || l_start_date);
234: hr_utility_trace ('Leaving '||l_proc_name);
235:
236: RETURN (l_start_date);
237: END GET_START_DATE;
238:
269: l_proc_name varchar2(100);
270: ln_gre_id number;
271: BEGIN
272: l_proc_name := g_proc_name || 'GET_PACT_INFO';
273: hr_utility_trace ('Entering '||l_proc_name);
274:
275: OPEN csr_get_pact_info;
276: FETCH csr_get_pact_info INTO p_trans_gre_id,
277: p_start_date,
288: g_gre_tab(ln_gre_id) := ln_gre_id;
289: END LOOP;
290: CLOSE csr_gre;
291:
292: hr_utility_trace ('Leaving '||l_proc_name);
293: END GET_PACT_INFO;
294:
295:
296: /************************************************************
350:
351: BEGIN
352: l_proc_name := g_proc_name || 'RANGE_CURSOR';
353:
354: hr_utility_trace ('Entering '||l_proc_name);
355: hr_utility_trace ('P_PAYROLL_ACTION_ID = '|| p_payroll_action_id);
356:
357: get_pact_info (p_payroll_action_id,
358: g_business_group,
351: BEGIN
352: l_proc_name := g_proc_name || 'RANGE_CURSOR';
353:
354: hr_utility_trace ('Entering '||l_proc_name);
355: hr_utility_trace ('P_PAYROLL_ACTION_ID = '|| p_payroll_action_id);
356:
357: get_pact_info (p_payroll_action_id,
358: g_business_group,
359: g_trans_gre_id,
380: AND org_information6 = '|| g_trans_gre_id ||'
381: OR organization_id = '||g_trans_gre_id||'))
382: AND :p_payroll_action_id > 0';
383:
384: hr_utility_trace ('Range cursor query : ' || p_sqlstr);
385: hr_utility_trace ('Leaving '||l_proc_name);
386:
387: END RANGE_CURSOR;
388:
381: OR organization_id = '||g_trans_gre_id||'))
382: AND :p_payroll_action_id > 0';
383:
384: hr_utility_trace ('Range cursor query : ' || p_sqlstr);
385: hr_utility_trace ('Leaving '||l_proc_name);
386:
387: END RANGE_CURSOR;
388:
389:
512: lv_primary_flag per_assignments_f.primary_flag%type;
513:
514: BEGIN
515: l_proc_name := g_proc_name || 'ACTION_CREATION';
516: hr_utility_trace ('Entering '||l_proc_name);
517: hr_utility_trace ('Parameters ....');
518: hr_utility_trace ('P_PAYROLL_ACTION_ID = '|| P_PAYROLL_ACTION_ID);
519: hr_utility_trace ('P_START_PERSON_ID = '|| P_START_PERSON_ID);
520: hr_utility_trace ('P_END_PERSON_ID = '|| P_END_PERSON_ID);
513:
514: BEGIN
515: l_proc_name := g_proc_name || 'ACTION_CREATION';
516: hr_utility_trace ('Entering '||l_proc_name);
517: hr_utility_trace ('Parameters ....');
518: hr_utility_trace ('P_PAYROLL_ACTION_ID = '|| P_PAYROLL_ACTION_ID);
519: hr_utility_trace ('P_START_PERSON_ID = '|| P_START_PERSON_ID);
520: hr_utility_trace ('P_END_PERSON_ID = '|| P_END_PERSON_ID);
521: hr_utility_trace ('P_CHUNK = '|| P_CHUNK);
514: BEGIN
515: l_proc_name := g_proc_name || 'ACTION_CREATION';
516: hr_utility_trace ('Entering '||l_proc_name);
517: hr_utility_trace ('Parameters ....');
518: hr_utility_trace ('P_PAYROLL_ACTION_ID = '|| P_PAYROLL_ACTION_ID);
519: hr_utility_trace ('P_START_PERSON_ID = '|| P_START_PERSON_ID);
520: hr_utility_trace ('P_END_PERSON_ID = '|| P_END_PERSON_ID);
521: hr_utility_trace ('P_CHUNK = '|| P_CHUNK);
522:
515: l_proc_name := g_proc_name || 'ACTION_CREATION';
516: hr_utility_trace ('Entering '||l_proc_name);
517: hr_utility_trace ('Parameters ....');
518: hr_utility_trace ('P_PAYROLL_ACTION_ID = '|| P_PAYROLL_ACTION_ID);
519: hr_utility_trace ('P_START_PERSON_ID = '|| P_START_PERSON_ID);
520: hr_utility_trace ('P_END_PERSON_ID = '|| P_END_PERSON_ID);
521: hr_utility_trace ('P_CHUNK = '|| P_CHUNK);
522:
523: IF g_business_group IS NULL THEN
516: hr_utility_trace ('Entering '||l_proc_name);
517: hr_utility_trace ('Parameters ....');
518: hr_utility_trace ('P_PAYROLL_ACTION_ID = '|| P_PAYROLL_ACTION_ID);
519: hr_utility_trace ('P_START_PERSON_ID = '|| P_START_PERSON_ID);
520: hr_utility_trace ('P_END_PERSON_ID = '|| P_END_PERSON_ID);
521: hr_utility_trace ('P_CHUNK = '|| P_CHUNK);
522:
523: IF g_business_group IS NULL THEN
524: get_pact_info (p_payroll_action_id,
517: hr_utility_trace ('Parameters ....');
518: hr_utility_trace ('P_PAYROLL_ACTION_ID = '|| P_PAYROLL_ACTION_ID);
519: hr_utility_trace ('P_START_PERSON_ID = '|| P_START_PERSON_ID);
520: hr_utility_trace ('P_END_PERSON_ID = '|| P_END_PERSON_ID);
521: hr_utility_trace ('P_CHUNK = '|| P_CHUNK);
522:
523: IF g_business_group IS NULL THEN
524: get_pact_info (p_payroll_action_id,
525: g_business_group,
537: p_report_qualifier => 'MX_SS_AFFL',
538: p_report_category => 'RT');
539:
540: IF lb_range_person_on THEN
541: hr_utility_trace ('Person ranges are ON');
542: OPEN c_affl_person_range;
543: ELSE
544: hr_utility_trace ('Person ranges are OFF');
545: OPEN c_affl_person;
540: IF lb_range_person_on THEN
541: hr_utility_trace ('Person ranges are ON');
542: OPEN c_affl_person_range;
543: ELSE
544: hr_utility_trace ('Person ranges are OFF');
545: OPEN c_affl_person;
546: END IF;
547:
548: LOOP
562: EXIT WHEN c_affl_person%NOTFOUND;
563: END IF;
564:
565: IF g_gre_tab.EXISTS(ln_tax_unit_id) THEN
566: hr_utility_trace ('-------------');
567: hr_utility_trace('Current person = '||ln_person_id);
568: hr_utility_trace('Previous person = '||ln_prev_person_id);
569:
570: IF (ln_person_id <> ln_prev_person_id) THEN
563: END IF;
564:
565: IF g_gre_tab.EXISTS(ln_tax_unit_id) THEN
566: hr_utility_trace ('-------------');
567: hr_utility_trace('Current person = '||ln_person_id);
568: hr_utility_trace('Previous person = '||ln_prev_person_id);
569:
570: IF (ln_person_id <> ln_prev_person_id) THEN
571: SELECT pay_assignment_actions_s.nextval
564:
565: IF g_gre_tab.EXISTS(ln_tax_unit_id) THEN
566: hr_utility_trace ('-------------');
567: hr_utility_trace('Current person = '||ln_person_id);
568: hr_utility_trace('Previous person = '||ln_prev_person_id);
569:
570: IF (ln_person_id <> ln_prev_person_id) THEN
571: SELECT pay_assignment_actions_s.nextval
572: INTO ln_affl_asg_act
571: SELECT pay_assignment_actions_s.nextval
572: INTO ln_affl_asg_act
573: FROM dual;
574:
575: hr_utility_trace('Creating affiliation report assignment action '||
576: ln_affl_asg_act);
577: hr_nonrun_asact.insact(ln_affl_asg_act,
578: ln_asg_id,
579: p_payroll_action_id,
583: 'U',
584: null);
585: ln_prev_person_id := ln_person_id;
586: ELSE
587: hr_utility_trace('Affiliation assignment action not created');
588: END IF;
589:
590:
591: -- Bug 5985804
591: -- Bug 5985804
592: IF (ln_prev_arch_asg_act <> ln_arch_asg_act) THEN
593: hr_nonrun_asact.insint (ln_affl_asg_act,
594: ln_arch_asg_act);
595: hr_utility_trace('SS archiver asg action '||ln_arch_asg_act||
596: ' locked by affiliation report asg action '||ln_affl_asg_act);
597: ln_prev_arch_asg_act := ln_arch_asg_act;
598: ELSE
599: hr_utility_trace ('SS archiver asg action '|| ln_arch_asg_act ||
595: hr_utility_trace('SS archiver asg action '||ln_arch_asg_act||
596: ' locked by affiliation report asg action '||ln_affl_asg_act);
597: ln_prev_arch_asg_act := ln_arch_asg_act;
598: ELSE
599: hr_utility_trace ('SS archiver asg action '|| ln_arch_asg_act ||
600: ' already locked by affiliation asg action '|| ln_affl_asg_act);
601: END IF;
602: END IF;
603: END LOOP;
607: ELSE
608: CLOSE c_affl_person;
609: END IF;
610:
611: hr_utility_trace ('Leaving '||l_proc_name);
612: EXCEPTION
613: WHEN OTHERS THEN
614: hr_utility_trace (SQLERRM);
615: RAISE;
610:
611: hr_utility_trace ('Leaving '||l_proc_name);
612: EXCEPTION
613: WHEN OTHERS THEN
614: hr_utility_trace (SQLERRM);
615: RAISE;
616: END ACTION_CREATION;
617:
618:
626: ) AS
627: l_proc_name VARCHAR2(100);
628: BEGIN
629: l_proc_name := g_proc_name || 'INIT';
630: hr_utility_trace ('Entering '||l_proc_name);
631:
632: get_pact_info (p_payroll_action_id,
633: g_business_group,
634: g_trans_gre_id,
634: g_trans_gre_id,
635: g_start_date,
636: g_end_date);
637:
638: hr_utility_trace ('Leaving '||l_proc_name);
639: END INIT;
640:
641:
642: /****************************************************************************
713: ln_term_idx NUMBER;
714: lv_hire_date pay_action_information.action_information2%TYPE;
715: BEGIN
716: l_proc_name := g_proc_name || 'PROCESS_TRANSACTIONS';
717: hr_utility_trace ('Entering '||l_proc_name);
718:
719: ln_prev_idw := -1;
720: ln_hire_idx := -1;
721: ln_term_idx := -1;
732: lv_gre_token := 'GRE';
733: END IF;
734:
735: WHILE ln_cntr IS NOT NULL LOOP
736: hr_utility_trace ('Transaction = '||
737: p_transactions(ln_cntr).tran_type||' ('||
738: p_transactions(ln_cntr).tran_date||')');
739: IF p_transactions(ln_cntr).tran_type = '08' THEN
740: IF ln_hire_idx <> -1 THEN
739: IF p_transactions(ln_cntr).tran_type = '08' THEN
740: IF ln_hire_idx <> -1 THEN
741: -- Eliminate current hire transaction if one 08 is already in.
742: p_transactions.DELETE(ln_cntr);
743: hr_utility_trace ('One hire transaction already exists. '||
744: 'Above hire transaction will not be reported.');
745: ELSE
746: lv_hire_date := p_transactions(ln_cntr).tran_date;
747: ln_hire_idx := ln_cntr;
749: ELSIF p_transactions(ln_cntr).tran_type = '07' THEN
750: IF p_transactions(ln_cntr).tran_date = lv_hire_date THEN
751: p_transactions.DELETE(ln_cntr);
752: lv_hire_date := 'NULL';
753: hr_utility_trace('This 07 transaction will be suppressed as '||
754: 'it was archived upon hire.');
755: ELSE
756: IF ln_prev_idw = -1 THEN
757: OPEN csr_prev_idw (lv_gre_token);
757: OPEN csr_prev_idw (lv_gre_token);
758: FETCH csr_prev_idw INTO ln_prev_idw;
759: CLOSE csr_prev_idw;
760: END IF;
761: hr_utility_trace('Previous IDW amount = '||ln_prev_idw);
762: hr_utility_trace('Current IDW amount = '||
763: p_transactions(ln_cntr).idw);
764: IF ln_prev_idw = p_transactions(ln_cntr).idw THEN
765: p_transactions.DELETE(ln_cntr);
758: FETCH csr_prev_idw INTO ln_prev_idw;
759: CLOSE csr_prev_idw;
760: END IF;
761: hr_utility_trace('Previous IDW amount = '||ln_prev_idw);
762: hr_utility_trace('Current IDW amount = '||
763: p_transactions(ln_cntr).idw);
764: IF ln_prev_idw = p_transactions(ln_cntr).idw THEN
765: p_transactions.DELETE(ln_cntr);
766: hr_utility_trace('No change in IDW. Transaction '||
762: hr_utility_trace('Current IDW amount = '||
763: p_transactions(ln_cntr).idw);
764: IF ln_prev_idw = p_transactions(ln_cntr).idw THEN
765: p_transactions.DELETE(ln_cntr);
766: hr_utility_trace('No change in IDW. Transaction '||
767: 'suppressed.');
768: ELSE
769: ln_prev_idw := p_transactions(ln_cntr).idw;
770: END IF;
774: ln_term_idx := p_transactions.NEXT(ln_cntr);
775: WHILE ln_term_idx IS NOT NULL LOOP
776: IF p_transactions(ln_term_idx).tran_type = '02' THEN
777: p_transactions.DELETE(ln_cntr);
778: hr_utility_trace('A termination transaction exists in '||
779: 'future. Above termination will not be reported.');
780: END IF;
781: ln_term_idx := p_transactions.NEXT(ln_term_idx);
782: END LOOP;
788: p_transactions.DELETE(ln_hire_idx);
789: EXIT WHEN ln_hire_idx = ln_cntr;
790: END LOOP;
791: ln_hire_idx := -1;
792: hr_utility_trace ('Person '||p_person_id||
793: ' hired and later terminated within the reporting period.');
794: END IF;
795: END IF;
796:
796:
797: ln_cntr := p_transactions.NEXT(ln_cntr);
798: END LOOP;
799:
800: hr_utility_trace ('------------------------');
801: ln_cntr := p_transactions.FIRST();
802: hr_utility_trace ('After transaction filtering, eligible ones are: -');
803: WHILE ln_cntr IS NOT NULL LOOP
804: hr_utility_trace ('Transaction = '||
798: END LOOP;
799:
800: hr_utility_trace ('------------------------');
801: ln_cntr := p_transactions.FIRST();
802: hr_utility_trace ('After transaction filtering, eligible ones are: -');
803: WHILE ln_cntr IS NOT NULL LOOP
804: hr_utility_trace ('Transaction = '||
805: p_transactions(ln_cntr).tran_type||' ('||
806: p_transactions(ln_cntr).tran_date||')');
800: hr_utility_trace ('------------------------');
801: ln_cntr := p_transactions.FIRST();
802: hr_utility_trace ('After transaction filtering, eligible ones are: -');
803: WHILE ln_cntr IS NOT NULL LOOP
804: hr_utility_trace ('Transaction = '||
805: p_transactions(ln_cntr).tran_type||' ('||
806: p_transactions(ln_cntr).tran_date||')');
807: ln_cntr := p_transactions.NEXT(ln_cntr);
808: END LOOP;
805: p_transactions(ln_cntr).tran_type||' ('||
806: p_transactions(ln_cntr).tran_date||')');
807: ln_cntr := p_transactions.NEXT(ln_cntr);
808: END LOOP;
809: hr_utility_trace ('------------------------');
810:
811: hr_utility_trace ('Leaving '||l_proc_name);
812: END PROCESS_TRANSACTIONS;
813:
807: ln_cntr := p_transactions.NEXT(ln_cntr);
808: END LOOP;
809: hr_utility_trace ('------------------------');
810:
811: hr_utility_trace ('Leaving '||l_proc_name);
812: END PROCESS_TRANSACTIONS;
813:
814:
815: /****************************************************************************
1003: ld_event_strt_date VARCHAR2 (30);
1004:
1005: BEGIN
1006: l_proc_name := g_proc_name || 'GENERATE_XML';
1007: hr_utility_trace ('Entering '||l_proc_name);
1008:
1009: ln_assignment_action_id := pay_magtape_generic.get_parameter_value
1010: ('TRANSFER_ACT_ID');
1011:
1008:
1009: ln_assignment_action_id := pay_magtape_generic.get_parameter_value
1010: ('TRANSFER_ACT_ID');
1011:
1012: hr_utility_trace ('Processing asg action '|| ln_assignment_action_id);
1013: hr_utility_trace ('g_start_date '|| g_start_date);
1014: hr_utility_trace ('g_end_date '|| g_end_date);
1015:
1016: ln_legal_er := hr_mx_utility.get_legal_employer(g_business_group,
1009: ln_assignment_action_id := pay_magtape_generic.get_parameter_value
1010: ('TRANSFER_ACT_ID');
1011:
1012: hr_utility_trace ('Processing asg action '|| ln_assignment_action_id);
1013: hr_utility_trace ('g_start_date '|| g_start_date);
1014: hr_utility_trace ('g_end_date '|| g_end_date);
1015:
1016: ln_legal_er := hr_mx_utility.get_legal_employer(g_business_group,
1017: g_trans_gre_id);
1010: ('TRANSFER_ACT_ID');
1011:
1012: hr_utility_trace ('Processing asg action '|| ln_assignment_action_id);
1013: hr_utility_trace ('g_start_date '|| g_start_date);
1014: hr_utility_trace ('g_end_date '|| g_end_date);
1015:
1016: ln_legal_er := hr_mx_utility.get_legal_employer(g_business_group,
1017: g_trans_gre_id);
1018:
1015:
1016: ln_legal_er := hr_mx_utility.get_legal_employer(g_business_group,
1017: g_trans_gre_id);
1018:
1019: hr_utility_trace ('Fetching start date from legal employer.'|| ln_legal_er);
1020: OPEN c_get_imp_date (ln_legal_er);
1021: FETCH c_get_imp_date INTO ld_imp_date;
1022: CLOSE c_get_imp_date;
1023: hr_utility_trace ('ld_imp_date '|| ld_imp_date);
1019: hr_utility_trace ('Fetching start date from legal employer.'|| ln_legal_er);
1020: OPEN c_get_imp_date (ln_legal_er);
1021: FETCH c_get_imp_date INTO ld_imp_date;
1022: CLOSE c_get_imp_date;
1023: hr_utility_trace ('ld_imp_date '|| ld_imp_date);
1024:
1025: SELECT fnd_date.date_to_canonical(MIN(creation_date))
1026: INTO ld_event_strt_date
1027: FROM pay_process_events ppe
1035: IF fnd_date.canonical_to_date(ld_event_strt_date) >= fnd_date.canonical_to_date(NVL(ld_imp_date,ld_event_strt_date)) THEN
1036: ld_imp_date := ld_event_strt_date;
1037: END IF;
1038:
1039: hr_utility_trace ('ld_event_strt_date '|| ld_event_strt_date);
1040: hr_utility_trace ('ld_imp_date '|| ld_imp_date);
1041:
1042: IF ld_imp_date IS NULL THEN
1043: ld_imp_date := pay_mx_utility.get_default_imp_date;
1036: ld_imp_date := ld_event_strt_date;
1037: END IF;
1038:
1039: hr_utility_trace ('ld_event_strt_date '|| ld_event_strt_date);
1040: hr_utility_trace ('ld_imp_date '|| ld_imp_date);
1041:
1042: IF ld_imp_date IS NULL THEN
1043: ld_imp_date := pay_mx_utility.get_default_imp_date;
1044: END IF;
1041:
1042: IF ld_imp_date IS NULL THEN
1043: ld_imp_date := pay_mx_utility.get_default_imp_date;
1044: END IF;
1045: hr_utility_trace ('Actual Implementation Date is : '|| ld_imp_date);
1046:
1047: OPEN csr_person (ln_assignment_action_id);
1048: FETCH csr_person INTO ln_person_id;
1049: CLOSE csr_person;
1053: LOOP
1054: FETCH csr_asg_actions INTO ln_per_asg_action,
1055: ld_process_date;
1056: EXIT WHEN csr_asg_actions%NOTFOUND OR ln_person_id IS NOT NULL;
1057: hr_utility_trace(
1058: 'Attempting to fetch person info locked by affiliation asg action '||
1059: ln_per_asg_action);*/
1060: OPEN get_emp_details (ln_person_id);
1061: --OPEN get_emp_details (ln_per_asg_action);
1077: lv_hire_date IS NULL OR
1078: NVL(ln_idw, 0) <= 0 OR
1079: lv_salary_type IS NULL) AND
1080: ln_person_id IS NOT NULL THEN
1081: hr_utility_trace ('Person ID '|| ln_person_id ||' identified as '||
1082: 'exception record. No transactions will be picked for this person.');
1083: lt_act_info_id_per_exc (lt_act_info_id_per_exc.COUNT()) :=
1084: ln_act_info_id;
1085: ELSIF ln_person_id IS NOT NULL THEN
1096: ln_idw,
1097: lv_leaving_reason;
1098: EXIT WHEN csr_transactions%NOTFOUND;
1099:
1100: hr_utility_trace ('Transaction type = '||lv_tran_type||'('||
1101: lv_tran_dt||')');
1102: IF lv_tran_dt IS NULL OR
1103: lv_ee_ssn IS NULL OR
1104: lv_er_ssid IS NULL OR
1103: lv_ee_ssn IS NULL OR
1104: lv_er_ssid IS NULL OR
1105: (lv_tran_type = '02' AND
1106: lv_leaving_reason IS NULL) THEN
1107: hr_utility_trace ('Action Information ID '||ln_act_info_id||
1108: ' identified as exception transaction.');
1109: lt_act_info_id_tran_exc (lt_act_info_id_tran_exc.COUNT()) :=
1110: ln_act_info_id;
1111: ELSE
1135:
1136: IF lt_act_info_id.count() = 0 AND
1137: lt_act_info_id_tran_exc.count() = 0 AND
1138: lt_act_info_id_per_exc.count() = 0 THEN
1139: hr_utility_trace ('Nothing to write to XML BLOB.');
1140: ELSE
1141: pay_payroll_xml_extract_pkg.generate(lt_act_info_id,
1142: NULL,
1143: g_document_type,
1143: g_document_type,
1144: l_xml);
1145: write_to_magtape_lob (l_xml);
1146:
1147: hr_utility_trace ('Attempting to generate XML for transaction exceptions.');
1148: pay_payroll_xml_extract_pkg.generate(lt_act_info_id_tran_exc,
1149: 'TRANS_EXCEPTION',
1150: g_document_type,
1151: l_xml);
1150: g_document_type,
1151: l_xml);
1152: write_to_magtape_lob (l_xml);
1153:
1154: hr_utility_trace ('Attempting to generate XML for person exceptions.');
1155: pay_payroll_xml_extract_pkg.generate(lt_act_info_id_per_exc,
1156: 'PERSON_EXCEPTION',
1157: g_document_type,
1158: l_xml);
1158: l_xml);
1159: write_to_magtape_lob (l_xml);
1160: END IF;
1161:
1162: hr_utility_trace ('Leaving '||l_proc_name);
1163: EXCEPTION
1164: WHEN OTHERS THEN
1165: hr_utility_trace (SQLERRM);
1166: RAISE;
1161:
1162: hr_utility_trace ('Leaving '||l_proc_name);
1163: EXCEPTION
1164: WHEN OTHERS THEN
1165: hr_utility_trace (SQLERRM);
1166: RAISE;
1167: END GENERATE_XML;
1168:
1169:
1175: l_proc_name varchar2(100);
1176: lv_buf varchar2(2000);
1177: BEGIN
1178: l_proc_name := g_proc_name || 'GEN_XML_HEADER';
1179: hr_utility_trace ('Entering '||l_proc_name);
1180:
1181: hr_utility_trace ('Root XML tag = '||
1182: pay_magtape_generic.get_parameter_value('ROOT_XML_TAG'));
1183:
1177: BEGIN
1178: l_proc_name := g_proc_name || 'GEN_XML_HEADER';
1179: hr_utility_trace ('Entering '||l_proc_name);
1180:
1181: hr_utility_trace ('Root XML tag = '||
1182: pay_magtape_generic.get_parameter_value('ROOT_XML_TAG'));
1183:
1184: lv_buf := pay_magtape_generic.get_parameter_value('ROOT_XML_TAG');
1185:
1184: lv_buf := pay_magtape_generic.get_parameter_value('ROOT_XML_TAG');
1185:
1186: write_to_magtape_lob (lv_buf);
1187:
1188: hr_utility_trace ('BLOB contents after appending header information');
1189: print_blob (pay_mag_tape.g_blob_value);
1190:
1191: hr_utility_trace ('Leaving '||l_proc_name);
1192: END GEN_XML_HEADER;
1187:
1188: hr_utility_trace ('BLOB contents after appending header information');
1189: print_blob (pay_mag_tape.g_blob_value);
1190:
1191: hr_utility_trace ('Leaving '||l_proc_name);
1192: END GEN_XML_HEADER;
1193:
1194:
1195: /****************************************************************************
1220: l_xml BLOB;
1221: lt_act_info_id pay_payroll_xml_extract_pkg.int_tab_type;
1222: BEGIN
1223: l_proc_name := g_proc_name || 'GEN_XML_FOOTER';
1224: hr_utility_trace ('Entering '||l_proc_name);
1225:
1226: OPEN csr_employer;
1227: FETCH csr_employer INTO lt_act_info_id(lt_act_info_id.count());
1228: CLOSE csr_employer;
1238: 2);
1239:
1240: write_to_magtape_lob (lv_buf);
1241:
1242: hr_utility_trace ('BLOB contents after appending footer information');
1243: print_blob (pay_mag_tape.g_blob_value);
1244:
1245: hr_utility_trace ('Leaving '||l_proc_name);
1246: END GEN_XML_FOOTER;
1241:
1242: hr_utility_trace ('BLOB contents after appending footer information');
1243: print_blob (pay_mag_tape.g_blob_value);
1244:
1245: hr_utility_trace ('Leaving '||l_proc_name);
1246: END GEN_XML_FOOTER;
1247:
1248: BEGIN
1249: --hr_utility.trace_on(null, 'MX_IDC');
1245: hr_utility_trace ('Leaving '||l_proc_name);
1246: END GEN_XML_FOOTER;
1247:
1248: BEGIN
1249: --hr_utility.trace_on(null, 'MX_IDC');
1250: g_proc_name := 'PER_MX_SS_AFFILIATION.';
1251: g_debug := hr_utility.debug_enabled;
1252: g_document_type := 'MX_SS_AFFL';
1253: END PER_MX_SS_AFFILIATION;
1247:
1248: BEGIN
1249: --hr_utility.trace_on(null, 'MX_IDC');
1250: g_proc_name := 'PER_MX_SS_AFFILIATION.';
1251: g_debug := hr_utility.debug_enabled;
1252: g_document_type := 'MX_SS_AFFL';
1253: END PER_MX_SS_AFFILIATION;