DBA Data[Home] [Help]
Skip to content

PACKAGE BODY: APPS.PAY_US_INDIANA

Source


1 package body pay_us_indiana as
2 /* $Header: pyusinyb.pkb 120.4 2011/09/14 20:18:48 rnestor ship $*/
3 
4 
5 /* Script to get the vaule of person's address detail
6     insert the values into temporary table and delete the values from
7     temporary table once the data is printed.
8 */
9 
10 PROCEDURE print_report_address(errbuf             OUT     NOCOPY VARCHAR2,
11                                retcode            OUT     NOCOPY NUMBER)
12 IS
13       l6_wait           BOOLEAN;
14       l6_phase          VARCHAR2(30);
15       l6_status         VARCHAR2(30);
16       l6_dev_phase      VARCHAR2(30);
17       l6_dev_status     VARCHAR2(30);
18       l6_message        VARCHAR2(255);
19       l_rep_req_id      NUMBER;
20       copies_buffer 	varchar2(80) := null;
21       print_buffer  	varchar2(80) := null;
22       printer_buffer  	varchar2(80) := null;
23       style_buffer  	varchar2(80) := null;
24       save_buffer  	boolean := null;
25       save_result  	varchar2(1) := null;
26       req_id 		VARCHAR2(80) := NULL; /* Request Id of the main request */
27       x			BOOLEAN;
28 
29       l_session_id number;
30 BEGIN
31  -- initialise variables - 0 is SRS Success, 1 is SRS Warning, 2 is SRS Error
32       retcode := 0;
33 
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
43 			    complete */
44 
45       select number_of_copies,
46         printer,
47         print_style,
48         save_output_flag
49       into  copies_buffer,
50         printer_buffer,
51         style_buffer,
52         save_result
53       from  fnd_concurrent_requests
54       where request_id = to_number(req_id);
55 
56       if (save_result='Y') then
57         save_buffer:=true;
58       elsif (save_result='N') then
59         save_buffer:=false;
60       else
61         save_buffer:=NULL;
62       end if;
63 
64       x := FND_REQUEST.set_print_options(
65 			printer => printer_buffer,
66 			style	=> style_buffer,
67 			copies  => copies_buffer,
68 			save_output => save_buffer,
69 			print_together => print_buffer);
70 
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));
80       END IF; /* if l_rep_req_id */
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
90                  (request_id => l_rep_req_id
91                  ,interval   => 1
92                  ,phase      => l6_phase
93                  ,status     => l6_status
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;
103      ELSE
104              hr_utility.trace('SQL Report - Indiana Address Successful');
105      END IF; /* l6_dev_phase */
106 
107 
108      DELETE
109      FROM pay_us_rpt_totals
110      WHERE attribute20 like  'INDIANA_YEAR_BEGIN_ADDRESS%'
111      AND   organization_id = l_session_id;
112 
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 
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 
130                errbuf  := hr_utility.get_message;
131               retcode := 2;
132 END print_report_address;
133 
134 
135 PROCEDURE print_override_location(errbuf             OUT     NOCOPY VARCHAR2,
136                                   retcode            OUT     NOCOPY NUMBER,
137                                   p_business_group   IN      VARCHAR2,
138                                   p_curr_year        IN      VARCHAR2) IS
139 
140       l6_wait           BOOLEAN;
141       l6_phase          VARCHAR2(30);
142       l6_status         VARCHAR2(30);
143       l6_dev_phase      VARCHAR2(30);
144       l6_dev_status     VARCHAR2(30);
145       l6_message        VARCHAR2(255);
146       l_rep_req_id      NUMBER;
147       copies_buffer 	varchar2(80) := null;
148       print_buffer  	varchar2(80) := null;
149       printer_buffer  	varchar2(80) := null;
150       style_buffer  	varchar2(80) := null;
151       save_buffer  	    boolean := null;
152       save_result  	    varchar2(1) := null;
153       req_id 		    VARCHAR2(80) := NULL; /* Request Id of the main request */
154       x			        BOOLEAN;
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
164 			    complete */
165 
166       select number_of_copies,
167         printer,
168         print_style,
169         save_output_flag
170       into  copies_buffer,
171         printer_buffer,
172         style_buffer,
173         save_result
174       from  fnd_concurrent_requests
175       where request_id = to_number(req_id);
176 
177       if (save_result='Y') then
178         save_buffer:=true;
179       elsif (save_result='N') then
180         save_buffer:=false;
181       else
182         save_buffer:=NULL;
183       end if;
184 
185       x := FND_REQUEST.set_print_options(
186 			printer => printer_buffer,
187 			style	=> style_buffer,
188 			copies  => copies_buffer,
189 			save_output => save_buffer,
190 			print_together => print_buffer);
191 
192       l_rep_req_id := fnd_request.submit_request(application    => 'PAY',
193                                                  program        => 'pyusolrp',
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));
203       END IF; /* if l_rep_req_id */
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
213                  (request_id => l_rep_req_id
214                  ,interval   => 1
215                  ,phase      => l6_phase
216                  ,status     => l6_status
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;
226      ELSE
227              hr_utility.trace('SQL Report Override Loaction Successful');
228      END IF; /* l6_dev_phase */
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 
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 
246                errbuf  := hr_utility.get_message;
247               retcode := 2;
248 END print_override_location;
249 
250 
251 
252 PROCEDURE get_insert_values (  p_proc_name                VARCHAR2,
253                                p_BUSINESS_GROUP_ID        VARCHAR2,
254                                p_person_id                VARCHAR2,
255                                p_curr_year                VARCHAR2,
256                                p_gre_name          IN OUT NOCOPY VARCHAR2,
257                                p_full_name         IN OUT NOCOPY VARCHAR2,
258                                p_employee_number   IN OUT NOCOPY VARCHAR2)
259 IS
260 
261  /* cursor to get the person's assignment detail  */
262 
263 CURSOR  csr_person_details
264 IS
265 SELECT  ppf.full_name,
266         ppf.employee_number
267 FROM
268         per_all_people_f ppf
269 
270 WHERE
271          ppf.person_id = p_person_id
272      AND to_date('01-JAN-'||p_curr_year,'DD/MM/YYYY')
273      BETWEEN (ppf.effective_start_date + 1)
274      AND ppf.effective_end_date;
275 
276 CURSOR cst_get_gre_name IS
277 SELECT hou.name
278 FROM hr_all_organization_units hou
279 WHERE hou.organization_id = hou.business_group_id
280 and hou.business_group_id = p_business_group_id ;
281 
282 l_proc_name varchar2(50) := 'get_insert_value';
283 
284  BEGIN
285   hr_utility.trace('In proc : get_insert_values');
286 --  hr_utility.trace('Person Id : ' || to_char(p_person_id));
287   --hr_utility.trace('Location Id   :  ' || to_char(p_location_id));
288 
289   IF  p_proc_name = 'INDIANA_YEAR_BEGIN_ADDRESS' THEN
290 
291         hr_utility.trace('Entering : ' || l_proc_name);
292 
293         /* get the detail of the person */
294 
295         OPEN csr_person_details;
296 
297         FETCH csr_person_details
298          INTO p_full_name,
299               p_employee_number;
300 
301        IF csr_person_details%NOTFOUND THEN
302              hr_utility.trace('csr_person_details failed');
303        END IF;
304 
305 
306        CLOSE csr_person_details;
307 
308 
309     /* get the Business Group name for p_business_group_id*/
310 
311       OPEN  cst_get_gre_name;
312 
313       FETCH  cst_get_gre_name
314        INTO  p_gre_name;
315 
316       CLOSE cst_get_gre_name;
317 
318    END IF;
319    hr_utility.trace('GRE NAME         : ' || p_gre_name);
320    hr_utility.trace('Full NAME        : ' || p_full_name);
321    hr_utility.trace('Employee Number: '  || p_employee_number);
322 
323    hr_utility.trace('Leaving : ' || l_proc_name);
324 EXCEPTION
325     WHEN OTHERS THEN
326     hr_utility.trace('Leaving : ' || l_proc_name || ' With Erorr' );
327 
328 END  get_insert_values ;
329 
330 
331 /* Mapping of the Temp. table and value are as follows
332    tax_unit_name       -     GRE_NAME
333    full_name           -     Attribute1
334    Employee_no     	-        ATTRUBITE2
335    effective_start_date-     ATTRIBUTE3
336    town_or_city              ATTRIBUTE4
337    region_1                ATTRIBUTE5
338    region_2                ATTRIBUTE6
339    postal_code             ATTRIBUTE7
340    add_information17       ATTRIBUTE8
341    add_information18       ATTRIBUTE9
342    add_information19       ATTRIBUTE10
343    add_information20       ATTRIBUTE11
344    error                   ATTRIBUTE12
345     */
346 
347 procedure  put_into_temp_table(
348                               p_tax_unit_name in varchar2,
349                               p_emp_full_name in varchar2,
350                               p_employee_number in varchar2,
351                               p_effective_start_date in date,
352                         	  p_town_or_city in varchar2,
353                         	  p_region_1 in varchar2,
354                         	  p_region_2 in varchar2,
355                         	  p_postal_code in varchar2,
356                         	  p_add_information17 in varchar2,
357                         	  p_add_information18 in varchar2,
358                         	  p_add_information19 in varchar2,
359                         	  p_add_information20 in varchar2,
360                				  p_error in varchar2,
361                         p_mesg  in varchar2
362                                   )
363 IS
364 l_success_failure_indicator number;
365 l_proc_name                 varchar2(50) := 'put_into_temp_table';
366 l_session_id                number;
367 
368 BEGIN
369        hr_utility.trace('Entering :' || l_proc_name);
370 
371        select userenv('sessionid')
372        into   l_session_id
373        from dual;
374 
375         INSERT
376         INTO    pay_us_rpt_totals
377                (
378                   organization_id,
379                   gre_name,
380                   attribute1,
381                   attribute2,
382                   attribute3,
383                   attribute4,
384                   attribute5,
385                   attribute6,
386                   attribute7,
387                   attribute8,
388                   attribute9,
389                   attribute10,
390                   attribute11,
391                   attribute12,
392                   attribute20
393                )
394         VALUES (
395                   l_session_id,
396                   p_tax_unit_name,
397                   p_emp_full_name,
398                   p_employee_number,
399                   to_char(p_effective_start_date,'mm/dd/yyyy'),
400                   p_town_or_city    ,
401                   p_region_1        ,
402                   p_region_2        ,
403                   p_postal_code     ,
404                   p_add_information17,
405                   p_add_information18,
406                   p_add_information19,
407                   p_add_information20,
408                   p_error,
409                   p_mesg);
410 
411 
412         hr_utility.trace('Leaving : ' || l_proc_name);
413 EXCEPTION
414 
415      WHEN others THEN
416         hr_utility.trace('Error in the Instertion into temporary Table');
417 END put_into_temp_table;
418 
419 
420 procedure update_address(errbuf             OUT     NOCOPY VARCHAR2,
421                          retcode            OUT     NOCOPY NUMBER,
422                          p_business_group   IN      VARCHAR2,
423                          p_curr_year        IN      VARCHAR2) is
424 
425  l_ret_code             number;
426  l_ret_text		        varchar2(1000);
427  l_gre_name             hr_tax_units_v.name%type;
428  l_full_name            per_people_f.full_name%type;
429  l_employee_number      per_people_f.employee_number%type;
430  l_error		        varchar2(1000);
431  l_last_day              DATE;
432  l_last_year            VARCHAR2(4);
433 
434 
435  cursor csr_get_add  is
436  SELECT *
437  FROM per_addresses pa
438  WHERE
439         pa.add_information17 = 'IN'
440 	and pa.date_from < to_date('01-JAN-'||p_curr_year,'DD/MM/YYYY')
441 	and pa.date_to is null
442     and pa.primary_flag = 'Y'
443     and pa.business_group_id = p_business_group;
444 
445 
446  cursor csr_get_ovr_add  is
447  SELECT pa.*
448  FROM per_addresses pa,
449       per_periods_of_service pos
450 
451  WHERE
452         pa.region_2 = 'IN'
453   and   pa.add_information17 is not NULL
454   and   pa.add_information17 <> 'IN'
455 	and pa.date_from < to_date('01-JAN-'||p_curr_year,'DD/MM/YYYY')
456 	and pa.date_to is null
457   and pa.primary_flag = 'Y'
458   and pa.person_id = pos.person_id
459   and (pos.actual_termination_date is null or pos.actual_termination_date > TO_CHAR(ADD_MONTHS(to_date('01-JAN-'||'2012','DD/MM/YYYY'), -12), 'ddMONyyyy'))
460   and pa.business_group_id = p_business_group;
461 
462  l_add_rec              csr_get_add%rowtype;
463  l_ovr_add_rec          csr_get_add%rowtype;
464 
465 begin
466 
467 -- hr_utility.trace_on(null,'oracle');
468   /* Get the addresses which has an tax override address of Indiana prior to
469      or as of 1-JAN-2001 */
470 
471   l_last_year := p_curr_year - 1;
472   l_last_day  := to_date('31-DEC-'||l_last_year,'DD/MM/YYYY');
473 
474   open csr_get_add ;
475 
476   hr_utility.trace('Updating the Per_Addresses for the esisting records...');
477 
478   loop
479 
480       fetch csr_get_add into l_add_rec;
481 
482       exit when csr_get_add%NOTFOUND;
483 
484       /* End date the address record as of /12/31/2000 */
485 
486 
487       update PER_ADDRESSES
488       set date_to = l_last_day
489       where address_id = l_add_rec.address_id;
490 
491       hr_utility.trace('Updated Addresses : ' || to_char(l_add_rec.address_id));
492 
493       insert into PER_ADDRESSES
494         (ADDRESS_ID,
495         BUSINESS_GROUP_ID,
496         PERSON_ID,
497         DATE_FROM,
498         PRIMARY_FLAG,
499         STYLE,
500         ADDRESS_LINE1,
501         ADDRESS_LINE2,
502         ADDRESS_LINE3,
503         ADDRESS_TYPE,
504         COMMENTS,
505         COUNTRY,
506         DATE_TO,
507         POSTAL_CODE,
508         REGION_1,
509         REGION_2,
510         REGION_3,
511         TELEPHONE_NUMBER_1,
512         TELEPHONE_NUMBER_2,
513         TELEPHONE_NUMBER_3,
514         TOWN_OR_CITY,
515         REQUEST_ID,
516         PROGRAM_APPLICATION_ID,
517         PROGRAM_ID,
518         PROGRAM_UPDATE_DATE,
519         ADDR_ATTRIBUTE_CATEGORY,
520         ADDR_ATTRIBUTE1,
521         ADDR_ATTRIBUTE2,
522         ADDR_ATTRIBUTE3,
523         ADDR_ATTRIBUTE4,
524         ADDR_ATTRIBUTE5,
525         ADDR_ATTRIBUTE6,
526         ADDR_ATTRIBUTE7,
527         ADDR_ATTRIBUTE8,
528         ADDR_ATTRIBUTE9,
529         ADDR_ATTRIBUTE10,
530         ADDR_ATTRIBUTE11,
531         ADDR_ATTRIBUTE12,
532         ADDR_ATTRIBUTE13,
533         ADDR_ATTRIBUTE14,
534         ADDR_ATTRIBUTE15,
535         ADDR_ATTRIBUTE16,
536         ADDR_ATTRIBUTE17,
537         ADDR_ATTRIBUTE18,
538         ADDR_ATTRIBUTE19,
539         ADDR_ATTRIBUTE20,
540         LAST_UPDATE_DATE,
541         LAST_UPDATED_BY,
542         LAST_UPDATE_LOGIN,
543         CREATED_BY,
544         CREATION_DATE,
545         OBJECT_VERSION_NUMBER,
546         ADD_INFORMATION17,
547         ADD_INFORMATION18,
548         ADD_INFORMATION19,
549         ADD_INFORMATION20,
550         ADD_INFORMATION13,
551         ADD_INFORMATION14,
552         ADD_INFORMATION15,
553         ADD_INFORMATION16
554         )
555         values
556         (per_addresses_s.NEXTVAL,
557         l_add_rec.BUSINESS_GROUP_ID,
558         l_add_rec.PERSON_ID,
559         to_date('01-JAN-'||p_curr_year,'DD/MM/YYYY'),
560         --to_date('01-JAN-2001', 'DD-MON-YYYY'),
561         l_add_rec.PRIMARY_FLAG,
562         l_add_rec.STYLE,
563         l_add_rec.ADDRESS_LINE1,
564         l_add_rec.ADDRESS_LINE2,
565         l_add_rec.ADDRESS_LINE3,
566         l_add_rec.ADDRESS_TYPE,
567         l_add_rec.COMMENTS,
568         l_add_rec.COUNTRY,
569         NULL,
570         l_add_rec.POSTAL_CODE,
571         l_add_rec.REGION_1,
572         l_add_rec.REGION_2,
573         l_add_rec.REGION_3,
574         l_add_rec.TELEPHONE_NUMBER_1,
575         l_add_rec.TELEPHONE_NUMBER_2,
576         l_add_rec.TELEPHONE_NUMBER_3,
577         l_add_rec.TOWN_OR_CITY,
578         l_add_rec.REQUEST_ID,
579         l_add_rec.PROGRAM_APPLICATION_ID,
580         l_add_rec.PROGRAM_ID,
581         l_add_rec.PROGRAM_UPDATE_DATE,
582         l_add_rec.ADDR_ATTRIBUTE_CATEGORY,
583         l_add_rec.ADDR_ATTRIBUTE1,
584         l_add_rec.ADDR_ATTRIBUTE2,
585         l_add_rec.ADDR_ATTRIBUTE3,
586         l_add_rec.ADDR_ATTRIBUTE4,
587         l_add_rec.ADDR_ATTRIBUTE5,
588         l_add_rec.ADDR_ATTRIBUTE6,
589         l_add_rec.ADDR_ATTRIBUTE7,
590         l_add_rec.ADDR_ATTRIBUTE8,
591         l_add_rec.ADDR_ATTRIBUTE9,
592         l_add_rec.ADDR_ATTRIBUTE10,
593         l_add_rec.ADDR_ATTRIBUTE11,
594         l_add_rec.ADDR_ATTRIBUTE12,
595         l_add_rec.ADDR_ATTRIBUTE13,
596         l_add_rec.ADDR_ATTRIBUTE14,
597         l_add_rec.ADDR_ATTRIBUTE15,
598         l_add_rec.ADDR_ATTRIBUTE16,
599         l_add_rec.ADDR_ATTRIBUTE17,
600         l_add_rec.ADDR_ATTRIBUTE18,
601         l_add_rec.ADDR_ATTRIBUTE19,
602         l_add_rec.ADDR_ATTRIBUTE20,
603         NULL,                      -- Bug 9157658
604         l_add_rec.LAST_UPDATED_BY,
605         l_add_rec.LAST_UPDATE_LOGIN,
606         l_add_rec.CREATED_BY,
607         l_add_rec.CREATION_DATE,
608         l_add_rec.OBJECT_VERSION_NUMBER,
609         NULL,
610         NULL,
611         NULL,
612         NULL,
613         l_add_rec.ADD_INFORMATION13,
614         l_add_rec.ADD_INFORMATION14,
615         l_add_rec.ADD_INFORMATION15,
616         l_add_rec.ADD_INFORMATION16
617         ) ;
618 
619 --      hr_utility.trace('Updated Addresses : ' ||
620   --                          to_char(l_add_rec.address_id));
621 
622         get_insert_values(
623                         'INDIANA_YEAR_BEGIN_ADDRESS',
624                          l_add_rec.BUSINESS_GROUP_ID,
625                          l_add_rec.PERSON_ID,
626                          p_curr_year,
627                          l_gre_name,
628                          l_full_name,
629                          l_employee_number
630                          );
631 
632          put_into_temp_table(p_tax_unit_name => l_gre_name ,
633                         p_emp_full_name => l_full_name ,
634                         p_employee_number => l_employee_number,
635                         p_effective_start_date => l_add_rec.DATE_FROM ,
636             			p_town_or_city => l_add_rec.town_or_city,
637                 		p_region_1 => l_add_rec.region_1,
638             			p_region_2 => l_add_rec.region_2,
639             			p_postal_code => l_add_rec.postal_code,
640             			p_add_information17 =>l_add_rec.add_information17,
641             			p_add_information18 =>l_add_rec.add_information18,
642             			p_add_information19 =>l_add_rec.add_information19,
643 			            p_add_information20 =>l_add_rec.add_information20,
644                         p_error => l_error,
645                   p_mesg => 'INDIANA_YEAR_BEGIN_ADDRESS' );
646 	COMMIT;
647   end loop;
648   close csr_get_add;
649 
650     open csr_get_ovr_add ;
651 
652   hr_utility.trace('Getting addresses where the priomary state is IN and Override is not IN...');
653 
654   loop
655 
656       fetch csr_get_ovr_add into l_ovr_add_rec;
657 
658       exit when csr_get_ovr_add%NOTFOUND;
659 
660       /* End date the address record as of /12/31/2000 */
661 
662 
663         get_insert_values(
664                         'INDIANA_YEAR_BEGIN_ADDRESS',
665                          l_ovr_add_rec.BUSINESS_GROUP_ID,
666                          l_ovr_add_rec.PERSON_ID,
667                          p_curr_year,
668                          l_gre_name,
669                          l_full_name,
670                          l_employee_number
671                          );
672 
673          put_into_temp_table(p_tax_unit_name => l_gre_name ,
674                         p_emp_full_name => l_full_name ,
675                         p_employee_number => l_employee_number,
676                         p_effective_start_date => l_ovr_add_rec.DATE_FROM ,
677             			p_town_or_city => l_ovr_add_rec.town_or_city,
678                 		p_region_1 => l_ovr_add_rec.region_1,
679             			p_region_2 => l_ovr_add_rec.region_2,
680             			p_postal_code => l_ovr_add_rec.postal_code,
681             			p_add_information17 =>l_ovr_add_rec.add_information17,
682             			p_add_information18 =>l_ovr_add_rec.add_information18,
683             			p_add_information19 =>l_ovr_add_rec.add_information19,
684 			            p_add_information20 =>l_ovr_add_rec.add_information20,
685                         p_error => l_error,
686                   p_mesg => 'INDIANA_YEAR_BEGIN_ADDRESS - REVIEW');
687 	COMMIT;
688   end loop;
689   close csr_get_ovr_add;
690 
691   /* Print the Indiana Address Report ' */
692 
693   print_report_address(errbuf, retcode);
694 
695   /* print_override_location(errbuf, retcode, p_curr_year, p_business_group); */
696 
697   print_override_location(errbuf, retcode, p_business_group,p_curr_year);
698 
699 end;
700 end pay_us_indiana;