34: select userenv('sessionid')
35: into l_session_id
36: from dual;
37:
38: hr_utility.trace('Entering the print_report_address');
39:
40: req_id:=fnd_profile.value('CONC_REQUEST_ID');
41: print_buffer:= 'N'; /*can be retrieved from fnd_profile.value('CONC_PRINT_TOGETHER'), if
42: set to 'Y' then will print the report only if all the processes are
71: l_rep_req_id := fnd_request.submit_request(application => 'PAY',
72: program => 'PYUSINRP');
73:
74: IF(l_rep_req_id = 0) THEN
75: hr_utility.trace(' Error While Indiana Year Begin Address Report' );
76: hr_utility.raise_error;
77: ELSE
78: hr_utility.trace(' Concurrent Request Id (Report Spool Request) : '
79: ||to_char(l_rep_req_id));
72: program => 'PYUSINRP');
73:
74: IF(l_rep_req_id = 0) THEN
75: hr_utility.trace(' Error While Indiana Year Begin Address Report' );
76: hr_utility.raise_error;
77: ELSE
78: hr_utility.trace(' Concurrent Request Id (Report Spool Request) : '
79: ||to_char(l_rep_req_id));
80: END IF; /* if l_rep_req_id */
74: IF(l_rep_req_id = 0) THEN
75: hr_utility.trace(' Error While Indiana Year Begin Address Report' );
76: hr_utility.raise_error;
77: ELSE
78: hr_utility.trace(' Concurrent Request Id (Report Spool Request) : '
79: ||to_char(l_rep_req_id));
80: END IF; /* if l_rep_req_id */
81:
82: COMMIT;
81:
82: COMMIT;
83:
84: /* Wait for report request completion */
85: hr_utility.trace('Waiting for the application to get completed ');
86:
87: /* Check for Report Request Status */
88:
89: l6_wait := fnd_concurrent.wait_for_request
94: ,dev_phase => l6_dev_phase
95: ,dev_status => l6_dev_status
96: ,message => l6_message);
97:
98: hr_utility.trace('Wait completed,Printing output based on the result');
99:
100: IF NOT (l6_dev_phase = 'COMPLETE' and l6_dev_status = 'NORMAL') THEN
101: hr_utility.trace('SQL Report - Indiana Address Exited with error') ;
102: retcode := 2;
97:
98: hr_utility.trace('Wait completed,Printing output based on the result');
99:
100: IF NOT (l6_dev_phase = 'COMPLETE' and l6_dev_status = 'NORMAL') THEN
101: hr_utility.trace('SQL Report - Indiana Address Exited with error') ;
102: retcode := 2;
103: ELSE
104: hr_utility.trace('SQL Report - Indiana Address Successful');
105: END IF; /* l6_dev_phase */
100: IF NOT (l6_dev_phase = 'COMPLETE' and l6_dev_status = 'NORMAL') THEN
101: hr_utility.trace('SQL Report - Indiana Address Exited with error') ;
102: retcode := 2;
103: ELSE
104: hr_utility.trace('SQL Report - Indiana Address Successful');
105: END IF; /* l6_dev_phase */
106:
107:
108: DELETE
113: COMMIT;
114:
115: EXCEPTION
116: WHEN NO_DATA_FOUND THEN
117: hr_utility.trace('Exception : No data Found');
118: --
119: -- Set up error message and error return code.
120: --
121:
118: --
119: -- Set up error message and error return code.
120: --
121:
122: errbuf := hr_utility.get_message;
123: retcode := 2;
124: WHEN OTHERS THEN
125: hr_utility.trace('Excption : When Others');
126: --
121:
122: errbuf := hr_utility.get_message;
123: retcode := 2;
124: WHEN OTHERS THEN
125: hr_utility.trace('Excption : When Others');
126: --
127: -- Set up error message and error return code.
128: --
129:
126: --
127: -- Set up error message and error return code.
128: --
129:
130: errbuf := hr_utility.get_message;
131: retcode := 2;
132: END print_report_address;
133:
134:
155: BEGIN
156: -- initialise variables - 0 is SRS Success, 1 is SRS Warning, 2 is SRS Error
157: retcode := 0;
158:
159: hr_utility.trace('Entering the print_report_address');
160:
161: req_id:=fnd_profile.value('CONC_REQUEST_ID');
162: print_buffer:= 'N'; /*can be retrieved from fnd_profile.value('CONC_PRINT_TOGETHER'), if
163: set to 'Y' then will print the report only if all the processes are
194: argument1 => p_business_group,
195: argument2 => p_curr_year);
196:
197: IF(l_rep_req_id = 0) THEN
198: hr_utility.trace(' Error While Indiana Year Begin Address Report' );
199: hr_utility.raise_error;
200: ELSE
201: hr_utility.trace(' Concurrent Request Id (Report Spool Request) : '
202: ||to_char(l_rep_req_id));
195: argument2 => p_curr_year);
196:
197: IF(l_rep_req_id = 0) THEN
198: hr_utility.trace(' Error While Indiana Year Begin Address Report' );
199: hr_utility.raise_error;
200: ELSE
201: hr_utility.trace(' Concurrent Request Id (Report Spool Request) : '
202: ||to_char(l_rep_req_id));
203: END IF; /* if l_rep_req_id */
197: IF(l_rep_req_id = 0) THEN
198: hr_utility.trace(' Error While Indiana Year Begin Address Report' );
199: hr_utility.raise_error;
200: ELSE
201: hr_utility.trace(' Concurrent Request Id (Report Spool Request) : '
202: ||to_char(l_rep_req_id));
203: END IF; /* if l_rep_req_id */
204:
205: COMMIT;
204:
205: COMMIT;
206:
207: /* Wait for report request completion */
208: hr_utility.trace('Waiting for the application to get completed ');
209:
210: /* Check for Report Request Status */
211:
212: l6_wait := fnd_concurrent.wait_for_request
217: ,dev_phase => l6_dev_phase
218: ,dev_status => l6_dev_status
219: ,message => l6_message);
220:
221: hr_utility.trace('Wait completed,Printing output based on the result');
222:
223: IF NOT (l6_dev_phase = 'COMPLETE' and l6_dev_status = 'NORMAL') THEN
224: hr_utility.trace('SQL Report Override Location Exited with error') ;
225: retcode := 2;
220:
221: hr_utility.trace('Wait completed,Printing output based on the result');
222:
223: IF NOT (l6_dev_phase = 'COMPLETE' and l6_dev_status = 'NORMAL') THEN
224: hr_utility.trace('SQL Report Override Location Exited with error') ;
225: retcode := 2;
226: ELSE
227: hr_utility.trace('SQL Report Override Loaction Successful');
228: END IF; /* l6_dev_phase */
223: IF NOT (l6_dev_phase = 'COMPLETE' and l6_dev_status = 'NORMAL') THEN
224: hr_utility.trace('SQL Report Override Location Exited with error') ;
225: retcode := 2;
226: ELSE
227: hr_utility.trace('SQL Report Override Loaction Successful');
228: END IF; /* l6_dev_phase */
229:
230:
231: EXCEPTION
229:
230:
231: EXCEPTION
232: WHEN NO_DATA_FOUND THEN
233: hr_utility.trace('Exception : No data Found');
234: --
235: -- Set up error message and error return code.
236: --
237:
234: --
235: -- Set up error message and error return code.
236: --
237:
238: errbuf := hr_utility.get_message;
239: retcode := 2;
240: WHEN OTHERS THEN
241: hr_utility.trace('Exception : When Others');
242: --
237:
238: errbuf := hr_utility.get_message;
239: retcode := 2;
240: WHEN OTHERS THEN
241: hr_utility.trace('Exception : When Others');
242: --
243: -- Set up error message and error return code.
244: --
245:
242: --
243: -- Set up error message and error return code.
244: --
245:
246: errbuf := hr_utility.get_message;
247: retcode := 2;
248: END print_override_location;
249:
250:
280:
281: l_proc_name varchar2(50) := 'get_insert_value';
282:
283: BEGIN
284: hr_utility.trace('In proc : get_insert_values');
285: -- hr_utility.trace('Person Id : ' || to_char(p_person_id));
286: --hr_utility.trace('Location Id : ' || to_char(p_location_id));
287:
288: IF p_proc_name = 'INDIANA_YEAR_BEGIN_ADDRESS' THEN
281: l_proc_name varchar2(50) := 'get_insert_value';
282:
283: BEGIN
284: hr_utility.trace('In proc : get_insert_values');
285: -- hr_utility.trace('Person Id : ' || to_char(p_person_id));
286: --hr_utility.trace('Location Id : ' || to_char(p_location_id));
287:
288: IF p_proc_name = 'INDIANA_YEAR_BEGIN_ADDRESS' THEN
289:
282:
283: BEGIN
284: hr_utility.trace('In proc : get_insert_values');
285: -- hr_utility.trace('Person Id : ' || to_char(p_person_id));
286: --hr_utility.trace('Location Id : ' || to_char(p_location_id));
287:
288: IF p_proc_name = 'INDIANA_YEAR_BEGIN_ADDRESS' THEN
289:
290: hr_utility.trace('Entering : ' || l_proc_name);
286: --hr_utility.trace('Location Id : ' || to_char(p_location_id));
287:
288: IF p_proc_name = 'INDIANA_YEAR_BEGIN_ADDRESS' THEN
289:
290: hr_utility.trace('Entering : ' || l_proc_name);
291:
292: /* get the detail of the person */
293:
294: OPEN csr_person_details;
297: INTO p_full_name,
298: p_employee_number;
299:
300: IF csr_person_details%NOTFOUND THEN
301: hr_utility.trace('csr_person_details failed');
302: END IF;
303:
304:
305: CLOSE csr_person_details;
314:
315: CLOSE cst_get_gre_name;
316:
317: END IF;
318: hr_utility.trace('GRE NAME : ' || p_gre_name);
319: hr_utility.trace('Full NAME : ' || p_full_name);
320: hr_utility.trace('Employee Number: ' || p_employee_number);
321:
322: hr_utility.trace('Leaving : ' || l_proc_name);
315: CLOSE cst_get_gre_name;
316:
317: END IF;
318: hr_utility.trace('GRE NAME : ' || p_gre_name);
319: hr_utility.trace('Full NAME : ' || p_full_name);
320: hr_utility.trace('Employee Number: ' || p_employee_number);
321:
322: hr_utility.trace('Leaving : ' || l_proc_name);
323: EXCEPTION
316:
317: END IF;
318: hr_utility.trace('GRE NAME : ' || p_gre_name);
319: hr_utility.trace('Full NAME : ' || p_full_name);
320: hr_utility.trace('Employee Number: ' || p_employee_number);
321:
322: hr_utility.trace('Leaving : ' || l_proc_name);
323: EXCEPTION
324: WHEN OTHERS THEN
318: hr_utility.trace('GRE NAME : ' || p_gre_name);
319: hr_utility.trace('Full NAME : ' || p_full_name);
320: hr_utility.trace('Employee Number: ' || p_employee_number);
321:
322: hr_utility.trace('Leaving : ' || l_proc_name);
323: EXCEPTION
324: WHEN OTHERS THEN
325: hr_utility.trace('Leaving : ' || l_proc_name || ' With Erorr' );
326:
321:
322: hr_utility.trace('Leaving : ' || l_proc_name);
323: EXCEPTION
324: WHEN OTHERS THEN
325: hr_utility.trace('Leaving : ' || l_proc_name || ' With Erorr' );
326:
327: END get_insert_values ;
328:
329:
363: l_proc_name varchar2(50) := 'put_into_temp_table';
364: l_session_id number;
365:
366: BEGIN
367: hr_utility.trace('Entering :' || l_proc_name);
368:
369: select userenv('sessionid')
370: into l_session_id
371: from dual;
406: p_error,
407: 'INDIANA_YEAR_BEGIN_ADDRESS');
408:
409:
410: hr_utility.trace('Leaving : ' || l_proc_name);
411: EXCEPTION
412:
413: WHEN others THEN
414: hr_utility.trace('Error in the Instertion into temporary Table');
410: hr_utility.trace('Leaving : ' || l_proc_name);
411: EXCEPTION
412:
413: WHEN others THEN
414: hr_utility.trace('Error in the Instertion into temporary Table');
415: END put_into_temp_table;
416:
417:
418: procedure update_address(errbuf OUT NOCOPY VARCHAR2,
442:
443: l_add_rec csr_get_add%rowtype;
444: begin
445:
446: -- hr_utility.trace_on(null,'oracle');
447: /* Get the addresses which has an tax override address of Indiana prior to
448: or as of 1-JAN-2001 */
449:
450: l_last_year := p_curr_year - 1;
451: l_last_day := to_date('31-DEC-'||l_last_year,'DD/MM/YYYY');
452:
453: open csr_get_add ;
454:
455: hr_utility.trace('Updating the Per_Addresses for the esisting records...');
456:
457: loop
458:
459: fetch csr_get_add into l_add_rec;
466: update PER_ADDRESSES
467: set date_to = l_last_day
468: where address_id = l_add_rec.address_id;
469:
470: hr_utility.trace('Updated Addresses : ' || to_char(l_add_rec.address_id));
471:
472: insert into PER_ADDRESSES
473: (ADDRESS_ID,
474: BUSINESS_GROUP_ID,
594: l_add_rec.ADD_INFORMATION15,
595: l_add_rec.ADD_INFORMATION16
596: ) ;
597:
598: -- hr_utility.trace('Updated Addresses : ' ||
599: -- to_char(l_add_rec.address_id));
600:
601: get_insert_values(
602: 'INDIANA_YEAR_BEGIN_ADDRESS',