39: g_debug boolean;
40: g_document_type varchar2(50);
41:
42: /****************************************************************************
43: Name : HR_UTILITY_TRACE
44: Description : This procedure prints debug messages.
45: *****************************************************************************/
46:
47: PROCEDURE HR_UTILITY_TRACE
43: Name : HR_UTILITY_TRACE
44: Description : This procedure prints debug messages.
45: *****************************************************************************/
46:
47: PROCEDURE HR_UTILITY_TRACE
48: (
49: P_TRC_DATA varchar2
50: ) AS
51: BEGIN
49: P_TRC_DATA varchar2
50: ) AS
51: BEGIN
52: IF g_debug THEN
53: hr_utility.trace(p_trc_data);
54: END IF;
55: END HR_UTILITY_TRACE;
56:
57: /*
51: BEGIN
52: IF g_debug THEN
53: hr_utility.trace(p_trc_data);
54: END IF;
55: END HR_UTILITY_TRACE;
56:
57: /*
58: -------------------------------------------------------------------------------------------------------
59: -- Name : bal_db_item
80: AND UE.legislation_code = 'US';
81:
82: l_defined_balance_id pay_defined_balances.defined_balance_id%TYPE;
83: BEGIN
84: hr_utility.set_location
85: ('pay_us_mmref_local_xml.bal_db_item - opening cursor', 10);
86: -- Open the cursor
87: OPEN csr_defined_balance;
88: -- Fetch the value
89: FETCH csr_defined_balance
90: INTO l_defined_balance_id;
91: IF csr_defined_balance%NOTFOUND THEN
92: CLOSE csr_defined_balance;
93: hr_utility.set_location
94: ('pay_us_mmref_local_xml.bal_db_item - no rows found from cursor', 20);
95: hr_utility.raise_error;
96: ELSE
97: hr_utility.set_location
91: IF csr_defined_balance%NOTFOUND THEN
92: CLOSE csr_defined_balance;
93: hr_utility.set_location
94: ('pay_us_mmref_local_xml.bal_db_item - no rows found from cursor', 20);
95: hr_utility.raise_error;
96: ELSE
97: hr_utility.set_location
98: ('pay_us_mmref_local_xml.bal_db_item - fetched from cursor', 30);
99: CLOSE csr_defined_balance;
93: hr_utility.set_location
94: ('pay_us_mmref_local_xml.bal_db_item - no rows found from cursor', 20);
95: hr_utility.raise_error;
96: ELSE
97: hr_utility.set_location
98: ('pay_us_mmref_local_xml.bal_db_item - fetched from cursor', 30);
99: CLOSE csr_defined_balance;
100: END IF;
101: -- Return the value to the call
132: p_locality_code IN OUT NOCOPY VARCHAR2
133: ) IS
134: l_state_code varchar2(200);
135: BEGIN
136: hr_utility.set_location
137: ('pay_us_mmref_local_xml.get_report_parameters', 10);
138: hr_utility.trace('Payroll_Action_Id '|| to_char(p_pactid));
139: SELECT ppa.start_date,
140: ppa.effective_date,
134: l_state_code varchar2(200);
135: BEGIN
136: hr_utility.set_location
137: ('pay_us_mmref_local_xml.get_report_parameters', 10);
138: hr_utility.trace('Payroll_Action_Id '|| to_char(p_pactid));
139: SELECT ppa.start_date,
140: ppa.effective_date,
141: ppa.business_group_id,
142: pay_us_get_item_data_pkg.GET_CPROG_PARAMETER_VALUE(ppa.payroll_action_id,
163: if p_locality_code = 'NULL' then
164: p_locality_code := l_state_code||'000-0000';
165: end if;
166: */
167: hr_utility.set_location('pay_us_mmref_local_xml.get_report_parameters', 15);
168: hr_utility.trace('Parameter Values ');
169: hr_utility.trace('Year Start '|| to_char(p_year_start,'dd-mon-yyyy'));
170: hr_utility.trace('Year End '|| to_char(p_year_end,'dd-mon-yyyy'));
171: hr_utility.trace('Business Group Id '|| to_char(p_business_group_id));
164: p_locality_code := l_state_code||'000-0000';
165: end if;
166: */
167: hr_utility.set_location('pay_us_mmref_local_xml.get_report_parameters', 15);
168: hr_utility.trace('Parameter Values ');
169: hr_utility.trace('Year Start '|| to_char(p_year_start,'dd-mon-yyyy'));
170: hr_utility.trace('Year End '|| to_char(p_year_end,'dd-mon-yyyy'));
171: hr_utility.trace('Business Group Id '|| to_char(p_business_group_id));
172: hr_utility.trace('p_state_abbrev '|| p_state_abbrev);
165: end if;
166: */
167: hr_utility.set_location('pay_us_mmref_local_xml.get_report_parameters', 15);
168: hr_utility.trace('Parameter Values ');
169: hr_utility.trace('Year Start '|| to_char(p_year_start,'dd-mon-yyyy'));
170: hr_utility.trace('Year End '|| to_char(p_year_end,'dd-mon-yyyy'));
171: hr_utility.trace('Business Group Id '|| to_char(p_business_group_id));
172: hr_utility.trace('p_state_abbrev '|| p_state_abbrev);
173: hr_utility.trace('p_state_code '|| p_state_code);
166: */
167: hr_utility.set_location('pay_us_mmref_local_xml.get_report_parameters', 15);
168: hr_utility.trace('Parameter Values ');
169: hr_utility.trace('Year Start '|| to_char(p_year_start,'dd-mon-yyyy'));
170: hr_utility.trace('Year End '|| to_char(p_year_end,'dd-mon-yyyy'));
171: hr_utility.trace('Business Group Id '|| to_char(p_business_group_id));
172: hr_utility.trace('p_state_abbrev '|| p_state_abbrev);
173: hr_utility.trace('p_state_code '|| p_state_code);
174: hr_utility.trace('p_report_type '|| p_report_type);
167: hr_utility.set_location('pay_us_mmref_local_xml.get_report_parameters', 15);
168: hr_utility.trace('Parameter Values ');
169: hr_utility.trace('Year Start '|| to_char(p_year_start,'dd-mon-yyyy'));
170: hr_utility.trace('Year End '|| to_char(p_year_end,'dd-mon-yyyy'));
171: hr_utility.trace('Business Group Id '|| to_char(p_business_group_id));
172: hr_utility.trace('p_state_abbrev '|| p_state_abbrev);
173: hr_utility.trace('p_state_code '|| p_state_code);
174: hr_utility.trace('p_report_type '|| p_report_type);
175: hr_utility.trace('p_locality_code '|| p_locality_code);
168: hr_utility.trace('Parameter Values ');
169: hr_utility.trace('Year Start '|| to_char(p_year_start,'dd-mon-yyyy'));
170: hr_utility.trace('Year End '|| to_char(p_year_end,'dd-mon-yyyy'));
171: hr_utility.trace('Business Group Id '|| to_char(p_business_group_id));
172: hr_utility.trace('p_state_abbrev '|| p_state_abbrev);
173: hr_utility.trace('p_state_code '|| p_state_code);
174: hr_utility.trace('p_report_type '|| p_report_type);
175: hr_utility.trace('p_locality_code '|| p_locality_code);
176: hr_utility.set_location
169: hr_utility.trace('Year Start '|| to_char(p_year_start,'dd-mon-yyyy'));
170: hr_utility.trace('Year End '|| to_char(p_year_end,'dd-mon-yyyy'));
171: hr_utility.trace('Business Group Id '|| to_char(p_business_group_id));
172: hr_utility.trace('p_state_abbrev '|| p_state_abbrev);
173: hr_utility.trace('p_state_code '|| p_state_code);
174: hr_utility.trace('p_report_type '|| p_report_type);
175: hr_utility.trace('p_locality_code '|| p_locality_code);
176: hr_utility.set_location
177: ('pay_us_mmref_local_xml.get_report_parameters', 40);
170: hr_utility.trace('Year End '|| to_char(p_year_end,'dd-mon-yyyy'));
171: hr_utility.trace('Business Group Id '|| to_char(p_business_group_id));
172: hr_utility.trace('p_state_abbrev '|| p_state_abbrev);
173: hr_utility.trace('p_state_code '|| p_state_code);
174: hr_utility.trace('p_report_type '|| p_report_type);
175: hr_utility.trace('p_locality_code '|| p_locality_code);
176: hr_utility.set_location
177: ('pay_us_mmref_local_xml.get_report_parameters', 40);
178: EXCEPTION
171: hr_utility.trace('Business Group Id '|| to_char(p_business_group_id));
172: hr_utility.trace('p_state_abbrev '|| p_state_abbrev);
173: hr_utility.trace('p_state_code '|| p_state_code);
174: hr_utility.trace('p_report_type '|| p_report_type);
175: hr_utility.trace('p_locality_code '|| p_locality_code);
176: hr_utility.set_location
177: ('pay_us_mmref_local_xml.get_report_parameters', 40);
178: EXCEPTION
179: WHEN OTHERS THEN
172: hr_utility.trace('p_state_abbrev '|| p_state_abbrev);
173: hr_utility.trace('p_state_code '|| p_state_code);
174: hr_utility.trace('p_report_type '|| p_report_type);
175: hr_utility.trace('p_locality_code '|| p_locality_code);
176: hr_utility.set_location
177: ('pay_us_mmref_local_xml.get_report_parameters', 40);
178: EXCEPTION
179: WHEN OTHERS THEN
180: hr_utility.trace('get_report_parameters procedure Raised Exception ');
176: hr_utility.set_location
177: ('pay_us_mmref_local_xml.get_report_parameters', 40);
178: EXCEPTION
179: WHEN OTHERS THEN
180: hr_utility.trace('get_report_parameters procedure Raised Exception ');
181: hr_utility.trace('ERROR '||substr(SQLERRM,1,40));
182: hr_utility.trace(substr(SQLERRM,41,90));
183: END get_report_parameters;
184:
177: ('pay_us_mmref_local_xml.get_report_parameters', 40);
178: EXCEPTION
179: WHEN OTHERS THEN
180: hr_utility.trace('get_report_parameters procedure Raised Exception ');
181: hr_utility.trace('ERROR '||substr(SQLERRM,1,40));
182: hr_utility.trace(substr(SQLERRM,41,90));
183: END get_report_parameters;
184:
185: -------------------------------------------------------------------------
178: EXCEPTION
179: WHEN OTHERS THEN
180: hr_utility.trace('get_report_parameters procedure Raised Exception ');
181: hr_utility.trace('ERROR '||substr(SQLERRM,1,40));
182: hr_utility.trace(substr(SQLERRM,41,90));
183: END get_report_parameters;
184:
185: -------------------------------------------------------------------------
186: -- Name : get_balance_value
206: p_effective_date DATE
207: ) RETURN NUMBER IS
208: l_jurisdiction_code VARCHAR2(20);
209: BEGIN
210: hr_utility.set_location
211: ('pay_us_mmref_local_xml.get_balance_value', 10);
212: pay_balance_pkg.set_context('TAX_UNIT_ID', p_tax_unit_id);
213: IF p_state_abbrev <> 'FED' THEN
214: SELECT jurisdiction_code
214: SELECT jurisdiction_code
215: INTO l_jurisdiction_code
216: FROM pay_state_rules
217: WHERE state_code = p_state_abbrev;
218: hr_utility.set_location
219: ('pay_us_mmref_local_xml.get_balance_value', 15);
220: pay_balance_pkg.set_context('JURISDICTION_CODE', l_jurisdiction_code);
221: END IF;
222: hr_utility.trace(p_balance_name);
218: hr_utility.set_location
219: ('pay_us_mmref_local_xml.get_balance_value', 15);
220: pay_balance_pkg.set_context('JURISDICTION_CODE', l_jurisdiction_code);
221: END IF;
222: hr_utility.trace(p_balance_name);
223: hr_utility.trace('Context');
224: hr_utility.trace('Tax Unit Id: '|| p_tax_unit_id);
225: hr_utility.trace('Jurisdiction: '|| l_jurisdiction_code);
226: hr_utility.set_location
219: ('pay_us_mmref_local_xml.get_balance_value', 15);
220: pay_balance_pkg.set_context('JURISDICTION_CODE', l_jurisdiction_code);
221: END IF;
222: hr_utility.trace(p_balance_name);
223: hr_utility.trace('Context');
224: hr_utility.trace('Tax Unit Id: '|| p_tax_unit_id);
225: hr_utility.trace('Jurisdiction: '|| l_jurisdiction_code);
226: hr_utility.set_location
227: ('pay_us_mmref_local_xml.get_balance_value', 20);
220: pay_balance_pkg.set_context('JURISDICTION_CODE', l_jurisdiction_code);
221: END IF;
222: hr_utility.trace(p_balance_name);
223: hr_utility.trace('Context');
224: hr_utility.trace('Tax Unit Id: '|| p_tax_unit_id);
225: hr_utility.trace('Jurisdiction: '|| l_jurisdiction_code);
226: hr_utility.set_location
227: ('pay_us_mmref_local_xml.get_balance_value', 20);
228: RETURN pay_balance_pkg.get_value(bal_db_item(p_balance_name),
221: END IF;
222: hr_utility.trace(p_balance_name);
223: hr_utility.trace('Context');
224: hr_utility.trace('Tax Unit Id: '|| p_tax_unit_id);
225: hr_utility.trace('Jurisdiction: '|| l_jurisdiction_code);
226: hr_utility.set_location
227: ('pay_us_mmref_local_xml.get_balance_value', 20);
228: RETURN pay_balance_pkg.get_value(bal_db_item(p_balance_name),
229: p_assignment_id,
222: hr_utility.trace(p_balance_name);
223: hr_utility.trace('Context');
224: hr_utility.trace('Tax Unit Id: '|| p_tax_unit_id);
225: hr_utility.trace('Jurisdiction: '|| l_jurisdiction_code);
226: hr_utility.set_location
227: ('pay_us_mmref_local_xml.get_balance_value', 20);
228: RETURN pay_balance_pkg.get_value(bal_db_item(p_balance_name),
229: p_assignment_id,
230: p_effective_date);
252: p_state_code VARCHAR2(200);
253: p_report_type VARCHAR2(200);
254: p_locality_code VARCHAR2(200);
255: BEGIN
256: -- hr_utility.trace_on(null,'LOCALXML');
257: hr_utility.set_location( 'pay_us_mmref_local_xml.range_cursor', 10);
258:
259: get_report_parameters( p_pactid,
260: p_year_start,
253: p_report_type VARCHAR2(200);
254: p_locality_code VARCHAR2(200);
255: BEGIN
256: -- hr_utility.trace_on(null,'LOCALXML');
257: hr_utility.set_location( 'pay_us_mmref_local_xml.range_cursor', 10);
258:
259: get_report_parameters( p_pactid,
260: p_year_start,
261: p_year_end,
264: p_report_type,
265: p_business_group_id,
266: p_locality_code
267: );
268: hr_utility.set_location( 'pay_us_mmref_local_xml.range_cursor', 20);
269:
270:
271: IF p_report_type = 'W2_MAG_XML' THEN
272: p_sqlstr := '
314: WHERE hoi.organization_id = paa.tax_unit_id
315: AND hoi.org_information_context = ''1099R Magnetic Report Rules''
316: )
317: ORDER BY to_number(paa.serial_number)';
318: hr_utility.set_location( 'pay_us_mmref_local_xml.range_cursor', 40);
319: END IF;
320: hr_utility.trace( substr(p_sqlstr,1, 50));
321: hr_utility.set_location( 'pay_us_mmref_local_xml.range_cursor', 50);
322: END range_cursor;
316: )
317: ORDER BY to_number(paa.serial_number)';
318: hr_utility.set_location( 'pay_us_mmref_local_xml.range_cursor', 40);
319: END IF;
320: hr_utility.trace( substr(p_sqlstr,1, 50));
321: hr_utility.set_location( 'pay_us_mmref_local_xml.range_cursor', 50);
322: END range_cursor;
323: --
324:
317: ORDER BY to_number(paa.serial_number)';
318: hr_utility.set_location( 'pay_us_mmref_local_xml.range_cursor', 40);
319: END IF;
320: hr_utility.trace( substr(p_sqlstr,1, 50));
321: hr_utility.set_location( 'pay_us_mmref_local_xml.range_cursor', 50);
322: END range_cursor;
323: --
324:
325: /****************************************************************************
440: l_gre_id := -1;
441: l_error_flag := 'N';
442:
443: -- Get the report parameters. These define the report being run.
444: hr_utility.set_location( 'pay_us_mmref_local_xml.create_assignement_act', 10);
445: get_report_parameters( p_pactid,
446: l_year_start,
447: l_year_end,
448: l_state_abbrev,
457:
458: --Currently all reports group by GRE
459: l_group_by_gre := TRUE;
460: --Open the appropriate cursor
461: hr_utility.set_location( 'pay_us_mmref_local_xml.create_assignement_act', 20);
462: hr_utility.trace('LOCALITY_CODE : '|| l_locality_code);
463: IF l_report_type = 'W2_MAG_XML' THEN
464: OPEN c_local(l_state_code,
465: l_locality_code);
458: --Currently all reports group by GRE
459: l_group_by_gre := TRUE;
460: --Open the appropriate cursor
461: hr_utility.set_location( 'pay_us_mmref_local_xml.create_assignement_act', 20);
462: hr_utility.trace('LOCALITY_CODE : '|| l_locality_code);
463: IF l_report_type = 'W2_MAG_XML' THEN
464: OPEN c_local(l_state_code,
465: l_locality_code);
466: END IF;
470: l_tax_unit_id,
471: l_effective_end_date,
472: l_assignment_action_id,
473: l_w2_box17;
474: hr_utility.set_location(
475: 'pay_us_mmref_local_xml.create_assignement_act', 40);
476: EXIT WHEN c_local%NOTFOUND;
477: --Based on the groupin criteria, check if the record is the same
478: --as the previous record.
488: )
489: ) THEN
490: --{
491: --Do Nothing
492: hr_utility.set_location(
493: 'pay_us_mmref_local_xml.create_assignement_act', 50);
494: NULL;
495: --}
496: ELSE
495: --}
496: ELSE
497: --{
498: --Create the assignment action for the record
499: hr_utility.trace('Assignment Fetched - ');
500: hr_utility.trace('Assignment Id : '|| to_char(l_assignment_id));
501: hr_utility.trace('Person Id : '|| to_char(l_person_id));
502: hr_utility.trace('tax unit id : '|| to_char(l_tax_unit_id));
503: hr_utility.trace('Effective End Date : '|| to_char(l_effective_end_date));
496: ELSE
497: --{
498: --Create the assignment action for the record
499: hr_utility.trace('Assignment Fetched - ');
500: hr_utility.trace('Assignment Id : '|| to_char(l_assignment_id));
501: hr_utility.trace('Person Id : '|| to_char(l_person_id));
502: hr_utility.trace('tax unit id : '|| to_char(l_tax_unit_id));
503: hr_utility.trace('Effective End Date : '|| to_char(l_effective_end_date));
504: IF (l_report_type = 'W2_MAG_XML') then
497: --{
498: --Create the assignment action for the record
499: hr_utility.trace('Assignment Fetched - ');
500: hr_utility.trace('Assignment Id : '|| to_char(l_assignment_id));
501: hr_utility.trace('Person Id : '|| to_char(l_person_id));
502: hr_utility.trace('tax unit id : '|| to_char(l_tax_unit_id));
503: hr_utility.trace('Effective End Date : '|| to_char(l_effective_end_date));
504: IF (l_report_type = 'W2_MAG_XML') then
505: SELECT pay_assignment_actions_s.nextval
498: --Create the assignment action for the record
499: hr_utility.trace('Assignment Fetched - ');
500: hr_utility.trace('Assignment Id : '|| to_char(l_assignment_id));
501: hr_utility.trace('Person Id : '|| to_char(l_person_id));
502: hr_utility.trace('tax unit id : '|| to_char(l_tax_unit_id));
503: hr_utility.trace('Effective End Date : '|| to_char(l_effective_end_date));
504: IF (l_report_type = 'W2_MAG_XML') then
505: SELECT pay_assignment_actions_s.nextval
506: INTO lockingactid
499: hr_utility.trace('Assignment Fetched - ');
500: hr_utility.trace('Assignment Id : '|| to_char(l_assignment_id));
501: hr_utility.trace('Person Id : '|| to_char(l_person_id));
502: hr_utility.trace('tax unit id : '|| to_char(l_tax_unit_id));
503: hr_utility.trace('Effective End Date : '|| to_char(l_effective_end_date));
504: IF (l_report_type = 'W2_MAG_XML') then
505: SELECT pay_assignment_actions_s.nextval
506: INTO lockingactid
507: FROM dual;
504: IF (l_report_type = 'W2_MAG_XML') then
505: SELECT pay_assignment_actions_s.nextval
506: INTO lockingactid
507: FROM dual;
508: hr_utility.set_location(
509: 'pay_us_mmref_local_xml.create_assignement_act', 60);
510: hr_nonrun_asact.insact( lockingactid,
511: l_assignment_id,
512: p_pactid,
511: l_assignment_id,
512: p_pactid,
513: p_chunk,
514: l_tax_unit_id);
515: hr_utility.set_location(
516: 'pay_us_mmref_local_xml.create_assignement_act', 70);
517: hr_nonrun_asact.insint(lockingactid,
518: l_assignment_action_id);
519: hr_utility.set_location(
515: hr_utility.set_location(
516: 'pay_us_mmref_local_xml.create_assignement_act', 70);
517: hr_nonrun_asact.insint(lockingactid,
518: l_assignment_action_id);
519: hr_utility.set_location(
520: 'pay_us_mmref_local_xml.create_assignement_act', 80);
521: hr_utility.trace('Interlock Created - ');
522: hr_utility.trace('Locking Action : '|| to_char(lockingactid));
523: hr_utility.trace('Locked Action : '|| to_char(l_assignment_action_id));
517: hr_nonrun_asact.insint(lockingactid,
518: l_assignment_action_id);
519: hr_utility.set_location(
520: 'pay_us_mmref_local_xml.create_assignement_act', 80);
521: hr_utility.trace('Interlock Created - ');
522: hr_utility.trace('Locking Action : '|| to_char(lockingactid));
523: hr_utility.trace('Locked Action : '|| to_char(l_assignment_action_id));
524: --Store the current person/GRE for comparision during the
525: --next iteration.
518: l_assignment_action_id);
519: hr_utility.set_location(
520: 'pay_us_mmref_local_xml.create_assignement_act', 80);
521: hr_utility.trace('Interlock Created - ');
522: hr_utility.trace('Locking Action : '|| to_char(lockingactid));
523: hr_utility.trace('Locked Action : '|| to_char(l_assignment_action_id));
524: --Store the current person/GRE for comparision during the
525: --next iteration.
526: l_prev_person_id := l_person_id;
519: hr_utility.set_location(
520: 'pay_us_mmref_local_xml.create_assignement_act', 80);
521: hr_utility.trace('Interlock Created - ');
522: hr_utility.trace('Locking Action : '|| to_char(lockingactid));
523: hr_utility.trace('Locked Action : '|| to_char(l_assignment_action_id));
524: --Store the current person/GRE for comparision during the
525: --next iteration.
526: l_prev_person_id := l_person_id;
527: l_prev_tax_unit_id := l_tax_unit_id;
532: CLOSE c_local;
533: END IF;
534:
535: IF l_error_flag = 'Y' THEN
536: hr_utility.trace('Error Flag was set to Y');
537: hr_utility.raise_error;
538: END IF;
539:
540: END create_assignment_act;
533: END IF;
534:
535: IF l_error_flag = 'Y' THEN
536: hr_utility.trace('Error Flag was set to Y');
537: hr_utility.raise_error;
538: END IF;
539:
540: END create_assignment_act;
541: --
574: ,p_state_abbreviation
575: ,p_locality_code
576: ,status
577: ,p_final_xml_string);
578: HR_UTILITY_TRACE('end_of_file l_final_xml_string = '
579: || p_final_xml_string);
580: WRITE_TO_MAGTAPE_LOB(p_final_xml_string);
581: --}
582: END transmitter_record_start;
587: l_is_temp_final_xml VARCHAR2(2);
588:
589: BEGIN
590: l_final_xml_string := '';
591: HR_UTILITY_TRACE('end_of_file l_final_xml_string = '
592: || l_final_xml_string);
593: WRITE_TO_MAGTAPE_LOB(l_final_xml_string);
594: -- pay_core_files.write_to_magtape_lob(l_final_xml_string);
595: END;
631: ,p_state_abbreviation
632: ,p_locality_code
633: ,status
634: ,p_final_xml_string);
635: HR_UTILITY_TRACE('end_of_file l_final_xml_string = '
636: || p_final_xml_string);
637: WRITE_TO_MAGTAPE_LOB(p_final_xml_string);
638: --}
639: END local_w2_xml_employer_start;
644: l_is_temp_final_xml VARCHAR2(2);
645:
646: BEGIN
647: l_final_xml_string := '';
648: HR_UTILITY_TRACE('end_of_file l_final_xml_string = '
649: || l_final_xml_string);
650: WRITE_TO_MAGTAPE_LOB(l_final_xml_string);
651: -- pay_core_files.write_to_magtape_lob(l_final_xml_string);
652: END local_w2_xml_employer_end;
710: l_main_payroll_action_id NUMBER;
711: BEGIN
712: --{
713: -- Fetch All parameters value set by Transmitter Cursor and Conc. Program
714: HR_UTILITY_TRACE('Constructing XML for Employee ->');
715: HR_UTILITY_TRACE('EE ASGN ID :'||to_char(pay_magtape_generic.get_parameter_value('TRANSFER_ACT_ID')));
716: OPEN c_get_params;
717: FETCH c_get_params INTO p_ye_assignment_action_id,
718: p_tax_unit_id,
711: BEGIN
712: --{
713: -- Fetch All parameters value set by Transmitter Cursor and Conc. Program
714: HR_UTILITY_TRACE('Constructing XML for Employee ->');
715: HR_UTILITY_TRACE('EE ASGN ID :'||to_char(pay_magtape_generic.get_parameter_value('TRANSFER_ACT_ID')));
716: OPEN c_get_params;
717: FETCH c_get_params INTO p_ye_assignment_action_id,
718: p_tax_unit_id,
719: p_payroll_action_id,
737: p_reporting_year := pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR');
738: p_locality_code := pay_magtape_generic.get_parameter_value('TRANSFER_LOCALITY_CODE');
739: p_jurisdiction_code := pay_magtape_generic.get_parameter_value('EE_LOCALITY_JD_CODE');
740: */
741: HR_UTILITY_TRACE('Prameter Used for Employee level XML');
742: HR_UTILITY_TRACE('p_tax_unit_id YE :'||to_char(p_tax_unit_id));
743: HR_UTILITY_TRACE('p_payroll_action_id YE :'||to_char(p_payroll_action_id));
744: HR_UTILITY_TRACE('p_payroll_action_id :'||to_char(l_main_payroll_action_id));
745: HR_UTILITY_TRACE('p_ye_assignment_action_id :'||to_char(p_ye_assignment_action_id));
738: p_locality_code := pay_magtape_generic.get_parameter_value('TRANSFER_LOCALITY_CODE');
739: p_jurisdiction_code := pay_magtape_generic.get_parameter_value('EE_LOCALITY_JD_CODE');
740: */
741: HR_UTILITY_TRACE('Prameter Used for Employee level XML');
742: HR_UTILITY_TRACE('p_tax_unit_id YE :'||to_char(p_tax_unit_id));
743: HR_UTILITY_TRACE('p_payroll_action_id YE :'||to_char(p_payroll_action_id));
744: HR_UTILITY_TRACE('p_payroll_action_id :'||to_char(l_main_payroll_action_id));
745: HR_UTILITY_TRACE('p_ye_assignment_action_id :'||to_char(p_ye_assignment_action_id));
746: HR_UTILITY_TRACE('p_assignment_action_id :'||to_char(p_assignment_action_id));
739: p_jurisdiction_code := pay_magtape_generic.get_parameter_value('EE_LOCALITY_JD_CODE');
740: */
741: HR_UTILITY_TRACE('Prameter Used for Employee level XML');
742: HR_UTILITY_TRACE('p_tax_unit_id YE :'||to_char(p_tax_unit_id));
743: HR_UTILITY_TRACE('p_payroll_action_id YE :'||to_char(p_payroll_action_id));
744: HR_UTILITY_TRACE('p_payroll_action_id :'||to_char(l_main_payroll_action_id));
745: HR_UTILITY_TRACE('p_ye_assignment_action_id :'||to_char(p_ye_assignment_action_id));
746: HR_UTILITY_TRACE('p_assignment_action_id :'||to_char(p_assignment_action_id));
747: HR_UTILITY_TRACE('p_assignment_id :'||to_char(p_assignment_id));
740: */
741: HR_UTILITY_TRACE('Prameter Used for Employee level XML');
742: HR_UTILITY_TRACE('p_tax_unit_id YE :'||to_char(p_tax_unit_id));
743: HR_UTILITY_TRACE('p_payroll_action_id YE :'||to_char(p_payroll_action_id));
744: HR_UTILITY_TRACE('p_payroll_action_id :'||to_char(l_main_payroll_action_id));
745: HR_UTILITY_TRACE('p_ye_assignment_action_id :'||to_char(p_ye_assignment_action_id));
746: HR_UTILITY_TRACE('p_assignment_action_id :'||to_char(p_assignment_action_id));
747: HR_UTILITY_TRACE('p_assignment_id :'||to_char(p_assignment_id));
748: HR_UTILITY_TRACE('p_date_earned :'||to_char(p_date_earned,'DD-MON-YYYY'));
741: HR_UTILITY_TRACE('Prameter Used for Employee level XML');
742: HR_UTILITY_TRACE('p_tax_unit_id YE :'||to_char(p_tax_unit_id));
743: HR_UTILITY_TRACE('p_payroll_action_id YE :'||to_char(p_payroll_action_id));
744: HR_UTILITY_TRACE('p_payroll_action_id :'||to_char(l_main_payroll_action_id));
745: HR_UTILITY_TRACE('p_ye_assignment_action_id :'||to_char(p_ye_assignment_action_id));
746: HR_UTILITY_TRACE('p_assignment_action_id :'||to_char(p_assignment_action_id));
747: HR_UTILITY_TRACE('p_assignment_id :'||to_char(p_assignment_id));
748: HR_UTILITY_TRACE('p_date_earned :'||to_char(p_date_earned,'DD-MON-YYYY'));
749: HR_UTILITY_TRACE('p_reporting_year :'||p_reporting_year);
742: HR_UTILITY_TRACE('p_tax_unit_id YE :'||to_char(p_tax_unit_id));
743: HR_UTILITY_TRACE('p_payroll_action_id YE :'||to_char(p_payroll_action_id));
744: HR_UTILITY_TRACE('p_payroll_action_id :'||to_char(l_main_payroll_action_id));
745: HR_UTILITY_TRACE('p_ye_assignment_action_id :'||to_char(p_ye_assignment_action_id));
746: HR_UTILITY_TRACE('p_assignment_action_id :'||to_char(p_assignment_action_id));
747: HR_UTILITY_TRACE('p_assignment_id :'||to_char(p_assignment_id));
748: HR_UTILITY_TRACE('p_date_earned :'||to_char(p_date_earned,'DD-MON-YYYY'));
749: HR_UTILITY_TRACE('p_reporting_year :'||p_reporting_year);
750: HR_UTILITY_TRACE('p_locality_code :'||p_locality_code);
743: HR_UTILITY_TRACE('p_payroll_action_id YE :'||to_char(p_payroll_action_id));
744: HR_UTILITY_TRACE('p_payroll_action_id :'||to_char(l_main_payroll_action_id));
745: HR_UTILITY_TRACE('p_ye_assignment_action_id :'||to_char(p_ye_assignment_action_id));
746: HR_UTILITY_TRACE('p_assignment_action_id :'||to_char(p_assignment_action_id));
747: HR_UTILITY_TRACE('p_assignment_id :'||to_char(p_assignment_id));
748: HR_UTILITY_TRACE('p_date_earned :'||to_char(p_date_earned,'DD-MON-YYYY'));
749: HR_UTILITY_TRACE('p_reporting_year :'||p_reporting_year);
750: HR_UTILITY_TRACE('p_locality_code :'||p_locality_code);
751: -- HR_UTILITY_TRACE('p_jurisdiction_code :'||p_jurisdiction_code);
744: HR_UTILITY_TRACE('p_payroll_action_id :'||to_char(l_main_payroll_action_id));
745: HR_UTILITY_TRACE('p_ye_assignment_action_id :'||to_char(p_ye_assignment_action_id));
746: HR_UTILITY_TRACE('p_assignment_action_id :'||to_char(p_assignment_action_id));
747: HR_UTILITY_TRACE('p_assignment_id :'||to_char(p_assignment_id));
748: HR_UTILITY_TRACE('p_date_earned :'||to_char(p_date_earned,'DD-MON-YYYY'));
749: HR_UTILITY_TRACE('p_reporting_year :'||p_reporting_year);
750: HR_UTILITY_TRACE('p_locality_code :'||p_locality_code);
751: -- HR_UTILITY_TRACE('p_jurisdiction_code :'||p_jurisdiction_code);
752:
745: HR_UTILITY_TRACE('p_ye_assignment_action_id :'||to_char(p_ye_assignment_action_id));
746: HR_UTILITY_TRACE('p_assignment_action_id :'||to_char(p_assignment_action_id));
747: HR_UTILITY_TRACE('p_assignment_id :'||to_char(p_assignment_id));
748: HR_UTILITY_TRACE('p_date_earned :'||to_char(p_date_earned,'DD-MON-YYYY'));
749: HR_UTILITY_TRACE('p_reporting_year :'||p_reporting_year);
750: HR_UTILITY_TRACE('p_locality_code :'||p_locality_code);
751: -- HR_UTILITY_TRACE('p_jurisdiction_code :'||p_jurisdiction_code);
752:
753: get_report_parameters( l_main_payroll_action_id,
746: HR_UTILITY_TRACE('p_assignment_action_id :'||to_char(p_assignment_action_id));
747: HR_UTILITY_TRACE('p_assignment_id :'||to_char(p_assignment_id));
748: HR_UTILITY_TRACE('p_date_earned :'||to_char(p_date_earned,'DD-MON-YYYY'));
749: HR_UTILITY_TRACE('p_reporting_year :'||p_reporting_year);
750: HR_UTILITY_TRACE('p_locality_code :'||p_locality_code);
751: -- HR_UTILITY_TRACE('p_jurisdiction_code :'||p_jurisdiction_code);
752:
753: get_report_parameters( l_main_payroll_action_id,
754: l_year_start,
747: HR_UTILITY_TRACE('p_assignment_id :'||to_char(p_assignment_id));
748: HR_UTILITY_TRACE('p_date_earned :'||to_char(p_date_earned,'DD-MON-YYYY'));
749: HR_UTILITY_TRACE('p_reporting_year :'||p_reporting_year);
750: HR_UTILITY_TRACE('p_locality_code :'||p_locality_code);
751: -- HR_UTILITY_TRACE('p_jurisdiction_code :'||p_jurisdiction_code);
752:
753: get_report_parameters( l_main_payroll_action_id,
754: l_year_start,
755: l_year_end,
759: l_business_group_id,
760: l_locality_code
761: );
762:
763: HR_UTILITY_TRACE('Year Start :'||to_char(l_year_start,'dd-mon-yyyy'));
764: HR_UTILITY_TRACE('Year End :'||to_char(l_year_end,'dd-mon-yyyy'));
765: HR_UTILITY_TRACE('State Abbreviation :'||l_state_abbrev);
766: HR_UTILITY_TRACE('State Code :'||l_state_code);
767: HR_UTILITY_TRACE('Report Type :'||l_report_type);
760: l_locality_code
761: );
762:
763: HR_UTILITY_TRACE('Year Start :'||to_char(l_year_start,'dd-mon-yyyy'));
764: HR_UTILITY_TRACE('Year End :'||to_char(l_year_end,'dd-mon-yyyy'));
765: HR_UTILITY_TRACE('State Abbreviation :'||l_state_abbrev);
766: HR_UTILITY_TRACE('State Code :'||l_state_code);
767: HR_UTILITY_TRACE('Report Type :'||l_report_type);
768: HR_UTILITY_TRACE('Locality Code :'||l_locality_code);
761: );
762:
763: HR_UTILITY_TRACE('Year Start :'||to_char(l_year_start,'dd-mon-yyyy'));
764: HR_UTILITY_TRACE('Year End :'||to_char(l_year_end,'dd-mon-yyyy'));
765: HR_UTILITY_TRACE('State Abbreviation :'||l_state_abbrev);
766: HR_UTILITY_TRACE('State Code :'||l_state_code);
767: HR_UTILITY_TRACE('Report Type :'||l_report_type);
768: HR_UTILITY_TRACE('Locality Code :'||l_locality_code);
769:
762:
763: HR_UTILITY_TRACE('Year Start :'||to_char(l_year_start,'dd-mon-yyyy'));
764: HR_UTILITY_TRACE('Year End :'||to_char(l_year_end,'dd-mon-yyyy'));
765: HR_UTILITY_TRACE('State Abbreviation :'||l_state_abbrev);
766: HR_UTILITY_TRACE('State Code :'||l_state_code);
767: HR_UTILITY_TRACE('Report Type :'||l_report_type);
768: HR_UTILITY_TRACE('Locality Code :'||l_locality_code);
769:
770: --
763: HR_UTILITY_TRACE('Year Start :'||to_char(l_year_start,'dd-mon-yyyy'));
764: HR_UTILITY_TRACE('Year End :'||to_char(l_year_end,'dd-mon-yyyy'));
765: HR_UTILITY_TRACE('State Abbreviation :'||l_state_abbrev);
766: HR_UTILITY_TRACE('State Code :'||l_state_code);
767: HR_UTILITY_TRACE('Report Type :'||l_report_type);
768: HR_UTILITY_TRACE('Locality Code :'||l_locality_code);
769:
770: --
771: -- Following Procedure Call will form the RE Record Structure in XML format
764: HR_UTILITY_TRACE('Year End :'||to_char(l_year_end,'dd-mon-yyyy'));
765: HR_UTILITY_TRACE('State Abbreviation :'||l_state_abbrev);
766: HR_UTILITY_TRACE('State Code :'||l_state_code);
767: HR_UTILITY_TRACE('Report Type :'||l_report_type);
768: HR_UTILITY_TRACE('Locality Code :'||l_locality_code);
769:
770: --
771: -- Following Procedure Call will form the RE Record Structure in XML format
772: --
784: ,status
785: ,p_final_xml_string
786: );
787:
788: --HR_UTILITY_TRACE('end_of_file p_final_xml_string = '
789: -- || p_final_xml_string);
790: WRITE_TO_MAGTAPE_LOB(p_final_xml_string);
791: --}
792: EXCEPTION
790: WRITE_TO_MAGTAPE_LOB(p_final_xml_string);
791: --}
792: EXCEPTION
793: WHEN OTHERS THEN
794: HR_UTILITY_TRACE('Error Encountered in local_w2_xml_employee_build');
795: HR_UTILITY_TRACE(sqlerrm);
796: END local_w2_xml_employee_build;
797:
798: /****************************************************************************
791: --}
792: EXCEPTION
793: WHEN OTHERS THEN
794: HR_UTILITY_TRACE('Error Encountered in local_w2_xml_employee_build');
795: HR_UTILITY_TRACE(sqlerrm);
796: END local_w2_xml_employee_build;
797:
798: /****************************************************************************
799: Name : PRINT_BLOB
866: --
867: end get_parameter;
868:
869: BEGIN
870: -- hr_utility.trace_on(null, 'USLOCALW2');
871: g_proc_name := 'PAY_US_MMREF_LOCAL_XML.';
872: g_debug := hr_utility.debug_enabled;
873: g_document_type := 'LOCAL_W2_XML';
874:
868:
869: BEGIN
870: -- hr_utility.trace_on(null, 'USLOCALW2');
871: g_proc_name := 'PAY_US_MMREF_LOCAL_XML.';
872: g_debug := hr_utility.debug_enabled;
873: g_document_type := 'LOCAL_W2_XML';
874:
875: END pay_us_mmref_local_xml;