DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_PROCESS_CONTACT_SS

Source


1 PACKAGE BODY HR_PROCESS_CONTACT_SS AS
2 /* $Header: hrconwrs.pkb 120.13.12020000.3 2012/11/06 09:14:08 aammoham ship $*/
3  --
4  -- Package scope global variables.
5  --
6  g_package                   varchar2(30)   := 'HR_PROCESS_CONTACT_SS';
7  g_data_error                exception;
8  g_no_changes                exception;
9  -- g_date_format  constant     varchar2(10):='RRRR/MM/DD';
10 
11  l_message_number            VARCHAR2(10);
12  --
13  -- Global cursor
14  --
15   CURSOR gc_get_cur_contact_data
16          (p_contact_relationship_id      in number
17          ,p_eff_date                     in date default trunc(sysdate)
18           )
19   IS
20      SELECT
21      contact_relationship_id,
22      contact_type,
23      comments,
24      primary_contact_flag,
25      third_party_pay_flag,
26      bondholder_flag,
27      date_start,
28      start_life_reason_id,
29      date_end,
30      end_life_reason_id,
31      rltd_per_rsds_w_dsgntr_flag,
32      personal_flag,
33      sequence_number,
34      dependent_flag,
35      beneficiary_flag,
36      cont_attribute_category,
37      cont_attribute1,
38      cont_attribute2,
39      cont_attribute3,
40      cont_attribute4,
41      cont_attribute5,
42      cont_attribute6,
43      cont_attribute7,
44      cont_attribute8,
45      cont_attribute9,
46      cont_attribute10,
47      cont_attribute11,
48      cont_attribute12,
49      cont_attribute13,
50      cont_attribute14,
51      cont_attribute15,
52      cont_attribute16,
53      cont_attribute17,
54      cont_attribute18,
55      cont_attribute19,
56      cont_attribute20,
57      CONT_INFORMATION_CATEGORY,
58      CONT_INFORMATION1  ,
59      CONT_INFORMATION2  ,
60      CONT_INFORMATION3  ,
61      CONT_INFORMATION4  ,
62      CONT_INFORMATION5  ,
63      CONT_INFORMATION6  ,
64      CONT_INFORMATION7  ,
65      CONT_INFORMATION8  ,
66      CONT_INFORMATION9  ,
67      CONT_INFORMATION10 ,
68      CONT_INFORMATION11 ,
69      CONT_INFORMATION12 ,
70      CONT_INFORMATION13 ,
71      CONT_INFORMATION14 ,
72      CONT_INFORMATION15 ,
73      CONT_INFORMATION16 ,
74      CONT_INFORMATION17 ,
75      CONT_INFORMATION18 ,
76      CONT_INFORMATION19 ,
77      CONT_INFORMATION20 ,
78      pcr.object_version_number
79   FROM
80      per_contact_relationships pcr
81      ,per_all_people_f pap
82      ,hr_comments        hc
83   WHERE  pcr.contact_relationship_id = p_contact_relationship_id
84     AND  pcr.contact_person_id = pap.person_id
85     AND  p_eff_date BETWEEN pap.effective_start_date and pap.effective_end_date
86     AND  hc.comment_id (+) = pap.comment_id;
87 
88 -- ---------------------------------------------------------------------------
89 -- ---------------------- < p_del_cont_primary_addr> -------------------------
90 -- ---------------------------------------------------------------------------
91 -- Purpose: This procedure will delete the address if the shared residence flag
92 --          is checked and primary address already exists.
93 -- ---------------------------------------------------------------------------
94 --
95 PROCEDURE p_del_cont_primary_addr
96    (p_contact_relationship_id          in  number
97    )
98 is
99   --
100   CURSOR c_cont_primary_addr
101   IS
102      SELECT addr.address_id
103      FROM per_contact_relationships pcr
104          ,per_addresses addr
105      WHERE  pcr.contact_relationship_id = p_contact_relationship_id
106        and  pcr.contact_person_id = addr.person_id
107        and  trunc(sysdate) between addr.date_from
108                                and nvl(addr.date_to, trunc(sysdate))
109        and  addr.primary_flag  = 'Y'
110        --
111        -- Bug 2652114 : Do not delete the address if contact is already a employee
112        -- otherwise his payroll will get affected.
113        --
114        and not exists
115              (select null
116               from per_all_assignments_f asg
117               where trunc(sysdate) between asg.effective_start_date
118                                        and asg.effective_end_date
119                 and asg.person_id = addr.person_id
120                 and asg.primary_flag = 'Y'
121                 and asg.assignment_type = 'E'
122              );
123 
124   --
125   l_cont_primary_addr c_cont_primary_addr%rowtype;
126   l_proc varchar2(72) :=  g_package ||  'p_del_cont_primary_addr';
127 
128   --
129 begin
130   --
131   hr_utility.set_Location('Entering'||l_proc,5);
132   OPEN c_cont_primary_addr;
133   FETCH c_cont_primary_addr into l_cont_primary_addr;
134   --
135   IF c_cont_primary_addr%FOUND
136   THEN
137     --
138     -- Delete the contacts primary address.
139     -- As there is no API to do the delete we have to physically call the
140     -- the delete statement.
141     --
142       hr_utility.set_Location('IF c_cont_primary_addr FOUND:'||l_proc,10);
143     delete from per_addresses
144       where address_id = l_cont_primary_addr.address_id;
145     --
146   END IF;
147   --
148   CLOSE c_cont_primary_addr;
149   --
150   hr_utility.set_Location('Exiting :'||l_proc,15);
151 end p_del_cont_primary_addr;
152 /* 999 Delete before arcsin
153 -- ----------------------------------------------------------------------------
154 -- |------------------------------< get_varchar2_value >------------------------|
155 -- ----------------------------------------------------------------------------
156 function get_varchar2_value
157   (p_transaction_step_id       in      number
158   ,p_name                      in      varchar2
159   ) return varchar2 is
160 
161   -- --------------------------------------------------------------------------
162   -- declare local variables
163   -- --------------------------------------------------------------------------
164   l_proc   varchar2(72)  := g_package||'get_varchar2_value';
165   l_insert boolean := false;
166   l_name           hr_api_transaction_values.name%type;
167   l_varchar2_value  varchar2(1000);
168   --
169   cursor csr_hatv is
170     select hatv.varchar2_value
171     from   hr_api_transaction_values hatv
172     where  hatv.transaction_step_id = p_transaction_step_id
173     and    hatv.name                = l_name;
174   --
175 begin
176 
177   hr_utility.set_location('Entering:'|| l_proc, 5);
178   -- upper the parameter name
179   l_name := upper(p_name);
180   -- select the transaction value details
181   open csr_hatv;
182   fetch csr_hatv
183   into l_varchar2_value;
184 
185   if csr_hatv%notfound then
186     -- parameter does not exist
187     close csr_hatv;
188     hr_utility.raise_error;
189   end if;
190   close csr_hatv;
191   --
192   return l_varchar2_value;
193   hr_utility.set_location(' Leaving:'||l_proc, 10);
194 end get_varchar2_value;
195 */
196 --
197 -- ----------------------------------------------------------------------------
198 -- |------------------------------< get_number_value >------------------------|
199 -- ----------------------------------------------------------------------------
200 function get_number_value
201   (p_transaction_step_id       in      number
202   ,p_name                      in      varchar2
203   ) return number is
204 
205   -- --------------------------------------------------------------------------
206   -- declare local variables
207   -- --------------------------------------------------------------------------
208   l_proc   varchar2(72)  := g_package||'get_number_value';
209   l_insert boolean := false;
210   l_name           hr_api_transaction_values.name%type;
211   l_number_value  number;
212   --
213   cursor csr_hatv is
214     select hatv.number_value
215     from   hr_api_transaction_values hatv
216     where  hatv.transaction_step_id = p_transaction_step_id
217     and    hatv.name                = l_name;
218   --
219 begin
220 
221   hr_utility.set_location('Entering:'|| l_proc, 5);
222   -- upper the parameter name
223   l_name := upper(p_name);
224   -- select the transaction value details
225   open csr_hatv;
226   fetch csr_hatv
227   into l_number_value;
228 
229   if csr_hatv%notfound then
230     -- parameter does not exist
231   hr_utility.set_location('If Parameter does not exist'|| l_proc, 10);
232     close csr_hatv;
233     hr_utility.raise_error;
234   end if;
235   close csr_hatv;
236   --
237   hr_utility.set_location(' Leaving:'||l_proc, 15);
238   return l_number_value;
239 
240 end get_number_value;
241 --
242 -- ---------------------------------------------------------------------------
243 -- ---------------------- < get_contact_relationship_tt> -------------------------
244 -- ---------------------------------------------------------------------------
245 -- Purpose: This procedure will get which regions are changed in earlier save
246 --          in the current transaction.  This is invoked when a user click BACK
247 --          button to go back from the Review page to Update page to correct
248 --          typos or make further changes.  Hence, we need to use the item_type
249 --          item_key passed in to retrieve the transaction record.
250 --          This is also used when the user first time navigates to review page.
251 --          Based on the output of this procedure Review page layout is built.
252 --          Ex : If contacts and phone changed then both are shown, if Only
253 --          phone changed then shows phone data.
254 -- ---------------------------------------------------------------------------
255 --
256 PROCEDURE get_contact_regions_status_tt
257    (p_item_type                       in  varchar2
258    ,p_item_key                        in  varchar2
259    ,p_activity_id                     in  varchar2
260    ,p_trans_rec_count                 out nocopy number
261    ,p_contact_changed                 out nocopy varchar2
262    ,p_phone_changed                   out nocopy varchar2
263    ,p_address_changed                 out nocopy varchar2
264    ,p_second_address_changed          out nocopy varchar2
265    ,p_parent_id                       out nocopy varchar2
266    ,p_contact_person_id               out nocopy varchar2
267    ,p_contact_relationship_id         out nocopy varchar2
268    ,p_contact_operation               out nocopy varchar2
269    ,p_shared_Residence_Flag           out nocopy varchar2
270    ,p_save_mode                       out nocopy varchar2
271    ,p_address_id                      out nocopy varchar2
272    ,p_contact_step_id                 out nocopy varchar2
273    ,p_phone_step_id                   out nocopy varchar2
274    ,p_address_step_id                 out nocopy varchar2
275    ,p_second_address_step_id          out nocopy varchar2
276    ,p_first_name                      out nocopy varchar2
277    ,p_last_name                       out nocopy varchar2
278    ,p_contact_set                     in  varchar2
279    )
280 is
281   --
282   l_trans_step_id                    number default null;
283   l_trans_rec_count                  integer default 0;
284   l_trans_step_ids       hr_util_web.g_varchar2_tab_type;
285   l_trans_obj_vers_nums  hr_util_web.g_varchar2_tab_type;
286   l_trans_step_rows                  NUMBER  ;
287   ln_index                           number  default 0;
288   l_id                               number;
289   l_contact_step_id                  varchar2(100) := null;
290   l_phone_step_id                    varchar2(100) := null;
291   l_address_step_id                  varchar2(100) := null;
292   l_second_address_step_id           varchar2(100) := null;
293   l_addr_person_id                   varchar2(100) := null;
294   -- 2447751 change starts
295   l_first_name     PER_ALL_PEOPLE_F.FIRST_NAME%TYPE := null;
296   l_last_name      PER_ALL_PEOPLE_F.LAST_NAME%TYPE := null;
297   -- 2447751 change ends
298   l_prmry_flag                       varchar2(100) := null;
299   -- StartRegistration
300   l_contact_set                      varchar2(5) := null;
301   l_contact_operation                varchar2(100) := null;
302   l_shared_Residence_Flag            varchar2(100) := null;
303   l_local_shared_Residence_Flag      varchar2(100) := null;
304   l_save_mode                        varchar2(100) := null;
305   l_contact_person_id                varchar2(100) := null;
306   l_proc   varchar2(72)  := g_package||'get_contact_regions_status_tt';
307 
308   --
309   CURSOR c_get_names
310   IS
311      SELECT last_name, first_name
312      from per_all_people_f
313      WHERE  person_id = p_contact_person_id
314        AND  trunc(sysdate) BETWEEN effective_start_date and effective_end_date;
315 
316   --
317 begin
318   --
319   hr_utility.set_location('Entering:'||l_proc, 5);
320   p_contact_changed   := 'N';
321   p_phone_changed     := 'N';
322   p_address_changed   := 'N';
323 --shdas
324   p_second_address_changed   := 'N';
325 --shdas
326   p_parent_id         := null;
327   p_contact_person_id := null;
328   p_contact_relationship_id  := null;
329   p_address_id        := null;
330   --
331   -- For a given item key, there could be multiple transaction steps saved.
332   -- Get whether transaction data is written for contacts, phone, address.
333   --
334   hr_transaction_api.get_transaction_step_info
335              (p_item_type              => p_item_type
336              ,p_item_key               => p_item_key
337              ,p_activity_id            => p_activity_id
338              ,p_transaction_step_id    => l_trans_step_ids
339              ,p_object_version_number  => l_trans_obj_vers_nums
340              ,p_rows                   => l_trans_step_rows);
341 
342   --
343   -- ---------------------------------------------------------------------
344   -- NOTE:We need to adjust the index which referrences l_trans_step_ids
345   --    by 1 because that table was created with the index starts at 0
346   --    in hr_transaction_api.get_transaction_step_info.
347   -- ---------------------------------------------------------------------
348   --
349   ln_index := 0;
350   --
351   hr_utility.set_location('Entering For Loop:'||l_proc, 10);
352   FOR j in 1..l_trans_step_rows
353   LOOP
354     -- StartRegistration
355     -- Get the contact set from java and compare with the contact set id
356     -- in each step.
357     -- if the step doesnot match, ignore the step and go to next step.
358     --
359     begin
360       l_contact_set := hr_transaction_api.get_varchar2_value
361         (p_transaction_step_id => l_trans_step_ids(ln_index)
362         ,p_name                => 'P_CONTACT_SET');
363     exception
364      when others then
365       --
366       hr_utility.set_location('Exception:'||l_proc,555);
367       l_contact_set := 1;
368       --
369     end;
370     --
371     if l_contact_set is null then
372        --
373         l_contact_set := 1;
374        --
375     end if;
376 
377    -- Save for later changes
378    begin
379       if l_contact_operation is null then
380         l_contact_operation := hr_transaction_api.get_varchar2_value
381          (p_transaction_step_id => l_trans_step_ids(ln_index)
382         ,p_name                => 'P_CONTACT_OPERATION');
383       end if;
384    /* fix sansingh , at this juncture check if
385       l_contact_operation from earlier check is null, the same information is stored
386        as P_PER_OR_CONTACT by PHONE NUMBER  region
387        so obtain l_contact_operation from here
388          */
389       if l_contact_operation is null then
390         l_contact_operation := hr_transaction_api.get_varchar2_value
391          (p_transaction_step_id => l_trans_step_ids(ln_index)
392         ,p_name                => 'P_PER_OR_CONTACT');
393       end if;
394       /*
395         fix sansingh if l_contact_operation is still null ,it means that only address region was get updated
396          where the same values is saved as  P_CONTACT_OR_PERSON ,
397          so obtain l_contact_operation from here
398       */
399       if l_contact_operation is null then
400          l_contact_operation := hr_transaction_api.get_varchar2_value
401          (p_transaction_step_id => l_trans_step_ids(ln_index)
402         ,p_name                => 'P_CONTACT_OR_PERSON');
403       end if;
404    exception
405      when others then
406       --
407       hr_utility.set_location('Exception:'||l_proc,560);
408       l_contact_operation := null ;
409       --
410     end;
411     --
412    -- Get the Save Mode
413    begin
414      --
415        if l_save_mode is null then
416        --
417        l_save_mode :=  hr_transaction_api.get_varchar2_value
418           (p_transaction_step_id => l_trans_step_ids(ln_index)
419           ,p_name                => 'P_SAVE_MODE');
420        --
421        end if;
422      --
423     exception
424      when others then
425       --
426       hr_utility.set_location('Exception:'||l_proc,565);
427       l_save_mode := null ;
428       --
429     end;
430     --
431     if l_contact_set is null then
432        --
433        l_contact_set := 1;
434        --
435     end if;
436     --
437     if  l_contact_set = p_contact_set then
438       --
439    -- Get Shared Residence Flag
440    begin
441      --
442        --
443        l_shared_Residence_Flag := hr_transaction_api.get_varchar2_value
444           (p_transaction_step_id => l_trans_step_ids(ln_index)
445           ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG');
446        --
447        if l_shared_Residence_Flag is null then
448           l_shared_Residence_Flag := l_local_shared_Residence_Flag ;
449        else
450           l_local_shared_Residence_Flag := l_shared_Residence_Flag;
451        end if;
452        --
453     exception
454      when others then
455       --
456       hr_utility.set_location('Exception:'||l_proc,570);
457       l_shared_Residence_Flag := l_local_shared_Residence_Flag ;
458       --
459    end;
460 
461       -- Now check the transaction data for each region.
462       -- If transaction data exists that means the region
463       -- was modified.
464 
465       --
466       -- Check Contact.
467       --
468       if (p_contact_changed = 'N') then
469         --
470         begin
471          --l_id := hr_transaction_api.get_number_value
472          l_id := get_number_value
473                      (p_transaction_step_id => l_trans_step_ids(ln_index)
474                      ,p_name                => 'P_CONTACT_PERSON_ID');
475 
476          p_contact_changed := 'Y';
477          p_contact_person_id := to_char(l_id);
478          l_contact_step_id   :=  l_trans_step_ids(ln_index);
479          --
480          l_id := get_number_value
481                      (p_transaction_step_id => l_trans_step_ids(ln_index)
482                      ,p_name                => 'P_CONTACT_RELATIONSHIP_ID');
483 
484          p_contact_relationship_id := to_char(l_id);
485          --
486          l_first_name        := hr_transaction_api.get_varchar2_value
487                                 (p_transaction_step_id => l_trans_step_ids(ln_index)
488                                 ,p_name                =>upper( 'p_first_name'));
489          --
490          l_last_name         := hr_transaction_api.get_varchar2_value
491                                 (p_transaction_step_id => l_trans_step_ids(ln_index)
492                                 ,p_name                =>upper( 'p_last_name'));
493          --
494         exception
495           when others then
496              null;
497         end;
498       end if;
499       --
500       -- Check phone
501       --
502       if (p_phone_changed = 'N') then
503         --
504         begin
505          -- l_id := hr_transaction_api.get_number_value
506          l_id := get_number_value
507                      (p_transaction_step_id => l_trans_step_ids(ln_index)
508                      ,p_name                => 'P_PHONE_ID');
509          --
510          p_phone_changed   := 'Y';
511 
512          l_phone_step_id   :=  l_trans_step_ids(ln_index);
513 
514          l_id := hr_transaction_api.get_number_value
515                      (p_transaction_step_id => l_trans_step_ids(ln_index)
516                      ,p_name                => 'P_PERSON_ID');
517          --
518          p_parent_id := to_char(l_id);
519          l_contact_person_id := p_parent_id;
520          if (p_contact_relationship_id is null) then
521            l_id := get_number_value
522                      (p_transaction_step_id => l_trans_step_ids(ln_index)
523                      ,p_name                => 'P_CONTACT_RELATIONSHIP_ID');
524 
525              p_contact_relationship_id := to_char(l_id);
526          end if;
527          --
528         exception
529           when others then
530              null;
531         end;
532       end if;
533 
534       --
535       -- Check Address.
536       --
537       if (p_address_changed = 'N') then
538         --
539         begin
540          l_id := get_number_value
541                      (p_transaction_step_id => l_trans_step_ids(ln_index)
542                      ,p_name                => 'P_ADDRESS_ID');
543          l_prmry_flag         := hr_transaction_api.get_varchar2_value
544                                 (p_transaction_step_id => l_trans_step_ids(ln_index)
545                                 ,p_name                => 'P_PRIMARY_FLAG');
546 
547          if (l_prmry_flag = 'Y') then
548             p_address_changed := 'Y';
549 
550             p_address_id      := to_char(l_id);
551             l_address_step_id   :=  l_trans_step_ids(ln_index);
552 
553             l_addr_person_id := hr_transaction_api.get_number_value
554                              (p_transaction_step_id => l_trans_step_ids(ln_index)
555                              ,p_name                => 'P_PERSON_ID');
556             l_contact_person_id := l_addr_person_id;
557          end if;
558          if (p_contact_relationship_id is null) then
559            l_id := get_number_value
560                      (p_transaction_step_id => l_trans_step_ids(ln_index)
561                      ,p_name                => 'P_CONTACT_RELATIONSHIP_ID');
562              p_contact_relationship_id := to_char(l_id);
563          end if;
564         exception
565           when others then
566              null;
567         end;
568         --
569       end if;
570       --
571       if (p_second_address_changed = 'N') then
572         --
573         begin
574          l_id := get_number_value
575                      (p_transaction_step_id => l_trans_step_ids(ln_index)
576                      ,p_name                => 'P_ADDRESS_ID');
577 
578          l_prmry_flag         := hr_transaction_api.get_varchar2_value
579                                 (p_transaction_step_id => l_trans_step_ids(ln_index)
580                                 ,p_name                => 'P_PRIMARY_FLAG');
581 
582          if (l_prmry_flag = 'N') then
583             p_second_address_changed := 'Y';
584             p_address_id      := to_char(l_id);
585 
586             l_second_address_step_id   :=  l_trans_step_ids(ln_index);
587 
588             l_addr_person_id := hr_transaction_api.get_number_value
589                              (p_transaction_step_id => l_trans_step_ids(ln_index)
590                              ,p_name                => 'P_PERSON_ID');
591             l_contact_person_id := l_addr_person_id;
592          end if;
593          if (p_contact_relationship_id is null) then
594            l_id := get_number_value
595                      (p_transaction_step_id => l_trans_step_ids(ln_index)
596                      ,p_name                => 'P_CONTACT_RELATIONSHIP_ID');
597 
598              p_contact_relationship_id := to_char(l_id);
599          end if;
600         exception
601           when others then
602              null;
603         end;
604         --
605       end if;
606 
607     end if; -- end check for current contact set
608     --
609     ln_index := ln_index + 1;
610     l_trans_rec_count  := l_trans_rec_count  + 1;
611     p_second_address_step_id  := l_second_address_step_id;
612     p_address_step_id  := l_address_step_id;
613     p_contact_step_id  := l_contact_step_id;
614     p_phone_step_id    := l_phone_step_id;
615     p_contact_person_id := nvl(nvl(p_contact_person_id, l_addr_person_id), p_parent_id);
616     --
617     if (p_contact_person_id > 0) and (p_contact_changed = 'N') then
618          --
619          -- It could be possible that only address or phone data was
620          -- updated, so we need to pass back the first name, last name to display as
621          -- context.
622          --
623          open  c_get_names;
624          fetch c_get_names into l_last_name, l_first_name;
625          close c_get_names;
626          --
627     end if;
628     --
629   END LOOP;
630 
631   --
632   p_last_name         := l_last_name;
633   p_first_name        := l_first_name;
634   p_contact_operation := l_contact_operation ;
635   p_save_mode         := l_save_mode;
636   p_shared_residence_flag := l_shared_residence_flag;
637   p_trans_rec_count := l_trans_rec_count;
638 
639   hr_utility.set_location('Exiting For Loop:'||l_proc, 20);
640   /* fix sansingh
641    before leaving check if p_contact_person_id is populated or not
642    if only phone or address region is updated , p_contact_person_id
643    would not be populated , it would be actually stored as p_person_id in that case for the transaction step
644    so populating p_contact_person_id with the same
645   */
646   if (p_contact_person_id is null) then
647     p_contact_person_id := l_contact_person_id;
648   end if;
649 
650   hr_utility.set_location('Exiting:'||l_proc, 25);
651   --
652 EXCEPTION
653    WHEN OTHERS THEN
654       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
655       hr_utility.set_location('Exception OTHERS:'||l_proc,555);
656       hr_utility.raise_error;
657   --
658 
659 end get_contact_regions_status_tt;
660 
661 --
662 -- ---------------------------------------------------------------------------
663 -- ---------------------- < get_contact_relationship_tt> -------------------------
664 -- ---------------------------------------------------------------------------
665 -- Purpose: This procedure will get transaction data which are saved earlier
666 --          in the current transaction.  This is invoked when a user click BACK
667 --          button to go back from the Review page to Update page to correct
668 --          typos or make further changes.  Hence, we need to use the item_type
669 --          item_key passed in to retrieve the transaction record.
670 --          This is an overloaded version.
671 -- ---------------------------------------------------------------------------
672 --
673 PROCEDURE get_contact_relationship_tt
674    (p_item_type                       in  varchar2
675    ,p_item_key                        in  varchar2
676    ,p_activity_id                     in  number
677    -- 9999 What is this parameter.
678    ,p_trans_rec_count                 out nocopy number
679    ,p_effective_date                  out nocopy date
680    -- 9999 What is this parameter.
681    ,p_attribute_update_mode           out nocopy varchar2
682    ,P_CONTACT_RELATIONSHIP_ID         out nocopy NUMBER
683    ,P_CONTACT_TYPE                    out nocopy VARCHAR2
684    ,P_COMMENTS                        out nocopy VARCHAR2
685    ,P_PRIMARY_CONTACT_FLAG            out nocopy VARCHAR2
686    ,P_THIRD_PARTY_PAY_FLAG            out nocopy VARCHAR2
687    ,p_bondholder_flag                 out nocopy varchar2
688    ,p_date_start                      out nocopy date
689    ,p_start_life_reason_id            out nocopy number
690    ,p_date_end                        out nocopy date
691    ,p_end_life_reason_id              out nocopy number
692    ,p_rltd_per_rsds_w_dsgntr_flag      out nocopy varchar2
693    ,p_personal_flag                    out nocopy varchar2
694    ,p_sequence_number                  out nocopy number
695    ,p_dependent_flag                   out nocopy varchar2
696    ,p_beneficiary_flag                 out nocopy varchar2
697    ,p_cont_attribute_category          out nocopy varchar2
698    ,p_cont_attribute1                  out nocopy varchar2
699    ,p_cont_attribute2                  out nocopy varchar2
700    ,p_cont_attribute3                  out nocopy varchar2
701    ,p_cont_attribute4                  out nocopy varchar2
702    ,p_cont_attribute5                  out nocopy varchar2
703    ,p_cont_attribute6                  out nocopy varchar2
704    ,p_cont_attribute7                  out nocopy varchar2
705    ,p_cont_attribute8                  out nocopy varchar2
706    ,p_cont_attribute9                  out nocopy varchar2
707    ,p_cont_attribute10                  out nocopy varchar2
708    ,p_cont_attribute11                  out nocopy varchar2
709    ,p_cont_attribute12                  out nocopy varchar2
710    ,p_cont_attribute13                  out nocopy varchar2
711    ,p_cont_attribute14                  out nocopy varchar2
712    ,p_cont_attribute15                  out nocopy varchar2
713    ,p_cont_attribute16                  out nocopy varchar2
714    ,p_cont_attribute17                  out nocopy varchar2
715    ,p_cont_attribute18                  out nocopy varchar2
716    ,p_cont_attribute19                  out nocopy varchar2
717    ,p_cont_attribute20                  out nocopy varchar2
718    ,P_CONT_INFORMATION_CATEGORY         out nocopy varchar2
719    ,P_CONT_INFORMATION1                 out nocopy varchar2
720    ,P_CONT_INFORMATION2                 out nocopy varchar2
721    ,P_CONT_INFORMATION3                 out nocopy varchar2
722    ,P_CONT_INFORMATION4                 out nocopy varchar2
723    ,P_CONT_INFORMATION5                 out nocopy varchar2
724    ,P_CONT_INFORMATION6                 out nocopy varchar2
725    ,P_CONT_INFORMATION7                 out nocopy varchar2
726    ,P_CONT_INFORMATION8                 out nocopy varchar2
727    ,P_CONT_INFORMATION9                 out nocopy varchar2
728    ,P_CONT_INFORMATION10                out nocopy varchar2
729    ,P_CONT_INFORMATION11                out nocopy varchar2
730    ,P_CONT_INFORMATION12                out nocopy varchar2
731    ,P_CONT_INFORMATION13                out nocopy varchar2
732    ,P_CONT_INFORMATION14                out nocopy varchar2
733    ,P_CONT_INFORMATION15                out nocopy varchar2
734    ,P_CONT_INFORMATION16                out nocopy varchar2
735    ,P_CONT_INFORMATION17                out nocopy varchar2
736    ,P_CONT_INFORMATION18                out nocopy varchar2
737    ,P_CONT_INFORMATION19                out nocopy varchar2
738    ,P_CONT_INFORMATION20                out nocopy varchar2
739    ,p_object_version_number             out nocopy number
740    -- 9999 What is this parameter.
741    ,p_review_proc_call                    out nocopy varchar2
742 )is
743 
744   l_transaction_step_id        number default null;
745   l_trans_obj_vers_num         number default null;
746   l_transaction_rec_count      integer default 0;
747   l_proc   varchar2(72)  := g_package||'get_contact_relationship_tt';
748 
749 begin
750     hr_utility.set_location('Entering:'||l_proc, 5);
751   -- ------------------------------------------------------------------
752   -- Check if there are any transaction rec already saved for the current
753   -- transaction. This is used for re-display the Update page when a user
754   -- clicks the Back button on the Review page to go back to the Update page
755   -- to make further changes or to correct errors.
756   -----------------------------------------------------------------------------
757   hr_transaction_api.get_transaction_step_info
758      (p_item_type              => p_item_type
759      ,p_item_key               => p_item_key
760      ,p_activity_id            => p_activity_id
761      ,p_transaction_step_id    => l_transaction_step_id
762      ,p_object_version_number  => l_trans_obj_vers_num);
763 
764 
765   IF l_transaction_step_id > 0
766   THEN
767      hr_utility.set_location('l_transaction_step_id > 0:'||l_proc, 10);
768      l_transaction_rec_count := 1;
769   ELSE
770      hr_utility.set_location('l_transaction_step_id < 0:'||l_proc, 10);
771      l_transaction_rec_count := 0;
772      return;
773   END IF;
774   --
775   -- -------------------------------------------------------------------
776   -- There are some changes made earlier in the transaction.
777   -- Retrieve the data and return to caller.
778   -- -------------------------------------------------------------------
779   --
780   -- Now get the transaction data for the given step
781   get_contact_relationship_tt(
782     p_transaction_step_id          => l_transaction_step_id
783    ,p_effective_date               => p_effective_date
784    -- 9999 What is this parameter
785    ,p_attribute_update_mode        => p_attribute_update_mode
786    ,P_CONTACT_RELATIONSHIP_ID      =>  P_CONTACT_RELATIONSHIP_ID
787    ,P_CONTACT_TYPE                 =>  P_CONTACT_TYPE
788    ,P_COMMENTS                     =>  P_COMMENTS
789    ,P_PRIMARY_CONTACT_FLAG         =>  P_PRIMARY_CONTACT_FLAG
790    ,P_THIRD_PARTY_PAY_FLAG         =>  P_THIRD_PARTY_PAY_FLAG
791    ,p_bondholder_flag              =>  p_bondholder_flag
792    ,p_date_start                   =>  p_date_start
793    ,p_start_life_reason_id         =>  p_start_life_reason_id
794    ,p_date_end                     =>  p_date_end
795    ,p_end_life_reason_id           =>  p_end_life_reason_id
796    ,p_rltd_per_rsds_w_dsgntr_flag  =>  p_rltd_per_rsds_w_dsgntr_flag
797    ,p_personal_flag                =>  p_personal_flag
798    ,p_sequence_number              =>  p_sequence_number
799    ,p_dependent_flag               =>  p_dependent_flag
800    ,p_beneficiary_flag             =>  p_beneficiary_flag
801    ,p_cont_attribute_category      =>  p_cont_attribute_category
802    ,p_cont_attribute1              =>  p_cont_attribute1
803    ,p_cont_attribute2              =>  p_cont_attribute2
804    ,p_cont_attribute3              =>  p_cont_attribute3
805    ,p_cont_attribute4              =>  p_cont_attribute4
806    ,p_cont_attribute5              =>  p_cont_attribute5
807    ,p_cont_attribute6              =>  p_cont_attribute6
808    ,p_cont_attribute7              =>  p_cont_attribute7
809    ,p_cont_attribute8              =>  p_cont_attribute8
810    ,p_cont_attribute9              =>  p_cont_attribute9
811    ,p_cont_attribute10             =>  p_cont_attribute10
812    ,p_cont_attribute11             =>  p_cont_attribute11
813    ,p_cont_attribute12             =>  p_cont_attribute12
814    ,p_cont_attribute13             =>  p_cont_attribute13
815    ,p_cont_attribute14             =>  p_cont_attribute14
816    ,p_cont_attribute15             =>  p_cont_attribute15
817    ,p_cont_attribute16             =>  p_cont_attribute16
818    ,p_cont_attribute17             =>  p_cont_attribute17
819    ,p_cont_attribute18             =>  p_cont_attribute18
820    ,p_cont_attribute19             =>  p_cont_attribute19
821    ,p_cont_attribute20             =>  p_cont_attribute20
822    ,p_object_version_number        =>  p_object_version_number
823    ,P_CONT_INFORMATION_CATEGORY    => P_CONT_INFORMATION_CATEGORY
824    ,P_CONT_INFORMATION1            => P_CONT_INFORMATION1
825    ,P_CONT_INFORMATION2            => P_CONT_INFORMATION2
826    ,P_CONT_INFORMATION3            => P_CONT_INFORMATION3
827    ,P_CONT_INFORMATION4            => P_CONT_INFORMATION4
828    ,P_CONT_INFORMATION5            => P_CONT_INFORMATION5
829    ,P_CONT_INFORMATION6            => P_CONT_INFORMATION6
830    ,P_CONT_INFORMATION7            => P_CONT_INFORMATION7
831    ,P_CONT_INFORMATION8            => P_CONT_INFORMATION8
832    ,P_CONT_INFORMATION9            => P_CONT_INFORMATION9
833    ,P_CONT_INFORMATION10           => P_CONT_INFORMATION10
834    ,P_CONT_INFORMATION11           => P_CONT_INFORMATION11
835    ,P_CONT_INFORMATION12           => P_CONT_INFORMATION12
836    ,P_CONT_INFORMATION13           => P_CONT_INFORMATION13
837    ,P_CONT_INFORMATION14           => P_CONT_INFORMATION14
838    ,P_CONT_INFORMATION15           => P_CONT_INFORMATION15
839    ,P_CONT_INFORMATION16           => P_CONT_INFORMATION16
840    ,P_CONT_INFORMATION17           => P_CONT_INFORMATION17
841    ,P_CONT_INFORMATION18           => P_CONT_INFORMATION18
842    ,P_CONT_INFORMATION19           => P_CONT_INFORMATION19
843    ,P_CONT_INFORMATION20           => P_CONT_INFORMATION20
844    ,p_review_proc_call             => p_review_proc_call
845    );
846  --
847  p_trans_rec_count := l_transaction_rec_count;
848  hr_utility.set_location('Exiting:'||l_proc, 15);
849  --
850 EXCEPTION
851    WHEN g_data_error THEN
852       hr_utility.set_location('Exception:g_data_error'||l_proc,555);
853       RAISE;
854 
855 
856 END get_contact_relationship_tt;
857 --
858 -- ---------------------------------------------------------------------------
859 -- ---------------------- < get_contact_relationship_tt> -------------------------
860 -- ---------------------------------------------------------------------------
861 -- Purpose: This procedure will get transaction data which are pending for
862 --          approval in workflow for a transaction step id.
863 --          This is the procedure which does the actual work.
864 -- ---------------------------------------------------------------------------
865 procedure get_contact_relationship_tt
866    (p_transaction_step_id             in  number
867    ,p_effective_date                  out nocopy date
868    -- 9999 What is this paramter.
869    ,p_attribute_update_mode           out nocopy varchar2
870    ,P_CONTACT_RELATIONSHIP_ID         out nocopy NUMBER
871    ,P_CONTACT_TYPE                    out nocopy VARCHAR2
872    ,P_COMMENTS                        out nocopy VARCHAR2
873    ,P_PRIMARY_CONTACT_FLAG            out nocopy VARCHAR2
874    ,P_THIRD_PARTY_PAY_FLAG            out nocopy VARCHAR2
875    ,p_bondholder_flag                 out nocopy varchar2
876    ,p_date_start                      out nocopy date
877    ,p_start_life_reason_id            out nocopy number
878    ,p_date_end                        out nocopy date
879    ,p_end_life_reason_id              out nocopy number
880    ,p_rltd_per_rsds_w_dsgntr_flag      out nocopy varchar2
881    ,p_personal_flag                    out nocopy varchar2
882    ,p_sequence_number                  out nocopy number
883    ,p_dependent_flag                   out nocopy varchar2
884    ,p_beneficiary_flag                 out nocopy varchar2
885    ,p_cont_attribute_category          out nocopy varchar2
886    ,p_cont_attribute1                  out nocopy varchar2
887    ,p_cont_attribute2                  out nocopy varchar2
888    ,p_cont_attribute3                  out nocopy varchar2
889    ,p_cont_attribute4                  out nocopy varchar2
890    ,p_cont_attribute5                  out nocopy varchar2
891    ,p_cont_attribute6                  out nocopy varchar2
892    ,p_cont_attribute7                  out nocopy varchar2
893    ,p_cont_attribute8                  out nocopy varchar2
894    ,p_cont_attribute9                  out nocopy varchar2
895    ,p_cont_attribute10                  out nocopy varchar2
896    ,p_cont_attribute11                  out nocopy varchar2
897    ,p_cont_attribute12                  out nocopy varchar2
898    ,p_cont_attribute13                  out nocopy varchar2
899    ,p_cont_attribute14                  out nocopy varchar2
900    ,p_cont_attribute15                  out nocopy varchar2
901    ,p_cont_attribute16                  out nocopy varchar2
902    ,p_cont_attribute17                  out nocopy varchar2
903    ,p_cont_attribute18                  out nocopy varchar2
904    ,p_cont_attribute19                  out nocopy varchar2
905    ,p_cont_attribute20                  out nocopy varchar2
906    ,P_CONT_INFORMATION_CATEGORY         out nocopy varchar2
907    ,P_CONT_INFORMATION1                 out nocopy varchar2
908    ,P_CONT_INFORMATION2                 out nocopy varchar2
909    ,P_CONT_INFORMATION3                 out nocopy varchar2
910    ,P_CONT_INFORMATION4                 out nocopy varchar2
911    ,P_CONT_INFORMATION5                 out nocopy varchar2
912    ,P_CONT_INFORMATION6                 out nocopy varchar2
913    ,P_CONT_INFORMATION7                 out nocopy varchar2
914    ,P_CONT_INFORMATION8                 out nocopy varchar2
915    ,P_CONT_INFORMATION9                 out nocopy varchar2
916    ,P_CONT_INFORMATION10                out nocopy varchar2
917    ,P_CONT_INFORMATION11                out nocopy varchar2
918    ,P_CONT_INFORMATION12                out nocopy varchar2
919    ,P_CONT_INFORMATION13                out nocopy varchar2
920    ,P_CONT_INFORMATION14                out nocopy varchar2
921    ,P_CONT_INFORMATION15                out nocopy varchar2
922    ,P_CONT_INFORMATION16                out nocopy varchar2
923    ,P_CONT_INFORMATION17                out nocopy varchar2
924    ,P_CONT_INFORMATION18                out nocopy varchar2
925    ,P_CONT_INFORMATION19                out nocopy varchar2
926    ,P_CONT_INFORMATION20                out nocopy varchar2
927    ,p_object_version_number             out nocopy number
928    -- 9999 What is this parameter.
929    ,p_review_proc_call                out nocopy varchar2
930 )is
931  --
932  --
933    l_proc   varchar2(72)  := g_package||'get_contact_relationship_tt';
934 
935 BEGIN
936   --
937   p_effective_date:=
938     hr_transaction_api.get_date_value
939     (p_transaction_step_id => p_transaction_step_id
940     ,p_name                => 'P_EFFECTIVE_DATE');
941   --
942   hr_utility.set_location('P_EFFECTIVE_DATE', 2222);
943   P_ATTRIBUTE_UPDATE_MODE := 'update';
944   /*
945   -- 9999 delete it later if not required.
946   p_attribute_update_mode :=
947     hr_transaction_api.get_varchar2_value
948     (p_transaction_step_id => p_transaction_step_id
949     ,p_name                => 'P_ATTRIBUTE_UPDATE_MODE');
950   hr_utility.set_location('P_ATTRIBUTE_UPDATE_MODE', 2222);
951   */
952   --
953   P_CONTACT_RELATIONSHIP_ID  :=
954       hr_transaction_api.get_NUMBER_value
955         (p_transaction_step_id => p_transaction_step_id
956         ,p_name                => 'P_CONTACT_RELATIONSHIP_ID');
957   hr_utility.set_location('P_CONTACT_RELATIONSHIP_ID', 2222);
958   --
959   P_CONTACT_TYPE  :=
960       hr_transaction_api.get_VARCHAR2_value
961         (p_transaction_step_id => p_transaction_step_id
962         ,p_name                => 'P_CONTACT_TYPE');
963   hr_utility.set_location('P_CONTACT_TYPE', 2222);
964   --
965   P_COMMENTS  :=
966       hr_transaction_api.get_VARCHAR2_value
967         (p_transaction_step_id => p_transaction_step_id
968         ,p_name                => 'P_COMMENTS');
969   hr_utility.set_location('P_COMMENTS', 2222);
970   --
971   P_PRIMARY_CONTACT_FLAG  :=
972       hr_transaction_api.get_VARCHAR2_value
973         (p_transaction_step_id => p_transaction_step_id
974         ,p_name                => 'P_PRIMARY_CONTACT_FLAG');
975   hr_utility.set_location('P_PRIMARY_CONTACT_FLAG', 2222);
976   --
977   P_THIRD_PARTY_PAY_FLAG  :=
978       hr_transaction_api.get_VARCHAR2_value
979         (p_transaction_step_id => p_transaction_step_id
980         ,p_name                => 'P_THIRD_PARTY_PAY_FLAG');
981   hr_utility.set_location('P_THIRD_PARTY_PAY_FLAG', 2222);
982   --
983   p_bondholder_flag  :=
984       hr_transaction_api.get_varchar2_value
985         (p_transaction_step_id => p_transaction_step_id
986         ,p_name                => 'P_BONDHOLDER_FLAG');
987   hr_utility.set_location('P_BONDHOLDER_FLAG', 2222);
988   --
989   p_date_start  :=
990       hr_transaction_api.get_date_value
991         (p_transaction_step_id => p_transaction_step_id
992         ,p_name                => 'P_DATE_START');
993   hr_utility.set_location('P_DATE_START', 2222);
994   --
995   p_start_life_reason_id  :=
996       hr_transaction_api.get_number_value
997         (p_transaction_step_id => p_transaction_step_id
998         ,p_name                => 'P_START_LIFE_REASON_ID');
999   hr_utility.set_location('P_START_LIFE_REASON_ID', 2222);
1000   --
1001   p_date_end  :=
1002       hr_transaction_api.get_date_value
1003         (p_transaction_step_id => p_transaction_step_id
1004         ,p_name                => 'P_DATE_END');
1005   hr_utility.set_location('P_DATE_END', 2222);
1006   --
1007   p_end_life_reason_id  :=
1008       hr_transaction_api.get_number_value
1009         (p_transaction_step_id => p_transaction_step_id
1010         ,p_name                => 'P_END_LIFE_REASON_ID');
1011   hr_utility.set_location('P_END_LIFE_REASON_ID', 2222);
1012   --
1013   p_rltd_per_rsds_w_dsgntr_flag  :=
1014       hr_transaction_api.get_varchar2_value
1015         (p_transaction_step_id => p_transaction_step_id
1016         ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG');
1017   hr_utility.set_location('P_RLTD_PER_RSDS_W_DSGNTR_FLAG', 2222);
1018   --
1019   p_personal_flag  :=
1020       hr_transaction_api.get_varchar2_value
1021         (p_transaction_step_id => p_transaction_step_id
1022         ,p_name                => 'P_PERSONAL_FLAG');
1023   hr_utility.set_location('P_PERSONAL_FLAG', 2222);
1024   --
1025   p_sequence_number  :=
1026       hr_transaction_api.get_number_value
1027         (p_transaction_step_id => p_transaction_step_id
1028         ,p_name                => 'P_SEQUENCE_NUMBER');
1029   hr_utility.set_location('P_SEQUENCE_NUMBER', 2222);
1030   --
1031   p_dependent_flag  :=
1032       hr_transaction_api.get_varchar2_value
1033         (p_transaction_step_id => p_transaction_step_id
1034         ,p_name                => 'P_DEPENDENT_FLAG');
1035   hr_utility.set_location('P_DEPENDENT_FLAG', 2222);
1036   --
1037   p_beneficiary_flag  :=
1038       hr_transaction_api.get_varchar2_value
1039         (p_transaction_step_id => p_transaction_step_id
1040         ,p_name                => 'P_BENEFICIARY_FLAG');
1041   hr_utility.set_location('P_BENEFICIARY_FLAG', 2222);
1042   --
1043   p_cont_attribute_category  :=
1044       hr_transaction_api.get_varchar2_value
1045         (p_transaction_step_id => p_transaction_step_id
1046         ,p_name                => 'P_CONT_ATTRIBUTE_CATEGORY');
1047   hr_utility.set_location('P_CONT_ATTRIBUTE_CATEGORY', 2222);
1048   --
1049   p_cont_attribute1  :=
1050       hr_transaction_api.get_varchar2_value
1051         (p_transaction_step_id => p_transaction_step_id
1052         ,p_name                => 'P_CONT_ATTRIBUTE1');
1053   hr_utility.set_location('P_CONT_ATTRIBUTE1', 2222);
1054   --
1055   p_cont_attribute2  :=
1056       hr_transaction_api.get_varchar2_value
1057         (p_transaction_step_id => p_transaction_step_id
1058         ,p_name                => 'P_CONT_ATTRIBUTE2');
1059   hr_utility.set_location('P_CONT_ATTRIBUTE2', 2222);
1060   --
1061   p_cont_attribute3  :=
1062       hr_transaction_api.get_varchar2_value
1063         (p_transaction_step_id => p_transaction_step_id
1064         ,p_name                => 'P_CONT_ATTRIBUTE3');
1065   hr_utility.set_location('P_CONT_ATTRIBUTE3', 2222);
1066   --
1067   p_cont_attribute4  :=
1068       hr_transaction_api.get_varchar2_value
1069         (p_transaction_step_id => p_transaction_step_id
1070         ,p_name                => 'P_CONT_ATTRIBUTE4');
1071   hr_utility.set_location('P_CONT_ATTRIBUTE4', 2222);
1072   --
1073   p_cont_attribute5  :=
1074       hr_transaction_api.get_varchar2_value
1075         (p_transaction_step_id => p_transaction_step_id
1076         ,p_name                => 'P_CONT_ATTRIBUTE5');
1077   hr_utility.set_location('P_CONT_ATTRIBUTE5', 2222);
1078   --
1079   p_cont_attribute6  :=
1080       hr_transaction_api.get_varchar2_value
1081         (p_transaction_step_id => p_transaction_step_id
1082         ,p_name                => 'P_CONT_ATTRIBUTE6');
1083   hr_utility.set_location('P_CONT_ATTRIBUTE6', 2222);
1084   --
1085   p_cont_attribute7  :=
1086       hr_transaction_api.get_varchar2_value
1087         (p_transaction_step_id => p_transaction_step_id
1088         ,p_name                => 'P_CONT_ATTRIBUTE7');
1089   hr_utility.set_location('P_CONT_ATTRIBUTE7', 2222);
1090   --
1091   p_cont_attribute8  :=
1092       hr_transaction_api.get_varchar2_value
1093         (p_transaction_step_id => p_transaction_step_id
1094         ,p_name                => 'P_CONT_ATTRIBUTE8');
1095   hr_utility.set_location('P_CONT_ATTRIBUTE8', 2222);
1096   --
1097   p_cont_attribute9  :=
1098       hr_transaction_api.get_varchar2_value
1099         (p_transaction_step_id => p_transaction_step_id
1100         ,p_name                => 'P_CONT_ATTRIBUTE9');
1101   hr_utility.set_location('P_CONT_ATTRIBUTE9', 2222);
1102   --
1103   p_cont_attribute10  :=
1104       hr_transaction_api.get_varchar2_value
1105         (p_transaction_step_id => p_transaction_step_id
1106         ,p_name                => 'P_CONT_ATTRIBUTE10');
1107   hr_utility.set_location('P_CONT_ATTRIBUTE10', 2222);
1108   --
1109   p_cont_attribute11  :=
1110       hr_transaction_api.get_varchar2_value
1111         (p_transaction_step_id => p_transaction_step_id
1112         ,p_name                => 'P_CONT_ATTRIBUTE11');
1113   hr_utility.set_location('P_CONT_ATTRIBUTE11', 2222);
1114   --
1115   p_cont_attribute12  :=
1116       hr_transaction_api.get_varchar2_value
1117         (p_transaction_step_id => p_transaction_step_id
1118         ,p_name                => 'P_CONT_ATTRIBUTE12');
1119   hr_utility.set_location('P_CONT_ATTRIBUTE12', 2222);
1120   --
1121   p_cont_attribute13  :=
1122       hr_transaction_api.get_varchar2_value
1123         (p_transaction_step_id => p_transaction_step_id
1124         ,p_name                => 'P_CONT_ATTRIBUTE13');
1125   hr_utility.set_location('P_CONT_ATTRIBUTE13', 2222);
1126   --
1127   p_cont_attribute14  :=
1128       hr_transaction_api.get_varchar2_value
1129         (p_transaction_step_id => p_transaction_step_id
1130         ,p_name                => 'P_CONT_ATTRIBUTE14');
1131   hr_utility.set_location('P_CONT_ATTRIBUTE14', 2222);
1132   --
1133   p_cont_attribute15  :=
1134       hr_transaction_api.get_varchar2_value
1135         (p_transaction_step_id => p_transaction_step_id
1136         ,p_name                => 'P_CONT_ATTRIBUTE15');
1137   hr_utility.set_location('P_CONT_ATTRIBUTE15', 2222);
1138   --
1139   p_cont_attribute16  :=
1140       hr_transaction_api.get_varchar2_value
1141         (p_transaction_step_id => p_transaction_step_id
1142         ,p_name                => 'P_CONT_ATTRIBUTE16');
1143   hr_utility.set_location('P_CONT_ATTRIBUTE16', 2222);
1144   --
1145   p_cont_attribute17  :=
1146       hr_transaction_api.get_varchar2_value
1147         (p_transaction_step_id => p_transaction_step_id
1148         ,p_name                => 'P_CONT_ATTRIBUTE17');
1149   hr_utility.set_location('P_CONT_ATTRIBUTE17', 2222);
1150   --
1151   p_cont_attribute18  :=
1152       hr_transaction_api.get_varchar2_value
1153         (p_transaction_step_id => p_transaction_step_id
1154         ,p_name                => 'P_CONT_ATTRIBUTE18');
1155   hr_utility.set_location('P_CONT_ATTRIBUTE18', 2222);
1156   --
1157   p_cont_attribute19  :=
1158       hr_transaction_api.get_varchar2_value
1159         (p_transaction_step_id => p_transaction_step_id
1160         ,p_name                => 'P_CONT_ATTRIBUTE19');
1161   hr_utility.set_location('P_CONT_ATTRIBUTE19', 2222);
1162   --
1163   p_cont_attribute20  :=
1164       hr_transaction_api.get_varchar2_value
1165         (p_transaction_step_id => p_transaction_step_id
1166         ,p_name                => 'P_CONT_ATTRIBUTE20');
1167   hr_utility.set_location('p_cont_attribute20', 2222);
1168   --
1169   p_object_version_number  :=
1170       hr_transaction_api.get_number_value
1171         (p_transaction_step_id => p_transaction_step_id
1172         ,p_name                => 'P_OBJECT_VERSION_NUMBER');
1173   hr_utility.set_location('p_object_version_number', 2222);
1174   --
1175   p_review_proc_call :=
1176     hr_transaction_api.get_varchar2_value
1177     (p_transaction_step_id => p_transaction_step_id
1178     ,p_name                => 'P_REVIEW_PROC_CALL');
1179   hr_utility.set_location('P_REVIEW_PROC_CALL', 2222);
1180   --
1181   --
1182   P_CONT_INFORMATION_CATEGORY  :=
1183       hr_transaction_api.get_VARCHAR2_value
1184             (p_transaction_step_id => p_transaction_step_id
1185             ,p_name                => 'P_CONT_INFORMATION_CATEGORY');
1186   --
1187   P_CONT_INFORMATION1  :=
1188       hr_transaction_api.get_VARCHAR2_value
1189             (p_transaction_step_id => p_transaction_step_id
1190             ,p_name                => 'P_CONT_INFORMATION1');
1191   --
1192   P_CONT_INFORMATION2  :=
1193       hr_transaction_api.get_VARCHAR2_value
1194             (p_transaction_step_id => p_transaction_step_id
1195             ,p_name                => 'P_CONT_INFORMATION2');
1196   --
1197   P_CONT_INFORMATION3  :=
1198       hr_transaction_api.get_VARCHAR2_value
1199             (p_transaction_step_id => p_transaction_step_id
1200             ,p_name                => 'P_CONT_INFORMATION3');
1201   --
1202   P_CONT_INFORMATION4  :=
1203       hr_transaction_api.get_VARCHAR2_value
1204             (p_transaction_step_id => p_transaction_step_id
1205             ,p_name                => 'P_CONT_INFORMATION4');
1206   --
1207   P_CONT_INFORMATION5  :=
1208       hr_transaction_api.get_VARCHAR2_value
1209             (p_transaction_step_id => p_transaction_step_id
1210             ,p_name                => 'P_CONT_INFORMATION5');
1211   --
1212   P_CONT_INFORMATION6  :=
1213        hr_transaction_api.get_VARCHAR2_value
1214             (p_transaction_step_id => p_transaction_step_id
1215             ,p_name                => 'P_CONT_INFORMATION6');
1216   --
1217   P_CONT_INFORMATION7  :=
1218        hr_transaction_api.get_VARCHAR2_value
1219             (p_transaction_step_id => p_transaction_step_id
1220             ,p_name                => 'P_CONT_INFORMATION7');
1221   --
1222   P_CONT_INFORMATION8  :=
1223        hr_transaction_api.get_VARCHAR2_value
1224             (p_transaction_step_id => p_transaction_step_id
1225             ,p_name                => 'P_CONT_INFORMATION8');
1226   --
1227   P_CONT_INFORMATION9  :=
1228        hr_transaction_api.get_VARCHAR2_value
1229             (p_transaction_step_id => p_transaction_step_id
1230             ,p_name                => 'P_CONT_INFORMATION9');
1231   --
1232   P_CONT_INFORMATION10  :=
1233        hr_transaction_api.get_VARCHAR2_value
1234             (p_transaction_step_id => p_transaction_step_id
1235             ,p_name                => 'P_CONT_INFORMATION10');
1236    --
1237    P_CONT_INFORMATION11  :=
1238        hr_transaction_api.get_VARCHAR2_value
1239             (p_transaction_step_id => p_transaction_step_id
1240             ,p_name                => 'P_CONT_INFORMATION11');
1241    --
1242    P_CONT_INFORMATION12  :=
1243         hr_transaction_api.get_VARCHAR2_value
1244             (p_transaction_step_id => p_transaction_step_id
1245             ,p_name                => 'P_CONT_INFORMATION12');
1246    --
1247    P_CONT_INFORMATION13  :=
1248         hr_transaction_api.get_VARCHAR2_value
1249             (p_transaction_step_id => p_transaction_step_id
1250             ,p_name                => 'P_CONT_INFORMATION13');
1251    --
1252    P_CONT_INFORMATION14  :=
1253         hr_transaction_api.get_VARCHAR2_value
1254             (p_transaction_step_id => p_transaction_step_id
1255             ,p_name                => 'P_CONT_INFORMATION14');
1256    --
1257    P_CONT_INFORMATION15  :=
1258         hr_transaction_api.get_VARCHAR2_value
1259             (p_transaction_step_id => p_transaction_step_id
1260             ,p_name                => 'P_CONT_INFORMATION15');
1261    --
1262    P_CONT_INFORMATION16  :=
1263         hr_transaction_api.get_VARCHAR2_value
1264             (p_transaction_step_id => p_transaction_step_id
1265             ,p_name                => 'P_CONT_INFORMATION16');
1266    --
1267    P_CONT_INFORMATION17  :=
1268         hr_transaction_api.get_VARCHAR2_value
1269             (p_transaction_step_id => p_transaction_step_id
1270             ,p_name                => 'P_CONT_INFORMATION17');
1271    --
1272    P_CONT_INFORMATION18  :=
1273         hr_transaction_api.get_VARCHAR2_value
1274             (p_transaction_step_id => p_transaction_step_id
1275             ,p_name                => 'P_CONT_INFORMATION18');
1276    --
1277    P_CONT_INFORMATION19  :=
1278         hr_transaction_api.get_VARCHAR2_value
1279             (p_transaction_step_id => p_transaction_step_id
1280             ,p_name                => 'P_CONT_INFORMATION19');
1281    --
1282    P_CONT_INFORMATION20  :=
1283         hr_transaction_api.get_VARCHAR2_value
1284             (p_transaction_step_id => p_transaction_step_id
1285             ,p_name                => 'P_CONT_INFORMATION20');
1286    --
1287 hr_utility.set_location('Exiting:'||l_proc, 15);
1288 EXCEPTION
1289    WHEN OTHERS THEN
1290       hr_utility.set_location('Exception:'||l_proc,555);
1291       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
1292       hr_utility.raise_error;
1293       --RAISE;
1294 
1295 END get_contact_relationship_tt;
1296 
1297 -- ----------------------------------------------------------------------------
1298  -- |-------------------------< check_ni_unique>------------------------|
1299  -- ----------------------------------------------------------------------------
1300  -- this procedure checks if the SSN entered is duplicate or not.If value of profile
1301  -- HR: NI Unique Error or Warning is 'Warning' then warning is raised for duplicate
1302  -- SSN entered else if value is 'Error' or null then error is raised.
1303 
1304 procedure check_ni_unique(
1305 p_national_identifier          in        varchar2    default null
1306 ,p_business_group_id           in        number
1307 ,p_person_id                   in        number
1308 ,p_ni_duplicate_warn_or_err    out nocopy       varchar2) is
1309 
1310  l_warning                           boolean default false;
1311  l_warning_or_error                  varchar2(20);
1312  l_proc   varchar2(72)  := g_package||'check_ni_unique';
1313 
1314 begin
1315   hr_utility.set_location('Entering:'||l_proc, 5);
1316   hr_utility.clear_message();
1317   hr_utility.clear_warning();
1318 
1319 
1320   l_warning_or_error := fnd_profile.value('PER_NI_UNIQUE_ERROR_WARNING');
1321   if l_warning_or_error is null then
1322     l_warning_or_error:= 'ERROR';
1323     hr_utility.set_location('l_warning_or_error:'||l_proc,10 );
1324   end if;
1325 
1326   if p_national_identifier is not null then
1327 
1328       hr_utility.set_location('p_national_identifier is not null:'||l_proc,15 );
1329       hr_ni_chk_pkg.check_ni_unique(p_national_identifier => p_national_identifier
1330                                    ,p_person_id => p_person_id
1331                                    ,p_business_group_id => p_business_group_id
1332                                    ,p_raise_error_or_warning => l_warning_or_error);
1333 
1334 
1335   l_warning := hr_utility.check_warning();
1336    if l_warning then
1337     hr_utility.set_location('if l_warning:'||l_proc,20);
1338     p_ni_duplicate_warn_or_err := 'WARNING';
1339    else
1340     hr_utility.set_location('else part of if l_warning:'||l_proc,25);
1341     p_ni_duplicate_warn_or_err := 'NONE';
1342    end if;
1343   end if;
1344 
1345   hr_utility.set_location('Exiting:'||l_proc, 30);
1346    exception
1347    when others then
1348    hr_utility.set_location('Exception:'||l_proc,555);
1349   if not l_warning then
1350     p_ni_duplicate_warn_or_err := 'ERROR';
1351     raise;
1352   end if;
1353 
1354   end check_ni_unique;
1355 --
1356 --
1357 --
1358 
1359 --
1360 -- 99999
1361 -- In update_person of hrperwrs.pkb p_login_person_id,
1362 -- p_process_section_name, p_action_type, p_review_page_region_code
1363 -- are there what is the significance of it.
1364 --
1365 -- 99999
1366 -- Write something similar to hr_process_person_ss.is_rec_changed
1367 -- validate_basic_details,
1368 -- 99999
1369 -- Include the following code in update_contact_relationship
1370 -- --
1371 --  l_count := l_count + 1;
1372 --  l_transaction_table(l_count).param_name := 'P_PROCESS_SECTION_NAME';
1373 --  l_transaction_table(l_count).param_value := p_process_section_name;
1374  -- l_transaction_table(l_count).param_data_type := 'VARCHAR2';
1375 --  l_count := l_count + 1;
1376 --  l_transaction_table(l_count).param_name := 'P_ACTION_TYPE';
1377 --  l_transaction_table(l_count).param_value := p_action_type;
1378 --  l_transaction_table(l_count).param_data_type := 'VARCHAR2';
1379 --
1380 --9999
1381 -- Put the errors like :
1382 --   WHEN g_data_error THEN
1383 --    hr_utility.raise_error;
1384 --
1385 --  WHEN g_no_changes THEN
1386 --    hr_utility.set_message(800, 'HR_PERINFO_NO_CHANGES');
1387 --    hr_utility.raise_error;
1388 --
1389 --  WHEN others THEN
1390 --    hr_utility.raise_error;
1391 -- 9999
1392 --
1393   /*
1394   ||===========================================================================
1395   || PROCEDURE: update_contact_relationship
1396   ||---------------------------------------------------------------------------
1397   ||
1398   || Description:
1399   || Description:
1400   ||     This procedure will call the actual API -
1401   ||                hr_contact_rel_api.update_contact_relationship()
1402   ||
1403   || Pre Conditions:
1404   ||
1405   || In Arguments:
1406   ||     Contains entire list of parameters that are defined in the actual
1407   ||     API. For details see peaddapi.pkb file.
1408   ||
1409   || out nocopy Arguments:
1410   ||
1411   || In out nocopy Arguments:
1412   ||
1413   || Post Success:
1414   ||     Executes the API call.
1415   ||
1416   || Post Failure:
1417   ||     Raises an exception
1418   ||
1419   || Access Status:
1420   ||     Public.
1421   ||
1422   ||===========================================================================
1423   */
1424 
1425 PROCEDURE update_contact_relationship
1426   (p_validate                      in        varchar2  default 'Y'
1427   ,p_cont_effective_date           in        date
1428   ,p_contact_relationship_id       in        number
1429   ,p_contact_type                  in        varchar2  default hr_api.g_varchar2
1430   ,p_ctr_comments                  in        clob      default hr_api.g_varchar2	-- Bug#13362792
1431   ,p_primary_contact_flag          in        varchar2  default hr_api.g_varchar2
1432   ,p_third_party_pay_flag          in        varchar2  default hr_api.g_varchar2
1433   ,p_bondholder_flag               in        varchar2  default hr_api.g_varchar2
1434   ,p_date_start                    in        date      default hr_api.g_date
1435   ,p_start_life_reason_id          in        number    default hr_api.g_number
1436   ,p_date_end                      in        date      default hr_api.g_date
1437   ,p_end_life_reason_id            in        number    default hr_api.g_number
1438   ,p_rltd_per_rsds_w_dsgntr_flag   in        varchar2  default hr_api.g_varchar2
1439   ,p_personal_flag                 in        varchar2  default hr_api.g_varchar2
1440   ,p_sequence_number               in        number    default hr_api.g_number
1441   ,p_dependent_flag                in        varchar2  default hr_api.g_varchar2
1442   ,p_beneficiary_flag              in        varchar2  default hr_api.g_varchar2
1443   ,p_cont_attribute_category       in        varchar2  default hr_api.g_varchar2
1444   ,p_cont_attribute1               in        varchar2  default hr_api.g_varchar2
1445   ,p_cont_attribute2               in        varchar2  default hr_api.g_varchar2
1446   ,p_cont_attribute3               in        varchar2  default hr_api.g_varchar2
1447   ,p_cont_attribute4               in        varchar2  default hr_api.g_varchar2
1448   ,p_cont_attribute5               in        varchar2  default hr_api.g_varchar2
1449   ,p_cont_attribute6               in        varchar2  default hr_api.g_varchar2
1450   ,p_cont_attribute7               in        varchar2  default hr_api.g_varchar2
1451   ,p_cont_attribute8               in        varchar2  default hr_api.g_varchar2
1452   ,p_cont_attribute9               in        varchar2  default hr_api.g_varchar2
1453   ,p_cont_attribute10              in        varchar2  default hr_api.g_varchar2
1454   ,p_cont_attribute11              in        varchar2  default hr_api.g_varchar2
1455   ,p_cont_attribute12              in        varchar2  default hr_api.g_varchar2
1456   ,p_cont_attribute13              in        varchar2  default hr_api.g_varchar2
1457   ,p_cont_attribute14              in        varchar2  default hr_api.g_varchar2
1458   ,p_cont_attribute15              in        varchar2  default hr_api.g_varchar2
1459   ,p_cont_attribute16              in        varchar2  default hr_api.g_varchar2
1460   ,p_cont_attribute17              in        varchar2  default hr_api.g_varchar2
1461   ,p_cont_attribute18              in        varchar2  default hr_api.g_varchar2
1462   ,p_cont_attribute19              in        varchar2  default hr_api.g_varchar2
1463   ,p_cont_attribute20              in        varchar2  default hr_api.g_varchar2
1464   ,p_person_id                     in        number
1465   ,p_login_person_id               in        number    default hr_api.g_number
1466   ,p_cont_object_version_number    in out nocopy    number
1467   ,p_item_type                     in        varchar2
1468   ,p_item_key                      in        varchar2
1469   ,p_activity_id                   in        number
1470   ,p_action                        in        varchar2 -- this is p_action_type
1471   ,p_process_section_name          in        varchar2
1472   ,p_review_page_region_code       in        varchar2 default hr_api.g_varchar2
1473 
1474   -- Update_person parameters
1475 
1476   ,p_per_effective_date           in      date
1477   ,p_datetrack_update_mode        in      varchar2
1478   ,p_cont_person_id               in      number
1479   ,p_per_object_version_number    in out nocopy  number
1480   ,p_person_type_id               in      number   default hr_api.g_number
1481   ,p_last_name                    in      varchar2 default hr_api.g_varchar2
1482   ,p_applicant_number             in      varchar2 default hr_api.g_varchar2
1483   ,p_per_comments                 in      varchar2 default hr_api.g_varchar2
1484   ,p_date_employee_data_verified  in      date     default hr_api.g_date
1485   ,p_date_of_birth                in      date     default hr_api.g_date
1486   ,p_email_address                in      varchar2 default hr_api.g_varchar2
1487   ,p_employee_number              in out nocopy  varchar2
1488   ,p_expense_check_send_to_addres in      varchar2 default hr_api.g_varchar2
1489   ,p_first_name                   in      varchar2 default hr_api.g_varchar2
1490   ,p_known_as                     in      varchar2 default hr_api.g_varchar2
1491   ,p_marital_status               in      varchar2 default hr_api.g_varchar2
1492   ,p_middle_names                 in      varchar2 default hr_api.g_varchar2
1493   ,p_nationality                  in      varchar2 default hr_api.g_varchar2
1494   ,p_national_identifier          in      varchar2 default hr_api.g_varchar2
1495   ,p_previous_last_name           in      varchar2 default hr_api.g_varchar2
1496   ,p_registered_disabled_flag     in      varchar2 default hr_api.g_varchar2
1497   ,p_sex                          in      varchar2 default hr_api.g_varchar2
1498   ,p_title                        in      varchar2 default hr_api.g_varchar2
1499   ,p_vendor_id                    in      number   default hr_api.g_number
1500   ,p_work_telephone               in      varchar2 default hr_api.g_varchar2
1501   ,p_attribute_category           in      varchar2 default hr_api.g_varchar2
1502   ,p_attribute1                   in      varchar2 default hr_api.g_varchar2
1503   ,p_attribute2                   in      varchar2 default hr_api.g_varchar2
1504   ,p_attribute3                   in      varchar2 default hr_api.g_varchar2
1505   ,p_attribute4                   in      varchar2 default hr_api.g_varchar2
1506   ,p_attribute5                   in      varchar2 default hr_api.g_varchar2
1507   ,p_attribute6                   in      varchar2 default hr_api.g_varchar2
1508   ,p_attribute7                   in      varchar2 default hr_api.g_varchar2
1509   ,p_attribute8                   in      varchar2 default hr_api.g_varchar2
1510   ,p_attribute9                   in      varchar2 default hr_api.g_varchar2
1511   ,p_attribute10                  in      varchar2 default hr_api.g_varchar2
1512   ,p_attribute11                  in      varchar2 default hr_api.g_varchar2
1513   ,p_attribute12                  in      varchar2 default hr_api.g_varchar2
1514   ,p_attribute13                  in      varchar2 default hr_api.g_varchar2
1515   ,p_attribute14                  in      varchar2 default hr_api.g_varchar2
1516   ,p_attribute15                  in      varchar2 default hr_api.g_varchar2
1517   ,p_attribute16                  in      varchar2 default hr_api.g_varchar2
1518   ,p_attribute17                  in      varchar2 default hr_api.g_varchar2
1519   ,p_attribute18                  in      varchar2 default hr_api.g_varchar2
1520   ,p_attribute19                  in      varchar2 default hr_api.g_varchar2
1521   ,p_attribute20                  in      varchar2 default hr_api.g_varchar2
1522   ,p_attribute21                  in      varchar2 default hr_api.g_varchar2
1523   ,p_attribute22                  in      varchar2 default hr_api.g_varchar2
1524   ,p_attribute23                  in      varchar2 default hr_api.g_varchar2
1525   ,p_attribute24                  in      varchar2 default hr_api.g_varchar2
1526   ,p_attribute25                  in      varchar2 default hr_api.g_varchar2
1527   ,p_attribute26                  in      varchar2 default hr_api.g_varchar2
1528   ,p_attribute27                  in      varchar2 default hr_api.g_varchar2
1529   ,p_attribute28                  in      varchar2 default hr_api.g_varchar2
1530   ,p_attribute29                  in      varchar2 default hr_api.g_varchar2
1531   ,p_attribute30                  in      varchar2 default hr_api.g_varchar2
1532   ,p_per_information_category     in      varchar2 default hr_api.g_varchar2
1533   ,p_per_information1             in      varchar2 default hr_api.g_varchar2
1534   ,p_per_information2             in      varchar2 default hr_api.g_varchar2
1535   ,p_per_information3             in      varchar2 default hr_api.g_varchar2
1536   ,p_per_information4             in      varchar2 default hr_api.g_varchar2
1537   ,p_per_information5             in      varchar2 default hr_api.g_varchar2
1538   ,p_per_information6             in      varchar2 default hr_api.g_varchar2
1539   ,p_per_information7             in      varchar2 default hr_api.g_varchar2
1540   ,p_per_information8             in      varchar2 default hr_api.g_varchar2
1541   ,p_per_information9             in      varchar2 default hr_api.g_varchar2
1542   ,p_per_information10            in      varchar2 default hr_api.g_varchar2
1543   ,p_per_information11            in      varchar2 default hr_api.g_varchar2
1544   ,p_per_information12            in      varchar2 default hr_api.g_varchar2
1545   ,p_per_information13            in      varchar2 default hr_api.g_varchar2
1546   ,p_per_information14            in      varchar2 default hr_api.g_varchar2
1547   ,p_per_information15            in      varchar2 default hr_api.g_varchar2
1548   ,p_per_information16            in      varchar2 default hr_api.g_varchar2
1549   ,p_per_information17            in      varchar2 default hr_api.g_varchar2
1550   ,p_per_information18            in      varchar2 default hr_api.g_varchar2
1551   ,p_per_information19            in      varchar2 default hr_api.g_varchar2
1552   ,p_per_information20            in      varchar2 default hr_api.g_varchar2
1553   ,p_per_information21            in      varchar2 default hr_api.g_varchar2
1554   ,p_per_information22            in      varchar2 default hr_api.g_varchar2
1555   ,p_per_information23            in      varchar2 default hr_api.g_varchar2
1556   ,p_per_information24            in      varchar2 default hr_api.g_varchar2
1557   ,p_per_information25            in      varchar2 default hr_api.g_varchar2
1558   ,p_per_information26            in      varchar2 default hr_api.g_varchar2
1559   ,p_per_information27            in      varchar2 default hr_api.g_varchar2
1560   ,p_per_information28            in      varchar2 default hr_api.g_varchar2
1561   ,p_per_information29            in      varchar2 default hr_api.g_varchar2
1562   ,p_per_information30            in      varchar2 default hr_api.g_varchar2
1563   ,p_date_of_death                in      date     default hr_api.g_date
1564   ,p_background_check_status      in      varchar2 default hr_api.g_varchar2
1565   ,p_background_date_check        in      date     default hr_api.g_date
1566   ,p_blood_type                   in      varchar2 default hr_api.g_varchar2
1567   ,p_correspondence_language      in      varchar2 default hr_api.g_varchar2
1568   ,p_fast_path_employee           in      varchar2 default hr_api.g_varchar2
1569   ,p_fte_capacity                 in      number   default hr_api.g_number
1570   ,p_hold_applicant_date_until    in      date     default hr_api.g_date
1571   ,p_honors                       in      varchar2 default hr_api.g_varchar2
1572   ,p_internal_location            in      varchar2 default hr_api.g_varchar2
1573   ,p_last_medical_test_by         in      varchar2 default hr_api.g_varchar2
1574   ,p_last_medical_test_date       in      date     default hr_api.g_date
1575   ,p_mailstop                     in      varchar2 default hr_api.g_varchar2
1576   ,p_office_number                in      varchar2 default hr_api.g_varchar2
1577   ,p_on_military_service          in      varchar2 default hr_api.g_varchar2
1578   ,p_pre_name_adjunct             in      varchar2 default hr_api.g_varchar2
1579   ,p_projected_start_date         in      date     default hr_api.g_date
1580   ,p_rehire_authorizor            in      varchar2 default hr_api.g_varchar2
1581   ,p_rehire_recommendation        in      varchar2 default hr_api.g_varchar2
1582   ,p_resume_exists                in      varchar2 default hr_api.g_varchar2
1583   ,p_resume_last_updated          in      date     default hr_api.g_date
1584   ,p_second_passport_exists       in      varchar2 default hr_api.g_varchar2
1585   ,p_student_status               in      varchar2 default hr_api.g_varchar2
1586   ,p_work_schedule                in      varchar2 default hr_api.g_varchar2
1587   ,p_rehire_reason                in      varchar2 default hr_api.g_varchar2
1588   ,p_suffix                       in      varchar2 default hr_api.g_varchar2
1589   ,p_benefit_group_id             in      number   default hr_api.g_number
1590   ,p_receipt_of_death_cert_date   in      date     default hr_api.g_date
1591   ,p_coord_ben_med_pln_no         in      varchar2 default hr_api.g_varchar2
1592   ,p_coord_ben_no_cvg_flag        in      varchar2 default hr_api.g_varchar2
1593   ,p_uses_tobacco_flag            in      varchar2 default hr_api.g_varchar2
1594   ,p_dpdnt_adoption_date          in      date     default hr_api.g_date
1595   ,p_dpdnt_vlntry_svce_flag       in      varchar2 default hr_api.g_varchar2
1596   ,p_original_date_of_hire        in      date     default hr_api.g_date
1597   ,p_adjusted_svc_date            in      date     default hr_api.g_date
1598   ,p_town_of_birth                in      varchar2 default hr_api.g_varchar2
1599   ,p_region_of_birth              in      varchar2 default hr_api.g_varchar2
1600   ,p_country_of_birth             in      varchar2 default hr_api.g_varchar2
1601   ,p_global_person_id             in      varchar2 default hr_api.g_varchar2
1602   ,p_business_group_id            in      number   default hr_api.g_number
1603   ,p_contact_operation            in      varchar2 default hr_api.g_varchar2
1604   ,p_emrg_cont_flag               in      varchar2 default hr_api.g_varchar2
1605   ,p_dpdnt_bnf_flag               in      varchar2 default hr_api.g_varchar2
1606   ,p_save_mode                    in      varchar2 default null
1607   ,P_CONT_INFORMATION_CATEGORY    in        varchar2    default hr_api.g_varchar2
1608   ,P_CONT_INFORMATION1            in        varchar2    default hr_api.g_varchar2
1609   ,P_CONT_INFORMATION2            in        varchar2    default hr_api.g_varchar2
1610   ,P_CONT_INFORMATION3            in        varchar2    default hr_api.g_varchar2
1611   ,P_CONT_INFORMATION4            in        varchar2    default hr_api.g_varchar2
1612   ,P_CONT_INFORMATION5            in        varchar2    default hr_api.g_varchar2
1613   ,P_CONT_INFORMATION6            in        varchar2    default hr_api.g_varchar2
1614   ,P_CONT_INFORMATION7            in        varchar2    default hr_api.g_varchar2
1615   ,P_CONT_INFORMATION8            in        varchar2    default hr_api.g_varchar2
1616   ,P_CONT_INFORMATION9            in        varchar2    default hr_api.g_varchar2
1617   ,P_CONT_INFORMATION10           in        varchar2    default hr_api.g_varchar2
1618   ,P_CONT_INFORMATION11           in        varchar2    default hr_api.g_varchar2
1619   ,P_CONT_INFORMATION12           in        varchar2    default hr_api.g_varchar2
1620   ,P_CONT_INFORMATION13           in        varchar2    default hr_api.g_varchar2
1621   ,P_CONT_INFORMATION14           in        varchar2    default hr_api.g_varchar2
1622   ,P_CONT_INFORMATION15           in        varchar2    default hr_api.g_varchar2
1623   ,P_CONT_INFORMATION16           in        varchar2    default hr_api.g_varchar2
1624   ,P_CONT_INFORMATION17           in        varchar2    default hr_api.g_varchar2
1625   ,P_CONT_INFORMATION18           in        varchar2    default hr_api.g_varchar2
1626   ,P_CONT_INFORMATION19           in        varchar2    default hr_api.g_varchar2
1627   ,P_CONT_INFORMATION20           in        varchar2    default hr_api.g_varchar2
1628   ,p_effective_start_date         out nocopy     date
1629   ,p_effective_end_date           out nocopy     date
1630   ,p_full_name                    out nocopy     varchar2
1631   ,p_comment_id                   out nocopy     number
1632   ,p_name_combination_warning     out nocopy     varchar2
1633   ,p_assign_payroll_warning       out nocopy     varchar2
1634   ,p_orig_hire_warning            out nocopy     varchar2
1635   ,p_ni_duplicate_warn_or_err   out nocopy     varchar2
1636   ,p_orig_rel_type                in varchar2      default null
1637 
1638  ) IS
1639 
1640    cursor get_emrg_primary_cont_flag(p_contact_relationship_id     number
1641                             ,p_contact_person_id           number
1642                             ,p_person_id number)
1643    is
1644    select primary_contact_flag --'N'
1645    from PER_CONTACT_RELATIONSHIPS
1646    where person_id = p_person_id
1647    and contact_person_id = p_contact_person_id
1648    and contact_type = 'EMRG'
1649    and trunc(sysdate) >= decode(date_start,null,trunc(sysdate),trunc(date_start))
1650    and trunc(sysdate) <  decode(date_end,null,trunc(sysdate)+1,trunc(date_end)) ;
1651 --   and primary_contact_flag = 'Y';
1652       --
1653       l_transaction_table            hr_transaction_ss.transaction_table;
1654       l_transaction_step_id          hr_api_transaction_steps.transaction_step_id%type;
1655       l_trs_object_version_number    hr_api_transaction_steps.object_version_number%type;
1656       l_cont_old_ovn                 number ;
1657       l_per_old_ovn                  number;
1658       l_old_contact_relationship_id  number;
1659       l_employee_number              per_all_people_f.employee_number%type ;
1660       l_count                        INTEGER := 0;
1661       l_attribute_update_mode        varchar2(100) default  null;
1662       l_validate                     boolean  default false;
1663       l_basic_details_changed        boolean default null;
1664       l_per_name_combination_warning VARCHAR2(100) default null;
1665       l_per_assign_payroll_warning   VARCHAR2(100) default null;
1666       l_per_orig_hire_warning        VARCHAR2(100) default null;
1667       l_per_details_changed          boolean default null;
1668       l_vendor_id                     number default null;
1669       l_sequence_number               number default null;
1670       l_benefit_group_id              number default null;
1671       l_fte_capacity                  number default null;
1672       l_result                     varchar2(100) default null;
1673       l_transaction_id             number default null;
1674       --
1675       l_effective_start_date             date default null;
1676       l_effective_end_date               date default null;
1677       l_per_ovn                          number default null;
1678       l_full_name                        per_all_people_f.full_name%type default null;
1679       l_comment_id                       number default null;
1680       l_name_combination_warning         boolean default null ;
1681       l_assign_payroll_warning           boolean default null ;
1682       l_orig_hire_warning                boolean default null ;
1683       -- StartRegistration
1684       l_contact_set                       number;
1685       -- EndRegistration
1686       l_start_life_reason_id              number := null;
1687       l_end_life_reason_id                number := null;
1688       l_contact_relationship_id           number := null;
1689       l_person_type_id                    number := null;
1690       -- Bug 2315163
1691       l_is_emergency_contact              varchar2(50) default null ;
1692       l_is_dpdnt_bnf                      varchar2(50) default null;
1693       l_emrg_primary_cont_flag            varchar2(30) default 'N';
1694 
1695       l_date_start                        date := p_date_start;
1696       l_proc   varchar2(72)  := g_package||'update_contact_relationship';
1697 
1698 
1699   --Added for the bug 14207426/14325833 starts
1700       l_emrg_relid number default null;
1701       l_emrg_ovn number default null;
1702       l_emrg_primary_chk_flag varchar2(10);
1703       z_person_id number;
1704       z_date_start date;
1705       z_date_end date;
1706 
1707 	l_exist_primary_contact varchar2(1);
1708 
1709 	cursor get_emrg_relid(p_cont_person_id     number
1710 		                              ,p_person_id number)
1711 	     is
1712 	     select contact_relationship_id,
1713 	            object_version_number,
1714 	            primary_contact_flag,
1715 	            person_id,
1716 	            date_start,
1717   	            date_end
1718 		     from PER_CONTACT_RELATIONSHIPS
1719 		     where person_id = p_person_id
1720 		     and contact_person_id = p_cont_person_id
1721 		     and contact_type = 'EMRG'
1722 		     and trunc(sysdate) >= decode(date_start,null,trunc(sysdate),trunc(date_start))
1723 	    	     and trunc(sysdate) <  decode(date_end,null,trunc(sysdate)+1,trunc(date_end));
1724 
1725 
1726 	cursor csr_chk_primary_cnt is
1727      		select 'Y'
1728      		from   per_contact_relationships
1729 		    where  person_id = p_person_id
1730 		     and    primary_contact_flag = 'Y'
1731 		     and    (nvl(date_end,hr_general.end_of_time)
1732 		              > nvl(z_date_start,hr_general.start_of_time)
1733 		     and    nvl(date_start,hr_general.start_of_time)
1734 		           < nvl(z_date_end,hr_general.end_of_time))
1735 				 and contact_type = 'EMRG';
1736   --Added for the bug 14207426/14325833 ends
1737   --
1738  BEGIN
1739   --
1740   hr_utility.set_location('Entering hr_contact_rel_api.update_contact_relationship', 5);
1741   --
1742   IF upper(p_action) = g_change
1743   THEN
1744      l_attribute_update_mode := g_attribute_update;
1745   ELSE
1746      IF upper(p_action) = g_correct
1747      THEN
1748         l_attribute_update_mode := g_attribute_correct;
1749      END IF;
1750   END IF;
1751 
1752   hr_utility.set_location('l_attribute_update_mode=' ||
1753                           l_attribute_update_mode, 10);
1754 
1755  -- Bug no:2263008 fix begins
1756 
1757    check_ni_unique(
1758      p_national_identifier => p_national_identifier
1759      ,p_business_group_id => p_business_group_id
1760      ,p_person_id => p_cont_person_id
1761      ,p_ni_duplicate_warn_or_err => p_ni_duplicate_warn_or_err);
1762 
1763    --Bug no:2263008 fix ends.
1764 
1765   l_cont_old_ovn := p_cont_object_version_number;
1766   l_old_contact_relationship_id := p_contact_relationship_id;
1767   l_per_old_ovn  := p_per_object_version_number;
1768   l_employee_number := p_employee_number ;
1769   --
1770   -- We will always save to transaction table regardless of whether the update is
1771   -- for approval or not.  Therefore, the validate_mode for calling the person
1772   -- api should always be set to true.
1773   --
1774   l_start_life_reason_id  := p_start_life_reason_id;
1775   if  p_start_life_reason_id <=0 then
1776       l_start_life_reason_id  := null;
1777   end if;
1778 
1779   l_end_life_reason_id      := p_end_life_reason_id;
1780   if p_end_life_reason_id   <= 0 then
1781      l_end_life_reason_id      := null;
1782   end if;
1783 
1784   l_contact_relationship_id := p_contact_relationship_id;
1785   if p_contact_relationship_id  <= 0 then
1786      l_contact_relationship_id   := null;
1787   end if;
1788 /*
1789   l_sequence_number  := p_sequence_number;
1790   if p_sequence_number  <= 0 then
1791      l_sequence_number  := null;
1792   end if;
1793 */
1794 
1795   l_person_type_id :=  p_person_type_id ;
1796   if p_person_type_id <= 0 then
1797      l_person_type_id  := null;
1798   end if;
1799 
1800    IF p_validate = 'N' OR p_validate IS NULL
1801    THEN
1802       l_validate := false;
1803    ELSE
1804       l_validate := true;
1805    END IF;
1806 
1807   SAVEPOINT  before_entering_into_update ;
1808 
1809   hr_utility.set_location('Before calling is_rec_changed', 15);
1810   --
1811   l_sequence_number  := p_sequence_number;
1812   --
1813   IF p_sequence_number <= 0
1814   THEN
1815      l_sequence_number := null;
1816   ELSE
1817      l_sequence_number := p_vendor_id;
1818   END IF;
1819   --
1820 
1821   --Added for the bug 14207426/14325833 starts
1822 
1823 	if(p_contact_operation = 'EMER_CR_NEW_REL' and p_primary_contact_flag = 'Y') then
1824 		open csr_chk_primary_cnt;
1825 		fetch csr_chk_primary_cnt into l_exist_primary_contact;
1826 		if csr_chk_primary_cnt%FOUND then
1827 			close csr_chk_primary_cnt;
1828 			hr_utility.set_message(800,'PER_7125_EMP_CON_PRIMARY');
1829 	      		hr_utility.raise_error;
1830 		end if;
1831 	end if;
1832 
1833 	if (p_contact_operation = 'EMRG_OVRW_UPD' and p_primary_contact_flag = 'Y' ) then
1834 		open get_emrg_relid( p_cont_person_id,p_person_id);
1835 		fetch get_emrg_relid into l_emrg_relid, l_emrg_ovn, l_emrg_primary_chk_flag,
1836 		z_person_id, z_date_start, z_date_end;
1837 		close get_emrg_relid;
1838 		if l_emrg_primary_chk_flag = 'N' then
1839 			open csr_chk_primary_cnt;
1840 			if csr_chk_primary_cnt%FOUND then
1841 			close csr_chk_primary_cnt;
1842 		    	hr_utility.set_message(800,'PER_7125_EMP_CON_PRIMARY');
1843 			hr_utility.raise_error;
1844 			end if;
1845 		end if;
1846 	end if;
1847 
1848   --Added for the bug 14207426/14325833 ends
1849 
1850   if p_contact_operation not in ( 'EMER_CR_NEW_REL', 'DPDNT_CR_NEW_REL') Then
1851     --
1852     -- Check if the record has changed
1853     --
1854 -- Bug 3469145 : Not passing p_primary_contact_flag value as it contains data respective to
1855 -- the Emergency relationship and here all the data belong to the other relationship.
1856 
1857    l_basic_details_changed := hr_process_contact_ss.is_rec_changed(
1858     p_effective_date            =>  p_cont_effective_date
1859    ,p_contact_relationship_id   =>  l_contact_relationship_id
1860    ,p_contact_type      	=>  p_contact_type
1861    ,p_comments      		=>  p_ctr_comments
1862 --   ,p_primary_contact_flag      =>  p_primary_contact_flag
1863    ,p_third_party_pay_flag      =>  p_third_party_pay_flag
1864    ,p_bondholder_flag      	=>  p_bondholder_flag
1865    ,p_date_start      		=>  p_date_start
1866    ,p_start_life_reason_id      =>  l_start_life_reason_id
1867    ,p_date_end      		=>  p_date_end
1868    ,p_end_life_reason_id      	=>  l_end_life_reason_id
1869    ,p_rltd_per_rsds_w_dsgntr_flag      =>  p_rltd_per_rsds_w_dsgntr_flag
1870    ,p_personal_flag         =>  p_personal_flag
1871 --   ,p_sequence_number       =>  l_sequence_number
1872    ,p_dependent_flag        =>  p_dependent_flag
1873    ,p_beneficiary_flag      =>  p_beneficiary_flag
1874    ,p_cont_attribute_category      =>  p_cont_attribute_category
1875    ,p_cont_attribute1       =>  p_cont_attribute1
1876    ,p_cont_attribute2       =>  p_cont_attribute2
1877    ,p_cont_attribute3       =>  p_cont_attribute3
1878    ,p_cont_attribute4       =>  p_cont_attribute4
1879    ,p_cont_attribute5       =>  p_cont_attribute5
1880    ,p_cont_attribute6       =>  p_cont_attribute6
1881    ,p_cont_attribute7       =>  p_cont_attribute7
1882    ,p_cont_attribute8       =>  p_cont_attribute8
1883    ,p_cont_attribute9       =>  p_cont_attribute9
1884    ,p_cont_attribute10      =>  p_cont_attribute10
1885    ,p_cont_attribute11      =>  p_cont_attribute11
1886    ,p_cont_attribute12      =>  p_cont_attribute12
1887    ,p_cont_attribute13      =>  p_cont_attribute13
1888    ,p_cont_attribute14      =>  p_cont_attribute14
1889    ,p_cont_attribute15      =>  p_cont_attribute15
1890    ,p_cont_attribute16      =>  p_cont_attribute16
1891    ,p_cont_attribute17      =>  p_cont_attribute17
1892    ,p_cont_attribute18      =>  p_cont_attribute18
1893    ,p_cont_attribute19      =>  p_cont_attribute19
1894    ,p_cont_attribute20      =>  p_cont_attribute20
1895    ,P_CONT_INFORMATION_CATEGORY => P_CONT_INFORMATION_CATEGORY
1896    ,P_CONT_INFORMATION1     => P_CONT_INFORMATION1
1897    ,P_CONT_INFORMATION2     => P_CONT_INFORMATION2
1898    ,P_CONT_INFORMATION3     => P_CONT_INFORMATION3
1899    ,P_CONT_INFORMATION4     => P_CONT_INFORMATION4
1900    ,P_CONT_INFORMATION5     => P_CONT_INFORMATION5
1901    ,P_CONT_INFORMATION6     => P_CONT_INFORMATION6
1902    ,P_CONT_INFORMATION7     => P_CONT_INFORMATION7
1903    ,P_CONT_INFORMATION8     => P_CONT_INFORMATION8
1904    ,P_CONT_INFORMATION9     => P_CONT_INFORMATION9
1905    ,P_CONT_INFORMATION10    => P_CONT_INFORMATION10
1906    ,P_CONT_INFORMATION11    => P_CONT_INFORMATION11
1907    ,P_CONT_INFORMATION12    => P_CONT_INFORMATION12
1908    ,P_CONT_INFORMATION13    => P_CONT_INFORMATION13
1909    ,P_CONT_INFORMATION14    => P_CONT_INFORMATION14
1910    ,P_CONT_INFORMATION15    => P_CONT_INFORMATION15
1911    ,P_CONT_INFORMATION16    => P_CONT_INFORMATION16
1912    ,P_CONT_INFORMATION17    => P_CONT_INFORMATION17
1913    ,P_CONT_INFORMATION18    => P_CONT_INFORMATION18
1914    ,P_CONT_INFORMATION19    => P_CONT_INFORMATION19
1915    ,P_CONT_INFORMATION20    => P_CONT_INFORMATION20
1916    ,p_object_version_number =>  p_cont_object_version_number
1917    );
1918    --
1919   else
1920    --
1921    l_basic_details_changed := true;
1922    --
1923   end if;
1924 
1925 -- Bug 3504216  : Checking if primary cont flag has changed or not.
1926 -- If primary contact flag has changed then setting l_basic_details_changed as true.
1927 -- Primary flag checkbox is availaible only in Emergency Contact.So checking for
1928 -- change in primary contact only when in Emerg Update.
1929 
1930 if p_contact_operation in ('EMRG_OVRW_UPD') then
1931     hr_utility.set_location('if p_contact_operation in EMRG_OVRW_UPD:'||l_proc,20);
1932     open get_emrg_primary_cont_flag(l_contact_relationship_id,
1933                                     p_cont_person_id,
1934                                     p_person_id);
1935     fetch get_emrg_primary_cont_flag into l_emrg_primary_cont_flag;
1936     if nvl(l_emrg_primary_cont_flag,'N') <> nvl(p_primary_contact_flag,'N') then
1937        l_basic_details_changed := true;
1938        validate_primary_cont_flag(
1939          p_contact_relationship_id => l_contact_relationship_id
1940         ,p_primary_contact_flag    => p_primary_contact_flag
1941         ,p_date_start              => sysdate
1942         ,p_contact_person_id       => p_cont_person_id
1943         ,p_object_version_number   => p_cont_object_version_number);
1944     end if;
1945     close get_emrg_primary_cont_flag;
1946 end if;
1947 
1948   IF l_basic_details_changed and
1949      p_contact_operation not in ( 'EMER_CR_NEW_REL', 'DPDNT_CR_NEW_REL') and
1950      nvl(p_save_mode, 'NVL') <> 'SAVE_FOR_LATER'
1951   THEN
1952 
1953     -- Call the actual API.
1954     --
1955     hr_utility.set_location('Calling hr_contact_rel_api.update_contact_relationship', 25);
1956     --
1957     if (nvl(p_rltd_per_rsds_w_dsgntr_flag , 'N') = 'Y') then
1958        --
1959        p_del_cont_primary_addr
1960        (p_contact_relationship_id          => p_contact_relationship_id);
1961        --
1962     end if;
1963 
1964     l_emrg_primary_cont_flag := p_primary_contact_flag;
1965 
1966     -- if primary contact flag already exists for the emergeny relationship
1967     -- then do not update again
1968 
1969  /*   open get_emrg_primary_cont_flag(l_contact_relationship_id,
1970                                     p_cont_person_id,
1971                                     p_person_id);
1972     fetch get_emrg_primary_cont_flag into l_emrg_primary_cont_flag;
1973     if get_emrg_primary_cont_flag%notfound then
1974        l_emrg_primary_cont_flag := p_primary_contact_flag;
1975     end if;
1976     close get_emrg_primary_cont_flag; */
1977 -- Bug 3306000 :
1978 
1979 validate_rel_start_date (
1980    p_person_id         => p_person_id
1981   ,p_item_key          => p_item_key
1982   ,p_save_mode         => p_save_mode
1983   ,p_date_start        => l_date_start
1984   ,p_date_of_birth     => p_date_of_birth );
1985 
1986     --
1987     hr_contact_rel_api.update_contact_relationship(
1988         p_validate                          => l_validate
1989        ,p_effective_date                    => p_cont_effective_date
1990        ,p_contact_relationship_id           => l_contact_relationship_id
1991        ,p_contact_type                      => p_contact_type
1992        ,p_comments                          => p_ctr_comments
1993 --       ,p_primary_contact_flag              => l_emrg_primary_cont_flag
1994        ,p_third_party_pay_flag              => p_third_party_pay_flag
1995        ,p_bondholder_flag                   => p_bondholder_flag
1996        ,p_date_start                        => p_date_start
1997        ,p_start_life_reason_id              => l_start_life_reason_id
1998        ,p_date_end                          => p_date_end
1999        ,p_end_life_reason_id                => l_end_life_reason_id
2000        ,p_rltd_per_rsds_w_dsgntr_flag       => p_rltd_per_rsds_w_dsgntr_flag
2001        ,p_personal_flag                     => p_personal_flag
2002  --      ,p_sequence_number                   => l_sequence_number
2003        ,p_dependent_flag                    => p_dependent_flag
2004        ,p_beneficiary_flag                  => p_beneficiary_flag
2005        ,p_cont_attribute_category           => p_cont_attribute_category
2006        ,p_cont_attribute1                   => p_cont_attribute1
2007        ,p_cont_attribute2                   => p_cont_attribute2
2008        ,p_cont_attribute3                   => p_cont_attribute3
2009        ,p_cont_attribute4                   => p_cont_attribute4
2010        ,p_cont_attribute5                   => p_cont_attribute5
2011        ,p_cont_attribute6                   => p_cont_attribute6
2012        ,p_cont_attribute7                   => p_cont_attribute7
2013        ,p_cont_attribute8                   => p_cont_attribute8
2014        ,p_cont_attribute9                   => p_cont_attribute9
2015        ,p_cont_attribute10                  => p_cont_attribute10
2016        ,p_cont_attribute11                  => p_cont_attribute11
2017        ,p_cont_attribute12                  => p_cont_attribute12
2018        ,p_cont_attribute13                  => p_cont_attribute13
2019        ,p_cont_attribute14                  => p_cont_attribute14
2020        ,p_cont_attribute15                  => p_cont_attribute15
2021        ,p_cont_attribute16                  => p_cont_attribute16
2022        ,p_cont_attribute17                  => p_cont_attribute17
2023        ,p_cont_attribute18                  => p_cont_attribute18
2024        ,p_cont_attribute19                  => p_cont_attribute19
2025        ,p_cont_attribute20                  => p_cont_attribute20
2026        ,P_CONT_INFORMATION_CATEGORY         => P_CONT_INFORMATION_CATEGORY
2027        ,P_CONT_INFORMATION1                 => P_CONT_INFORMATION1
2028        ,P_CONT_INFORMATION2                 => P_CONT_INFORMATION2
2029        ,P_CONT_INFORMATION3                 => P_CONT_INFORMATION3
2030        ,P_CONT_INFORMATION4                 => P_CONT_INFORMATION4
2031        ,P_CONT_INFORMATION5                 => P_CONT_INFORMATION5
2032        ,P_CONT_INFORMATION6                 => P_CONT_INFORMATION6
2033        ,P_CONT_INFORMATION7                 => P_CONT_INFORMATION7
2034        ,P_CONT_INFORMATION8                 => P_CONT_INFORMATION8
2035        ,P_CONT_INFORMATION9                 => P_CONT_INFORMATION9
2036        ,P_CONT_INFORMATION10                => P_CONT_INFORMATION10
2037        ,P_CONT_INFORMATION11                => P_CONT_INFORMATION11
2038        ,P_CONT_INFORMATION12                => P_CONT_INFORMATION12
2039        ,P_CONT_INFORMATION13                => P_CONT_INFORMATION13
2040        ,P_CONT_INFORMATION14                => P_CONT_INFORMATION14
2041        ,P_CONT_INFORMATION15                => P_CONT_INFORMATION15
2042        ,P_CONT_INFORMATION16                => P_CONT_INFORMATION16
2043        ,P_CONT_INFORMATION17                => P_CONT_INFORMATION17
2044        ,P_CONT_INFORMATION18                => P_CONT_INFORMATION18
2045        ,P_CONT_INFORMATION19                => P_CONT_INFORMATION19
2046        ,P_CONT_INFORMATION20                => P_CONT_INFORMATION20
2047        ,p_object_version_number             => p_cont_object_version_number
2048     );
2049     --
2050     --
2051     --
2052     IF hr_errors_api.errorExists
2053     THEN
2054        hr_utility.set_location('api error exists hr_contact_rel_api.update_contact_relationship', 30);
2055        ROLLBACK  to before_entering_into_update ;
2056        raise g_data_error;
2057     END IF;
2058   --
2059   --
2060   ELSE
2061     --
2062     hr_utility.set_location('No changes found  hr_contact_rel_api.update_contact_relationship', 35);
2063     --
2064   END IF;
2065 
2066   IF p_vendor_id = 0
2067   THEN
2068      l_vendor_id := null;
2069   ELSE
2070      l_vendor_id := p_vendor_id;
2071   END IF;
2072   --
2073   IF p_benefit_group_id = 0
2074   THEN
2075      l_benefit_group_id := null;
2076   ELSE
2077      l_benefit_group_id := p_benefit_group_id;
2078   END IF;
2079   --
2080   IF p_fte_capacity = 0
2081   THEN
2082      l_fte_capacity := null;
2083   ELSE
2084      l_fte_capacity := p_fte_capacity;
2085   END IF;
2086   --
2087   l_per_details_changed := hr_process_person_ss.is_rec_changed
2088     (p_effective_date              => p_per_effective_date
2089     ,p_person_id                   => p_cont_person_id
2090     ,p_object_version_number       => p_per_object_version_number
2091     ,p_person_type_id              => l_person_type_id
2092     ,p_last_name                   => p_last_name
2093     ,p_applicant_number            => p_applicant_number
2094     ,p_comments                    => p_per_comments
2095     ,p_date_employee_data_verified => p_date_employee_data_verified
2096     ,p_original_date_of_hire       => p_original_date_of_hire
2097     ,p_date_of_birth               => p_date_of_birth
2098     ,p_town_of_birth               => p_town_of_birth
2099     ,p_region_of_birth             => p_region_of_birth
2100     ,p_country_of_birth            => p_country_of_birth
2101     ,p_global_person_id            => p_global_person_id
2102     ,p_email_address               => p_email_address
2103     ,p_employee_number             => p_employee_number
2104     ,p_expense_check_send_to_addres => p_expense_check_send_to_addres
2105     ,p_first_name                  => p_first_name
2106     ,p_known_as                    => p_known_as
2107     ,p_marital_status              => p_marital_status
2108     ,p_middle_names                => p_middle_names
2109     ,p_nationality                 => p_nationality
2110     ,p_national_identifier         => p_national_identifier
2111     ,p_previous_last_name          => p_previous_last_name
2112     ,p_registered_disabled_flag    => p_registered_disabled_flag
2113     ,p_sex                         => p_sex
2114     ,p_title                       => p_title
2115     ,p_vendor_id                   => l_vendor_id
2116     ,p_work_telephone              => p_work_telephone
2117     ,p_suffix                      => p_suffix
2118     ,p_date_of_death               => p_date_of_death
2119     ,p_background_check_status     => p_background_check_status
2120     ,p_background_date_check       => p_background_date_check
2121     ,p_blood_type                  => p_blood_type
2122     ,p_correspondence_language     => p_correspondence_language
2123     ,p_fast_path_employee          => p_fast_path_employee
2124     ,p_fte_capacity                => l_fte_capacity
2125     ,p_hold_applicant_date_until   => p_hold_applicant_date_until
2126     ,p_honors                      => p_honors
2127     ,p_internal_location           => p_internal_location
2128     ,p_last_medical_test_by        => p_last_medical_test_by
2129     ,p_last_medical_test_date      => p_last_medical_test_date
2130     ,p_mailstop                    => p_mailstop
2131     ,p_office_number               => p_office_number
2132     ,p_on_military_service         => p_on_military_service
2133     ,p_pre_name_adjunct            => p_pre_name_adjunct
2134     ,p_projected_start_date        => p_projected_start_date
2135     ,p_rehire_authorizor           => p_rehire_authorizor
2136     ,p_rehire_recommendation       => p_rehire_recommendation
2137     ,p_resume_exists               => p_resume_exists
2138     ,p_resume_last_updated         => p_resume_last_updated
2139     ,p_second_passport_exists      => p_second_passport_exists
2140     ,p_student_status              => p_student_status
2141     ,p_work_schedule               => p_work_schedule
2142     ,p_rehire_reason               => p_rehire_reason
2143     ,p_benefit_group_id            => l_benefit_group_id
2144     ,p_receipt_of_death_cert_date  => p_receipt_of_death_cert_date
2145     ,p_coord_ben_med_pln_no        => p_coord_ben_med_pln_no
2146     ,p_coord_ben_no_cvg_flag       => p_coord_ben_no_cvg_flag
2147     ,p_uses_tobacco_flag           => p_uses_tobacco_flag
2148     ,p_dpdnt_adoption_date         => p_dpdnt_adoption_date
2149     ,p_dpdnt_vlntry_svce_flag      => p_dpdnt_vlntry_svce_flag
2150 --  ,p_adjusted_svc_date           => p_adjusted_svc_date
2151     ,p_attribute_category          => p_attribute_category
2152     ,p_attribute1                  => p_attribute1
2153     ,p_attribute2                  => p_attribute2
2154     ,p_attribute3                  => p_attribute3
2155     ,p_attribute4                  => p_attribute4
2156     ,p_attribute5                  => p_attribute5
2157     ,p_attribute6                  => p_attribute6
2158     ,p_attribute7                  => p_attribute7
2159     ,p_attribute8                  => p_attribute8
2160     ,p_attribute9                  => p_attribute9
2161     ,p_attribute10                 => p_attribute10
2162     ,p_attribute11                 => p_attribute11
2163     ,p_attribute12                 => p_attribute12
2164     ,p_attribute13                 => p_attribute13
2165     ,p_attribute14                 => p_attribute14
2166     ,p_attribute15                 => p_attribute15
2167     ,p_attribute16                 => p_attribute16
2168     ,p_attribute17                 => p_attribute17
2169     ,p_attribute18                 => p_attribute18
2170     ,p_attribute19                 => p_attribute19
2171     ,p_attribute20                 => p_attribute20
2172     ,p_attribute21                 => p_attribute21
2173     ,p_attribute22                 => p_attribute22
2174     ,p_attribute23                 => p_attribute23
2175     ,p_attribute24                 => p_attribute24
2176     ,p_attribute25                 => p_attribute25
2177     ,p_attribute26                 => p_attribute26
2178     ,p_attribute27                 => p_attribute27
2179     ,p_attribute28                 => p_attribute28
2180     ,p_attribute29                 => p_attribute29
2181     ,p_attribute30                 => p_attribute30
2182     ,p_per_information_category    => p_per_information_category
2183     ,p_per_information1            => p_per_information1
2184     ,p_per_information2            => p_per_information2
2185     ,p_per_information3            => p_per_information3
2186     ,p_per_information4            => p_per_information4
2187     ,p_per_information5            => p_per_information5
2188     ,p_per_information6            => p_per_information6
2189     ,p_per_information7            => p_per_information7
2190     ,p_per_information8            => p_per_information8
2191     ,p_per_information9            => p_per_information9
2192     ,p_per_information10           => p_per_information10
2193     ,p_per_information11           => p_per_information11
2194     ,p_per_information12           => p_per_information12
2195     ,p_per_information13           => p_per_information13
2196     ,p_per_information14           => p_per_information14
2197     ,p_per_information15           => p_per_information15
2198     ,p_per_information16           => p_per_information16
2199     ,p_per_information17           => p_per_information17
2200     ,p_per_information18           => p_per_information18
2201     ,p_per_information19           => p_per_information19
2202     ,p_per_information20           => p_per_information20
2203     ,p_per_information21           => p_per_information21
2204     ,p_per_information22           => p_per_information22
2205     ,p_per_information23           => p_per_information23
2206     ,p_per_information24           => p_per_information24
2207     ,p_per_information25           => p_per_information25
2208     ,p_per_information26           => p_per_information26
2209     ,p_per_information27           => p_per_information27
2210     ,p_per_information28           => p_per_information28
2211     ,p_per_information29           => p_per_information29
2212     ,p_per_information30           => p_per_information30
2213     );
2214   --
2215   --
2216   IF  l_per_details_changed  and
2217       nvl(p_save_mode, 'NVL') <> 'SAVE_FOR_LATER'
2218   THEN
2219      --
2220      -- Call actual api itself.
2221      --
2222      l_per_ovn := p_per_object_version_number;
2223      l_employee_number := p_employee_number;
2224     --
2225     hr_person_api.update_person(
2226          p_validate                          => l_validate
2227          ,p_effective_date                   => p_per_effective_date
2228          ,p_datetrack_update_mode            => 'CORRECTION'
2229          ,p_person_id                        => p_cont_person_id
2230          ,p_object_version_number            => l_per_ovn -- p_per_object_version_number
2231          --,p_person_type_id                   => l_person_type_id
2232          ,p_last_name                        => p_last_name
2233          ,p_applicant_number                  => p_applicant_number
2234          ,p_comments                         => p_per_comments
2235          ,p_date_employee_data_verified      => p_date_employee_data_verified
2236          ,p_date_of_birth                    => p_date_of_birth
2237          ,p_email_address                    => p_email_address
2238          ,p_employee_number                  => l_employee_number
2239          ,p_expense_check_send_to_addres     => p_expense_check_send_to_addres
2240          ,p_first_name                       => p_first_name
2241          ,p_known_as                         => p_known_as
2242          ,p_marital_status                   => p_marital_status
2243          ,p_middle_names                     => p_middle_names
2244          ,p_nationality                      => p_nationality
2245          ,p_national_identifier              => p_national_identifier
2246          ,p_previous_last_name               => p_previous_last_name
2247          ,p_registered_disabled_flag         => p_registered_disabled_flag
2248          ,p_sex                              => p_sex
2249          ,p_title                            => p_title
2250          ,p_vendor_id                        => p_vendor_id
2251          ,p_work_telephone                   => p_work_telephone
2252          ,p_attribute_category               =>  p_attribute_category
2253          ,p_attribute1                       =>  p_attribute1
2254          ,p_attribute2                       =>  p_attribute2
2255          ,p_attribute3                       =>  p_attribute3
2256          ,p_attribute4                       =>  p_attribute4
2257          ,p_attribute5                       =>  p_attribute5
2258          ,p_attribute6                       =>  p_attribute6
2259          ,p_attribute7                       =>  p_attribute7
2260          ,p_attribute8                       =>  p_attribute8
2261          ,p_attribute9                       =>  p_attribute9
2262          ,p_attribute10                       =>  p_attribute10
2263          ,p_attribute11                       =>  p_attribute11
2264          ,p_attribute12                       =>  p_attribute12
2265          ,p_attribute13                       =>  p_attribute13
2266          ,p_attribute14                       =>  p_attribute14
2267          ,p_attribute15                       =>  p_attribute15
2268          ,p_attribute16                       =>  p_attribute16
2269          ,p_attribute17                       =>  p_attribute17
2270          ,p_attribute18                       =>  p_attribute18
2271          ,p_attribute19                       =>  p_attribute19
2272          ,p_attribute20                       =>  p_attribute20
2273          ,p_attribute21                       =>  p_attribute21
2274          ,p_attribute22                       =>  p_attribute22
2275          ,p_attribute23                       =>  p_attribute23
2276          ,p_attribute24                       =>  p_attribute24
2277          ,p_attribute25                       =>  p_attribute25
2278          ,p_attribute26                       =>  p_attribute26
2279          ,p_attribute27                       =>  p_attribute27
2280          ,p_attribute28                       =>  p_attribute28
2281          ,p_attribute29                       =>  p_attribute29
2282          ,p_attribute30                       =>  p_attribute30
2283          ,p_per_information_category          =>  p_per_information_category
2284          ,p_per_information1                  =>  p_per_information1
2285          ,p_per_information2                  =>  p_per_information2
2286          ,p_per_information3                  =>  p_per_information3
2287          ,p_per_information4                  =>  p_per_information4
2288          ,p_per_information5                  =>  p_per_information5
2289          ,p_per_information6                  =>  p_per_information6
2290          ,p_per_information7                  =>  p_per_information7
2291          ,p_per_information8                  =>  p_per_information8
2292          ,p_per_information9                  =>  p_per_information9
2293          ,p_per_information10                  =>  p_per_information10
2294          ,p_per_information11                  =>  p_per_information11
2295          ,p_per_information12                  =>  p_per_information12
2296          ,p_per_information13                  =>  p_per_information13
2297          ,p_per_information14                  =>  p_per_information14
2298          ,p_per_information15                  =>  p_per_information15
2299          ,p_per_information16                  =>  p_per_information16
2300          ,p_per_information17                  =>  p_per_information17
2301          ,p_per_information18                  =>  p_per_information18
2302          ,p_per_information19                  =>  p_per_information19
2303          ,p_per_information20                  =>  p_per_information20
2304          ,p_per_information21                  =>  p_per_information21
2305          ,p_per_information22                  =>  p_per_information22
2306          ,p_per_information23                  =>  p_per_information23
2307          ,p_per_information24                  =>  p_per_information24
2308          ,p_per_information25                  =>  p_per_information25
2309          ,p_per_information26                  =>  p_per_information26
2310          ,p_per_information27                  =>  p_per_information27
2311          ,p_per_information28                  =>  p_per_information28
2312          ,p_per_information29                  =>  p_per_information29
2313          ,p_per_information30                  =>  p_per_information30
2314          ,p_date_of_death                    => p_date_of_death
2315          ,p_background_check_status          => p_background_check_status
2316          ,p_background_date_check            => p_background_date_check
2317          ,p_blood_type                       => p_blood_type
2318          ,p_correspondence_language          => p_correspondence_language
2319          ,p_fast_path_employee               => p_fast_path_employee
2320          ,p_fte_capacity                     => p_fte_capacity
2321          ,p_hold_applicant_date_until        => p_hold_applicant_date_until
2322          ,p_honors                           => p_honors
2323          ,p_internal_location                => p_internal_location
2324          ,p_last_medical_test_by             => p_last_medical_test_by
2325          ,p_last_medical_test_date           => p_last_medical_test_date
2326          ,p_mailstop                         => p_mailstop
2327          ,p_office_number                    => p_office_number
2328          ,p_on_military_service              => p_on_military_service
2329          ,p_pre_name_adjunct                 => p_pre_name_adjunct
2330          ,p_projected_start_date             => p_projected_start_date
2331          ,p_rehire_authorizor                => p_rehire_authorizor
2332          ,p_rehire_recommendation            => p_rehire_recommendation
2333          ,p_resume_exists                    => p_resume_exists
2334          ,p_resume_last_updated              => p_resume_last_updated
2335          ,p_second_passport_exists           => p_second_passport_exists
2336          ,p_student_status                   => p_student_status
2337          ,p_work_schedule                    => p_work_schedule
2338          ,p_rehire_reason                    => p_rehire_reason
2339          ,p_suffix                           => p_suffix
2340          ,p_benefit_group_id                 => p_benefit_group_id
2341          ,p_receipt_of_death_cert_date       => p_receipt_of_death_cert_date
2342          ,p_coord_ben_med_pln_no             => p_coord_ben_med_pln_no
2343          ,p_coord_ben_no_cvg_flag            => p_coord_ben_no_cvg_flag
2344          ,p_uses_tobacco_flag                => p_uses_tobacco_flag
2345          ,p_dpdnt_adoption_date              => p_dpdnt_adoption_date
2346          ,p_dpdnt_vlntry_svce_flag           => p_dpdnt_vlntry_svce_flag
2347          ,p_original_date_of_hire            => p_original_date_of_hire
2348         --  ,p_adjusted_svc_date                => bb
2349          ,p_town_of_birth                    => p_town_of_birth
2350          ,p_region_of_birth                  => p_region_of_birth
2351          ,p_country_of_birth                 => p_country_of_birth
2352          ,p_global_person_id                 => p_global_person_id
2353          ,p_effective_start_date             =>  l_effective_start_date
2354          ,p_effective_end_date               =>  l_effective_end_date
2355          ,p_full_name                        =>  l_full_name
2356          ,p_comment_id                       =>  l_comment_id
2357          ,p_name_combination_warning         =>  l_name_combination_warning
2358          ,p_assign_payroll_warning           =>  l_assign_payroll_warning
2359          ,p_orig_hire_warning                =>  l_orig_hire_warning
2360   );
2361     --
2362     --
2363     IF hr_errors_api.errorExists
2364       THEN
2365          hr_utility.set_location('api error exists hr_process_person_ss.update_person', 40);
2366          ROLLBACK to  before_entering_into_update ;
2367          raise g_data_error;
2368     END IF;
2369   ELSE
2370     --
2371     hr_utility.set_location('No changes found in  hr_process_person_ss.update_person', 45);
2372     --
2373   END IF;
2374 
2375   ROLLBACK  to  before_entering_into_update ;
2376   --
2377   -- --------------------------------------------------------------------------
2378   -- We will write the data to transaction tables.
2379   -- Determine if a transaction step exists for this activity
2380   -- if a transaction step does exist then the transaction_step_id and
2381   -- object_version_number are set (i.e. not null).
2382   -- --------------------------------------------------------------------------
2383   --
2384   IF l_per_details_changed OR l_basic_details_changed
2385   THEN
2386     hr_utility.set_location('l_per_details_changed OR l_basic_details_changed', 50);
2387      -- First, check if transaction id exists or not
2388 
2389      l_transaction_id := hr_transaction_ss.get_transaction_id
2390                      (p_item_type   => p_item_type
2391                      ,p_item_key    => p_item_key);
2392      --
2393      --
2394      IF l_transaction_id is null THEN
2395     hr_utility.set_location('IF l_transaction_id is null THEN', 55);
2396         -- Start a Transaction
2397         hr_transaction_ss.start_transaction
2398            (itemtype   => p_item_type
2399            ,itemkey    => p_item_key
2400            ,actid      => p_activity_id
2401            ,funmode    => 'RUN'
2402            ,p_api_addtnl_info => p_contact_operation    --TEST
2403            ,p_login_person_id => nvl(p_login_person_id, p_person_id)
2404            ,result     => l_result);
2405 
2406         l_transaction_id := hr_transaction_ss.get_transaction_id
2407                         (p_item_type   => p_item_type
2408                         ,p_item_key    => p_item_key);
2409      END IF;
2410      --
2411      -- Create a transaction step
2412      --
2413      hr_transaction_api.create_transaction_step
2414         (p_validate              => false
2415         ,p_creator_person_id     => nvl(p_login_person_id, p_person_id)
2416         ,p_transaction_id        => l_transaction_id
2417         ,p_api_name              => g_package || '.PROCESS_API'
2418         ,p_item_type             => p_item_type
2419         ,p_item_key              => p_item_key
2420         ,p_activity_id           => p_activity_id
2421         ,p_transaction_step_id   => l_transaction_step_id
2422         ,p_object_version_number => l_trs_object_version_number);
2423 
2424      --
2425      hr_utility.set_location('l_transaction_step_id = '
2426                            || to_char(l_transaction_step_id), 30);
2427 
2428 
2429      l_count := l_count + 1;
2430      l_transaction_table(l_count).param_name :=upper('p_validate');
2431      l_transaction_table(l_count).param_value := p_validate;
2432      l_transaction_table(l_count).param_data_type := upper('varchar2');
2433      --
2434      l_count:=l_count+1;
2435      l_transaction_table(l_count).param_name      := 'P_SAVE_MODE';
2436      l_transaction_table(l_count).param_value     :=  p_save_mode;
2437      l_transaction_table(l_count).param_data_type := 'VARCHAR2';
2438      --
2439      l_count := l_count + 1;
2440      l_transaction_table(l_count).param_name :=upper('p_item_type');
2441      l_transaction_table(l_count).param_value := p_item_type;
2442      l_transaction_table(l_count).param_data_type := upper('varchar2');
2443      --
2444      --
2445      l_count := l_count + 1;
2446      l_transaction_table(l_count).param_name :=upper('p_item_key');
2447      l_transaction_table(l_count).param_value := p_item_key;
2448      l_transaction_table(l_count).param_data_type := upper('varchar2');
2449      --
2450      --
2451      l_count := l_count + 1;
2452      l_transaction_table(l_count).param_name :=upper('p_activity_id');
2453      l_transaction_table(l_count).param_value := p_activity_id;
2454      l_transaction_table(l_count).param_data_type := upper('number');
2455      --
2456      --
2457      l_count := l_count + 1;
2458      l_transaction_table(l_count).param_name :=upper('p_action');
2459      l_transaction_table(l_count).param_value := p_action;
2460      l_transaction_table(l_count).param_data_type := upper('varchar2');
2461      --
2462      --
2463      l_count := l_count + 1;
2464      l_transaction_table(l_count).param_name :=upper('p_process_section_name');
2465      l_transaction_table(l_count).param_value := p_process_section_name;
2466      l_transaction_table(l_count).param_data_type := upper('varchar2');
2467      --
2468      --
2469      l_count := l_count + 1;
2470      l_transaction_table(l_count).param_name :=upper('p_review_page_region_code');
2471      l_transaction_table(l_count).param_value := p_review_page_region_code;
2472      l_transaction_table(l_count).param_data_type := upper('varchar2');
2473      --
2474      --
2475      l_count := l_count + 1;
2476      l_transaction_table(l_count).param_name :=upper('p_business_group_id');
2477      l_transaction_table(l_count).param_value := p_business_group_id;
2478      l_transaction_table(l_count).param_data_type := upper('number');
2479      --
2480      l_count := l_count + 1;
2481      l_transaction_table(l_count).param_name :=upper('p_person_id');
2482      l_transaction_table(l_count).param_value := p_person_id;
2483      l_transaction_table(l_count).param_data_type := upper('number');
2484      --
2485      l_count := l_count + 1;
2486      l_transaction_table(l_count).param_name :=upper('p_login_person_id');
2487      l_transaction_table(l_count).param_value := p_login_person_id;
2488      l_transaction_table(l_count).param_data_type := upper('number');
2489      --
2490      --
2491      l_count := l_count + 1;
2492      l_transaction_table(l_count).param_name :=upper('P_REVIEW_PROC_CALL');
2493      l_transaction_table(l_count).param_value := p_review_page_region_code;
2494      l_transaction_table(l_count).param_data_type := upper('varchar2');
2495      --
2496      --
2497      l_count := l_count + 1;
2498      l_transaction_table(l_count).param_name := 'P_REVIEW_ACTID';
2499      l_transaction_table(l_count).param_value := P_ACTIVITY_ID;
2500      l_transaction_table(l_count).param_data_type := 'VARCHAR2';
2501      --
2502   --END IF;
2503   --
2504   --
2505     IF  l_basic_details_changed  THEN
2506      --
2507     hr_utility.set_location('IF  l_basic_details_changed  THEN', 60);
2508      l_count := l_count + 1;
2509      l_transaction_table(l_count).param_name :=upper('p_cont_rec_changed');
2510      l_transaction_table(l_count).param_value := 'CHANGED';
2511      l_transaction_table(l_count).param_data_type := upper('varchar2');
2512      --
2513     END IF ;
2514      --
2515      l_count := l_count + 1;
2516      l_transaction_table(l_count).param_name :=upper('p_cont_effective_date');
2517      l_transaction_table(l_count).param_value :=to_char( p_cont_effective_date,
2518    						hr_transaction_ss.g_date_format);
2519      l_transaction_table(l_count).param_data_type := upper('date');
2520      --
2521      --
2522      l_count := l_count + 1;
2523      l_transaction_table(l_count).param_name :=upper('p_contact_relationship_id');
2524      l_transaction_table(l_count).param_value := l_contact_relationship_id;
2525      l_transaction_table(l_count).param_data_type := upper('number');
2526      --
2527      --
2528      l_count := l_count + 1;
2529      l_transaction_table(l_count).param_name :=upper('p_contact_type');
2530      l_transaction_table(l_count).param_value := p_contact_type;
2531      l_transaction_table(l_count).param_data_type := upper('varchar2');
2532      --
2533      --
2534      l_count := l_count + 1;
2535      l_transaction_table(l_count).param_name :=upper('p_ctr_comments');
2536      l_transaction_table(l_count).param_value := p_ctr_comments;
2537      l_transaction_table(l_count).param_data_type := upper('varchar2');
2538      --
2539      --
2540      l_count := l_count + 1;
2541      l_transaction_table(l_count).param_name :=upper('p_primary_contact_flag');
2542      l_transaction_table(l_count).param_value := p_primary_contact_flag;
2543      l_transaction_table(l_count).param_data_type := upper('varchar2');
2544      --
2545      --
2546      l_count := l_count + 1;
2547      l_transaction_table(l_count).param_name :=upper('p_third_party_pay_flag');
2548      l_transaction_table(l_count).param_value := p_third_party_pay_flag;
2549      l_transaction_table(l_count).param_data_type := upper('varchar2');
2550      --
2551      --
2552      l_count := l_count + 1;
2553      l_transaction_table(l_count).param_name :=upper('p_bondholder_flag');
2554      l_transaction_table(l_count).param_value := p_bondholder_flag;
2555      l_transaction_table(l_count).param_data_type := upper('varchar2');
2556      --
2557      --
2558      l_count := l_count + 1;
2559      l_transaction_table(l_count).param_name :=upper('p_date_start');
2560      l_transaction_table(l_count).param_value := to_char(p_date_start,
2561                                                  hr_transaction_ss.g_date_format);
2562      l_transaction_table(l_count).param_data_type := upper('date');
2563      --
2564      --
2565      l_count := l_count + 1;
2566      l_transaction_table(l_count).param_name :=upper('p_start_life_reason_id');
2567      l_transaction_table(l_count).param_value := l_start_life_reason_id;
2568      l_transaction_table(l_count).param_data_type := upper('number');
2569      --
2570      --
2571      l_count := l_count + 1;
2572      l_transaction_table(l_count).param_name :=upper('p_date_end');
2573      l_transaction_table(l_count).param_value :=to_char( p_date_end,
2574                                                  hr_transaction_ss.g_date_format);
2575      l_transaction_table(l_count).param_data_type := upper('date');
2576      --
2577      --
2578      l_count := l_count + 1;
2579      l_transaction_table(l_count).param_name :=upper('p_end_life_reason_id');
2580      l_transaction_table(l_count).param_value := l_end_life_reason_id;
2581      l_transaction_table(l_count).param_data_type := upper('number');
2582      --
2583      --
2584      l_count := l_count + 1;
2585      l_transaction_table(l_count).param_name :=upper('p_rltd_per_rsds_w_dsgntr_flag');
2586      l_transaction_table(l_count).param_value := p_rltd_per_rsds_w_dsgntr_flag;
2587      l_transaction_table(l_count).param_data_type := upper('varchar2');
2588      --
2589      --
2590      l_count := l_count + 1;
2591      l_transaction_table(l_count).param_name :=upper('p_personal_flag');
2592      l_transaction_table(l_count).param_value := p_personal_flag;
2593      l_transaction_table(l_count).param_data_type := upper('varchar2');
2594      --
2595      --
2596      l_count := l_count + 1;
2597      l_transaction_table(l_count).param_name :=upper('p_sequence_number');
2598      l_transaction_table(l_count).param_value := l_sequence_number;
2599      l_transaction_table(l_count).param_data_type := upper('number');
2600      --
2601      --
2602      l_count := l_count + 1;
2603      l_transaction_table(l_count).param_name :=upper('p_dependent_flag');
2604      l_transaction_table(l_count).param_value := p_dependent_flag;
2605      l_transaction_table(l_count).param_data_type := upper('varchar2');
2606      --
2607      --
2608      l_count := l_count + 1;
2609      l_transaction_table(l_count).param_name :=upper('p_beneficiary_flag');
2610      l_transaction_table(l_count).param_value := p_beneficiary_flag;
2611      l_transaction_table(l_count).param_data_type := upper('varchar2');
2612      --
2613      --
2614      l_count := l_count + 1;
2615      l_transaction_table(l_count).param_name :=upper('p_cont_attribute_category');
2616      l_transaction_table(l_count).param_value := p_cont_attribute_category;
2617      l_transaction_table(l_count).param_data_type := upper('varchar2');
2618      --
2619      --
2620      l_count := l_count + 1;
2621      l_transaction_table(l_count).param_name :=upper('p_cont_attribute1');
2622      l_transaction_table(l_count).param_value := p_cont_attribute1;
2623      l_transaction_table(l_count).param_data_type := upper('varchar2');
2624      --
2625      --
2626      l_count := l_count + 1;
2627      l_transaction_table(l_count).param_name :=upper('p_cont_attribute2');
2628      l_transaction_table(l_count).param_value := p_cont_attribute2;
2629      l_transaction_table(l_count).param_data_type := upper('varchar2');
2630      --
2631      --
2632      l_count := l_count + 1;
2633      l_transaction_table(l_count).param_name :=upper('p_cont_attribute3');
2634      l_transaction_table(l_count).param_value := p_cont_attribute3;
2635      l_transaction_table(l_count).param_data_type := upper('varchar2');
2636      --
2637      --
2638      l_count := l_count + 1;
2639      l_transaction_table(l_count).param_name :=upper('p_cont_attribute4');
2640      l_transaction_table(l_count).param_value := p_cont_attribute4;
2641      l_transaction_table(l_count).param_data_type := upper('varchar2');
2642      --
2643      --
2644      l_count := l_count + 1;
2645      l_transaction_table(l_count).param_name :=upper('p_cont_attribute5');
2646      l_transaction_table(l_count).param_value := p_cont_attribute5;
2647      l_transaction_table(l_count).param_data_type := upper('varchar2');
2648      --
2649      --
2650      l_count := l_count + 1;
2651      l_transaction_table(l_count).param_name :=upper('p_cont_attribute6');
2652      l_transaction_table(l_count).param_value := p_cont_attribute6;
2653      l_transaction_table(l_count).param_data_type := upper('varchar2');
2654      --
2655      --
2656      l_count := l_count + 1;
2657      l_transaction_table(l_count).param_name :=upper('p_cont_attribute7');
2658      l_transaction_table(l_count).param_value := p_cont_attribute7;
2659      l_transaction_table(l_count).param_data_type := upper('varchar2');
2660      --
2661      --
2662      l_count := l_count + 1;
2663      l_transaction_table(l_count).param_name :=upper('p_cont_attribute8');
2664      l_transaction_table(l_count).param_value := p_cont_attribute8;
2665      l_transaction_table(l_count).param_data_type := upper('varchar2');
2666      --
2667      --
2668      l_count := l_count + 1;
2669      l_transaction_table(l_count).param_name :=upper('p_cont_attribute9');
2670      l_transaction_table(l_count).param_value := p_cont_attribute9;
2671      l_transaction_table(l_count).param_data_type := upper('varchar2');
2672      --
2673      --
2674      l_count := l_count + 1;
2675      l_transaction_table(l_count).param_name :=upper('p_cont_attribute10');
2676      l_transaction_table(l_count).param_value := p_cont_attribute10;
2677      l_transaction_table(l_count).param_data_type := upper('varchar2');
2678      --
2679      --
2680      l_count := l_count + 1;
2681      l_transaction_table(l_count).param_name :=upper('p_cont_attribute11');
2682      l_transaction_table(l_count).param_value := p_cont_attribute11;
2683      l_transaction_table(l_count).param_data_type := upper('varchar2');
2684      --
2685      --
2686      l_count := l_count + 1;
2687      l_transaction_table(l_count).param_name :=upper('p_cont_attribute12');
2688      l_transaction_table(l_count).param_value := p_cont_attribute12;
2689      l_transaction_table(l_count).param_data_type := upper('varchar2');
2690      --
2691      --
2692      l_count := l_count + 1;
2693      l_transaction_table(l_count).param_name :=upper('p_cont_attribute13');
2694      l_transaction_table(l_count).param_value := p_cont_attribute13;
2695      l_transaction_table(l_count).param_data_type := upper('varchar2');
2696      --
2697      --
2698      l_count := l_count + 1;
2699      l_transaction_table(l_count).param_name :=upper('p_cont_attribute14');
2700      l_transaction_table(l_count).param_value := p_cont_attribute14;
2701      l_transaction_table(l_count).param_data_type := upper('varchar2');
2702      --
2703      --
2704      l_count := l_count + 1;
2705      l_transaction_table(l_count).param_name :=upper('p_cont_attribute15');
2706      l_transaction_table(l_count).param_value := p_cont_attribute15;
2707      l_transaction_table(l_count).param_data_type := upper('varchar2');
2708      --
2709      --
2710      l_count := l_count + 1;
2711      l_transaction_table(l_count).param_name :=upper('p_cont_attribute16');
2712      l_transaction_table(l_count).param_value := p_cont_attribute16;
2713      l_transaction_table(l_count).param_data_type := upper('varchar2');
2714      --
2715      --
2716      l_count := l_count + 1;
2717      l_transaction_table(l_count).param_name :=upper('p_cont_attribute17');
2718      l_transaction_table(l_count).param_value := p_cont_attribute17;
2719      l_transaction_table(l_count).param_data_type := upper('varchar2');
2720      --
2721      --
2722      l_count := l_count + 1;
2723      l_transaction_table(l_count).param_name :=upper('p_cont_attribute18');
2724      l_transaction_table(l_count).param_value := p_cont_attribute18;
2725      l_transaction_table(l_count).param_data_type := upper('varchar2');
2726      --
2727      --
2728      l_count := l_count + 1;
2729      l_transaction_table(l_count).param_name :=upper('p_cont_attribute19');
2730      l_transaction_table(l_count).param_value := p_cont_attribute19;
2731      l_transaction_table(l_count).param_data_type := upper('varchar2');
2732      --
2733      --
2734      l_count := l_count + 1;
2735      l_transaction_table(l_count).param_name :=upper('p_cont_attribute20');
2736      l_transaction_table(l_count).param_value := p_cont_attribute20;
2737      l_transaction_table(l_count).param_data_type := upper('varchar2');
2738      --
2739      --
2740      l_count := l_count + 1;
2741      l_transaction_table(l_count).param_name :=upper('p_cont_object_version_number');
2742      l_transaction_table(l_count).param_value := l_cont_old_ovn;
2743      l_transaction_table(l_count).param_data_type := upper('number');
2744      --
2745      if not l_per_details_changed then
2746         --
2747         hr_utility.set_location('if not l_per_details_changed then', 65);
2748         l_count := l_count + 1;
2749         l_transaction_table(l_count).param_name :=upper('p_per_rec_changed');
2750         l_transaction_table(l_count).param_value := null;
2751         l_transaction_table(l_count).param_data_type := upper('varchar2');
2752         --
2753      end if;
2754      --
2755   --END IF ; -- End of parameters for update_contact_relationship
2756   --
2757   --
2758     IF  l_per_details_changed  THEN
2759       --
2760       l_count := l_count + 1;
2761       hr_utility.set_location('if l_per_details_changed  THEN', 70);
2762       l_transaction_table(l_count).param_name :=upper('p_per_rec_changed');
2763       l_transaction_table(l_count).param_value := 'CHANGED';
2764       l_transaction_table(l_count).param_data_type := upper('varchar2');
2765       --
2766     END IF ;
2767       --
2768       l_count := l_count + 1;
2769       l_transaction_table(l_count).param_name :=upper('p_per_effective_date');
2770       l_transaction_table(l_count).param_value := to_char(p_per_effective_date,
2771                                                   hr_transaction_ss.g_date_format);
2772       l_transaction_table(l_count).param_data_type := upper('date');
2773       --
2774       --
2775       l_count := l_count + 1;
2776       l_transaction_table(l_count).param_name :=upper('p_datetrack_update_mode');
2777       l_transaction_table(l_count).param_value := p_datetrack_update_mode;
2778       l_transaction_table(l_count).param_data_type := upper('varchar2');
2779       --
2780       --
2781       l_count := l_count + 1;
2782       l_transaction_table(l_count).param_name :=upper('p_cont_person_id');
2783       l_transaction_table(l_count).param_value := p_cont_person_id;
2784       l_transaction_table(l_count).param_data_type := upper('number');
2785       --
2786       --
2787       l_count := l_count + 1;
2788       l_transaction_table(l_count).param_name :=upper('p_per_object_version_number');
2789       l_transaction_table(l_count).param_value := l_per_old_ovn;
2790       l_transaction_table(l_count).param_data_type := upper('number');
2791       --
2792       --
2793       l_count := l_count + 1;
2794       l_transaction_table(l_count).param_name :=upper('p_person_type_id');
2795       l_transaction_table(l_count).param_value := l_person_type_id;
2796       l_transaction_table(l_count).param_data_type := upper('number');
2797       --
2798       --
2799       l_count := l_count + 1;
2800       l_transaction_table(l_count).param_name :=upper('p_last_name');
2801       l_transaction_table(l_count).param_value := p_last_name;
2802       l_transaction_table(l_count).param_data_type := upper('varchar2');
2803       --
2804       --
2805       l_count := l_count + 1;
2806       l_transaction_table(l_count).param_name :=upper('p_applicant_number');
2807       l_transaction_table(l_count).param_value := p_applicant_number;
2808       l_transaction_table(l_count).param_data_type := upper('varchar2');
2809       --
2810       --
2811       l_count := l_count + 1;
2812       l_transaction_table(l_count).param_name :=upper('p_per_comments');
2813       l_transaction_table(l_count).param_value := p_per_comments;
2814       l_transaction_table(l_count).param_data_type := upper('varchar2');
2815       --
2816       --
2817       l_count := l_count + 1;
2818       l_transaction_table(l_count).param_name :=upper('p_date_employee_data_verified');
2819       l_transaction_table(l_count).param_value := to_char(p_date_employee_data_verified,
2820                                                   hr_transaction_ss.g_date_format);
2821       l_transaction_table(l_count).param_data_type := upper('date');
2822       --
2823       --
2824       l_count := l_count + 1;
2825       l_transaction_table(l_count).param_name :=upper('p_date_of_birth');
2826       l_transaction_table(l_count).param_value :=to_char( p_date_of_birth,
2827                                                   hr_transaction_ss.g_date_format);
2828       l_transaction_table(l_count).param_data_type := upper('date');
2829       --
2830       --
2831       l_count := l_count + 1;
2832       l_transaction_table(l_count).param_name :=upper('p_email_address');
2833       l_transaction_table(l_count).param_value := p_email_address;
2834       l_transaction_table(l_count).param_data_type := upper('varchar2');
2835       --
2836       --
2837       l_count := l_count + 1;
2838       l_transaction_table(l_count).param_name :=upper('p_employee_number');
2839       l_transaction_table(l_count).param_value := l_employee_number;
2840       l_transaction_table(l_count).param_data_type := upper('varchar2');
2841       --
2842       --
2843       l_count := l_count + 1;
2844       l_transaction_table(l_count).param_name :=upper('p_expense_check_send_to_addres');
2845       l_transaction_table(l_count).param_value := p_expense_check_send_to_addres;
2846       l_transaction_table(l_count).param_data_type := upper('varchar2');
2847       --
2848       --
2849       l_count := l_count + 1;
2850       l_transaction_table(l_count).param_name :=upper('p_first_name');
2851       l_transaction_table(l_count).param_value := p_first_name;
2852       l_transaction_table(l_count).param_data_type := upper('varchar2');
2853       --
2854       --
2855       l_count := l_count + 1;
2856       l_transaction_table(l_count).param_name :=upper('p_known_as');
2857       l_transaction_table(l_count).param_value := p_known_as;
2858       l_transaction_table(l_count).param_data_type := upper('varchar2');
2859       --
2860       --
2861       l_count := l_count + 1;
2862       l_transaction_table(l_count).param_name :=upper('p_marital_status');
2863       l_transaction_table(l_count).param_value := p_marital_status;
2864       l_transaction_table(l_count).param_data_type := upper('varchar2');
2865       --
2866       --
2867       l_count := l_count + 1;
2868       l_transaction_table(l_count).param_name :=upper('p_middle_names');
2869       l_transaction_table(l_count).param_value := p_middle_names;
2870       l_transaction_table(l_count).param_data_type := upper('varchar2');
2871       --
2872       --
2873       l_count := l_count + 1;
2874       l_transaction_table(l_count).param_name :=upper('p_nationality');
2875       l_transaction_table(l_count).param_value := p_nationality;
2876       l_transaction_table(l_count).param_data_type := upper('varchar2');
2877       --
2878       --
2879       l_count := l_count + 1;
2880       l_transaction_table(l_count).param_name :=upper('p_national_identifier');
2881       l_transaction_table(l_count).param_value := p_national_identifier;
2882       l_transaction_table(l_count).param_data_type := upper('varchar2');
2883       --
2884       --
2885       l_count := l_count + 1;
2886       l_transaction_table(l_count).param_name :=upper('p_previous_last_name');
2887       l_transaction_table(l_count).param_value := p_previous_last_name;
2888       l_transaction_table(l_count).param_data_type := upper('varchar2');
2889       --
2890       --
2891       l_count := l_count + 1;
2892       l_transaction_table(l_count).param_name :=upper('p_registered_disabled_flag');
2893       l_transaction_table(l_count).param_value := p_registered_disabled_flag;
2894       l_transaction_table(l_count).param_data_type := upper('varchar2');
2895       --
2896       --
2897       l_count := l_count + 1;
2898       l_transaction_table(l_count).param_name :=upper('p_sex');
2899       l_transaction_table(l_count).param_value := p_sex;
2900       l_transaction_table(l_count).param_data_type := upper('varchar2');
2901       --
2902       --
2903       l_count := l_count + 1;
2904       l_transaction_table(l_count).param_name :=upper('p_title');
2905       l_transaction_table(l_count).param_value := p_title;
2906       l_transaction_table(l_count).param_data_type := upper('varchar2');
2907       --
2908       --
2909       l_count := l_count + 1;
2910       l_transaction_table(l_count).param_name :=upper('p_vendor_id');
2911       l_transaction_table(l_count).param_value := p_vendor_id;
2912       l_transaction_table(l_count).param_data_type := upper('number');
2913       --
2914       --
2915       l_count := l_count + 1;
2916       l_transaction_table(l_count).param_name :=upper('p_work_telephone');
2917       l_transaction_table(l_count).param_value := p_work_telephone;
2918       l_transaction_table(l_count).param_data_type := upper('varchar2');
2919       --
2920       --
2921       l_count := l_count + 1;
2922       l_transaction_table(l_count).param_name :=upper('p_attribute_category');
2923       l_transaction_table(l_count).param_value := p_attribute_category;
2924       l_transaction_table(l_count).param_data_type := upper('varchar2');
2925       --
2926       --
2927       l_count := l_count + 1;
2928       l_transaction_table(l_count).param_name :=upper('p_attribute1');
2929       l_transaction_table(l_count).param_value := p_attribute1;
2930       l_transaction_table(l_count).param_data_type := upper('varchar2');
2931       --
2932       --
2933       l_count := l_count + 1;
2934       l_transaction_table(l_count).param_name :=upper('p_attribute2');
2935       l_transaction_table(l_count).param_value := p_attribute2;
2936       l_transaction_table(l_count).param_data_type := upper('varchar2');
2937       --
2938       --
2939       l_count := l_count + 1;
2940       l_transaction_table(l_count).param_name :=upper('p_attribute3');
2941       l_transaction_table(l_count).param_value := p_attribute3;
2942       l_transaction_table(l_count).param_data_type := upper('varchar2');
2943       --
2944       --
2945       l_count := l_count + 1;
2946       l_transaction_table(l_count).param_name :=upper('p_attribute4');
2947       l_transaction_table(l_count).param_value := p_attribute4;
2948       l_transaction_table(l_count).param_data_type := upper('varchar2');
2949       --
2950       --
2951       l_count := l_count + 1;
2952       l_transaction_table(l_count).param_name :=upper('p_attribute5');
2953       l_transaction_table(l_count).param_value := p_attribute5;
2954       l_transaction_table(l_count).param_data_type := upper('varchar2');
2955       --
2956       --
2957       l_count := l_count + 1;
2958       l_transaction_table(l_count).param_name :=upper('p_attribute6');
2959       l_transaction_table(l_count).param_value := p_attribute6;
2960       l_transaction_table(l_count).param_data_type := upper('varchar2');
2961       --
2962       --
2963       l_count := l_count + 1;
2964       l_transaction_table(l_count).param_name :=upper('p_attribute7');
2965       l_transaction_table(l_count).param_value := p_attribute7;
2966       l_transaction_table(l_count).param_data_type := upper('varchar2');
2967       --
2968       --
2969       l_count := l_count + 1;
2970       l_transaction_table(l_count).param_name :=upper('p_attribute8');
2971       l_transaction_table(l_count).param_value := p_attribute8;
2972       l_transaction_table(l_count).param_data_type := upper('varchar2');
2973       --
2974       --
2975       l_count := l_count + 1;
2976       l_transaction_table(l_count).param_name :=upper('p_attribute9');
2977       l_transaction_table(l_count).param_value := p_attribute9;
2978       l_transaction_table(l_count).param_data_type := upper('varchar2');
2979       --
2980       --
2981       l_count := l_count + 1;
2982       l_transaction_table(l_count).param_name :=upper('p_attribute10');
2983       l_transaction_table(l_count).param_value := p_attribute10;
2984       l_transaction_table(l_count).param_data_type := upper('varchar2');
2985       --
2986       --
2987       l_count := l_count + 1;
2988       l_transaction_table(l_count).param_name :=upper('p_attribute11');
2989       l_transaction_table(l_count).param_value := p_attribute11;
2990       l_transaction_table(l_count).param_data_type := upper('varchar2');
2991       --
2992       --
2993       l_count := l_count + 1;
2994       l_transaction_table(l_count).param_name :=upper('p_attribute12');
2995       l_transaction_table(l_count).param_value := p_attribute12;
2996       l_transaction_table(l_count).param_data_type := upper('varchar2');
2997       --
2998       --
2999       l_count := l_count + 1;
3000       l_transaction_table(l_count).param_name :=upper('p_attribute13');
3001       l_transaction_table(l_count).param_value := p_attribute13;
3002       l_transaction_table(l_count).param_data_type := upper('varchar2');
3003       --
3004       --
3005       l_count := l_count + 1;
3006       l_transaction_table(l_count).param_name :=upper('p_attribute14');
3007       l_transaction_table(l_count).param_value := p_attribute14;
3008       l_transaction_table(l_count).param_data_type := upper('varchar2');
3009       --
3010       --
3011       l_count := l_count + 1;
3012       l_transaction_table(l_count).param_name :=upper('p_attribute15');
3013       l_transaction_table(l_count).param_value := p_attribute15;
3014       l_transaction_table(l_count).param_data_type := upper('varchar2');
3015       --
3016       --
3017       l_count := l_count + 1;
3018       l_transaction_table(l_count).param_name :=upper('p_attribute16');
3019       l_transaction_table(l_count).param_value := p_attribute16;
3020       l_transaction_table(l_count).param_data_type := upper('varchar2');
3021       --
3022       --
3023       l_count := l_count + 1;
3024       l_transaction_table(l_count).param_name :=upper('p_attribute17');
3025       l_transaction_table(l_count).param_value := p_attribute17;
3026       l_transaction_table(l_count).param_data_type := upper('varchar2');
3027       --
3028       --
3029       l_count := l_count + 1;
3030       l_transaction_table(l_count).param_name :=upper('p_attribute18');
3031       l_transaction_table(l_count).param_value := p_attribute18;
3032       l_transaction_table(l_count).param_data_type := upper('varchar2');
3033       --
3034       --
3035       l_count := l_count + 1;
3036       l_transaction_table(l_count).param_name :=upper('p_attribute19');
3037       l_transaction_table(l_count).param_value := p_attribute19;
3038       l_transaction_table(l_count).param_data_type := upper('varchar2');
3039       --
3040       --
3041       l_count := l_count + 1;
3042       l_transaction_table(l_count).param_name :=upper('p_attribute20');
3043       l_transaction_table(l_count).param_value := p_attribute20;
3044       l_transaction_table(l_count).param_data_type := upper('varchar2');
3045       --
3046       --
3047       l_count := l_count + 1;
3048       l_transaction_table(l_count).param_name :=upper('p_attribute21');
3049       l_transaction_table(l_count).param_value := p_attribute21;
3050       l_transaction_table(l_count).param_data_type := upper('varchar2');
3051       --
3052       --
3053       l_count := l_count + 1;
3054       l_transaction_table(l_count).param_name :=upper('p_attribute22');
3055       l_transaction_table(l_count).param_value := p_attribute22;
3056       l_transaction_table(l_count).param_data_type := upper('varchar2');
3057       --
3058       --
3059       l_count := l_count + 1;
3060       l_transaction_table(l_count).param_name :=upper('p_attribute23');
3061       l_transaction_table(l_count).param_value := p_attribute23;
3062       l_transaction_table(l_count).param_data_type := upper('varchar2');
3063       --
3064       --
3065       l_count := l_count + 1;
3066       l_transaction_table(l_count).param_name :=upper('p_attribute24');
3067       l_transaction_table(l_count).param_value := p_attribute24;
3068       l_transaction_table(l_count).param_data_type := upper('varchar2');
3069       --
3070       --
3071       l_count := l_count + 1;
3072       l_transaction_table(l_count).param_name :=upper('p_attribute25');
3073       l_transaction_table(l_count).param_value := p_attribute25;
3074       l_transaction_table(l_count).param_data_type := upper('varchar2');
3075       --
3076       --
3077       l_count := l_count + 1;
3078       l_transaction_table(l_count).param_name :=upper('p_attribute26');
3079       l_transaction_table(l_count).param_value := p_attribute26;
3080       l_transaction_table(l_count).param_data_type := upper('varchar2');
3081       --
3082       --
3083       l_count := l_count + 1;
3084       l_transaction_table(l_count).param_name :=upper('p_attribute27');
3085       l_transaction_table(l_count).param_value := p_attribute27;
3086       l_transaction_table(l_count).param_data_type := upper('varchar2');
3087       --
3088       --
3089       l_count := l_count + 1;
3090       l_transaction_table(l_count).param_name :=upper('p_attribute28');
3091       l_transaction_table(l_count).param_value := p_attribute28;
3092       l_transaction_table(l_count).param_data_type := upper('varchar2');
3093       --
3094       --
3095       l_count := l_count + 1;
3096       l_transaction_table(l_count).param_name :=upper('p_attribute29');
3097       l_transaction_table(l_count).param_value := p_attribute29;
3098       l_transaction_table(l_count).param_data_type := upper('varchar2');
3099       --
3100       --
3101       l_count := l_count + 1;
3102       l_transaction_table(l_count).param_name :=upper('p_attribute30');
3103       l_transaction_table(l_count).param_value := p_attribute30;
3104       l_transaction_table(l_count).param_data_type := upper('varchar2');
3105       --
3106       --
3107       l_count := l_count + 1;
3108       l_transaction_table(l_count).param_name :=upper('p_per_information_category');
3109       l_transaction_table(l_count).param_value := p_per_information_category;
3110       l_transaction_table(l_count).param_data_type := upper('varchar2');
3111       --
3112       --
3113       l_count := l_count + 1;
3114       l_transaction_table(l_count).param_name :=upper('p_per_information1');
3115       l_transaction_table(l_count).param_value := p_per_information1;
3116       l_transaction_table(l_count).param_data_type := upper('varchar2');
3117       --
3118       --
3119       l_count := l_count + 1;
3120       l_transaction_table(l_count).param_name :=upper('p_per_information2');
3121       l_transaction_table(l_count).param_value := p_per_information2;
3122       l_transaction_table(l_count).param_data_type := upper('varchar2');
3123       --
3124       --
3125       l_count := l_count + 1;
3126       l_transaction_table(l_count).param_name :=upper('p_per_information3');
3127       l_transaction_table(l_count).param_value := p_per_information3;
3128       l_transaction_table(l_count).param_data_type := upper('varchar2');
3129       --
3130       --
3131       l_count := l_count + 1;
3132       l_transaction_table(l_count).param_name :=upper('p_per_information4');
3133       l_transaction_table(l_count).param_value := p_per_information4;
3134       l_transaction_table(l_count).param_data_type := upper('varchar2');
3135       --
3136       --
3137       l_count := l_count + 1;
3138       l_transaction_table(l_count).param_name :=upper('p_per_information5');
3139       l_transaction_table(l_count).param_value := p_per_information5;
3140       l_transaction_table(l_count).param_data_type := upper('varchar2');
3141       --
3142       --
3143       l_count := l_count + 1;
3144       l_transaction_table(l_count).param_name :=upper('p_per_information6');
3145       l_transaction_table(l_count).param_value := p_per_information6;
3146       l_transaction_table(l_count).param_data_type := upper('varchar2');
3147       --
3148       --
3149       l_count := l_count + 1;
3150       l_transaction_table(l_count).param_name :=upper('p_per_information7');
3151       l_transaction_table(l_count).param_value := p_per_information7;
3152       l_transaction_table(l_count).param_data_type := upper('varchar2');
3153       --
3154       --
3155       l_count := l_count + 1;
3156       l_transaction_table(l_count).param_name :=upper('p_per_information8');
3157       l_transaction_table(l_count).param_value := p_per_information8;
3158       l_transaction_table(l_count).param_data_type := upper('varchar2');
3159       --
3160       --
3161       l_count := l_count + 1;
3162       l_transaction_table(l_count).param_name :=upper('p_per_information9');
3163       l_transaction_table(l_count).param_value := p_per_information9;
3164       l_transaction_table(l_count).param_data_type := upper('varchar2');
3165       --
3166       --
3167       l_count := l_count + 1;
3168       l_transaction_table(l_count).param_name :=upper('p_per_information10');
3169       l_transaction_table(l_count).param_value := p_per_information10;
3170       l_transaction_table(l_count).param_data_type := upper('varchar2');
3171       --
3172       --
3173       l_count := l_count + 1;
3174       l_transaction_table(l_count).param_name :=upper('p_per_information11');
3175       l_transaction_table(l_count).param_value := p_per_information11;
3176       l_transaction_table(l_count).param_data_type := upper('varchar2');
3177       --
3178       --
3179       l_count := l_count + 1;
3180       l_transaction_table(l_count).param_name :=upper('p_per_information12');
3181       l_transaction_table(l_count).param_value := p_per_information12;
3182       l_transaction_table(l_count).param_data_type := upper('varchar2');
3183       --
3184       --
3185       l_count := l_count + 1;
3186       l_transaction_table(l_count).param_name :=upper('p_per_information13');
3187       l_transaction_table(l_count).param_value := p_per_information13;
3188       l_transaction_table(l_count).param_data_type := upper('varchar2');
3189       --
3190       --
3191       l_count := l_count + 1;
3192       l_transaction_table(l_count).param_name :=upper('p_per_information14');
3193       l_transaction_table(l_count).param_value := p_per_information14;
3194       l_transaction_table(l_count).param_data_type := upper('varchar2');
3195       --
3196       --
3197       l_count := l_count + 1;
3198       l_transaction_table(l_count).param_name :=upper('p_per_information15');
3199       l_transaction_table(l_count).param_value := p_per_information15;
3200       l_transaction_table(l_count).param_data_type := upper('varchar2');
3201       --
3202       --
3203       l_count := l_count + 1;
3204       l_transaction_table(l_count).param_name :=upper('p_per_information16');
3205       l_transaction_table(l_count).param_value := p_per_information16;
3206       l_transaction_table(l_count).param_data_type := upper('varchar2');
3207       --
3208       --
3209       l_count := l_count + 1;
3210       l_transaction_table(l_count).param_name :=upper('p_per_information17');
3211       l_transaction_table(l_count).param_value := p_per_information17;
3212       l_transaction_table(l_count).param_data_type := upper('varchar2');
3213       --
3214       --
3215       l_count := l_count + 1;
3216       l_transaction_table(l_count).param_name :=upper('p_per_information18');
3217       l_transaction_table(l_count).param_value := p_per_information18;
3218       l_transaction_table(l_count).param_data_type := upper('varchar2');
3219       --
3220       --
3221       l_count := l_count + 1;
3222       l_transaction_table(l_count).param_name :=upper('p_per_information19');
3223       l_transaction_table(l_count).param_value := p_per_information19;
3224       l_transaction_table(l_count).param_data_type := upper('varchar2');
3225       --
3226       --
3227       l_count := l_count + 1;
3228       l_transaction_table(l_count).param_name :=upper('p_per_information20');
3229       l_transaction_table(l_count).param_value := p_per_information20;
3230       l_transaction_table(l_count).param_data_type := upper('varchar2');
3231       --
3232       --
3233       l_count := l_count + 1;
3234       l_transaction_table(l_count).param_name :=upper('p_per_information21');
3235       l_transaction_table(l_count).param_value := p_per_information21;
3236       l_transaction_table(l_count).param_data_type := upper('varchar2');
3237       --
3238       --
3239       l_count := l_count + 1;
3240       l_transaction_table(l_count).param_name :=upper('p_per_information22');
3241       l_transaction_table(l_count).param_value := p_per_information22;
3242       l_transaction_table(l_count).param_data_type := upper('varchar2');
3243       --
3244       --
3245       l_count := l_count + 1;
3246       l_transaction_table(l_count).param_name :=upper('p_per_information23');
3247       l_transaction_table(l_count).param_value := p_per_information23;
3248       l_transaction_table(l_count).param_data_type := upper('varchar2');
3249       --
3250       --
3251       l_count := l_count + 1;
3252       l_transaction_table(l_count).param_name :=upper('p_per_information24');
3253       l_transaction_table(l_count).param_value := p_per_information24;
3254       l_transaction_table(l_count).param_data_type := upper('varchar2');
3255       --
3256       --
3257       l_count := l_count + 1;
3258       l_transaction_table(l_count).param_name :=upper('p_per_information25');
3259       l_transaction_table(l_count).param_value := p_per_information25;
3260       l_transaction_table(l_count).param_data_type := upper('varchar2');
3261       --
3262       --
3263       l_count := l_count + 1;
3264       l_transaction_table(l_count).param_name :=upper('p_per_information26');
3265       l_transaction_table(l_count).param_value := p_per_information26;
3266       l_transaction_table(l_count).param_data_type := upper('varchar2');
3267       --
3268       --
3269       l_count := l_count + 1;
3270       l_transaction_table(l_count).param_name :=upper('p_per_information27');
3271       l_transaction_table(l_count).param_value := p_per_information27;
3272       l_transaction_table(l_count).param_data_type := upper('varchar2');
3273       --
3274       --
3275       l_count := l_count + 1;
3276       l_transaction_table(l_count).param_name :=upper('p_per_information28');
3277       l_transaction_table(l_count).param_value := p_per_information28;
3278       l_transaction_table(l_count).param_data_type := upper('varchar2');
3279       --
3280       --
3281       l_count := l_count + 1;
3282       l_transaction_table(l_count).param_name :=upper('p_per_information29');
3283       l_transaction_table(l_count).param_value := p_per_information29;
3284       l_transaction_table(l_count).param_data_type := upper('varchar2');
3285       --
3286       --
3287       l_count := l_count + 1;
3288       l_transaction_table(l_count).param_name :=upper('p_per_information30');
3289       l_transaction_table(l_count).param_value := p_per_information30;
3290       l_transaction_table(l_count).param_data_type := upper('varchar2');
3291       --
3292       --
3293       l_count := l_count + 1;
3294       l_transaction_table(l_count).param_name :=upper('p_date_of_death');
3295       l_transaction_table(l_count).param_value := to_char(p_date_of_death,
3296                                                   hr_transaction_ss.g_date_format);
3297       l_transaction_table(l_count).param_data_type := upper('date');
3298       --
3299       --
3300       l_count := l_count + 1;
3301       l_transaction_table(l_count).param_name :=upper('p_dpdnt_adoption_date');
3302       l_transaction_table(l_count).param_value :=to_char(p_dpdnt_adoption_date,
3303                                                        hr_transaction_ss.g_date_format);
3304       l_transaction_table(l_count).param_data_type := upper('date');
3305       --
3306       l_count := l_count + 1;
3307       l_transaction_table(l_count).param_name :=upper('p_background_check_status');
3308       l_transaction_table(l_count).param_value := p_background_check_status;
3309       l_transaction_table(l_count).param_data_type := upper('varchar2');
3310       --
3311       --
3312       l_count := l_count + 1;
3313       l_transaction_table(l_count).param_name :=upper('p_background_date_check');
3314       l_transaction_table(l_count).param_value := to_char(p_background_date_check,
3315                                                   hr_transaction_ss.g_date_format);
3316       l_transaction_table(l_count).param_data_type := upper('date');
3317       --
3318       --
3319       l_count := l_count + 1;
3320       l_transaction_table(l_count).param_name :=upper('p_blood_type');
3321       l_transaction_table(l_count).param_value := p_blood_type;
3322       l_transaction_table(l_count).param_data_type := upper('varchar2');
3323       --
3324       --
3325       l_count := l_count + 1;
3326       l_transaction_table(l_count).param_name :=upper('p_correspondence_language');
3327       l_transaction_table(l_count).param_value := p_correspondence_language;
3328       l_transaction_table(l_count).param_data_type := upper('varchar2');
3329       --
3330       --
3331       l_count := l_count + 1;
3332       l_transaction_table(l_count).param_name :=upper('p_fast_path_employee');
3333       l_transaction_table(l_count).param_value := p_fast_path_employee;
3334       l_transaction_table(l_count).param_data_type := upper('varchar2');
3335       --
3336       --
3337       l_count := l_count + 1;
3338       l_transaction_table(l_count).param_name :=upper('p_fte_capacity');
3339       l_transaction_table(l_count).param_value := p_fte_capacity;
3340       l_transaction_table(l_count).param_data_type := upper('number');
3341       --
3342       --
3343       l_count := l_count + 1;
3344       l_transaction_table(l_count).param_name :=upper('p_hold_applicant_date_until');
3345       l_transaction_table(l_count).param_value := to_char(p_hold_applicant_date_until,
3346                                                        hr_transaction_ss.g_date_format);
3347       l_transaction_table(l_count).param_data_type := upper('date');
3348       --
3349       --
3350       l_count := l_count + 1;
3351       l_transaction_table(l_count).param_name :=upper('p_honors');
3352       l_transaction_table(l_count).param_value := p_honors;
3353       l_transaction_table(l_count).param_data_type := upper('varchar2');
3354       --
3355       --
3356       l_count := l_count + 1;
3357       l_transaction_table(l_count).param_name :=upper('p_internal_location');
3358       l_transaction_table(l_count).param_value := p_internal_location;
3359       l_transaction_table(l_count).param_data_type := upper('varchar2');
3360       --
3361       --
3362       l_count := l_count + 1;
3363       l_transaction_table(l_count).param_name :=upper('p_last_medical_test_by');
3364       l_transaction_table(l_count).param_value := p_last_medical_test_by;
3365       l_transaction_table(l_count).param_data_type := upper('varchar2');
3366       --
3367       --
3368       l_count := l_count + 1;
3369       l_transaction_table(l_count).param_name :=upper('p_last_medical_test_date');
3370       l_transaction_table(l_count).param_value := to_char(p_last_medical_test_date,
3371                                                        hr_transaction_ss.g_date_format);
3372       l_transaction_table(l_count).param_data_type := upper('date');
3373       --
3374       --
3375       l_count := l_count + 1;
3376       l_transaction_table(l_count).param_name :=upper('p_mailstop');
3377       l_transaction_table(l_count).param_value := p_mailstop;
3378       l_transaction_table(l_count).param_data_type := upper('varchar2');
3379       --
3380       --
3381       l_count := l_count + 1;
3382       l_transaction_table(l_count).param_name :=upper('p_office_number');
3383       l_transaction_table(l_count).param_value := p_office_number;
3384       l_transaction_table(l_count).param_data_type := upper('varchar2');
3385       --
3386       --
3387       l_count := l_count + 1;
3388       l_transaction_table(l_count).param_name :=upper('p_on_military_service');
3389       l_transaction_table(l_count).param_value := p_on_military_service;
3390       l_transaction_table(l_count).param_data_type := upper('varchar2');
3391       --
3392       --
3393       l_count := l_count + 1;
3394       l_transaction_table(l_count).param_name :=upper('p_pre_name_adjunct');
3395       l_transaction_table(l_count).param_value := p_pre_name_adjunct;
3396       l_transaction_table(l_count).param_data_type := upper('varchar2');
3397       --
3398       --
3399       l_count := l_count + 1;
3400       l_transaction_table(l_count).param_name :=upper('p_projected_start_date');
3401       l_transaction_table(l_count).param_value := to_char(p_projected_start_date,
3402                                                        hr_transaction_ss.g_date_format);
3403       l_transaction_table(l_count).param_data_type := upper('date');
3404       --
3405       --
3406       l_count := l_count + 1;
3407       l_transaction_table(l_count).param_name :=upper('p_rehire_authorizor');
3408       l_transaction_table(l_count).param_value := p_rehire_authorizor;
3409       l_transaction_table(l_count).param_data_type := upper('varchar2');
3410       --
3411       --
3412       l_count := l_count + 1;
3413       l_transaction_table(l_count).param_name :=upper('p_rehire_recommendation');
3414       l_transaction_table(l_count).param_value := p_rehire_recommendation;
3415       l_transaction_table(l_count).param_data_type := upper('varchar2');
3416       --
3417       --
3418       l_count := l_count + 1;
3419       l_transaction_table(l_count).param_name :=upper('p_resume_exists');
3420       l_transaction_table(l_count).param_value := p_resume_exists;
3421       l_transaction_table(l_count).param_data_type := upper('varchar2');
3422       --
3423       --
3424       l_count := l_count + 1;
3425       l_transaction_table(l_count).param_name :=upper('p_resume_last_updated');
3426       l_transaction_table(l_count).param_value := to_char(p_resume_last_updated,
3427                                                        hr_transaction_ss.g_date_format);
3428       l_transaction_table(l_count).param_data_type := upper('date');
3429       --
3430       --
3431       l_count := l_count + 1;
3432       l_transaction_table(l_count).param_name :=upper('p_second_passport_exists');
3433       l_transaction_table(l_count).param_value := p_second_passport_exists;
3434       l_transaction_table(l_count).param_data_type := upper('varchar2');
3435       --
3436       --
3437       l_count := l_count + 1;
3438       l_transaction_table(l_count).param_name :=upper('p_student_status');
3439       l_transaction_table(l_count).param_value := p_student_status;
3440       l_transaction_table(l_count).param_data_type := upper('varchar2');
3441       --
3442       --
3443       l_count := l_count + 1;
3444       l_transaction_table(l_count).param_name :=upper('p_work_schedule');
3445       l_transaction_table(l_count).param_value := p_work_schedule;
3446       l_transaction_table(l_count).param_data_type := upper('varchar2');
3447       --
3448       --
3449       l_count := l_count + 1;
3450       l_transaction_table(l_count).param_name :=upper('p_rehire_reason');
3451       l_transaction_table(l_count).param_value := p_rehire_reason;
3452       l_transaction_table(l_count).param_data_type := upper('varchar2');
3453       --
3454       --
3455       l_count := l_count + 1;
3456       l_transaction_table(l_count).param_name :=upper('p_suffix');
3457       l_transaction_table(l_count).param_value := p_suffix;
3458       l_transaction_table(l_count).param_data_type := upper('varchar2');
3459       --
3460       --
3461       l_count := l_count + 1;
3462       l_transaction_table(l_count).param_name :=upper('p_benefit_group_id');
3463       l_transaction_table(l_count).param_value := p_benefit_group_id;
3464       l_transaction_table(l_count).param_data_type := upper('number');
3465       --
3466       --
3467       l_count := l_count + 1;
3468       l_transaction_table(l_count).param_name :=upper('p_receipt_of_death_cert_date');
3469       l_transaction_table(l_count).param_value := to_char(p_receipt_of_death_cert_date,
3470                                                        hr_transaction_ss.g_date_format);
3471       l_transaction_table(l_count).param_data_type := upper('date');
3472       --
3473       --
3474       l_count := l_count + 1;
3475       l_transaction_table(l_count).param_name :=upper('p_coord_ben_med_pln_no');
3476       l_transaction_table(l_count).param_value := p_coord_ben_med_pln_no;
3477       l_transaction_table(l_count).param_data_type := upper('varchar2');
3478       --
3479       --
3480       l_count := l_count + 1;
3481       l_transaction_table(l_count).param_name :=upper('p_coord_ben_no_cvg_flag');
3482       l_transaction_table(l_count).param_value := p_coord_ben_no_cvg_flag;
3483       l_transaction_table(l_count).param_data_type := upper('varchar2');
3484       --
3485       --
3486       l_count := l_count + 1;
3487       l_transaction_table(l_count).param_name :=upper('p_uses_tobacco_flag');
3488       l_transaction_table(l_count).param_value := p_uses_tobacco_flag;
3489       l_transaction_table(l_count).param_data_type := upper('varchar2');
3490       --
3491       --
3492       l_count := l_count + 1;
3493       l_transaction_table(l_count).param_name :=upper('p_dpdnt_vlntry_svce_flag');
3494       l_transaction_table(l_count).param_value := p_dpdnt_vlntry_svce_flag;
3495       l_transaction_table(l_count).param_data_type := upper('varchar2');
3496       --
3497       --
3498       l_count := l_count + 1;
3499       l_transaction_table(l_count).param_name :=upper('p_original_date_of_hire');
3500       l_transaction_table(l_count).param_value := to_char(p_original_date_of_hire,
3501                                                        hr_transaction_ss.g_date_format);
3502       l_transaction_table(l_count).param_data_type := upper('date');
3503       --
3504       --
3505       l_count := l_count + 1;
3506       l_transaction_table(l_count).param_name :=upper('p_adjusted_svc_date');
3507       l_transaction_table(l_count).param_value := to_char(p_adjusted_svc_date,
3508                                                        hr_transaction_ss.g_date_format);
3509       l_transaction_table(l_count).param_data_type := upper('date');
3510       --
3511       --
3512       l_count := l_count + 1;
3513       l_transaction_table(l_count).param_name :=upper('p_town_of_birth');
3514       l_transaction_table(l_count).param_value := p_town_of_birth;
3515       l_transaction_table(l_count).param_data_type := upper('varchar2');
3516       --
3517       --
3518       l_count := l_count + 1;
3519       l_transaction_table(l_count).param_name :=upper('p_region_of_birth');
3520       l_transaction_table(l_count).param_value := p_region_of_birth;
3521       l_transaction_table(l_count).param_data_type := upper('varchar2');
3522       --
3523       --
3524       l_count := l_count + 1;
3525       l_transaction_table(l_count).param_name :=upper('p_country_of_birth');
3526       l_transaction_table(l_count).param_value := p_country_of_birth;
3527       l_transaction_table(l_count).param_data_type := upper('varchar2');
3528       --
3529       --
3530       l_count := l_count + 1;
3531       l_transaction_table(l_count).param_name :=upper('p_global_person_id');
3532       l_transaction_table(l_count).param_value := p_global_person_id;
3533       l_transaction_table(l_count).param_data_type := upper('varchar2');
3534       --
3535       -- These are the parameters which are there in the create_contact.
3536       -- We need to populate null values so that we can have generic get
3537       -- ffunction which works for create_contact and update_contact.
3538       --
3539       l_count := l_count + 1;
3540       l_transaction_table(l_count).param_name :=upper('p_start_date');
3541       l_transaction_table(l_count).param_value := to_char(p_date_start, hr_transaction_ss.g_date_format);
3542       l_transaction_table(l_count).param_data_type := upper('date');
3543       --
3544       --
3545       l_count := l_count + 1;
3546       l_transaction_table(l_count).param_name :=upper('p_contact_person_id');
3547       l_transaction_table(l_count).param_value := p_cont_person_id;
3548       l_transaction_table(l_count).param_data_type := upper('number');
3549       --
3550       --
3551       l_count := l_count + 1;
3552       l_transaction_table(l_count).param_name :=upper('p_create_mirror_flag');
3553       l_transaction_table(l_count).param_value := null;
3554       l_transaction_table(l_count).param_data_type := upper('varchar2');
3555       --
3556       --
3557       l_count := l_count + 1;
3558       l_transaction_table(l_count).param_name :=upper('p_mirror_type');
3559       l_transaction_table(l_count).param_value := null;
3560       l_transaction_table(l_count).param_data_type := upper('varchar2');
3561       --
3562       --
3563       l_count := l_count + 1;
3564       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute_cat');
3565       l_transaction_table(l_count).param_value := null;
3566       l_transaction_table(l_count).param_data_type := upper('varchar2');
3567       --
3568       --
3569       l_count := l_count + 1;
3570       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute1');
3571       l_transaction_table(l_count).param_value := null;
3572       l_transaction_table(l_count).param_data_type := upper('varchar2');
3573       --
3574       --
3575       l_count := l_count + 1;
3576       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute2');
3577       l_transaction_table(l_count).param_value := null;
3578       l_transaction_table(l_count).param_data_type := upper('varchar2');
3579       --
3580       --
3581       l_count := l_count + 1;
3582       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute3');
3583       l_transaction_table(l_count).param_value := null;
3584       l_transaction_table(l_count).param_data_type := upper('varchar2');
3585       --
3586       --
3587       l_count := l_count + 1;
3588       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute4');
3589       l_transaction_table(l_count).param_value := null;
3590       l_transaction_table(l_count).param_data_type := upper('varchar2');
3591       --
3592       --
3593       l_count := l_count + 1;
3594       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute5');
3595       l_transaction_table(l_count).param_value := null;
3596       l_transaction_table(l_count).param_data_type := upper('varchar2');
3597       --
3598       --
3599       l_count := l_count + 1;
3600       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute6');
3601       l_transaction_table(l_count).param_value := null;
3602       l_transaction_table(l_count).param_data_type := upper('varchar2');
3603       --
3604       --
3605       l_count := l_count + 1;
3606       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute7');
3607       l_transaction_table(l_count).param_value := null;
3608       l_transaction_table(l_count).param_data_type := upper('varchar2');
3609       --
3610       --
3611       l_count := l_count + 1;
3612       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute8');
3613       l_transaction_table(l_count).param_value := null;
3614       l_transaction_table(l_count).param_data_type := upper('varchar2');
3615       --
3616       --
3617       l_count := l_count + 1;
3618       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute9');
3619       l_transaction_table(l_count).param_value := null;
3620       l_transaction_table(l_count).param_data_type := upper('varchar2');
3621       --
3622       --
3623       l_count := l_count + 1;
3624       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute10');
3625       l_transaction_table(l_count).param_value := null;
3626       l_transaction_table(l_count).param_data_type := upper('varchar2');
3627       --
3628       --
3629       l_count := l_count + 1;
3630       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute11');
3631       l_transaction_table(l_count).param_value := null;
3632       l_transaction_table(l_count).param_data_type := upper('varchar2');
3633       --
3634       --
3635       l_count := l_count + 1;
3636       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute12');
3637       l_transaction_table(l_count).param_value := null;
3638       l_transaction_table(l_count).param_data_type := upper('varchar2');
3639       --
3640       --
3641       l_count := l_count + 1;
3642       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute13');
3643       l_transaction_table(l_count).param_value := null;
3644       l_transaction_table(l_count).param_data_type := upper('varchar2');
3645       --
3646       --
3647       l_count := l_count + 1;
3648       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute14');
3649       l_transaction_table(l_count).param_value := null;
3650       l_transaction_table(l_count).param_data_type := upper('varchar2');
3651       --
3652       --
3653       l_count := l_count + 1;
3654       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute15');
3655       l_transaction_table(l_count).param_value := null;
3656       l_transaction_table(l_count).param_data_type := upper('varchar2');
3657       --
3658       --
3659       l_count := l_count + 1;
3660       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute16');
3661       l_transaction_table(l_count).param_value := null;
3662       l_transaction_table(l_count).param_data_type := upper('varchar2');
3663       --
3664       --
3665       l_count := l_count + 1;
3666       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute17');
3667       l_transaction_table(l_count).param_value := null;
3668       l_transaction_table(l_count).param_data_type := upper('varchar2');
3669       --
3670       --
3671       l_count := l_count + 1;
3672       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute18');
3673       l_transaction_table(l_count).param_value := null;
3674       l_transaction_table(l_count).param_data_type := upper('varchar2');
3675       --
3676       --
3677       l_count := l_count + 1;
3678       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute19');
3679       l_transaction_table(l_count).param_value := null;
3680       l_transaction_table(l_count).param_data_type := upper('varchar2');
3681       --
3682       --
3683       l_count := l_count + 1;
3684       l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute20');
3685       l_transaction_table(l_count).param_value := null;
3686       l_transaction_table(l_count).param_data_type := upper('varchar2');
3687       --
3688       --StartRegistration
3689       --  This is a marker for the contact person to be used to identify the Address
3690       --  to be retrieved for the contact person in context in review page.
3691       --  The HR_LAST_CONTACT_SET is in from the work flow attribute
3692       begin
3693             l_contact_set := wf_engine.GetItemAttrNumber(itemtype => p_item_type,
3694                                                 itemkey  => p_item_key,
3695                                                 aname    => 'HR_CONTACT_SET');
3696 
3697             exception when others then
3698                 hr_utility.set_location('Exception:'||l_proc,555);
3699                 l_contact_set := 0;
3700 
3701       end;
3702 
3703       l_count := l_count + 1;
3704       l_transaction_table(l_count).param_name := 'P_CONTACT_SET';
3705       l_transaction_table(l_count).param_value := l_contact_set;
3706       l_transaction_table(l_count).param_data_type := 'VARCHAR2';
3707       --
3708       -- EndRegistration
3709       --
3710       l_count := l_count + 1;
3711       l_transaction_table(l_count).param_name :=upper('p_contact_operation');
3712       l_transaction_table(l_count).param_value := p_contact_operation;
3713       l_transaction_table(l_count).param_data_type := upper('varchar2');
3714       --
3715       l_count := l_count + 1;
3716       l_transaction_table(l_count).param_name :=upper('p_emrg_cont_flag');
3717       l_transaction_table(l_count).param_value := p_emrg_cont_flag;
3718       l_transaction_table(l_count).param_data_type := upper('varchar2');
3719       --
3720       l_count := l_count + 1;
3721       l_transaction_table(l_count).param_name :=upper('p_dpdnt_bnf_flag');
3722       l_transaction_table(l_count).param_value := p_dpdnt_bnf_flag;
3723       l_transaction_table(l_count).param_data_type := upper('varchar2');
3724 
3725      --2315163fix
3726      --
3727       if p_contact_operation  in ( 'EMER_CR_NEW_CONT', 'EMER_CR_NEW_REL', 'EMRG_OVRW_UPD')
3728          or p_emrg_cont_flag ='Y' then
3729         l_is_emergency_contact := 'Yes';
3730       else
3731         l_is_emergency_contact := 'No';
3732       end if;
3733 
3734       l_count := l_count + 1;
3735       l_transaction_table(l_count).param_name :=upper('p_is_emergency_contact');
3736       l_transaction_table(l_count).param_value := l_is_emergency_contact;
3737       l_transaction_table(l_count).param_data_type := upper('varchar2');
3738 
3739       if p_contact_operation  in ( 'DPDNT_CR_NEW_CONT', 'DPDNT_CR_NEW_REL',  'DPDNT_OVRW_UPD')
3740          or p_dpdnt_bnf_flag ='Y' then
3741         l_is_dpdnt_bnf := 'Yes';
3742       else
3743         l_is_dpdnt_bnf := 'No';
3744       end if;
3745 
3746       l_count := l_count + 1;
3747       l_transaction_table(l_count).param_name :=upper('p_is_dpdnt_bnf');
3748       l_transaction_table(l_count).param_value := l_is_dpdnt_bnf;
3749       l_transaction_table(l_count).param_data_type := upper('varchar2');
3750       --
3751   l_count := l_count + 1;
3752   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION_CATEGORY');
3753   l_transaction_table(l_count).param_value := P_CONT_INFORMATION_CATEGORY;
3754   l_transaction_table(l_count).param_data_type := upper('varchar2');
3755 
3756   --
3757   --
3758 
3759   l_count := l_count + 1;
3760   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION1');
3761   l_transaction_table(l_count).param_value := P_CONT_INFORMATION1;
3762   l_transaction_table(l_count).param_data_type := upper('varchar2');
3763 
3764   --
3765   --
3766 
3767   l_count := l_count + 1;
3768   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION2');
3769   l_transaction_table(l_count).param_value := P_CONT_INFORMATION2;
3770   l_transaction_table(l_count).param_data_type := upper('varchar2');
3771 
3772   --
3773   --
3774 
3775   l_count := l_count + 1;
3776   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION3');
3777   l_transaction_table(l_count).param_value := P_CONT_INFORMATION3;
3778   l_transaction_table(l_count).param_data_type := upper('varchar2');
3779 
3780   --
3781   --
3782 
3783   l_count := l_count + 1;
3784   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION4');
3785   l_transaction_table(l_count).param_value := P_CONT_INFORMATION4;
3786   l_transaction_table(l_count).param_data_type := upper('varchar2');
3787 
3788   --
3789   --
3790 
3791   l_count := l_count + 1;
3792   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION5');
3793   l_transaction_table(l_count).param_value := P_CONT_INFORMATION5;
3794   l_transaction_table(l_count).param_data_type := upper('varchar2');
3795 
3796   --
3797   --
3798 
3799   l_count := l_count + 1;
3800   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION6');
3801   l_transaction_table(l_count).param_value := P_CONT_INFORMATION6;
3802   l_transaction_table(l_count).param_data_type := upper('varchar2');
3803 
3804   --
3805   --
3806 
3807   l_count := l_count + 1;
3808   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION7');
3809   l_transaction_table(l_count).param_value := P_CONT_INFORMATION7;
3810   l_transaction_table(l_count).param_data_type := upper('varchar2');
3811 
3812   --
3813   --
3814 
3815   l_count := l_count + 1;
3816   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION8');
3817   l_transaction_table(l_count).param_value := P_CONT_INFORMATION8;
3818   l_transaction_table(l_count).param_data_type := upper('varchar2');
3819 
3820   --
3821   --
3822 
3823   l_count := l_count + 1;
3824   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION9');
3825   l_transaction_table(l_count).param_value := P_CONT_INFORMATION9;
3826   l_transaction_table(l_count).param_data_type := upper('varchar2');
3827 
3828   --
3829   --
3830 
3831   l_count := l_count + 1;
3832   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION10');
3833   l_transaction_table(l_count).param_value := P_CONT_INFORMATION10;
3834   l_transaction_table(l_count).param_data_type := upper('varchar2');
3835 
3836   --
3837   --
3838 
3839   l_count := l_count + 1;
3840   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION11');
3841   l_transaction_table(l_count).param_value := P_CONT_INFORMATION11;
3842   l_transaction_table(l_count).param_data_type := upper('varchar2');
3843 
3844   --
3845   --
3846 
3847   l_count := l_count + 1;
3848   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION12');
3849   l_transaction_table(l_count).param_value := P_CONT_INFORMATION12;
3850   l_transaction_table(l_count).param_data_type := upper('varchar2');
3851 
3852   --
3853   --
3854 
3855   l_count := l_count + 1;
3856   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION13');
3857   l_transaction_table(l_count).param_value := P_CONT_INFORMATION13;
3858   l_transaction_table(l_count).param_data_type := upper('varchar2');
3859 
3860   --
3861   --
3862 
3863   l_count := l_count + 1;
3864   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION14');
3865   l_transaction_table(l_count).param_value := P_CONT_INFORMATION14;
3866   l_transaction_table(l_count).param_data_type := upper('varchar2');
3867 
3868   --
3869   --
3870 
3871   l_count := l_count + 1;
3872   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION15');
3873   l_transaction_table(l_count).param_value := P_CONT_INFORMATION15;
3874   l_transaction_table(l_count).param_data_type := upper('varchar2');
3875 
3876   --
3877   --
3878 
3879   l_count := l_count + 1;
3880   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION16');
3881   l_transaction_table(l_count).param_value := P_CONT_INFORMATION16;
3882   l_transaction_table(l_count).param_data_type := upper('varchar2');
3883 
3884   --
3885   --
3886 
3887   l_count := l_count + 1;
3888   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION17');
3889   l_transaction_table(l_count).param_value := P_CONT_INFORMATION17;
3890   l_transaction_table(l_count).param_data_type := upper('varchar2');
3891 
3892   --
3893   --
3894 
3895   l_count := l_count + 1;
3896   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION18');
3897   l_transaction_table(l_count).param_value := P_CONT_INFORMATION18;
3898   l_transaction_table(l_count).param_data_type := upper('varchar2');
3899 
3900   --
3901   --
3902 
3903   l_count := l_count + 1;
3904   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION19');
3905   l_transaction_table(l_count).param_value := P_CONT_INFORMATION19;
3906   l_transaction_table(l_count).param_data_type := upper('varchar2');
3907 
3908   --
3909   --
3910 
3911   l_count := l_count + 1;
3912   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION20');
3913   l_transaction_table(l_count).param_value := P_CONT_INFORMATION20;
3914   l_transaction_table(l_count).param_data_type := upper('varchar2');
3915 
3916       hr_utility.set_location('Before Calling :hr_transaction_ss.save_transaction_step', 75);
3917       hr_utility.set_location('Before Calling :hr_transaction_ss.save_transaction_step '
3918                                || to_char(l_transaction_table.count), 75);
3919       --
3920 
3921      -- Bug 3152505 : Added the new transaction var
3922      l_count := l_count + 1;
3923      l_transaction_table(l_count).param_name :=upper('p_orig_rel_type');
3924      l_transaction_table(l_count).param_value := p_orig_rel_type;
3925      l_transaction_table(l_count).param_data_type := upper('varchar2');
3926     --
3927 
3928       hr_transaction_ss.save_transaction_step
3929                 (p_item_type => p_item_type
3930                 ,p_item_key => p_item_key
3931                 ,p_login_person_id => nvl(p_login_person_id, p_person_id)
3932                 ,p_actid => p_activity_id
3933                 ,p_transaction_step_id => l_transaction_step_id
3934                 ,p_api_name => g_package || '.PROCESS_API'
3935                 ,p_transaction_data => l_transaction_table);
3936       --
3937       hr_utility.set_location('Leaving hr_process_contact_ss.update_contact_relationship', 80);
3938 
3939   END IF;
3940   --
3941   -- 9999 set out variables here. Do we need to set anyway.
3942   --
3943   p_name_combination_warning  :=  l_per_name_combination_warning;
3944   p_assign_payroll_warning    :=  l_per_assign_payroll_warning;
3945   p_orig_hire_warning         :=  l_per_orig_hire_warning;
3946   hr_utility.set_location('Exiting:'||l_proc, 85);
3947 
3948   EXCEPTION
3949     WHEN hr_utility.hr_error THEN
3950          -- -------------------------------------------
3951          -- an application error has been raised so we must
3952          -- redisplay the web form to display the error
3953          -- --------------------------------------------
3954          hr_utility.set_location('Exception:'||l_proc,560);
3955          hr_message.provide_error;
3956          l_message_number := hr_message.last_message_number;
3957          --
3958          -- 99999 What error messages I have to trap here.
3959          --
3960          IF l_message_number = 'APP-7165' OR
3961             l_message_number = 'APP-7155' THEN
3962             hr_utility.set_message(800, 'HR_UPDATE_NOT_ALLOWED');
3963             hr_utility.raise_error;
3964          ELSE
3965             hr_utility.raise_error;
3966          END IF;
3967     WHEN OTHERS THEN
3968       hr_utility.set_location('Exception:'||l_proc,565);
3969       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
3970       hr_utility.raise_error;
3971       --RAISE;  -- Raise error here relevant to the new tech stack.
3972   --
3973  end update_contact_relationship;
3974 --
3975 -- ---------------------------------------------------------------------------
3976 -- ---------------------------- < is_rec_changed > ---------------------------
3977 -- ---------------------------------------------------------------------------
3978 -- Purpose: This function will check field by field to determine if there
3979 --          are any changes made to the record.
3980 -- ---------------------------------------------------------------------------
3981 FUNCTION  is_rec_changed (
3982    p_effective_date                in        date
3983   ,p_contact_relationship_id       in        number
3984   ,p_contact_type                  in        varchar2  default hr_api.g_varchar2
3985   ,p_comments                      in        clob      default hr_api.g_varchar2	-- Bug#13362792
3986   ,p_primary_contact_flag          in        varchar2  default hr_api.g_varchar2
3987   ,p_third_party_pay_flag          in        varchar2  default hr_api.g_varchar2
3988   ,p_bondholder_flag               in        varchar2  default hr_api.g_varchar2
3989   ,p_date_start                    in        date      default hr_api.g_date
3990   ,p_start_life_reason_id          in        number    default hr_api.g_number
3991   ,p_date_end                      in        date      default hr_api.g_date
3992   ,p_end_life_reason_id            in        number    default hr_api.g_number
3993   ,p_rltd_per_rsds_w_dsgntr_flag   in        varchar2  default hr_api.g_varchar2
3994   ,p_personal_flag                 in        varchar2  default hr_api.g_varchar2
3995   ,p_sequence_number               in        number    default hr_api.g_number
3996   ,p_dependent_flag                in        varchar2  default hr_api.g_varchar2
3997   ,p_beneficiary_flag              in        varchar2  default hr_api.g_varchar2
3998   ,p_cont_attribute_category       in        varchar2  default hr_api.g_varchar2
3999   ,p_cont_attribute1               in        varchar2  default hr_api.g_varchar2
4000   ,p_cont_attribute2               in        varchar2  default hr_api.g_varchar2
4001   ,p_cont_attribute3               in        varchar2  default hr_api.g_varchar2
4002   ,p_cont_attribute4               in        varchar2  default hr_api.g_varchar2
4003   ,p_cont_attribute5               in        varchar2  default hr_api.g_varchar2
4004   ,p_cont_attribute6               in        varchar2  default hr_api.g_varchar2
4005   ,p_cont_attribute7               in        varchar2  default hr_api.g_varchar2
4006   ,p_cont_attribute8               in        varchar2  default hr_api.g_varchar2
4007   ,p_cont_attribute9               in        varchar2  default hr_api.g_varchar2
4008   ,p_cont_attribute10              in        varchar2  default hr_api.g_varchar2
4009   ,p_cont_attribute11              in        varchar2  default hr_api.g_varchar2
4010   ,p_cont_attribute12              in        varchar2  default hr_api.g_varchar2
4011   ,p_cont_attribute13              in        varchar2  default hr_api.g_varchar2
4012   ,p_cont_attribute14              in        varchar2  default hr_api.g_varchar2
4013   ,p_cont_attribute15              in        varchar2  default hr_api.g_varchar2
4014   ,p_cont_attribute16              in        varchar2  default hr_api.g_varchar2
4015   ,p_cont_attribute17              in        varchar2  default hr_api.g_varchar2
4016   ,p_cont_attribute18              in        varchar2  default hr_api.g_varchar2
4017   ,p_cont_attribute19              in        varchar2  default hr_api.g_varchar2
4018   ,p_cont_attribute20              in        varchar2  default hr_api.g_varchar2
4019 -- Added new params
4020   ,P_CONT_INFORMATION_CATEGORY 	  in        varchar2    default hr_api.g_varchar2
4021   ,P_CONT_INFORMATION1            in        varchar2    default hr_api.g_varchar2
4022   ,P_CONT_INFORMATION2            in        varchar2    default hr_api.g_varchar2
4023   ,P_CONT_INFORMATION3            in        varchar2    default hr_api.g_varchar2
4024   ,P_CONT_INFORMATION4            in        varchar2    default hr_api.g_varchar2
4025   ,P_CONT_INFORMATION5            in        varchar2    default hr_api.g_varchar2
4026   ,P_CONT_INFORMATION6            in        varchar2    default hr_api.g_varchar2
4027   ,P_CONT_INFORMATION7            in        varchar2    default hr_api.g_varchar2
4028   ,P_CONT_INFORMATION8            in        varchar2    default hr_api.g_varchar2
4029   ,P_CONT_INFORMATION9            in        varchar2    default hr_api.g_varchar2
4030   ,P_CONT_INFORMATION10           in        varchar2    default hr_api.g_varchar2
4031   ,P_CONT_INFORMATION11           in        varchar2    default hr_api.g_varchar2
4032   ,P_CONT_INFORMATION12           in        varchar2    default hr_api.g_varchar2
4033   ,P_CONT_INFORMATION13           in        varchar2    default hr_api.g_varchar2
4034   ,P_CONT_INFORMATION14           in        varchar2    default hr_api.g_varchar2
4035   ,P_CONT_INFORMATION15           in        varchar2    default hr_api.g_varchar2
4036   ,P_CONT_INFORMATION16           in        varchar2    default hr_api.g_varchar2
4037   ,P_CONT_INFORMATION17           in        varchar2    default hr_api.g_varchar2
4038   ,P_CONT_INFORMATION18           in        varchar2    default hr_api.g_varchar2
4039   ,P_CONT_INFORMATION19           in        varchar2    default hr_api.g_varchar2
4040   ,P_CONT_INFORMATION20           in        varchar2    default hr_api.g_varchar2
4041   ,p_object_version_number         in        number )
4042 return boolean  is
4043 --
4044   l_rec_changed                    boolean default null;
4045   l_cur_contact_data               gc_get_cur_contact_data%rowtype;
4046   l_proc   varchar2(72)  := g_package||'is_rec_changed';
4047 --
4048 BEGIN
4049   --
4050 --2480916 fix starts
4051 --decommenting the fetch of cursor data as we are checking this cursor value with the current value.
4052 --
4053   hr_utility.set_location('Entering:'||l_proc, 5);
4054   OPEN gc_get_cur_contact_data(p_contact_relationship_id => p_contact_relationship_id);
4055   FETCH gc_get_cur_contact_data into l_cur_contact_data;
4056   IF gc_get_cur_contact_data%NOTFOUND
4057   THEN
4058      hr_utility.set_location('IF gc_get_cur_contact_data NOTFOUND:'||l_proc,10 );
4059      CLOSE gc_get_cur_contact_data;
4060      raise g_data_error;
4061   ELSE
4062      hr_utility.set_location('IF gc_get_cur_contact_data FOUND:'||l_proc,15 );
4063      CLOSE gc_get_cur_contact_data;
4064   END IF;
4065 --2480916 fix ends
4066 --
4067 ------------------------------------------------------------------------------
4068 -- NOTE: We need to use nvl(xxx attribute name, hr_api.g_xxxx) because the
4069 --       parameter coming in can be null.  If we do not use nvl, then it will
4070 --       never be equal to the database null value if the parameter value is
4071 --       also null.
4072 ------------------------------------------------------------------------------
4073 
4074    --
4075    IF p_contact_type <> hr_api.g_varchar2
4076    THEN
4077        --
4078        IF nvl(p_contact_type, hr_api.g_varchar2) <>
4079              nvl(l_cur_contact_data.contact_type, hr_api.g_varchar2)
4080        THEN
4081             l_rec_changed := TRUE;
4082             goto finish;
4083        END IF;
4084        --
4085    END IF;
4086    --
4087    --
4088    IF p_comments <> hr_api.g_varchar2
4089    THEN
4090        --
4091        IF nvl(p_comments, hr_api.g_varchar2) <>
4092              nvl(l_cur_contact_data.comments, hr_api.g_varchar2)
4093        THEN
4094             l_rec_changed := TRUE;
4095             goto finish;
4096        END IF;
4097        --
4098    END IF;
4099    --
4100    --
4101    IF p_primary_contact_flag <> hr_api.g_varchar2
4102    THEN
4103        --
4104        IF nvl(p_primary_contact_flag, hr_api.g_varchar2) <>
4105              nvl(l_cur_contact_data.primary_contact_flag, hr_api.g_varchar2)
4106        THEN
4107             l_rec_changed := TRUE;
4108             goto finish;
4109        END IF;
4110        --
4111    END IF;
4112    --
4113    --
4114    IF p_third_party_pay_flag <> hr_api.g_varchar2
4115    THEN
4116        --
4117        IF nvl(p_third_party_pay_flag, hr_api.g_varchar2) <>
4118              nvl(l_cur_contact_data.third_party_pay_flag, hr_api.g_varchar2)
4119        THEN
4120             l_rec_changed := TRUE;
4121             goto finish;
4122        END IF;
4123        --
4124    END IF;
4125    --
4126    --
4127    IF p_bondholder_flag <> hr_api.g_varchar2
4128    THEN
4129        --
4130        IF nvl(p_bondholder_flag, hr_api.g_varchar2) <>
4131              nvl(l_cur_contact_data.bondholder_flag, hr_api.g_varchar2)
4132        THEN
4133             l_rec_changed := TRUE;
4134             goto finish;
4135        END IF;
4136        --
4137    END IF;
4138    --
4139    --
4140    IF p_date_start <> hr_api.g_date
4141    THEN
4142        --
4143        IF nvl(p_date_start, hr_api.g_date) <>
4144              nvl(l_cur_contact_data.date_start, hr_api.g_date)
4145        THEN
4146             l_rec_changed := TRUE;
4147             goto finish;
4148        END IF;
4149        --
4150    END IF;
4151    --
4152    --
4153    IF p_start_life_reason_id <> hr_api.g_number
4154    THEN
4155        --
4156        IF nvl(p_start_life_reason_id, hr_api.g_number) <>
4157              nvl(l_cur_contact_data.start_life_reason_id, hr_api.g_number)
4158        THEN
4159             l_rec_changed := TRUE;
4160             goto finish;
4161        END IF;
4162        --
4163    END IF;
4164    --
4165    --
4166    IF p_date_end <> hr_api.g_date
4167    THEN
4168        --
4169        IF nvl(p_date_end, hr_api.g_date) <>
4170              nvl(l_cur_contact_data.date_end, hr_api.g_date)
4171        THEN
4172             l_rec_changed := TRUE;
4173             goto finish;
4174        END IF;
4175        --
4176    END IF;
4177    --
4178    --
4179    IF p_end_life_reason_id <> hr_api.g_number
4180    THEN
4181        --
4182        IF nvl(p_end_life_reason_id, hr_api.g_number) <>
4183              nvl(l_cur_contact_data.end_life_reason_id, hr_api.g_number)
4184        THEN
4185             l_rec_changed := TRUE;
4186             goto finish;
4187        END IF;
4188        --
4189    END IF;
4190    --
4191    --
4192    IF p_rltd_per_rsds_w_dsgntr_flag <> hr_api.g_varchar2
4193    THEN
4194        --
4195        IF nvl(p_rltd_per_rsds_w_dsgntr_flag, hr_api.g_varchar2) <>
4196              nvl(l_cur_contact_data.rltd_per_rsds_w_dsgntr_flag, hr_api.g_varchar2)
4197        THEN
4198             l_rec_changed := TRUE;
4199             goto finish;
4200        END IF;
4201        --
4202    END IF;
4203    --
4204    --
4205    IF p_personal_flag <> hr_api.g_varchar2
4206    THEN
4207        --
4208        IF nvl(p_personal_flag, hr_api.g_varchar2) <>
4209              nvl(l_cur_contact_data.personal_flag, hr_api.g_varchar2)
4210        THEN
4211             l_rec_changed := TRUE;
4212             goto finish;
4213        END IF;
4214        --
4215    END IF;
4216    --
4217    --
4218    IF p_sequence_number <> hr_api.g_number
4219    THEN
4220        --
4221        IF nvl(p_sequence_number, hr_api.g_number) <>
4222              nvl(l_cur_contact_data.sequence_number, hr_api.g_number)
4223        THEN
4224             l_rec_changed := TRUE;
4225             goto finish;
4226        END IF;
4227        --
4228    END IF;
4229    --
4230    --
4231    IF p_dependent_flag <> hr_api.g_varchar2
4232    THEN
4233        --
4234        IF nvl(p_dependent_flag, hr_api.g_varchar2) <>
4235              nvl(l_cur_contact_data.dependent_flag, hr_api.g_varchar2)
4236        THEN
4237             l_rec_changed := TRUE;
4238             goto finish;
4239        END IF;
4240        --
4241    END IF;
4242    --
4243    --
4244    IF p_beneficiary_flag <> hr_api.g_varchar2
4245    THEN
4246        --
4247        IF nvl(p_beneficiary_flag, hr_api.g_varchar2) <>
4248              nvl(l_cur_contact_data.beneficiary_flag, hr_api.g_varchar2)
4249        THEN
4250             l_rec_changed := TRUE;
4251             goto finish;
4252        END IF;
4253        --
4254    END IF;
4255    --
4256    --
4257    IF p_cont_attribute_category <> hr_api.g_varchar2
4258    THEN
4259        --
4260        IF nvl(p_cont_attribute_category, hr_api.g_varchar2) <>
4261              nvl(l_cur_contact_data.cont_attribute_category, hr_api.g_varchar2)
4262        THEN
4263             l_rec_changed := TRUE;
4264             goto finish;
4265        END IF;
4266        --
4267    END IF;
4268    --
4269    --
4270    IF p_cont_attribute1 <> hr_api.g_varchar2
4271    THEN
4272        --
4273        IF nvl(p_cont_attribute1, hr_api.g_varchar2) <>
4274              nvl(l_cur_contact_data.cont_attribute1, hr_api.g_varchar2)
4275        THEN
4276             l_rec_changed := TRUE;
4277             goto finish;
4278        END IF;
4279        --
4280    END IF;
4281    --
4282    --
4283    IF p_cont_attribute2 <> hr_api.g_varchar2
4284    THEN
4285        --
4286        IF nvl(p_cont_attribute2, hr_api.g_varchar2) <>
4287              nvl(l_cur_contact_data.cont_attribute2, hr_api.g_varchar2)
4288        THEN
4289             l_rec_changed := TRUE;
4290             goto finish;
4291        END IF;
4292        --
4293    END IF;
4294    --
4295    --
4296    IF p_cont_attribute3 <> hr_api.g_varchar2
4297    THEN
4298        --
4299        IF nvl(p_cont_attribute3, hr_api.g_varchar2) <>
4300              nvl(l_cur_contact_data.cont_attribute3, hr_api.g_varchar2)
4301        THEN
4302             l_rec_changed := TRUE;
4303             goto finish;
4304        END IF;
4305        --
4306    END IF;
4307    --
4308    --
4309    IF p_cont_attribute4 <> hr_api.g_varchar2
4310    THEN
4311        --
4312        IF nvl(p_cont_attribute4, hr_api.g_varchar2) <>
4313              nvl(l_cur_contact_data.cont_attribute4, hr_api.g_varchar2)
4314        THEN
4315             l_rec_changed := TRUE;
4316             goto finish;
4317        END IF;
4318        --
4319    END IF;
4320    --
4321    --
4322    IF p_cont_attribute5 <> hr_api.g_varchar2
4323    THEN
4324        --
4325        IF nvl(p_cont_attribute5, hr_api.g_varchar2) <>
4326              nvl(l_cur_contact_data.cont_attribute5, hr_api.g_varchar2)
4327        THEN
4328             l_rec_changed := TRUE;
4329             goto finish;
4330        END IF;
4331        --
4332    END IF;
4333    --
4334    --
4335    IF p_cont_attribute6 <> hr_api.g_varchar2
4336    THEN
4337        --
4338        IF nvl(p_cont_attribute6, hr_api.g_varchar2) <>
4339              nvl(l_cur_contact_data.cont_attribute6, hr_api.g_varchar2)
4340        THEN
4341             l_rec_changed := TRUE;
4342             goto finish;
4343        END IF;
4344        --
4345    END IF;
4346    --
4347    --
4348    IF p_cont_attribute7 <> hr_api.g_varchar2
4349    THEN
4350        --
4351        IF nvl(p_cont_attribute7, hr_api.g_varchar2) <>
4352              nvl(l_cur_contact_data.cont_attribute7, hr_api.g_varchar2)
4353        THEN
4354             l_rec_changed := TRUE;
4355             goto finish;
4356        END IF;
4357        --
4358    END IF;
4359    --
4360    --
4361    IF p_cont_attribute8 <> hr_api.g_varchar2
4362    THEN
4363        --
4364        IF nvl(p_cont_attribute8, hr_api.g_varchar2) <>
4365              nvl(l_cur_contact_data.cont_attribute8, hr_api.g_varchar2)
4366        THEN
4367             l_rec_changed := TRUE;
4368             goto finish;
4369        END IF;
4370        --
4371    END IF;
4372    --
4373    --
4374    IF p_cont_attribute9 <> hr_api.g_varchar2
4375    THEN
4376        --
4377        IF nvl(p_cont_attribute9, hr_api.g_varchar2) <>
4378              nvl(l_cur_contact_data.cont_attribute9, hr_api.g_varchar2)
4379        THEN
4380             l_rec_changed := TRUE;
4381             goto finish;
4382        END IF;
4383        --
4384    END IF;
4385    --
4386    --
4387    IF p_cont_attribute10 <> hr_api.g_varchar2
4388    THEN
4389        --
4390        IF nvl(p_cont_attribute10, hr_api.g_varchar2) <>
4391              nvl(l_cur_contact_data.cont_attribute10, hr_api.g_varchar2)
4392        THEN
4393             l_rec_changed := TRUE;
4394             goto finish;
4395        END IF;
4396        --
4397    END IF;
4398    --
4399    --
4400    IF p_cont_attribute11 <> hr_api.g_varchar2
4401    THEN
4402        --
4403        IF nvl(p_cont_attribute11, hr_api.g_varchar2) <>
4404              nvl(l_cur_contact_data.cont_attribute11, hr_api.g_varchar2)
4405        THEN
4406             l_rec_changed := TRUE;
4407             goto finish;
4408        END IF;
4409        --
4410    END IF;
4411    --
4412    --
4413    IF p_cont_attribute12 <> hr_api.g_varchar2
4414    THEN
4415        --
4416        IF nvl(p_cont_attribute12, hr_api.g_varchar2) <>
4417              nvl(l_cur_contact_data.cont_attribute12, hr_api.g_varchar2)
4418        THEN
4419             l_rec_changed := TRUE;
4420             goto finish;
4421        END IF;
4422        --
4423    END IF;
4424    --
4425    --
4426    IF p_cont_attribute13 <> hr_api.g_varchar2
4427    THEN
4428        --
4429        IF nvl(p_cont_attribute13, hr_api.g_varchar2) <>
4430              nvl(l_cur_contact_data.cont_attribute13, hr_api.g_varchar2)
4431        THEN
4432             l_rec_changed := TRUE;
4433             goto finish;
4434        END IF;
4435        --
4436    END IF;
4437    --
4438    --
4439    IF p_cont_attribute14 <> hr_api.g_varchar2
4440    THEN
4441        --
4442        IF nvl(p_cont_attribute14, hr_api.g_varchar2) <>
4443              nvl(l_cur_contact_data.cont_attribute14, hr_api.g_varchar2)
4444        THEN
4445             l_rec_changed := TRUE;
4446             goto finish;
4447        END IF;
4448        --
4449    END IF;
4450    --
4451    --
4452    IF p_cont_attribute15 <> hr_api.g_varchar2
4453    THEN
4454        --
4455        IF nvl(p_cont_attribute15, hr_api.g_varchar2) <>
4456              nvl(l_cur_contact_data.cont_attribute15, hr_api.g_varchar2)
4457        THEN
4458             l_rec_changed := TRUE;
4459             goto finish;
4460        END IF;
4461        --
4462    END IF;
4463    --
4464    --
4465    IF p_cont_attribute16 <> hr_api.g_varchar2
4466    THEN
4467        --
4468        IF nvl(p_cont_attribute16, hr_api.g_varchar2) <>
4469              nvl(l_cur_contact_data.cont_attribute16, hr_api.g_varchar2)
4470        THEN
4471             l_rec_changed := TRUE;
4472             goto finish;
4473        END IF;
4474        --
4475    END IF;
4476    --
4477    --
4478    IF p_cont_attribute17 <> hr_api.g_varchar2
4479    THEN
4480        --
4481        IF nvl(p_cont_attribute17, hr_api.g_varchar2) <>
4482              nvl(l_cur_contact_data.cont_attribute17, hr_api.g_varchar2)
4483        THEN
4484             l_rec_changed := TRUE;
4485             goto finish;
4486        END IF;
4487        --
4488    END IF;
4489    --
4490    --
4491    IF p_cont_attribute18 <> hr_api.g_varchar2
4492    THEN
4493        --
4494        IF nvl(p_cont_attribute18, hr_api.g_varchar2) <>
4495              nvl(l_cur_contact_data.cont_attribute18, hr_api.g_varchar2)
4496        THEN
4497             l_rec_changed := TRUE;
4498             goto finish;
4499        END IF;
4500        --
4501    END IF;
4502    --
4503    --
4504    IF p_cont_attribute19 <> hr_api.g_varchar2
4505    THEN
4506        --
4507        IF nvl(p_cont_attribute19, hr_api.g_varchar2) <>
4508              nvl(l_cur_contact_data.cont_attribute19, hr_api.g_varchar2)
4509        THEN
4510             l_rec_changed := TRUE;
4511             goto finish;
4512        END IF;
4513        --
4514    END IF;
4515    --
4516    --
4517    IF p_cont_attribute20 <> hr_api.g_varchar2
4518    THEN
4519        --
4520        IF nvl(p_cont_attribute20, hr_api.g_varchar2) <>
4521              nvl(l_cur_contact_data.cont_attribute20, hr_api.g_varchar2)
4522        THEN
4523             l_rec_changed := TRUE;
4524             goto finish;
4525        END IF;
4526        --
4527    END IF;
4528    --
4529  IF P_CONT_INFORMATION1 <> hr_api.g_varchar2
4530    THEN
4531        --
4532        IF nvl(P_CONT_INFORMATION1, hr_api.g_varchar2) <>
4533              nvl(l_cur_contact_data.CONT_INFORMATION1, hr_api.g_varchar2)
4534        THEN
4535             l_rec_changed := TRUE;
4536             goto finish;
4537        END IF;
4538        --
4539    END IF;
4540 
4541    IF P_CONT_INFORMATION2 <> hr_api.g_varchar2
4542    THEN
4543        --
4544        IF nvl(P_CONT_INFORMATION2, hr_api.g_varchar2) <>
4545              nvl(l_cur_contact_data.CONT_INFORMATION2, hr_api.g_varchar2)
4546        THEN
4547             l_rec_changed := TRUE;
4548             goto finish;
4549        END IF;
4550        --
4551    END IF;
4552 
4553    IF P_CONT_INFORMATION3 <> hr_api.g_varchar2
4554    THEN
4555        --
4556        IF nvl(P_CONT_INFORMATION3, hr_api.g_varchar2) <>
4557              nvl(l_cur_contact_data.CONT_INFORMATION3, hr_api.g_varchar2)
4558        THEN
4559             l_rec_changed := TRUE;
4560             goto finish;
4561        END IF;
4562        --
4563    END IF;
4564 
4565    IF P_CONT_INFORMATION4 <> hr_api.g_varchar2
4566    THEN
4567        --
4568        IF nvl(P_CONT_INFORMATION4, hr_api.g_varchar2) <>
4569              nvl(l_cur_contact_data.CONT_INFORMATION4, hr_api.g_varchar2)
4570        THEN
4571             l_rec_changed := TRUE;
4572             goto finish;
4573        END IF;
4574        --
4575    END IF;
4576 
4577    IF P_CONT_INFORMATION5 <> hr_api.g_varchar2
4578    THEN
4579        --
4580        IF nvl(P_CONT_INFORMATION5, hr_api.g_varchar2) <>
4581              nvl(l_cur_contact_data.CONT_INFORMATION5, hr_api.g_varchar2)
4582        THEN
4583             l_rec_changed := TRUE;
4584             goto finish;
4585        END IF;
4586        --
4587    END IF;
4588 
4589    IF P_CONT_INFORMATION6 <> hr_api.g_varchar2
4590    THEN
4591        --
4592        IF nvl(P_CONT_INFORMATION6, hr_api.g_varchar2) <>
4593              nvl(l_cur_contact_data.CONT_INFORMATION6, hr_api.g_varchar2)
4594        THEN
4595             l_rec_changed := TRUE;
4596             goto finish;
4597        END IF;
4598        --
4599    END IF;
4600 
4601    IF P_CONT_INFORMATION7 <> hr_api.g_varchar2
4602    THEN
4603        --
4604        IF nvl(P_CONT_INFORMATION7, hr_api.g_varchar2) <>
4605              nvl(l_cur_contact_data.CONT_INFORMATION7, hr_api.g_varchar2)
4606        THEN
4607             l_rec_changed := TRUE;
4608             goto finish;
4609        END IF;
4610        --
4611    END IF;
4612 
4613    IF P_CONT_INFORMATION8 <> hr_api.g_varchar2
4614    THEN
4615        --
4616        IF nvl(P_CONT_INFORMATION8, hr_api.g_varchar2) <>
4617              nvl(l_cur_contact_data.CONT_INFORMATION8, hr_api.g_varchar2)
4618        THEN
4619             l_rec_changed := TRUE;
4620             goto finish;
4621        END IF;
4622        --
4623    END IF;
4624 
4625    IF P_CONT_INFORMATION9 <> hr_api.g_varchar2
4626    THEN
4627        --
4628        IF nvl(P_CONT_INFORMATION9, hr_api.g_varchar2) <>
4629              nvl(l_cur_contact_data.CONT_INFORMATION9, hr_api.g_varchar2)
4630        THEN
4631             l_rec_changed := TRUE;
4632             goto finish;
4633        END IF;
4634        --
4635    END IF;
4636 
4637    IF P_CONT_INFORMATION10 <> hr_api.g_varchar2
4638    THEN
4639        --
4640        IF nvl(P_CONT_INFORMATION10, hr_api.g_varchar2) <>
4641              nvl(l_cur_contact_data.CONT_INFORMATION10, hr_api.g_varchar2)
4642        THEN
4643             l_rec_changed := TRUE;
4644             goto finish;
4645        END IF;
4646        --
4647    END IF;
4648 
4649    IF P_CONT_INFORMATION11 <> hr_api.g_varchar2
4650    THEN
4651        --
4652        IF nvl(P_CONT_INFORMATION11, hr_api.g_varchar2) <>
4653              nvl(l_cur_contact_data.CONT_INFORMATION11, hr_api.g_varchar2)
4654        THEN
4655             l_rec_changed := TRUE;
4656             goto finish;
4657        END IF;
4658        --
4659    END IF;
4660 
4661    IF P_CONT_INFORMATION12 <> hr_api.g_varchar2
4662    THEN
4663        --
4664        IF nvl(P_CONT_INFORMATION12, hr_api.g_varchar2) <>
4665              nvl(l_cur_contact_data.CONT_INFORMATION12, hr_api.g_varchar2)
4666        THEN
4667             l_rec_changed := TRUE;
4668             goto finish;
4669        END IF;
4670        --
4671    END IF;
4672 
4673    IF P_CONT_INFORMATION13 <> hr_api.g_varchar2
4674    THEN
4675        --
4676        IF nvl(P_CONT_INFORMATION13, hr_api.g_varchar2) <>
4677              nvl(l_cur_contact_data.CONT_INFORMATION13, hr_api.g_varchar2)
4678        THEN
4679             l_rec_changed := TRUE;
4680             goto finish;
4681        END IF;
4682        --
4683    END IF;
4684 
4685    IF P_CONT_INFORMATION14 <> hr_api.g_varchar2
4686    THEN
4687        --
4688        IF nvl(P_CONT_INFORMATION14, hr_api.g_varchar2) <>
4689              nvl(l_cur_contact_data.CONT_INFORMATION14, hr_api.g_varchar2)
4690        THEN
4691             l_rec_changed := TRUE;
4692             goto finish;
4693        END IF;
4694        --
4695    END IF;
4696 
4697    IF P_CONT_INFORMATION15 <> hr_api.g_varchar2
4698    THEN
4699        --
4700        IF nvl(P_CONT_INFORMATION15, hr_api.g_varchar2) <>
4701              nvl(l_cur_contact_data.CONT_INFORMATION15, hr_api.g_varchar2)
4702        THEN
4703             l_rec_changed := TRUE;
4704             goto finish;
4705        END IF;
4706        --
4707    END IF;
4708 
4709    IF P_CONT_INFORMATION16 <> hr_api.g_varchar2
4710    THEN
4711        --
4712        IF nvl(P_CONT_INFORMATION16, hr_api.g_varchar2) <>
4713              nvl(l_cur_contact_data.CONT_INFORMATION16, hr_api.g_varchar2)
4714        THEN
4715             l_rec_changed := TRUE;
4716             goto finish;
4717        END IF;
4718        --
4719    END IF;
4720 
4721    IF P_CONT_INFORMATION17 <> hr_api.g_varchar2
4722    THEN
4723        --
4724        IF nvl(P_CONT_INFORMATION17, hr_api.g_varchar2) <>
4725              nvl(l_cur_contact_data.CONT_INFORMATION17, hr_api.g_varchar2)
4726        THEN
4727             l_rec_changed := TRUE;
4728             goto finish;
4729        END IF;
4730        --
4731    END IF;
4732 
4733    IF P_CONT_INFORMATION18 <> hr_api.g_varchar2
4734    THEN
4735        --
4736        IF nvl(P_CONT_INFORMATION18, hr_api.g_varchar2) <>
4737              nvl(l_cur_contact_data.CONT_INFORMATION18, hr_api.g_varchar2)
4738        THEN
4739             l_rec_changed := TRUE;
4740             goto finish;
4741        END IF;
4742        --
4743    END IF;
4744 
4745    IF P_CONT_INFORMATION19 <> hr_api.g_varchar2
4746    THEN
4747        --
4748        IF nvl(P_CONT_INFORMATION19, hr_api.g_varchar2) <>
4749              nvl(l_cur_contact_data.CONT_INFORMATION19, hr_api.g_varchar2)
4750        THEN
4751             l_rec_changed := TRUE;
4752             goto finish;
4753        END IF;
4754        --
4755    END IF;
4756 
4757    IF P_CONT_INFORMATION20 <> hr_api.g_varchar2
4758    THEN
4759        --
4760        IF nvl(P_CONT_INFORMATION20, hr_api.g_varchar2) <>
4761              nvl(l_cur_contact_data.CONT_INFORMATION20, hr_api.g_varchar2)
4762        THEN
4763             l_rec_changed := TRUE;
4764             goto finish;
4765        END IF;
4766        --
4767    END IF;
4768    --
4769    <<finish>>
4770    --
4771   hr_utility.set_location('Exiting:'||l_proc, 20);
4772   RETURN l_rec_changed;
4773 
4774 
4775   EXCEPTION
4776   When g_data_error THEN
4777   hr_utility.set_location('Exception:When g_data_error THEN'||l_proc,555);
4778        raise;
4779 
4780   When others THEN
4781     hr_utility.set_location('  When others THEN'||l_proc,560);
4782       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
4783       hr_utility.raise_error;
4784        --raise;
4785 
4786   END is_rec_changed;
4787 
4788 
4789 -- ---------------------------------------------------------------------------
4790 -- ---------------------- < get_contact_from_tt> -------------------------
4791 -- ---------------------------------------------------------------------------
4792 -- Purpose: This procedure will get transaction data which are saved earlier
4793 --          in the current transaction.  This is invoked when a user click BACK
4794 --          button to go back from the Review page to Update page to correct
4795 --          typos or make further changes.  Hence, we need to use the item_type
4796 --          item_key passed in to retrieve the transaction record.
4797 --          This is an overloaded version.
4798 -- ---------------------------------------------------------------------------
4799 
4800 procedure get_contact_from_tt
4801   (
4802    p_start_date                   out nocopy        date
4803   ,p_business_group_id            out nocopy        number
4804   ,p_person_id                    out nocopy        number
4805   ,p_contact_person_id            out nocopy        number
4806   ,p_contact_type                 out nocopy        varchar2
4807   ,p_ctr_comments                 out nocopy        varchar2
4808   ,p_primary_contact_flag         out nocopy        varchar2
4809   ,p_date_start                   out nocopy        date
4810   ,p_start_life_reason_id         out nocopy        number
4811   ,p_date_end                     out nocopy        date
4812   ,p_end_life_reason_id           out nocopy        number
4813   ,p_rltd_per_rsds_w_dsgntr_flag  out nocopy        varchar2
4814   ,p_personal_flag                out nocopy        varchar2
4815   ,p_sequence_number              out nocopy        number
4816   ,p_cont_attribute_category      out nocopy        varchar2
4817   ,p_cont_attribute1              out nocopy        varchar2
4818   ,p_cont_attribute2              out nocopy        varchar2
4819   ,p_cont_attribute3              out nocopy        varchar2
4820   ,p_cont_attribute4              out nocopy        varchar2
4821   ,p_cont_attribute5              out nocopy        varchar2
4822   ,p_cont_attribute6              out nocopy        varchar2
4823   ,p_cont_attribute7              out nocopy        varchar2
4824   ,p_cont_attribute8              out nocopy        varchar2
4825   ,p_cont_attribute9              out nocopy        varchar2
4826   ,p_cont_attribute10             out nocopy        varchar2
4827   ,p_cont_attribute11             out nocopy        varchar2
4828   ,p_cont_attribute12             out nocopy        varchar2
4829   ,p_cont_attribute13             out nocopy        varchar2
4830   ,p_cont_attribute14             out nocopy        varchar2
4831   ,p_cont_attribute15             out nocopy        varchar2
4832   ,p_cont_attribute16             out nocopy        varchar2
4833   ,p_cont_attribute17             out nocopy        varchar2
4834   ,p_cont_attribute18             out nocopy        varchar2
4835   ,p_cont_attribute19             out nocopy        varchar2
4836   ,p_cont_attribute20             out nocopy        varchar2
4837   ,p_third_party_pay_flag         out nocopy        varchar2
4838   ,p_bondholder_flag              out nocopy        varchar2
4839   ,p_dependent_flag               out nocopy        varchar2
4840   ,p_beneficiary_flag             out nocopy        varchar2
4841   ,p_last_name                    out nocopy        varchar2
4842   ,p_sex                          out nocopy        varchar2
4843   ,p_sex_meaning                  out nocopy        varchar2
4844   ,p_person_type_id               out nocopy        number
4845   ,p_per_comments                 out nocopy        varchar2
4846   ,p_date_of_birth                out nocopy        date
4847   ,p_email_address                out nocopy        varchar2
4848   ,p_first_name                   out nocopy        varchar2
4849   ,p_known_as                     out nocopy        varchar2
4850   ,p_marital_status               out nocopy        varchar2
4851   ,p_marital_status_meaning       out nocopy        varchar2
4852   ,p_student_status               out nocopy        varchar2
4853   ,p_student_status_meaning       out nocopy        varchar2
4854   ,p_middle_names                 out nocopy        varchar2
4855   ,p_nationality                  out nocopy        varchar2
4856   ,p_national_identifier          out nocopy        varchar2
4857   ,p_previous_last_name           out nocopy        varchar2
4858   ,p_registered_disabled_flag     out nocopy        varchar2
4859   ,p_registered_disabled          out nocopy        varchar2
4860   ,p_title                        out nocopy        varchar2
4861   ,p_work_telephone               out nocopy        varchar2
4862   ,p_attribute_category           out nocopy        varchar2
4863   ,p_attribute1                   out nocopy        varchar2
4864   ,p_attribute2                   out nocopy        varchar2
4865   ,p_attribute3                   out nocopy        varchar2
4866   ,p_attribute4                   out nocopy        varchar2
4867   ,p_attribute5                   out nocopy        varchar2
4868   ,p_attribute6                   out nocopy        varchar2
4869   ,p_attribute7                   out nocopy        varchar2
4870   ,p_attribute8                   out nocopy        varchar2
4871   ,p_attribute9                   out nocopy        varchar2
4872   ,p_attribute10                  out nocopy        varchar2
4873   ,p_attribute11                  out nocopy        varchar2
4874   ,p_attribute12                  out nocopy        varchar2
4875   ,p_attribute13                  out nocopy        varchar2
4876   ,p_attribute14                  out nocopy        varchar2
4877   ,p_attribute15                  out nocopy        varchar2
4878   ,p_attribute16                  out nocopy        varchar2
4879   ,p_attribute17                  out nocopy        varchar2
4880   ,p_attribute18                  out nocopy        varchar2
4881   ,p_attribute19                  out nocopy        varchar2
4882   ,p_attribute20                  out nocopy        varchar2
4883   ,p_attribute21                  out nocopy        varchar2
4884   ,p_attribute22                  out nocopy        varchar2
4885   ,p_attribute23                  out nocopy        varchar2
4886   ,p_attribute24                  out nocopy        varchar2
4887   ,p_attribute25                  out nocopy        varchar2
4888   ,p_attribute26                  out nocopy        varchar2
4889   ,p_attribute27                  out nocopy        varchar2
4890   ,p_attribute28                  out nocopy        varchar2
4891   ,p_attribute29                  out nocopy        varchar2
4892   ,p_attribute30                  out nocopy        varchar2
4893   ,p_per_information_category     out nocopy        varchar2
4894   ,p_per_information1             out nocopy        varchar2
4895   ,p_per_information2             out nocopy        varchar2
4896   ,p_per_information3             out nocopy        varchar2
4897   ,p_per_information4             out nocopy        varchar2
4898   ,p_per_information5             out nocopy        varchar2
4899   ,p_per_information6             out nocopy        varchar2
4900   ,p_per_information7             out nocopy        varchar2
4901   ,p_per_information8             out nocopy        varchar2
4902   ,p_per_information9             out nocopy        varchar2
4903   ,p_per_information10            out nocopy        varchar2
4904   ,p_per_information11            out nocopy        varchar2
4905   ,p_per_information12            out nocopy        varchar2
4906   ,p_per_information13            out nocopy        varchar2
4907   ,p_per_information14            out nocopy        varchar2
4908   ,p_per_information15            out nocopy        varchar2
4909   ,p_per_information16            out nocopy        varchar2
4910   ,p_per_information17            out nocopy        varchar2
4911   ,p_per_information18            out nocopy        varchar2
4912   ,p_per_information19            out nocopy        varchar2
4913   ,p_per_information20            out nocopy        varchar2
4914   ,p_per_information21            out nocopy        varchar2
4915   ,p_per_information22            out nocopy        varchar2
4916   ,p_per_information23            out nocopy        varchar2
4917   ,p_per_information24            out nocopy        varchar2
4918   ,p_per_information25            out nocopy        varchar2
4919   ,p_per_information26            out nocopy        varchar2
4920   ,p_per_information27            out nocopy        varchar2
4921   ,p_per_information28            out nocopy        varchar2
4922   ,p_per_information29            out nocopy        varchar2
4923   ,p_per_information30            out nocopy        varchar2
4924   ,p_uses_tobacco_flag            out nocopy        varchar2
4925   ,p_uses_tobacco_meaning         out nocopy        varchar2
4926   ,p_on_military_service          out nocopy        varchar2
4927   ,p_on_military_service_meaning  out nocopy        varchar2
4928   ,p_dpdnt_vlntry_svce_flag       out nocopy        varchar2
4929   ,p_dpdnt_vlntry_svce_meaning    out nocopy        varchar2
4930   ,p_correspondence_language      out nocopy        varchar2
4931   ,p_honors                       out nocopy        varchar2
4932   ,p_pre_name_adjunct             out nocopy        varchar2
4933   ,p_suffix                       out nocopy        varchar2
4934   ,p_create_mirror_flag           out nocopy        varchar2
4935   ,p_mirror_type                  out nocopy        varchar2
4936   ,p_mirror_cont_attribute_cat    out nocopy        varchar2
4937   ,p_mirror_cont_attribute1       out nocopy        varchar2
4938   ,p_mirror_cont_attribute2       out nocopy        varchar2
4939   ,p_mirror_cont_attribute3       out nocopy        varchar2
4940   ,p_mirror_cont_attribute4       out nocopy        varchar2
4941   ,p_mirror_cont_attribute5       out nocopy        varchar2
4942   ,p_mirror_cont_attribute6       out nocopy        varchar2
4943   ,p_mirror_cont_attribute7       out nocopy        varchar2
4944   ,p_mirror_cont_attribute8       out nocopy        varchar2
4945   ,p_mirror_cont_attribute9       out nocopy        varchar2
4946   ,p_mirror_cont_attribute10      out nocopy        varchar2
4947   ,p_mirror_cont_attribute11      out nocopy        varchar2
4948   ,p_mirror_cont_attribute12      out nocopy        varchar2
4949   ,p_mirror_cont_attribute13      out nocopy        varchar2
4950   ,p_mirror_cont_attribute14      out nocopy        varchar2
4951   ,p_mirror_cont_attribute15      out nocopy        varchar2
4952   ,p_mirror_cont_attribute16      out nocopy        varchar2
4953   ,p_mirror_cont_attribute17      out nocopy        varchar2
4954   ,p_mirror_cont_attribute18      out nocopy        varchar2
4955   ,p_mirror_cont_attribute19      out nocopy        varchar2
4956   ,p_mirror_cont_attribute20      out nocopy        varchar2
4957   ,p_item_type                    in         varchar2
4958   ,p_item_key                     in         varchar2
4959   ,p_activity_id                  in         number
4960   ,p_action                       out nocopy        varchar2
4961   ,p_login_person_id              out nocopy        number
4962   ,p_process_section_name         out nocopy        varchar2
4963   ,p_review_page_region_code      out nocopy        varchar2
4964   -- Bug 1914891
4965   ,p_date_of_death                out nocopy        date
4966   ,p_dpdnt_adoption_date          out nocopy        date
4967   ,p_title_meaning                out nocopy        varchar2
4968   ,p_contact_type_meaning         out nocopy        varchar2
4969   ,p_contact_operation            out nocopy        varchar2
4970   ,p_emrg_cont_flag               out nocopy        varchar2
4971   ,p_dpdnt_bnf_flag               out nocopy        varchar2
4972   ,p_contact_relationship_id      out nocopy        number
4973   ,p_cont_object_version_number   out nocopy        number
4974   -- bug# 2315163
4975   ,p_is_emrg_cont                 out nocopy        varchar2
4976   ,p_is_dpdnt_bnf                 out nocopy        varchar2
4977   ,P_CONT_INFORMATION_CATEGORY    out nocopy        varchar2
4978   ,P_CONT_INFORMATION1            out nocopy        varchar2
4979   ,P_CONT_INFORMATION2            out nocopy        varchar2
4980   ,P_CONT_INFORMATION3            out nocopy        varchar2
4981   ,P_CONT_INFORMATION4            out nocopy        varchar2
4982   ,P_CONT_INFORMATION5            out nocopy        varchar2
4983   ,P_CONT_INFORMATION6            out nocopy        varchar2
4984   ,P_CONT_INFORMATION7            out nocopy        varchar2
4985   ,P_CONT_INFORMATION8            out nocopy        varchar2
4986   ,P_CONT_INFORMATION9            out nocopy        varchar2
4987   ,P_CONT_INFORMATION10           out nocopy        varchar2
4988   ,P_CONT_INFORMATION11           out nocopy        varchar2
4989   ,P_CONT_INFORMATION12           out nocopy        varchar2
4990   ,P_CONT_INFORMATION13           out nocopy        varchar2
4991   ,P_CONT_INFORMATION14           out nocopy        varchar2
4992   ,P_CONT_INFORMATION15           out nocopy        varchar2
4993   ,P_CONT_INFORMATION16           out nocopy        varchar2
4994   ,P_CONT_INFORMATION17           out nocopy        varchar2
4995   ,P_CONT_INFORMATION18           out nocopy        varchar2
4996   ,P_CONT_INFORMATION19           out nocopy        varchar2
4997   ,P_CONT_INFORMATION20           out nocopy        varchar2)
4998 
4999 
5000 IS
5001   l_transaction_step_id        number default null;
5002   l_trans_obj_vers_num         number default null;
5003   l_transaction_rec_count      integer default 0;
5004   l_proc   varchar2(72)  := g_package||'get_contact_from_tt';
5005 
5006 BEGIN
5007 
5008   -- ------------------------------------------------------------------
5009   -- Check if there are any transaction rec already saved for the current
5010   -- transaction. This is used for re-display the Update page when a user
5011   -- clicks the Back button on the Review page to go back to the Update page
5012   -- to make further changes or to correct errors.
5013   -----------------------------------------------------------------------------
5014   hr_utility.set_location('Entering:'||l_proc, 5);
5015   hr_transaction_api.get_transaction_step_info
5016      (p_item_type              => p_item_type
5017      ,p_item_key               => p_item_key
5018      ,p_activity_id            => p_activity_id
5019      ,p_transaction_step_id    => l_transaction_step_id
5020      ,p_object_version_number  => l_trans_obj_vers_num);
5021 
5022   IF l_transaction_step_id > 0
5023   THEN
5024      l_transaction_rec_count := 1;
5025   ELSE
5026      l_transaction_rec_count := 0;
5027      hr_utility.set_location('Exiting thru Else part of l_transaction_step_id > 0 :'||l_proc, 10);
5028      return;
5029   END IF;
5030   --
5031   -- -------------------------------------------------------------------
5032   -- There are some changes made earlier in the transaction.
5033   -- Retrieve the data and return to caller.
5034   -- -------------------------------------------------------------------
5035   --
5036   -- Now get the transaction data for the given step
5037    get_contact_from_tt (
5038    p_transaction_step_id     	=>  l_transaction_step_id
5039    ,p_start_date     		=>  p_start_date
5040    ,p_business_group_id     	=>  p_business_group_id
5041    ,p_person_id     		=>  p_person_id
5042    ,p_contact_person_id     	=>  p_contact_person_id
5043    ,p_contact_type     		=>  p_contact_type
5044    ,p_ctr_comments     		=>  p_ctr_comments
5045    ,p_primary_contact_flag     	=>  p_primary_contact_flag
5046    ,p_date_start     		=>  p_date_start
5047    ,p_start_life_reason_id     	=>  p_start_life_reason_id
5048    ,p_date_end     		=>  p_date_end
5049    ,p_end_life_reason_id     	=>  p_end_life_reason_id
5050    ,p_rltd_per_rsds_w_dsgntr_flag     =>  p_rltd_per_rsds_w_dsgntr_flag
5051    ,p_personal_flag     	=>  p_personal_flag
5052    ,p_sequence_number     	=>  p_sequence_number
5053    ,p_cont_attribute_category   =>  p_cont_attribute_category
5054    ,p_cont_attribute1     	=>  p_cont_attribute1
5055    ,p_cont_attribute2     	=>  p_cont_attribute2
5056    ,p_cont_attribute3     	=>  p_cont_attribute3
5057    ,p_cont_attribute4     	=>  p_cont_attribute4
5058    ,p_cont_attribute5     	=>  p_cont_attribute5
5059    ,p_cont_attribute6     	=>  p_cont_attribute6
5060    ,p_cont_attribute7     	=>  p_cont_attribute7
5061    ,p_cont_attribute8     	=>  p_cont_attribute8
5062    ,p_cont_attribute9     =>  p_cont_attribute9
5063    ,p_cont_attribute10     =>  p_cont_attribute10
5064    ,p_cont_attribute11     =>  p_cont_attribute11
5065    ,p_cont_attribute12     =>  p_cont_attribute12
5066    ,p_cont_attribute13     =>  p_cont_attribute13
5067    ,p_cont_attribute14     =>  p_cont_attribute14
5068    ,p_cont_attribute15     =>  p_cont_attribute15
5069    ,p_cont_attribute16     =>  p_cont_attribute16
5070    ,p_cont_attribute17     =>  p_cont_attribute17
5071    ,p_cont_attribute18     =>  p_cont_attribute18
5072    ,p_cont_attribute19     =>  p_cont_attribute19
5073    ,p_cont_attribute20     =>  p_cont_attribute20
5074    ,p_third_party_pay_flag     =>  p_third_party_pay_flag
5075    ,p_bondholder_flag     	=>  p_bondholder_flag
5076    ,p_dependent_flag     	=>  p_dependent_flag
5077    ,p_beneficiary_flag     	=>  p_beneficiary_flag
5078    ,p_last_name     		=>  p_last_name
5079    ,p_sex     			=>  p_sex
5080    ,p_sex_meaning               =>  p_sex_meaning
5081    ,p_person_type_id     =>  p_person_type_id
5082    ,p_per_comments     =>  p_per_comments
5083    ,p_date_of_birth     =>  p_date_of_birth
5084    ,p_email_address     =>  p_email_address
5085    ,p_first_name     =>  p_first_name
5086    ,p_known_as     =>  p_known_as
5087    ,p_marital_status     =>  p_marital_status
5088    ,p_marital_status_meaning     =>  p_marital_status_meaning
5089    ,p_student_status     =>  p_student_status
5090    ,p_student_status_meaning     =>  p_student_status_meaning
5091    ,p_middle_names     =>  p_middle_names
5092    ,p_nationality     =>  p_nationality
5093    ,p_national_identifier     =>  p_national_identifier
5094    ,p_previous_last_name     =>  p_previous_last_name
5095    ,p_registered_disabled_flag     =>  p_registered_disabled_flag
5096    ,p_registered_disabled          =>  p_registered_disabled
5097    ,p_title     =>  p_title
5098    ,p_work_telephone     =>  p_work_telephone
5099    ,p_attribute_category     =>  p_attribute_category
5100    ,p_attribute1     =>  p_attribute1
5101    ,p_attribute2     =>  p_attribute2
5102    ,p_attribute3     =>  p_attribute3
5103    ,p_attribute4     =>  p_attribute4
5104    ,p_attribute5     =>  p_attribute5
5105    ,p_attribute6     =>  p_attribute6
5106    ,p_attribute7     =>  p_attribute7
5107    ,p_attribute8     =>  p_attribute8
5108    ,p_attribute9     =>  p_attribute9
5109    ,p_attribute10     =>  p_attribute10
5110    ,p_attribute11     =>  p_attribute11
5111    ,p_attribute12     =>  p_attribute12
5112    ,p_attribute13     =>  p_attribute13
5113    ,p_attribute14     =>  p_attribute14
5114    ,p_attribute15     =>  p_attribute15
5115    ,p_attribute16     =>  p_attribute16
5116    ,p_attribute17     =>  p_attribute17
5117    ,p_attribute18     =>  p_attribute18
5118    ,p_attribute19     =>  p_attribute19
5119    ,p_attribute20     =>  p_attribute20
5120    ,p_attribute21     =>  p_attribute21
5121    ,p_attribute22     =>  p_attribute22
5122    ,p_attribute23     =>  p_attribute23
5123    ,p_attribute24     =>  p_attribute24
5124    ,p_attribute25     =>  p_attribute25
5125    ,p_attribute26     =>  p_attribute26
5126    ,p_attribute27     =>  p_attribute27
5127    ,p_attribute28     =>  p_attribute28
5128    ,p_attribute29     =>  p_attribute29
5129    ,p_attribute30     =>  p_attribute30
5130    ,p_per_information_category     =>  p_per_information_category
5131    ,p_per_information1     =>  p_per_information1
5132    ,p_per_information2     =>  p_per_information2
5133    ,p_per_information3     =>  p_per_information3
5134    ,p_per_information4     =>  p_per_information4
5135    ,p_per_information5     =>  p_per_information5
5136    ,p_per_information6     =>  p_per_information6
5137    ,p_per_information7     =>  p_per_information7
5138    ,p_per_information8     =>  p_per_information8
5139    ,p_per_information9     =>  p_per_information9
5140    ,p_per_information10     =>  p_per_information10
5141    ,p_per_information11     =>  p_per_information11
5142    ,p_per_information12     =>  p_per_information12
5143    ,p_per_information13     =>  p_per_information13
5144    ,p_per_information14     =>  p_per_information14
5145    ,p_per_information15     =>  p_per_information15
5146    ,p_per_information16     =>  p_per_information16
5147    ,p_per_information17     =>  p_per_information17
5148    ,p_per_information18     =>  p_per_information18
5149    ,p_per_information19     =>  p_per_information19
5150    ,p_per_information20     =>  p_per_information20
5151    ,p_per_information21     =>  p_per_information21
5152    ,p_per_information22     =>  p_per_information22
5153    ,p_per_information23     =>  p_per_information23
5154    ,p_per_information24     =>  p_per_information24
5155    ,p_per_information25     =>  p_per_information25
5156    ,p_per_information26     =>  p_per_information26
5157    ,p_per_information27     =>  p_per_information27
5158    ,p_per_information28     =>  p_per_information28
5159    ,p_per_information29     =>  p_per_information29
5160    ,p_per_information30     =>  p_per_information30
5161    ,p_uses_tobacco_flag         =>  p_uses_tobacco_flag
5162    ,p_uses_tobacco_meaning      =>  p_uses_tobacco_meaning
5163    ,p_on_military_service       =>  p_on_military_service
5164    ,p_on_military_service_meaning => p_on_military_service_meaning
5165    ,p_dpdnt_vlntry_svce_flag      => p_dpdnt_vlntry_svce_flag
5166    ,p_dpdnt_vlntry_svce_meaning   => p_dpdnt_vlntry_svce_meaning
5167    ,p_correspondence_language     =>  p_correspondence_language
5168    ,p_honors     		=>  p_honors
5169    ,p_pre_name_adjunct     	=>  p_pre_name_adjunct
5170    ,p_suffix     		=>  p_suffix
5171    ,p_create_mirror_flag     	=>  p_create_mirror_flag
5172    ,p_mirror_type     		=>  p_mirror_type
5173    ,p_mirror_cont_attribute_cat     =>  p_mirror_cont_attribute_cat
5174    ,p_mirror_cont_attribute1     =>  p_mirror_cont_attribute1
5175    ,p_mirror_cont_attribute2     =>  p_mirror_cont_attribute2
5176    ,p_mirror_cont_attribute3     =>  p_mirror_cont_attribute3
5177    ,p_mirror_cont_attribute4     =>  p_mirror_cont_attribute4
5178    ,p_mirror_cont_attribute5     =>  p_mirror_cont_attribute5
5179    ,p_mirror_cont_attribute6     =>  p_mirror_cont_attribute6
5180    ,p_mirror_cont_attribute7     =>  p_mirror_cont_attribute7
5181    ,p_mirror_cont_attribute8     =>  p_mirror_cont_attribute8
5182    ,p_mirror_cont_attribute9     =>  p_mirror_cont_attribute9
5183    ,p_mirror_cont_attribute10     =>  p_mirror_cont_attribute10
5184    ,p_mirror_cont_attribute11     =>  p_mirror_cont_attribute11
5185    ,p_mirror_cont_attribute12     =>  p_mirror_cont_attribute12
5186    ,p_mirror_cont_attribute13     =>  p_mirror_cont_attribute13
5187    ,p_mirror_cont_attribute14     =>  p_mirror_cont_attribute14
5188    ,p_mirror_cont_attribute15     =>  p_mirror_cont_attribute15
5189    ,p_mirror_cont_attribute16     =>  p_mirror_cont_attribute16
5190    ,p_mirror_cont_attribute17     =>  p_mirror_cont_attribute17
5191    ,p_mirror_cont_attribute18     =>  p_mirror_cont_attribute18
5192    ,p_mirror_cont_attribute19     =>  p_mirror_cont_attribute19
5193    ,p_mirror_cont_attribute20     =>  p_mirror_cont_attribute20
5194    ,p_cont_information_category   =>  p_cont_information_category
5195    ,p_cont_information1           =>  p_cont_information1
5196    ,p_cont_information2           =>  p_cont_information2
5197    ,p_cont_information3           =>  p_cont_information3
5198    ,p_cont_information4           =>  p_cont_information4
5199    ,p_cont_information5           =>  p_cont_information5
5200    ,p_cont_information6           =>  p_cont_information6
5201    ,p_cont_information7           =>  p_cont_information7
5202    ,p_cont_information8           =>  p_cont_information8
5203    ,p_cont_information9           =>  p_cont_information9
5204    ,p_cont_information10          =>  p_cont_information10
5205    ,p_cont_information11          =>  p_cont_information11
5206    ,p_cont_information12          =>  p_cont_information12
5207    ,p_cont_information13          =>  p_cont_information13
5208    ,p_cont_information14          =>  p_cont_information14
5209    ,p_cont_information15          =>  p_cont_information15
5210    ,p_cont_information16          =>  p_cont_information16
5211    ,p_cont_information17          =>  p_cont_information17
5212    ,p_cont_information18          =>  p_cont_information18
5213    ,p_cont_information19          =>  p_cont_information19
5214    ,p_cont_information20          =>  p_cont_information20
5215    ,p_action     		=>  p_action
5216    ,p_login_person_id     	=>  p_login_person_id
5217    ,p_process_section_name     	=>  p_process_section_name
5218    ,p_review_page_region_code   =>  p_review_page_region_code
5219    -- Bug 1914891
5220    ,p_date_of_death             =>  p_date_of_death
5221    -- ikasire
5222    ,p_dpdnt_adoption_date       =>  p_dpdnt_adoption_date
5223    ,p_title_meaning             =>  p_title_meaning
5224    ,p_contact_type_meaning      =>  p_contact_type_meaning
5225    ,p_contact_operation         =>  p_contact_operation
5226    ,p_emrg_cont_flag            =>  p_emrg_cont_flag
5227    ,p_dpdnt_bnf_flag            =>  p_dpdnt_bnf_flag
5228    ,p_contact_relationship_id   =>  p_contact_relationship_id
5229    ,p_cont_object_version_number=>  p_cont_object_version_number
5230    --bug# 2315163
5231    ,p_is_emrg_cont              =>  p_is_emrg_cont
5232    ,p_is_dpdnt_bnf              =>  p_is_dpdnt_bnf
5233   );
5234 
5235 hr_utility.set_location('Exiting:'||l_proc, 15);
5236 
5237  EXCEPTION
5238    WHEN g_data_error THEN
5239    hr_utility.set_location('WHEN g_data_error THEN'||l_proc,555);
5240       RAISE;
5241  END get_contact_from_tt;
5242 -- ---------------------------------------------------------------------------
5243 -- ---------------------- < get_contact_from_tt> -------------------------
5244 -- ---------------------------------------------------------------------------
5245 -- Purpose: This procedure will get transaction data which are pending for 9999(?)
5246 --          approval in workflow for a transaction step id.
5247 --          This is the procedure which does the actual work.
5248 -- ---------------------------------------------------------------------------
5249 
5250 procedure get_contact_from_tt
5251   (p_transaction_step_id          in         number
5252   ,p_start_date                   out nocopy        date
5253   ,p_business_group_id            out nocopy        number
5254   ,p_person_id                    out nocopy        number
5255   ,p_contact_person_id            out nocopy        number
5256   ,p_contact_type                 out nocopy        varchar2
5257   ,p_ctr_comments                 out nocopy        varchar2
5258   ,p_primary_contact_flag         out nocopy        varchar2
5259   ,p_date_start                   out nocopy        date
5260   ,p_start_life_reason_id         out nocopy        number
5261   ,p_date_end                     out nocopy        date
5262   ,p_end_life_reason_id           out nocopy        number
5263   ,p_rltd_per_rsds_w_dsgntr_flag  out nocopy        varchar2
5264   ,p_personal_flag                out nocopy        varchar2
5265   ,p_sequence_number              out nocopy        number
5266   ,p_cont_attribute_category      out nocopy        varchar2
5267   ,p_cont_attribute1              out nocopy        varchar2
5268   ,p_cont_attribute2              out nocopy        varchar2
5269   ,p_cont_attribute3              out nocopy        varchar2
5270   ,p_cont_attribute4              out nocopy        varchar2
5271   ,p_cont_attribute5              out nocopy        varchar2
5272   ,p_cont_attribute6              out nocopy        varchar2
5273   ,p_cont_attribute7              out nocopy        varchar2
5274   ,p_cont_attribute8              out nocopy        varchar2
5275   ,p_cont_attribute9              out nocopy        varchar2
5276   ,p_cont_attribute10             out nocopy        varchar2
5277   ,p_cont_attribute11             out nocopy        varchar2
5278   ,p_cont_attribute12             out nocopy        varchar2
5279   ,p_cont_attribute13             out nocopy        varchar2
5280   ,p_cont_attribute14             out nocopy        varchar2
5281   ,p_cont_attribute15             out nocopy        varchar2
5282   ,p_cont_attribute16             out nocopy        varchar2
5283   ,p_cont_attribute17             out nocopy        varchar2
5284   ,p_cont_attribute18             out nocopy        varchar2
5285   ,p_cont_attribute19             out nocopy        varchar2
5286   ,p_cont_attribute20             out nocopy        varchar2
5287   ,p_third_party_pay_flag         out nocopy        varchar2
5288   ,p_bondholder_flag              out nocopy        varchar2
5289   ,p_dependent_flag               out nocopy        varchar2
5290   ,p_beneficiary_flag             out nocopy        varchar2
5291   ,p_last_name                    out nocopy        varchar2
5292   ,p_sex                          out nocopy        varchar2
5293   ,p_sex_meaning                  out nocopy        varchar2
5294   ,p_person_type_id               out nocopy        number
5295   ,p_per_comments                 out nocopy        varchar2
5296   ,p_date_of_birth                out nocopy        date
5297   ,p_email_address                out nocopy        varchar2
5298   ,p_first_name                   out nocopy        varchar2
5299   ,p_known_as                     out nocopy        varchar2
5300   ,p_marital_status               out nocopy        varchar2
5301   ,p_marital_status_meaning       out nocopy        varchar2
5302   ,p_student_status               out nocopy        varchar2
5303   ,p_student_status_meaning       out nocopy        varchar2
5304   ,p_middle_names                 out nocopy        varchar2
5305   ,p_nationality                  out nocopy        varchar2
5306   ,p_national_identifier          out nocopy        varchar2
5307   ,p_previous_last_name           out nocopy        varchar2
5308   ,p_registered_disabled_flag     out nocopy        varchar2
5309   ,p_registered_disabled          out nocopy        varchar2
5310   ,p_title                        out nocopy        varchar2
5311   ,p_work_telephone               out nocopy        varchar2
5312   ,p_attribute_category           out nocopy        varchar2
5313   ,p_attribute1                   out nocopy        varchar2
5314   ,p_attribute2                   out nocopy        varchar2
5315   ,p_attribute3                   out nocopy        varchar2
5316   ,p_attribute4                   out nocopy        varchar2
5317   ,p_attribute5                   out nocopy        varchar2
5318   ,p_attribute6                   out nocopy        varchar2
5319   ,p_attribute7                   out nocopy        varchar2
5320   ,p_attribute8                   out nocopy        varchar2
5321   ,p_attribute9                   out nocopy        varchar2
5322   ,p_attribute10                  out nocopy        varchar2
5323   ,p_attribute11                  out nocopy        varchar2
5324   ,p_attribute12                  out nocopy        varchar2
5325   ,p_attribute13                  out nocopy        varchar2
5326   ,p_attribute14                  out nocopy        varchar2
5327   ,p_attribute15                  out nocopy        varchar2
5328   ,p_attribute16                  out nocopy        varchar2
5329   ,p_attribute17                  out nocopy        varchar2
5330   ,p_attribute18                  out nocopy        varchar2
5331   ,p_attribute19                  out nocopy        varchar2
5332   ,p_attribute20                  out nocopy        varchar2
5333   ,p_attribute21                  out nocopy        varchar2
5334   ,p_attribute22                  out nocopy        varchar2
5335   ,p_attribute23                  out nocopy        varchar2
5336   ,p_attribute24                  out nocopy        varchar2
5337   ,p_attribute25                  out nocopy        varchar2
5338   ,p_attribute26                  out nocopy        varchar2
5339   ,p_attribute27                  out nocopy        varchar2
5340   ,p_attribute28                  out nocopy        varchar2
5341   ,p_attribute29                  out nocopy        varchar2
5342   ,p_attribute30                  out nocopy        varchar2
5343   ,p_per_information_category     out nocopy        varchar2
5344   ,p_per_information1             out nocopy        varchar2
5345   ,p_per_information2             out nocopy        varchar2
5346   ,p_per_information3             out nocopy        varchar2
5347   ,p_per_information4             out nocopy        varchar2
5348   ,p_per_information5             out nocopy        varchar2
5349   ,p_per_information6             out nocopy        varchar2
5350   ,p_per_information7             out nocopy        varchar2
5351   ,p_per_information8             out nocopy        varchar2
5352   ,p_per_information9             out nocopy        varchar2
5353   ,p_per_information10            out nocopy        varchar2
5354   ,p_per_information11            out nocopy        varchar2
5355   ,p_per_information12            out nocopy        varchar2
5356   ,p_per_information13            out nocopy        varchar2
5357   ,p_per_information14            out nocopy        varchar2
5358   ,p_per_information15            out nocopy        varchar2
5359   ,p_per_information16            out nocopy        varchar2
5360   ,p_per_information17            out nocopy        varchar2
5361   ,p_per_information18            out nocopy        varchar2
5362   ,p_per_information19            out nocopy        varchar2
5363   ,p_per_information20            out nocopy        varchar2
5364   ,p_per_information21            out nocopy        varchar2
5365   ,p_per_information22            out nocopy        varchar2
5366   ,p_per_information23            out nocopy        varchar2
5367   ,p_per_information24            out nocopy        varchar2
5368   ,p_per_information25            out nocopy        varchar2
5369   ,p_per_information26            out nocopy        varchar2
5370   ,p_per_information27            out nocopy        varchar2
5371   ,p_per_information28            out nocopy        varchar2
5372   ,p_per_information29            out nocopy        varchar2
5373   ,p_per_information30            out nocopy        varchar2
5374   ,p_uses_tobacco_flag            out nocopy        varchar2
5375   ,p_uses_tobacco_meaning         out nocopy        varchar2
5376   ,p_on_military_service          out nocopy        varchar2
5377   ,p_on_military_service_meaning  out nocopy        varchar2
5378   ,p_dpdnt_vlntry_svce_flag       out nocopy        varchar2
5379   ,p_dpdnt_vlntry_svce_meaning    out nocopy        varchar2
5380   ,p_correspondence_language      out nocopy        varchar2
5381   ,p_honors                       out nocopy        varchar2
5382   ,p_pre_name_adjunct             out nocopy        varchar2
5383   ,p_suffix                       out nocopy        varchar2
5384   ,p_create_mirror_flag           out nocopy        varchar2
5385   ,p_mirror_type                  out nocopy        varchar2
5386   ,p_mirror_cont_attribute_cat    out nocopy        varchar2
5387   ,p_mirror_cont_attribute1       out nocopy        varchar2
5388   ,p_mirror_cont_attribute2       out nocopy        varchar2
5389   ,p_mirror_cont_attribute3       out nocopy        varchar2
5390   ,p_mirror_cont_attribute4       out nocopy        varchar2
5391   ,p_mirror_cont_attribute5       out nocopy        varchar2
5392   ,p_mirror_cont_attribute6       out nocopy        varchar2
5393   ,p_mirror_cont_attribute7       out nocopy        varchar2
5394   ,p_mirror_cont_attribute8       out nocopy        varchar2
5395   ,p_mirror_cont_attribute9       out nocopy        varchar2
5396   ,p_mirror_cont_attribute10      out nocopy        varchar2
5397   ,p_mirror_cont_attribute11      out nocopy        varchar2
5398   ,p_mirror_cont_attribute12      out nocopy        varchar2
5399   ,p_mirror_cont_attribute13      out nocopy        varchar2
5400   ,p_mirror_cont_attribute14      out nocopy        varchar2
5401   ,p_mirror_cont_attribute15      out nocopy        varchar2
5402   ,p_mirror_cont_attribute16      out nocopy        varchar2
5403   ,p_mirror_cont_attribute17      out nocopy        varchar2
5404   ,p_mirror_cont_attribute18      out nocopy        varchar2
5405   ,p_mirror_cont_attribute19      out nocopy        varchar2
5406   ,p_mirror_cont_attribute20      out nocopy        varchar2
5407   ,p_action                       out nocopy        varchar2
5408   ,p_login_person_id              out nocopy        number
5409   ,p_process_section_name         out nocopy        varchar2
5410   ,p_review_page_region_code      out nocopy        varchar2
5411   -- Bug 1914891
5412   ,p_date_of_death                out nocopy        date
5413   -- ikasire
5414   ,p_dpdnt_adoption_date          out nocopy        date
5415   ,p_title_meaning                out nocopy        varchar2
5416   ,p_contact_type_meaning         out nocopy        varchar2
5417   ,p_contact_operation            out nocopy        varchar2
5418   ,p_emrg_cont_flag               out nocopy        varchar2
5419   ,p_dpdnt_bnf_flag               out nocopy        varchar2
5420   ,p_contact_relationship_id      out nocopy        number
5421   ,p_cont_object_version_number   out nocopy        number
5422 --bug# 2315163
5423   ,p_is_emrg_cont                 out nocopy        varchar2
5424   ,p_is_dpdnt_bnf                 out nocopy        varchar2
5425   ,P_CONT_INFORMATION_CATEGORY    out nocopy        varchar2
5426   ,P_CONT_INFORMATION1            out nocopy        varchar2
5427   ,P_CONT_INFORMATION2            out nocopy        varchar2
5428   ,P_CONT_INFORMATION3            out nocopy        varchar2
5429   ,P_CONT_INFORMATION4            out nocopy        varchar2
5430   ,P_CONT_INFORMATION5            out nocopy        varchar2
5431   ,P_CONT_INFORMATION6            out nocopy        varchar2
5432   ,P_CONT_INFORMATION7            out nocopy        varchar2
5433   ,P_CONT_INFORMATION8            out nocopy        varchar2
5434   ,P_CONT_INFORMATION9            out nocopy        varchar2
5435   ,P_CONT_INFORMATION10           out nocopy        varchar2
5436   ,P_CONT_INFORMATION11           out nocopy        varchar2
5437   ,P_CONT_INFORMATION12           out nocopy        varchar2
5438   ,P_CONT_INFORMATION13           out nocopy        varchar2
5439   ,P_CONT_INFORMATION14           out nocopy        varchar2
5440   ,P_CONT_INFORMATION15           out nocopy        varchar2
5441   ,P_CONT_INFORMATION16           out nocopy        varchar2
5442   ,P_CONT_INFORMATION17           out nocopy        varchar2
5443   ,P_CONT_INFORMATION18           out nocopy        varchar2
5444   ,P_CONT_INFORMATION19           out nocopy        varchar2
5445   ,P_CONT_INFORMATION20           out nocopy        varchar2
5446 ) IS
5447 
5448  l_proc   varchar2(72)  := g_package||'get_contact_from_tt';
5449 
5450  BEGIN
5451   --
5452   hr_utility.set_location('Entering:'||l_proc, 5);
5453 
5454   hr_utility.set_location('Setting the attributes:'||l_proc,10 );
5455   p_cont_object_version_number :=
5456       hr_transaction_api.get_number_value
5457         (p_transaction_step_id => p_transaction_step_id
5458         ,p_name                =>upper( 'p_cont_object_version_number'));
5459 
5460   p_contact_relationship_id :=
5461       hr_transaction_api.get_number_value
5462         (p_transaction_step_id => p_transaction_step_id
5463         ,p_name                =>upper( 'p_contact_relationship_id'));
5464 
5465   p_contact_operation  :=
5466       hr_transaction_api.get_varchar2_value
5467         (p_transaction_step_id => p_transaction_step_id
5468         ,p_name                =>upper( 'p_contact_operation'));
5469 
5470   p_emrg_cont_flag  :=
5471       hr_transaction_api.get_varchar2_value
5472         (p_transaction_step_id => p_transaction_step_id
5473         ,p_name                =>upper( 'p_emrg_cont_flag'));
5474 
5475   p_dpdnt_bnf_flag  :=
5476       hr_transaction_api.get_varchar2_value
5477         (p_transaction_step_id => p_transaction_step_id
5478         ,p_name                =>upper( 'p_dpdnt_bnf_flag'));
5479 
5480   --bug# 2315163
5481   p_is_emrg_cont    :=
5482       hr_transaction_api.get_varchar2_value
5483         (p_transaction_step_id => p_transaction_step_id
5484         ,p_name                =>upper( 'p_is_emergency_contact'));
5485 
5486   p_is_dpdnt_bnf    :=
5487       hr_transaction_api.get_varchar2_value
5488         (p_transaction_step_id => p_transaction_step_id
5489         ,p_name                =>upper( 'p_is_dpdnt_bnf'));
5490 
5491 
5492   -- Bug 1914891
5493   --
5494   p_date_of_death  :=
5495       hr_transaction_api.get_date_value
5496         (p_transaction_step_id => p_transaction_step_id
5497         ,p_name                =>upper( 'p_date_of_death'));
5498   --
5499   -- ikasire
5500   --
5501   p_dpdnt_adoption_date  :=
5502       hr_transaction_api.get_date_value
5503         (p_transaction_step_id => p_transaction_step_id
5504         ,p_name                =>upper( 'p_dpdnt_adoption_date'));
5505   --
5506   p_start_date  :=
5507       hr_transaction_api.get_date_value
5508         (p_transaction_step_id => p_transaction_step_id
5509         ,p_name                =>upper( 'p_start_date'));
5510   --
5511   p_business_group_id  :=
5512       hr_transaction_api.get_number_value
5513         (p_transaction_step_id => p_transaction_step_id
5514         ,p_name                =>upper( 'p_business_group_id'));
5515   --
5516   p_person_id  :=
5517       hr_transaction_api.get_number_value
5518         (p_transaction_step_id => p_transaction_step_id
5519         ,p_name                =>upper( 'p_person_id'));
5520   --
5521   p_contact_person_id  :=
5522       hr_transaction_api.get_number_value
5523         (p_transaction_step_id => p_transaction_step_id
5524         ,p_name                =>upper( 'p_contact_person_id'));
5525   --
5526   p_contact_type  :=
5527       hr_transaction_api.get_varchar2_value
5528         (p_transaction_step_id => p_transaction_step_id
5529         ,p_name                =>upper( 'p_contact_type'));
5530   --
5531   -- Bug 1914891
5532   --
5533   p_contact_type_meaning := HR_GENERAL.DECODE_LOOKUP('CONTACT',p_contact_type);
5534   --
5535   p_ctr_comments  :=
5536       hr_transaction_api.get_varchar2_value
5537         (p_transaction_step_id => p_transaction_step_id
5538         ,p_name                =>upper( 'p_ctr_comments'));
5539   --
5540   p_primary_contact_flag  :=
5541       hr_transaction_api.get_varchar2_value
5542         (p_transaction_step_id => p_transaction_step_id
5543         ,p_name                =>upper( 'p_primary_contact_flag'));
5544   --
5545   p_date_start  :=
5546       hr_transaction_api.get_date_value
5547         (p_transaction_step_id => p_transaction_step_id
5548         ,p_name                =>upper( 'p_date_start'));
5549   --
5550   p_start_life_reason_id  :=
5551       hr_transaction_api.get_number_value
5552         (p_transaction_step_id => p_transaction_step_id
5553         ,p_name                =>upper( 'p_start_life_reason_id'));
5554   --
5555   p_date_end  :=
5556       hr_transaction_api.get_date_value
5557         (p_transaction_step_id => p_transaction_step_id
5558         ,p_name                =>upper( 'p_date_end'));
5559   --
5560   p_end_life_reason_id  :=
5561       hr_transaction_api.get_number_value
5562         (p_transaction_step_id => p_transaction_step_id
5563         ,p_name                =>upper( 'p_end_life_reason_id'));
5564   --
5565   p_rltd_per_rsds_w_dsgntr_flag  :=
5566       hr_transaction_api.get_varchar2_value
5567         (p_transaction_step_id => p_transaction_step_id
5568         ,p_name                =>upper( 'p_rltd_per_rsds_w_dsgntr_flag'));
5569   --
5570   p_personal_flag  :=
5571       hr_transaction_api.get_varchar2_value
5572         (p_transaction_step_id => p_transaction_step_id
5573         ,p_name                =>upper( 'p_personal_flag'));
5574   --
5575   p_sequence_number  :=
5576       hr_transaction_api.get_number_value
5577         (p_transaction_step_id => p_transaction_step_id
5578         ,p_name                =>upper( 'p_sequence_number'));
5579   --
5580   p_cont_attribute_category  :=
5581       hr_transaction_api.get_varchar2_value
5582         (p_transaction_step_id => p_transaction_step_id
5583         ,p_name                =>upper( 'p_cont_attribute_category'));
5584   --
5585   p_cont_attribute1  :=
5586       hr_transaction_api.get_varchar2_value
5587         (p_transaction_step_id => p_transaction_step_id
5588         ,p_name                =>upper( 'p_cont_attribute1'));
5589   --
5590   p_cont_attribute2  :=
5591       hr_transaction_api.get_varchar2_value
5592         (p_transaction_step_id => p_transaction_step_id
5593         ,p_name                =>upper( 'p_cont_attribute2'));
5594   --
5595   p_cont_attribute3  :=
5596       hr_transaction_api.get_varchar2_value
5597         (p_transaction_step_id => p_transaction_step_id
5598         ,p_name                =>upper( 'p_cont_attribute3'));
5599   --
5600   p_cont_attribute4  :=
5601       hr_transaction_api.get_varchar2_value
5602         (p_transaction_step_id => p_transaction_step_id
5603         ,p_name                =>upper( 'p_cont_attribute4'));
5604   --
5605   p_cont_attribute5  :=
5606       hr_transaction_api.get_varchar2_value
5607         (p_transaction_step_id => p_transaction_step_id
5608         ,p_name                =>upper( 'p_cont_attribute5'));
5609   --
5610   p_cont_attribute6  :=
5611       hr_transaction_api.get_varchar2_value
5612         (p_transaction_step_id => p_transaction_step_id
5613         ,p_name                =>upper( 'p_cont_attribute6'));
5614   --
5615   p_cont_attribute7  :=
5616       hr_transaction_api.get_varchar2_value
5617         (p_transaction_step_id => p_transaction_step_id
5618         ,p_name                =>upper( 'p_cont_attribute7'));
5619   --
5620   p_cont_attribute8  :=
5621       hr_transaction_api.get_varchar2_value
5622         (p_transaction_step_id => p_transaction_step_id
5623         ,p_name                =>upper( 'p_cont_attribute8'));
5624   --
5625   p_cont_attribute9  :=
5626       hr_transaction_api.get_varchar2_value
5627         (p_transaction_step_id => p_transaction_step_id
5628         ,p_name                =>upper( 'p_cont_attribute9'));
5629   --
5630   p_cont_attribute10  :=
5631       hr_transaction_api.get_varchar2_value
5632         (p_transaction_step_id => p_transaction_step_id
5633         ,p_name                =>upper( 'p_cont_attribute10'));
5634   --
5635   p_cont_attribute11  :=
5636       hr_transaction_api.get_varchar2_value
5637         (p_transaction_step_id => p_transaction_step_id
5638         ,p_name                =>upper( 'p_cont_attribute11'));
5639   --
5640   p_cont_attribute12  :=
5641       hr_transaction_api.get_varchar2_value
5642         (p_transaction_step_id => p_transaction_step_id
5643         ,p_name                =>upper( 'p_cont_attribute12'));
5644   --
5645   p_cont_attribute13  :=
5646       hr_transaction_api.get_varchar2_value
5647         (p_transaction_step_id => p_transaction_step_id
5648         ,p_name                =>upper( 'p_cont_attribute13'));
5649   --
5650   p_cont_attribute14  :=
5651       hr_transaction_api.get_varchar2_value
5652         (p_transaction_step_id => p_transaction_step_id
5653         ,p_name                =>upper( 'p_cont_attribute14'));
5654   --
5655   p_cont_attribute15  :=
5656       hr_transaction_api.get_varchar2_value
5657         (p_transaction_step_id => p_transaction_step_id
5658         ,p_name                =>upper( 'p_cont_attribute15'));
5659   --
5660   p_cont_attribute16  :=
5661       hr_transaction_api.get_varchar2_value
5662         (p_transaction_step_id => p_transaction_step_id
5663         ,p_name                =>upper( 'p_cont_attribute16'));
5664   --
5665   p_cont_attribute17  :=
5666       hr_transaction_api.get_varchar2_value
5667         (p_transaction_step_id => p_transaction_step_id
5668         ,p_name                =>upper( 'p_cont_attribute17'));
5669   --
5670   p_cont_attribute18  :=
5671       hr_transaction_api.get_varchar2_value
5672         (p_transaction_step_id => p_transaction_step_id
5673         ,p_name                =>upper( 'p_cont_attribute18'));
5674   --
5675   p_cont_attribute19  :=
5676       hr_transaction_api.get_varchar2_value
5677         (p_transaction_step_id => p_transaction_step_id
5678         ,p_name                =>upper( 'p_cont_attribute19'));
5679   --
5680   p_cont_attribute20  :=
5681       hr_transaction_api.get_varchar2_value
5682         (p_transaction_step_id => p_transaction_step_id
5683         ,p_name                =>upper( 'p_cont_attribute20'));
5684   --
5685   p_third_party_pay_flag  :=
5686       hr_transaction_api.get_varchar2_value
5687         (p_transaction_step_id => p_transaction_step_id
5688         ,p_name                =>upper( 'p_third_party_pay_flag'));
5689   --
5690   p_bondholder_flag  :=
5691       hr_transaction_api.get_varchar2_value
5692         (p_transaction_step_id => p_transaction_step_id
5693         ,p_name                =>upper( 'p_bondholder_flag'));
5694   --
5695   p_dependent_flag  :=
5696       hr_transaction_api.get_varchar2_value
5697         (p_transaction_step_id => p_transaction_step_id
5698         ,p_name                =>upper( 'p_dependent_flag'));
5699   --
5700   p_beneficiary_flag  :=
5701       hr_transaction_api.get_varchar2_value
5702         (p_transaction_step_id => p_transaction_step_id
5703         ,p_name                =>upper( 'p_beneficiary_flag'));
5704   --
5705   p_last_name  :=
5706       hr_transaction_api.get_varchar2_value
5707         (p_transaction_step_id => p_transaction_step_id
5708         ,p_name                =>upper( 'p_last_name'));
5709   --
5710   p_sex  :=
5711       hr_transaction_api.get_varchar2_value
5712         (p_transaction_step_id => p_transaction_step_id
5713         ,p_name                =>upper( 'p_sex'));
5714   --
5715   p_sex_meaning  :=  HR_GENERAL.DECODE_LOOKUP('SEX',p_sex); -- 7777
5716   --
5717   p_uses_tobacco_flag  :=
5718       hr_transaction_api.get_varchar2_value
5719         (p_transaction_step_id => p_transaction_step_id
5720         ,p_name                =>upper( 'p_uses_tobacco_flag'));
5721   --
5722   p_uses_tobacco_meaning  :=  HR_GENERAL.DECODE_LOOKUP('TOBACCO_USER',p_uses_tobacco_flag); -- 7777
5723   --
5724   p_on_military_service  :=
5725       hr_transaction_api.get_varchar2_value
5726         (p_transaction_step_id => p_transaction_step_id
5727         ,p_name                =>upper( 'p_on_military_service'));
5728   --
5729   p_on_military_service_meaning  :=  HR_GENERAL.DECODE_LOOKUP('YES_NO',p_on_military_service); -- 7777
5730   --
5731   p_dpdnt_vlntry_svce_flag  :=
5732       hr_transaction_api.get_varchar2_value
5733         (p_transaction_step_id => p_transaction_step_id
5734         ,p_name                =>upper( 'p_dpdnt_vlntry_svce_flag'));
5735   --
5736   p_dpdnt_vlntry_svce_meaning    :=  HR_GENERAL.DECODE_LOOKUP('YES_NO',p_dpdnt_vlntry_svce_flag); -- 7777
5737   --
5738   p_person_type_id  :=
5739       hr_transaction_api.get_number_value
5740         (p_transaction_step_id => p_transaction_step_id
5741         ,p_name                =>upper( 'p_person_type_id'));
5742   --
5743   p_per_comments  :=
5744       hr_transaction_api.get_varchar2_value
5745         (p_transaction_step_id => p_transaction_step_id
5746         ,p_name                =>upper( 'p_per_comments'));
5747   --
5748   p_date_of_birth  :=
5749       hr_transaction_api.get_date_value
5750         (p_transaction_step_id => p_transaction_step_id
5751         ,p_name                =>upper( 'p_date_of_birth'));
5752   --
5753   p_email_address  :=
5754       hr_transaction_api.get_varchar2_value
5755         (p_transaction_step_id => p_transaction_step_id
5756         ,p_name                =>upper( 'p_email_address'));
5757   --
5758   p_first_name  :=
5759       hr_transaction_api.get_varchar2_value
5760         (p_transaction_step_id => p_transaction_step_id
5761         ,p_name                =>upper( 'p_first_name'));
5762   --
5763   p_known_as  :=
5764       hr_transaction_api.get_varchar2_value
5765         (p_transaction_step_id => p_transaction_step_id
5766         ,p_name                =>upper( 'p_known_as'));
5767   --
5768   p_marital_status  :=
5769       hr_transaction_api.get_varchar2_value
5770         (p_transaction_step_id => p_transaction_step_id
5771         ,p_name                =>upper( 'p_marital_status'));
5772   --
5773   p_marital_status_meaning  :=  HR_GENERAL.DECODE_LOOKUP('MAR_STATUS',p_marital_status); -- 7777
5774   --
5775   --
5776   p_student_status  :=  -- 12345
5777       hr_transaction_api.get_varchar2_value
5778         (p_transaction_step_id => p_transaction_step_id
5779         ,p_name                =>upper( 'p_student_status'));
5780   --
5781   p_student_status_meaning  :=  HR_GENERAL.DECODE_LOOKUP('STUDENT_STATUS',p_student_status); -- 7777
5782   --
5783   p_middle_names  :=
5784       hr_transaction_api.get_varchar2_value
5785         (p_transaction_step_id => p_transaction_step_id
5786         ,p_name                =>upper( 'p_middle_names'));
5787   --
5788   p_nationality  :=
5789       hr_transaction_api.get_varchar2_value
5790         (p_transaction_step_id => p_transaction_step_id
5791         ,p_name                =>upper( 'p_nationality'));
5792   --
5793   p_national_identifier  :=
5794       hr_transaction_api.get_varchar2_value
5795         (p_transaction_step_id => p_transaction_step_id
5796         ,p_name                =>upper( 'p_national_identifier'));
5797   --
5798   p_previous_last_name  :=
5799       hr_transaction_api.get_varchar2_value
5800         (p_transaction_step_id => p_transaction_step_id
5801         ,p_name                =>upper( 'p_previous_last_name'));
5802   --
5803   p_registered_disabled_flag  :=
5804       hr_transaction_api.get_varchar2_value
5805         (p_transaction_step_id => p_transaction_step_id
5806         ,p_name                =>upper( 'p_registered_disabled_flag'));
5807   --
5808   p_registered_disabled       :=  HR_GENERAL.DECODE_LOOKUP('REGISTERED_DISABLED', p_registered_disabled_flag);
5809   --
5810   p_title  :=
5811       hr_transaction_api.get_varchar2_value
5812         (p_transaction_step_id => p_transaction_step_id
5813         ,p_name                =>upper( 'p_title'));
5814   --
5815   -- Bug 1914891
5816   --
5817   p_title_meaning := HR_GENERAL.DECODE_LOOKUP('TITLE', p_title);
5818   --
5819   p_work_telephone  :=
5820       hr_transaction_api.get_varchar2_value
5821         (p_transaction_step_id => p_transaction_step_id
5822         ,p_name                =>upper( 'p_work_telephone'));
5823   --
5824   p_attribute_category  :=
5825       hr_transaction_api.get_varchar2_value
5826         (p_transaction_step_id => p_transaction_step_id
5827         ,p_name                =>upper( 'p_attribute_category'));
5828   --
5829   p_attribute1  :=
5830       hr_transaction_api.get_varchar2_value
5831         (p_transaction_step_id => p_transaction_step_id
5832         ,p_name                =>upper( 'p_attribute1'));
5833   --
5834   p_attribute2  :=
5835       hr_transaction_api.get_varchar2_value
5836         (p_transaction_step_id => p_transaction_step_id
5837         ,p_name                =>upper( 'p_attribute2'));
5838   --
5839   p_attribute3  :=
5840       hr_transaction_api.get_varchar2_value
5841         (p_transaction_step_id => p_transaction_step_id
5842         ,p_name                =>upper( 'p_attribute3'));
5843   --
5844   p_attribute4  :=
5845       hr_transaction_api.get_varchar2_value
5846         (p_transaction_step_id => p_transaction_step_id
5847         ,p_name                =>upper( 'p_attribute4'));
5848   --
5849   p_attribute5  :=
5850       hr_transaction_api.get_varchar2_value
5851         (p_transaction_step_id => p_transaction_step_id
5852         ,p_name                =>upper( 'p_attribute5'));
5853   --
5854   p_attribute6  :=
5855       hr_transaction_api.get_varchar2_value
5856         (p_transaction_step_id => p_transaction_step_id
5857         ,p_name                =>upper( 'p_attribute6'));
5858   --
5859   p_attribute7  :=
5860       hr_transaction_api.get_varchar2_value
5861         (p_transaction_step_id => p_transaction_step_id
5862         ,p_name                =>upper( 'p_attribute7'));
5863   --
5864   p_attribute8  :=
5865       hr_transaction_api.get_varchar2_value
5866         (p_transaction_step_id => p_transaction_step_id
5867         ,p_name                =>upper( 'p_attribute8'));
5868   --
5869   p_attribute9  :=
5870       hr_transaction_api.get_varchar2_value
5871         (p_transaction_step_id => p_transaction_step_id
5872         ,p_name                =>upper( 'p_attribute9'));
5873   --
5874   p_attribute10  :=
5875       hr_transaction_api.get_varchar2_value
5876         (p_transaction_step_id => p_transaction_step_id
5877         ,p_name                =>upper( 'p_attribute10'));
5878   --
5879   p_attribute11  :=
5880       hr_transaction_api.get_varchar2_value
5881         (p_transaction_step_id => p_transaction_step_id
5882         ,p_name                =>upper( 'p_attribute11'));
5883   --
5884   p_attribute12  :=
5885       hr_transaction_api.get_varchar2_value
5886         (p_transaction_step_id => p_transaction_step_id
5887         ,p_name                =>upper( 'p_attribute12'));
5888   --
5889   p_attribute13  :=
5890       hr_transaction_api.get_varchar2_value
5891         (p_transaction_step_id => p_transaction_step_id
5892         ,p_name                =>upper( 'p_attribute13'));
5893   --
5894   p_attribute14  :=
5895       hr_transaction_api.get_varchar2_value
5896         (p_transaction_step_id => p_transaction_step_id
5897         ,p_name                =>upper( 'p_attribute14'));
5898   --
5899   p_attribute15  :=
5900       hr_transaction_api.get_varchar2_value
5901         (p_transaction_step_id => p_transaction_step_id
5902         ,p_name                =>upper( 'p_attribute15'));
5903   --
5904   p_attribute16  :=
5905       hr_transaction_api.get_varchar2_value
5906         (p_transaction_step_id => p_transaction_step_id
5907         ,p_name                =>upper( 'p_attribute16'));
5908   --
5909   p_attribute17  :=
5910       hr_transaction_api.get_varchar2_value
5911         (p_transaction_step_id => p_transaction_step_id
5912         ,p_name                =>upper( 'p_attribute17'));
5913   --
5914   p_attribute18  :=
5915       hr_transaction_api.get_varchar2_value
5916         (p_transaction_step_id => p_transaction_step_id
5917         ,p_name                =>upper( 'p_attribute18'));
5918   --
5919   p_attribute19  :=
5920       hr_transaction_api.get_varchar2_value
5921         (p_transaction_step_id => p_transaction_step_id
5922         ,p_name                =>upper( 'p_attribute19'));
5923   --
5924   p_attribute20  :=
5925       hr_transaction_api.get_varchar2_value
5926         (p_transaction_step_id => p_transaction_step_id
5927         ,p_name                =>upper( 'p_attribute20'));
5928   --
5929   p_attribute21  :=
5930       hr_transaction_api.get_varchar2_value
5931         (p_transaction_step_id => p_transaction_step_id
5932         ,p_name                =>upper( 'p_attribute21'));
5933   --
5934   p_attribute22  :=
5935       hr_transaction_api.get_varchar2_value
5936         (p_transaction_step_id => p_transaction_step_id
5937         ,p_name                =>upper( 'p_attribute22'));
5938   --
5939   p_attribute23  :=
5940       hr_transaction_api.get_varchar2_value
5941         (p_transaction_step_id => p_transaction_step_id
5942         ,p_name                =>upper( 'p_attribute23'));
5943   --
5944   p_attribute24  :=
5945       hr_transaction_api.get_varchar2_value
5946         (p_transaction_step_id => p_transaction_step_id
5947         ,p_name                =>upper( 'p_attribute24'));
5948   --
5949   p_attribute25  :=
5950       hr_transaction_api.get_varchar2_value
5951         (p_transaction_step_id => p_transaction_step_id
5952         ,p_name                =>upper( 'p_attribute25'));
5953   --
5954   p_attribute26  :=
5955       hr_transaction_api.get_varchar2_value
5956         (p_transaction_step_id => p_transaction_step_id
5957         ,p_name                =>upper( 'p_attribute26'));
5958   --
5959   p_attribute27  :=
5960       hr_transaction_api.get_varchar2_value
5961         (p_transaction_step_id => p_transaction_step_id
5962         ,p_name                =>upper( 'p_attribute27'));
5963   --
5964   p_attribute28  :=
5965       hr_transaction_api.get_varchar2_value
5966         (p_transaction_step_id => p_transaction_step_id
5967         ,p_name                =>upper( 'p_attribute28'));
5968   --
5969   p_attribute29  :=
5970       hr_transaction_api.get_varchar2_value
5971         (p_transaction_step_id => p_transaction_step_id
5972         ,p_name                =>upper( 'p_attribute29'));
5973   --
5974   p_attribute30  :=
5975       hr_transaction_api.get_varchar2_value
5976         (p_transaction_step_id => p_transaction_step_id
5977         ,p_name                =>upper( 'p_attribute30'));
5978   --
5979   p_per_information_category  :=
5980       hr_transaction_api.get_varchar2_value
5981         (p_transaction_step_id => p_transaction_step_id
5982         ,p_name                =>upper( 'p_per_information_category'));
5983   --
5984   p_per_information1  :=
5985       hr_transaction_api.get_varchar2_value
5986         (p_transaction_step_id => p_transaction_step_id
5987         ,p_name                =>upper( 'p_per_information1'));
5988   --
5989   p_per_information2  :=
5990       hr_transaction_api.get_varchar2_value
5991         (p_transaction_step_id => p_transaction_step_id
5992         ,p_name                =>upper( 'p_per_information2'));
5993   --
5994   p_per_information3  :=
5995       hr_transaction_api.get_varchar2_value
5996         (p_transaction_step_id => p_transaction_step_id
5997         ,p_name                =>upper( 'p_per_information3'));
5998   --
5999   p_per_information4  :=
6000       hr_transaction_api.get_varchar2_value
6001         (p_transaction_step_id => p_transaction_step_id
6002         ,p_name                =>upper( 'p_per_information4'));
6003   --
6004   p_per_information5  :=
6005       hr_transaction_api.get_varchar2_value
6006         (p_transaction_step_id => p_transaction_step_id
6007         ,p_name                =>upper( 'p_per_information5'));
6008   --
6009   p_per_information6  :=
6010       hr_transaction_api.get_varchar2_value
6011         (p_transaction_step_id => p_transaction_step_id
6012         ,p_name                =>upper( 'p_per_information6'));
6013   --
6014   p_per_information7  :=
6015       hr_transaction_api.get_varchar2_value
6016         (p_transaction_step_id => p_transaction_step_id
6017         ,p_name                =>upper( 'p_per_information7'));
6018   --
6019   p_per_information8  :=
6020       hr_transaction_api.get_varchar2_value
6021         (p_transaction_step_id => p_transaction_step_id
6022         ,p_name                =>upper( 'p_per_information8'));
6023   --
6024   p_per_information9  :=
6025       hr_transaction_api.get_varchar2_value
6026         (p_transaction_step_id => p_transaction_step_id
6027         ,p_name                =>upper( 'p_per_information9'));
6028   --
6029   p_per_information10  :=
6030       hr_transaction_api.get_varchar2_value
6031         (p_transaction_step_id => p_transaction_step_id
6032         ,p_name                =>upper( 'p_per_information10'));
6033   --
6034   p_per_information11  :=
6035       hr_transaction_api.get_varchar2_value
6036         (p_transaction_step_id => p_transaction_step_id
6037         ,p_name                =>upper( 'p_per_information11'));
6038   --
6039   p_per_information12  :=
6040       hr_transaction_api.get_varchar2_value
6041         (p_transaction_step_id => p_transaction_step_id
6042         ,p_name                =>upper( 'p_per_information12'));
6043   --
6044   p_per_information13  :=
6045       hr_transaction_api.get_varchar2_value
6046         (p_transaction_step_id => p_transaction_step_id
6047         ,p_name                =>upper( 'p_per_information13'));
6048   --
6049   p_per_information14  :=
6050       hr_transaction_api.get_varchar2_value
6051         (p_transaction_step_id => p_transaction_step_id
6052         ,p_name                =>upper( 'p_per_information14'));
6053   --
6054   p_per_information15  :=
6055       hr_transaction_api.get_varchar2_value
6056         (p_transaction_step_id => p_transaction_step_id
6057         ,p_name                =>upper( 'p_per_information15'));
6058   --
6059   p_per_information16  :=
6060       hr_transaction_api.get_varchar2_value
6061         (p_transaction_step_id => p_transaction_step_id
6062         ,p_name                =>upper( 'p_per_information16'));
6063   --
6064   p_per_information17  :=
6065       hr_transaction_api.get_varchar2_value
6066         (p_transaction_step_id => p_transaction_step_id
6067         ,p_name                =>upper( 'p_per_information17'));
6068   --
6069   p_per_information18  :=
6070       hr_transaction_api.get_varchar2_value
6071         (p_transaction_step_id => p_transaction_step_id
6072         ,p_name                =>upper( 'p_per_information18'));
6073   --
6074   p_per_information19  :=
6075       hr_transaction_api.get_varchar2_value
6076         (p_transaction_step_id => p_transaction_step_id
6077         ,p_name                =>upper( 'p_per_information19'));
6078   --
6079   p_per_information20  :=
6080       hr_transaction_api.get_varchar2_value
6081         (p_transaction_step_id => p_transaction_step_id
6082         ,p_name                =>upper( 'p_per_information20'));
6083   --
6084   p_per_information21  :=
6085       hr_transaction_api.get_varchar2_value
6086         (p_transaction_step_id => p_transaction_step_id
6087         ,p_name                =>upper( 'p_per_information21'));
6088   --
6089   p_per_information22  :=
6090       hr_transaction_api.get_varchar2_value
6091         (p_transaction_step_id => p_transaction_step_id
6092         ,p_name                =>upper( 'p_per_information22'));
6093   --
6094   p_per_information23  :=
6095       hr_transaction_api.get_varchar2_value
6096         (p_transaction_step_id => p_transaction_step_id
6097         ,p_name                =>upper( 'p_per_information23'));
6098   --
6099   p_per_information24  :=
6100       hr_transaction_api.get_varchar2_value
6101         (p_transaction_step_id => p_transaction_step_id
6102         ,p_name                =>upper( 'p_per_information24'));
6103   --
6104   p_per_information25  :=
6105       hr_transaction_api.get_varchar2_value
6106         (p_transaction_step_id => p_transaction_step_id
6107         ,p_name                =>upper( 'p_per_information25'));
6108   --
6109   p_per_information26  :=
6110       hr_transaction_api.get_varchar2_value
6111         (p_transaction_step_id => p_transaction_step_id
6112         ,p_name                =>upper( 'p_per_information26'));
6113   --
6114   p_per_information27  :=
6115       hr_transaction_api.get_varchar2_value
6116         (p_transaction_step_id => p_transaction_step_id
6117         ,p_name                =>upper( 'p_per_information27'));
6118   --
6119   p_per_information28  :=
6120       hr_transaction_api.get_varchar2_value
6121         (p_transaction_step_id => p_transaction_step_id
6122         ,p_name                =>upper( 'p_per_information28'));
6123   --
6124   p_per_information29  :=
6125       hr_transaction_api.get_varchar2_value
6126         (p_transaction_step_id => p_transaction_step_id
6127         ,p_name                =>upper( 'p_per_information29'));
6128   --
6129   p_per_information30  :=
6130       hr_transaction_api.get_varchar2_value
6131         (p_transaction_step_id => p_transaction_step_id
6132         ,p_name                =>upper( 'p_per_information30'));
6133   --
6134   p_correspondence_language  :=
6135       hr_transaction_api.get_varchar2_value
6136         (p_transaction_step_id => p_transaction_step_id
6137         ,p_name                =>upper( 'p_correspondence_language'));
6138   --
6139   p_honors  :=
6140       hr_transaction_api.get_varchar2_value
6141         (p_transaction_step_id => p_transaction_step_id
6142         ,p_name                =>upper( 'p_honors'));
6143   --
6144   p_pre_name_adjunct  :=
6145       hr_transaction_api.get_varchar2_value
6146         (p_transaction_step_id => p_transaction_step_id
6147         ,p_name                =>upper( 'p_pre_name_adjunct'));
6148   --
6149   p_suffix  :=
6150       hr_transaction_api.get_varchar2_value
6151         (p_transaction_step_id => p_transaction_step_id
6152         ,p_name                =>upper( 'p_suffix'));
6153   --
6154   p_create_mirror_flag  :=
6155       hr_transaction_api.get_varchar2_value
6156         (p_transaction_step_id => p_transaction_step_id
6157         ,p_name                =>upper( 'p_create_mirror_flag'));
6158   --
6159   p_mirror_type  :=
6160       hr_transaction_api.get_varchar2_value
6161         (p_transaction_step_id => p_transaction_step_id
6162         ,p_name                =>upper( 'p_mirror_type'));
6163   --
6164   p_mirror_cont_attribute_cat  :=
6165       hr_transaction_api.get_varchar2_value
6166         (p_transaction_step_id => p_transaction_step_id
6167         ,p_name                =>upper( 'p_mirror_cont_attribute_cat'));
6168   --
6169   p_mirror_cont_attribute1  :=
6170       hr_transaction_api.get_varchar2_value
6171         (p_transaction_step_id => p_transaction_step_id
6172         ,p_name                =>upper( 'p_mirror_cont_attribute1'));
6173   --
6174   p_mirror_cont_attribute2  :=
6175       hr_transaction_api.get_varchar2_value
6176         (p_transaction_step_id => p_transaction_step_id
6177         ,p_name                =>upper( 'p_mirror_cont_attribute2'));
6178   --
6179   p_mirror_cont_attribute3  :=
6180       hr_transaction_api.get_varchar2_value
6181         (p_transaction_step_id => p_transaction_step_id
6182         ,p_name                =>upper( 'p_mirror_cont_attribute3'));
6183   --
6184   p_mirror_cont_attribute4  :=
6185       hr_transaction_api.get_varchar2_value
6186         (p_transaction_step_id => p_transaction_step_id
6187         ,p_name                =>upper( 'p_mirror_cont_attribute4'));
6188   --
6189   p_mirror_cont_attribute5  :=
6190       hr_transaction_api.get_varchar2_value
6191         (p_transaction_step_id => p_transaction_step_id
6192         ,p_name                =>upper( 'p_mirror_cont_attribute5'));
6193   --
6194   p_mirror_cont_attribute6  :=
6195       hr_transaction_api.get_varchar2_value
6196         (p_transaction_step_id => p_transaction_step_id
6197         ,p_name                =>upper( 'p_mirror_cont_attribute6'));
6198   --
6199   p_mirror_cont_attribute7  :=
6200       hr_transaction_api.get_varchar2_value
6201         (p_transaction_step_id => p_transaction_step_id
6202         ,p_name                =>upper( 'p_mirror_cont_attribute7'));
6203   --
6204   p_mirror_cont_attribute8  :=
6205       hr_transaction_api.get_varchar2_value
6206         (p_transaction_step_id => p_transaction_step_id
6207         ,p_name                =>upper( 'p_mirror_cont_attribute8'));
6208   --
6209   p_mirror_cont_attribute9  :=
6210       hr_transaction_api.get_varchar2_value
6211         (p_transaction_step_id => p_transaction_step_id
6212         ,p_name                =>upper( 'p_mirror_cont_attribute9'));
6213   --
6214   p_mirror_cont_attribute10  :=
6215       hr_transaction_api.get_varchar2_value
6216         (p_transaction_step_id => p_transaction_step_id
6217         ,p_name                =>upper( 'p_mirror_cont_attribute10'));
6218   --
6219   p_mirror_cont_attribute11  :=
6220       hr_transaction_api.get_varchar2_value
6221         (p_transaction_step_id => p_transaction_step_id
6222         ,p_name                =>upper( 'p_mirror_cont_attribute11'));
6223   --
6224   p_mirror_cont_attribute12  :=
6225       hr_transaction_api.get_varchar2_value
6226         (p_transaction_step_id => p_transaction_step_id
6227         ,p_name                =>upper( 'p_mirror_cont_attribute12'));
6228   --
6229   p_mirror_cont_attribute13  :=
6230       hr_transaction_api.get_varchar2_value
6231         (p_transaction_step_id => p_transaction_step_id
6232         ,p_name                =>upper( 'p_mirror_cont_attribute13'));
6233   --
6234   p_mirror_cont_attribute14  :=
6235       hr_transaction_api.get_varchar2_value
6236         (p_transaction_step_id => p_transaction_step_id
6237         ,p_name                =>upper( 'p_mirror_cont_attribute14'));
6238   --
6239   p_mirror_cont_attribute15  :=
6240       hr_transaction_api.get_varchar2_value
6241         (p_transaction_step_id => p_transaction_step_id
6242         ,p_name                =>upper( 'p_mirror_cont_attribute15'));
6243   --
6244   p_mirror_cont_attribute16  :=
6245       hr_transaction_api.get_varchar2_value
6246         (p_transaction_step_id => p_transaction_step_id
6247         ,p_name                =>upper( 'p_mirror_cont_attribute16'));
6248   --
6249   p_mirror_cont_attribute17  :=
6250       hr_transaction_api.get_varchar2_value
6251         (p_transaction_step_id => p_transaction_step_id
6252         ,p_name                =>upper( 'p_mirror_cont_attribute17'));
6253   --
6254   p_mirror_cont_attribute18  :=
6255       hr_transaction_api.get_varchar2_value
6256         (p_transaction_step_id => p_transaction_step_id
6257         ,p_name                =>upper( 'p_mirror_cont_attribute18'));
6258   --
6259   p_mirror_cont_attribute19  :=
6260       hr_transaction_api.get_varchar2_value
6261         (p_transaction_step_id => p_transaction_step_id
6262         ,p_name                =>upper( 'p_mirror_cont_attribute19'));
6263   --
6264   p_mirror_cont_attribute20  :=
6265       hr_transaction_api.get_varchar2_value
6266         (p_transaction_step_id => p_transaction_step_id
6267         ,p_name                =>upper( 'p_mirror_cont_attribute20'));
6268   --
6269 /*
6270   p_item_type  :=
6271       hr_transaction_api.get_varchar2_value
6272         (p_transaction_step_id => p_transaction_step_id
6273         ,p_name                =>upper( 'p_item_type'));
6274   --
6275   p_item_key  :=
6276       hr_transaction_api.get_varchar2_value
6277         (p_transaction_step_id => p_transaction_step_id
6278         ,p_name                =>upper( 'p_item_key'));
6279   --
6280   p_activity_id  :=
6281       hr_transaction_api.get_number_value
6282         (p_transaction_step_id => p_transaction_step_id
6283         ,p_name                =>upper( 'p_activity_id'));
6284 */
6285   --
6286   p_action  :=
6287       hr_transaction_api.get_varchar2_value
6288         (p_transaction_step_id => p_transaction_step_id
6289         ,p_name                =>upper( 'p_action'));
6290   --
6291   p_login_person_id  :=
6292       hr_transaction_api.get_number_value
6293         (p_transaction_step_id => p_transaction_step_id
6294         ,p_name                =>upper( 'p_login_person_id'));
6295   --
6296   p_process_section_name  :=
6297       hr_transaction_api.get_varchar2_value
6298         (p_transaction_step_id => p_transaction_step_id
6299         ,p_name                =>upper( 'p_process_section_name'));
6300   --
6301   p_review_page_region_code  :=
6302       hr_transaction_api.get_varchar2_value
6303         (p_transaction_step_id => p_transaction_step_id
6304         ,p_name                =>upper( 'P_REVIEW_PROC_CALL'));
6305 
6306   --
6307   P_CONT_INFORMATION_CATEGORY  :=
6308       hr_transaction_api.get_VARCHAR2_value
6309             (p_transaction_step_id => p_transaction_step_id
6310             ,p_name                => 'P_CONT_INFORMATION_CATEGORY');
6311   --
6312   P_CONT_INFORMATION1  :=
6313       hr_transaction_api.get_VARCHAR2_value
6314             (p_transaction_step_id => p_transaction_step_id
6315             ,p_name                => 'P_CONT_INFORMATION1');
6316   --
6317   P_CONT_INFORMATION2  :=
6318       hr_transaction_api.get_VARCHAR2_value
6319             (p_transaction_step_id => p_transaction_step_id
6320             ,p_name                => 'P_CONT_INFORMATION2');
6321   --
6322   P_CONT_INFORMATION3  :=
6323       hr_transaction_api.get_VARCHAR2_value
6324             (p_transaction_step_id => p_transaction_step_id
6325             ,p_name                => 'P_CONT_INFORMATION3');
6326   --
6327   P_CONT_INFORMATION4  :=
6328       hr_transaction_api.get_VARCHAR2_value
6329             (p_transaction_step_id => p_transaction_step_id
6330             ,p_name                => 'P_CONT_INFORMATION4');
6331   --
6332   P_CONT_INFORMATION5  :=
6333       hr_transaction_api.get_VARCHAR2_value
6334             (p_transaction_step_id => p_transaction_step_id
6335             ,p_name                => 'P_CONT_INFORMATION5');
6336   --
6337   P_CONT_INFORMATION6  :=
6338        hr_transaction_api.get_VARCHAR2_value
6339             (p_transaction_step_id => p_transaction_step_id
6340             ,p_name                => 'P_CONT_INFORMATION6');
6341   --
6342   P_CONT_INFORMATION7  :=
6343        hr_transaction_api.get_VARCHAR2_value
6344             (p_transaction_step_id => p_transaction_step_id
6345             ,p_name                => 'P_CONT_INFORMATION7');
6346   --
6347   P_CONT_INFORMATION8  :=
6348        hr_transaction_api.get_VARCHAR2_value
6349             (p_transaction_step_id => p_transaction_step_id
6350             ,p_name                => 'P_CONT_INFORMATION8');
6351   --
6352   P_CONT_INFORMATION9  :=
6353        hr_transaction_api.get_VARCHAR2_value
6354             (p_transaction_step_id => p_transaction_step_id
6355             ,p_name                => 'P_CONT_INFORMATION9');
6356   --
6357   P_CONT_INFORMATION10  :=
6358        hr_transaction_api.get_VARCHAR2_value
6359             (p_transaction_step_id => p_transaction_step_id
6360             ,p_name                => 'P_CONT_INFORMATION10');
6361    --
6362    P_CONT_INFORMATION11  :=
6363        hr_transaction_api.get_VARCHAR2_value
6364             (p_transaction_step_id => p_transaction_step_id
6365             ,p_name                => 'P_CONT_INFORMATION11');
6366    --
6367    P_CONT_INFORMATION12  :=
6368         hr_transaction_api.get_VARCHAR2_value
6369             (p_transaction_step_id => p_transaction_step_id
6370             ,p_name                => 'P_CONT_INFORMATION12');
6371    --
6372    P_CONT_INFORMATION13  :=
6373         hr_transaction_api.get_VARCHAR2_value
6374             (p_transaction_step_id => p_transaction_step_id
6375             ,p_name                => 'P_CONT_INFORMATION13');
6376    --
6377    P_CONT_INFORMATION14  :=
6378         hr_transaction_api.get_VARCHAR2_value
6379             (p_transaction_step_id => p_transaction_step_id
6380             ,p_name                => 'P_CONT_INFORMATION14');
6381    --
6382    P_CONT_INFORMATION15  :=
6383         hr_transaction_api.get_VARCHAR2_value
6384             (p_transaction_step_id => p_transaction_step_id
6385             ,p_name                => 'P_CONT_INFORMATION15');
6386    --
6387    P_CONT_INFORMATION16  :=
6388         hr_transaction_api.get_VARCHAR2_value
6389             (p_transaction_step_id => p_transaction_step_id
6390             ,p_name                => 'P_CONT_INFORMATION16');
6391    --
6392    P_CONT_INFORMATION17  :=
6393         hr_transaction_api.get_VARCHAR2_value
6394             (p_transaction_step_id => p_transaction_step_id
6395             ,p_name                => 'P_CONT_INFORMATION17');
6396    --
6397    P_CONT_INFORMATION18  :=
6398         hr_transaction_api.get_VARCHAR2_value
6399             (p_transaction_step_id => p_transaction_step_id
6400             ,p_name                => 'P_CONT_INFORMATION18');
6401    --
6402    P_CONT_INFORMATION19  :=
6403         hr_transaction_api.get_VARCHAR2_value
6404             (p_transaction_step_id => p_transaction_step_id
6405             ,p_name                => 'P_CONT_INFORMATION19');
6406    --
6407    P_CONT_INFORMATION20  :=
6408         hr_transaction_api.get_VARCHAR2_value
6409             (p_transaction_step_id => p_transaction_step_id
6410             ,p_name                => 'P_CONT_INFORMATION20');
6411    --
6412           hr_utility.set_location('End of setting the attributes:'||l_proc,15 );
6413           hr_utility.set_location('Exiting:'||l_proc, 20);
6414 
6415  EXCEPTION
6416    WHEN OTHERS THEN
6417       hr_utility.set_location('Exception:'||l_proc,555);
6418       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
6419       hr_utility.raise_error;
6420    --RAISE;
6421 
6422  END get_contact_from_tt;
6423  --
6424   /*
6425   ||===========================================================================
6426   || PROCEDURE: create_contact_tt
6427   ||---------------------------------------------------------------------------
6428   ||
6429   || Description:
6430   || Description:
6431   ||     This procedure will call the actual API -
6432   ||                hr_contact_rel_api.create_contact_tt()
6433   ||
6434   || Pre Conditions:
6435   ||
6436   || In Arguments:
6437   ||     Contains entire list of parameters that are defined in the actual
6438   ||     API. For details see pecrlapi.pkb file.
6439   ||
6440   || out nocopy Arguments:
6441   ||
6442   || In out nocopy Arguments:
6443   ||
6444   || Post Success:
6445   ||     Executes the API call.
6446   ||
6447   || Post Failure:
6448   ||     Raises an exception
6449   ||
6450   || Access Status:
6451   ||     Public.
6452   ||
6453   ||===========================================================================
6454   */
6455 
6456 procedure create_contact_tt
6457   (p_validate                     in        number     default 0
6458   ,p_start_date                   in        date
6459   ,p_business_group_id            in        number
6460   ,p_person_id                    in        number
6461   ,p_contact_person_id            in        number      default null
6462   ,p_contact_type                 in        varchar2
6463   ,p_ctr_comments                 in        varchar2    default null
6464   ,p_primary_contact_flag         in        varchar2    default 'N'
6465   ,p_date_start                   in        date        default null
6466   ,p_start_life_reason_id         in        number      default null
6467   ,p_date_end                     in        date        default null
6468   ,p_end_life_reason_id           in        number      default null
6469   ,p_rltd_per_rsds_w_dsgntr_flag  in        varchar2    default 'N'
6470   ,p_personal_flag                in        varchar2    default 'N'
6471   ,p_sequence_number              in        number      default null
6472   ,p_cont_attribute_category      in        varchar2    default null
6473   ,p_cont_attribute1              in        varchar2    default null
6474   ,p_cont_attribute2              in        varchar2    default null
6475   ,p_cont_attribute3              in        varchar2    default null
6476   ,p_cont_attribute4              in        varchar2    default null
6477   ,p_cont_attribute5              in        varchar2    default null
6478   ,p_cont_attribute6              in        varchar2    default null
6479   ,p_cont_attribute7              in        varchar2    default null
6480   ,p_cont_attribute8              in        varchar2    default null
6481   ,p_cont_attribute9              in        varchar2    default null
6482   ,p_cont_attribute10             in        varchar2    default null
6483   ,p_cont_attribute11             in        varchar2    default null
6484   ,p_cont_attribute12             in        varchar2    default null
6485   ,p_cont_attribute13             in        varchar2    default null
6486   ,p_cont_attribute14             in        varchar2    default null
6487   ,p_cont_attribute15             in        varchar2    default null
6488   ,p_cont_attribute16             in        varchar2    default null
6489   ,p_cont_attribute17             in        varchar2    default null
6490   ,p_cont_attribute18             in        varchar2    default null
6491   ,p_cont_attribute19             in        varchar2    default null
6492   ,p_cont_attribute20             in        varchar2    default null
6493   ,p_third_party_pay_flag         in        varchar2    default 'N'
6494   ,p_bondholder_flag              in        varchar2    default 'N'
6495   ,p_dependent_flag               in        varchar2    default 'N'
6496   ,p_beneficiary_flag             in        varchar2    default 'N'
6497   ,p_last_name                    in        varchar2    default null
6498   ,p_sex                          in        varchar2    default null
6499   ,p_person_type_id               in        number      default null
6500   ,p_per_comments                 in        varchar2    default null
6501   ,p_date_of_birth                in        date        default null
6502   ,p_email_address                in        varchar2    default null
6503   ,p_first_name                   in        varchar2    default null
6504   ,p_known_as                     in        varchar2    default null
6505   ,p_marital_status               in        varchar2    default null
6506   ,p_middle_names                 in        varchar2    default null
6507   ,p_nationality                  in        varchar2    default null
6508   ,p_national_identifier          in        varchar2    default null
6509   ,p_previous_last_name           in        varchar2    default null
6510   ,p_registered_disabled_flag     in        varchar2    default null
6511   ,p_title                        in        varchar2    default null
6512   ,p_work_telephone               in        varchar2    default null
6513   ,p_attribute_category           in        varchar2    default null
6514   ,p_attribute1                   in        varchar2    default null
6515   ,p_attribute2                   in        varchar2    default null
6516   ,p_attribute3                   in        varchar2    default null
6517   ,p_attribute4                   in        varchar2    default null
6518   ,p_attribute5                   in        varchar2    default null
6519   ,p_attribute6                   in        varchar2    default null
6520   ,p_attribute7                   in        varchar2    default null
6521   ,p_attribute8                   in        varchar2    default null
6522   ,p_attribute9                   in        varchar2    default null
6523   ,p_attribute10                  in        varchar2    default null
6524   ,p_attribute11                  in        varchar2    default null
6525   ,p_attribute12                  in        varchar2    default null
6526   ,p_attribute13                  in        varchar2    default null
6527   ,p_attribute14                  in        varchar2    default null
6528   ,p_attribute15                  in        varchar2    default null
6529   ,p_attribute16                  in        varchar2    default null
6530   ,p_attribute17                  in        varchar2    default null
6531   ,p_attribute18                  in        varchar2    default null
6532   ,p_attribute19                  in        varchar2    default null
6533   ,p_attribute20                  in        varchar2    default null
6534   ,p_attribute21                  in        varchar2    default null
6535   ,p_attribute22                  in        varchar2    default null
6536   ,p_attribute23                  in        varchar2    default null
6537   ,p_attribute24                  in        varchar2    default null
6538   ,p_attribute25                  in        varchar2    default null
6539   ,p_attribute26                  in        varchar2    default null
6540   ,p_attribute27                  in        varchar2    default null
6541   ,p_attribute28                  in        varchar2    default null
6542   ,p_attribute29                  in        varchar2    default null
6543   ,p_attribute30                  in        varchar2    default null
6544   ,p_per_information_category     in        varchar2    default null
6545   ,p_per_information1             in        varchar2    default null
6546   ,p_per_information2             in        varchar2    default null
6547   ,p_per_information3             in        varchar2    default null
6548   ,p_per_information4             in        varchar2    default null
6549   ,p_per_information5             in        varchar2    default null
6550   ,p_per_information6             in        varchar2    default null
6551   ,p_per_information7             in        varchar2    default null
6552   ,p_per_information8             in        varchar2    default null
6553   ,p_per_information9             in        varchar2    default null
6554   ,p_per_information10            in        varchar2    default null
6555   ,p_per_information11            in        varchar2    default null
6556   ,p_per_information12            in        varchar2    default null
6557   ,p_per_information13            in        varchar2    default null
6558   ,p_per_information14            in        varchar2    default null
6559   ,p_per_information15            in        varchar2    default null
6560   ,p_per_information16            in        varchar2    default null
6561   ,p_per_information17            in        varchar2    default null
6562   ,p_per_information18            in        varchar2    default null
6563   ,p_per_information19            in        varchar2    default null
6564   ,p_per_information20            in        varchar2    default null
6565   ,p_per_information21            in        varchar2    default null
6566   ,p_per_information22            in        varchar2    default null
6567   ,p_per_information23            in        varchar2    default null
6568   ,p_per_information24            in        varchar2    default null
6569   ,p_per_information25            in        varchar2    default null
6570   ,p_per_information26            in        varchar2    default null
6571   ,p_per_information27            in        varchar2    default null
6572   ,p_per_information28            in        varchar2    default null
6573   ,p_per_information29            in        varchar2    default null
6574   ,p_per_information30            in        varchar2    default null
6575   ,p_correspondence_language      in        varchar2    default null
6576   ,p_honors                       in        varchar2    default null
6577   ,p_pre_name_adjunct             in        varchar2    default null
6578   ,p_suffix                       in        varchar2    default null
6579   ,p_create_mirror_flag           in        varchar2    default 'N'
6580   ,p_mirror_type                  in        varchar2    default null
6581   ,p_mirror_cont_attribute_cat    in        varchar2    default null
6582   ,p_mirror_cont_attribute1       in        varchar2    default null
6583   ,p_mirror_cont_attribute2       in        varchar2    default null
6584   ,p_mirror_cont_attribute3       in        varchar2    default null
6585   ,p_mirror_cont_attribute4       in        varchar2    default null
6586   ,p_mirror_cont_attribute5       in        varchar2    default null
6587   ,p_mirror_cont_attribute6       in        varchar2    default null
6588   ,p_mirror_cont_attribute7       in        varchar2    default null
6589   ,p_mirror_cont_attribute8       in        varchar2    default null
6590   ,p_mirror_cont_attribute9       in        varchar2    default null
6591   ,p_mirror_cont_attribute10      in        varchar2    default null
6592   ,p_mirror_cont_attribute11      in        varchar2    default null
6593   ,p_mirror_cont_attribute12      in        varchar2    default null
6594   ,p_mirror_cont_attribute13      in        varchar2    default null
6595   ,p_mirror_cont_attribute14      in        varchar2    default null
6596   ,p_mirror_cont_attribute15      in        varchar2    default null
6597   ,p_mirror_cont_attribute16      in        varchar2    default null
6598   ,p_mirror_cont_attribute17      in        varchar2    default null
6599   ,p_mirror_cont_attribute18      in        varchar2    default null
6600   ,p_mirror_cont_attribute19      in        varchar2    default null
6601   ,p_mirror_cont_attribute20      in        varchar2    default null
6602   ,p_item_type                    in        varchar2
6603   ,p_item_key                     in        varchar2
6604   ,p_activity_id                  in        number
6605   ,p_action                       in        varchar2
6606   ,p_login_person_id              in        number
6607   ,p_process_section_name         in        varchar2
6608   ,p_review_page_region_code      in        varchar2 default null
6609 
6610   ,p_adjusted_svc_date            in      date     default null
6611   ,p_datetrack_update_mode        in      varchar2 default hr_api.g_correction -- 9999
6612   ,p_applicant_number             in      varchar2 default null
6613   ,p_background_check_status      in      varchar2 default null
6614   ,p_background_date_check        in      date     default null
6615   ,p_benefit_group_id             in      number   default null
6616   ,p_blood_type                   in      varchar2 default null
6617   ,p_coord_ben_med_pln_no         in      varchar2 default null
6618   ,p_coord_ben_no_cvg_flag        in      varchar2 default null
6619   ,p_country_of_birth             in      varchar2 default null
6620   ,p_date_employee_data_verified  in      date     default null
6621   ,p_date_of_death                in      date     default null
6622   ,p_dpdnt_adoption_date          in      date     default null
6623   ,p_dpdnt_vlntry_svce_flag       in      varchar2 default null
6624   ,p_employee_number              in out nocopy  varchar2
6625   ,p_expense_check_send_to_addres in      varchar2 default null
6626   ,p_fast_path_employee           in      varchar2 default null
6627   ,p_fte_capacity                 in      number   default null
6628   ,p_global_person_id             in      varchar2 default null
6629   ,p_hold_applicant_date_until    in      date     default null
6630   ,p_internal_location            in      varchar2 default null
6631   ,p_last_medical_test_by         in      varchar2 default null
6632   ,p_last_medical_test_date       in      date     default null
6633   ,p_mailstop                     in      varchar2 default null
6634   ,p_office_number                in      varchar2 default null
6635   ,p_on_military_service          in      varchar2 default null
6636   ,p_original_date_of_hire        in      date     default null
6637   ,p_projected_start_date         in      date     default null
6638   ,p_receipt_of_death_cert_date   in      date     default null
6639   ,p_region_of_birth              in      varchar2 default null
6640   ,p_rehire_authorizor            in      varchar2 default null
6641   ,p_rehire_recommendation        in      varchar2 default null
6642   ,p_rehire_reason                in      varchar2 default null
6643   ,p_resume_exists                in      varchar2 default null
6644   ,p_resume_last_updated          in      date     default null
6645   ,p_second_passport_exists       in      varchar2 default null
6646   ,p_student_status               in      varchar2 default null
6647   ,p_town_of_birth                in      varchar2 default null
6648   ,p_uses_tobacco_flag            in      varchar2 default null
6649   ,p_vendor_id                    in      number   default null
6650   ,p_work_schedule                in      varchar2 default null
6651   ,p_contact_operation            in      varchar2 default null
6652   ,p_emrg_cont_flag               in      varchar2 default 'N'
6653   ,p_dpdnt_bnf_flag               in      varchar2 default 'N'
6654   ,p_save_mode                    in      varchar2  default null
6655 -- Added new paramets
6656   ,P_CONT_INFORMATION_CATEGORY 	  in      varchar2    default null
6657   ,P_CONT_INFORMATION1            in      varchar2    default null
6658   ,P_CONT_INFORMATION2            in      varchar2    default null
6659   ,P_CONT_INFORMATION3            in      varchar2    default null
6660   ,P_CONT_INFORMATION4            in      varchar2    default null
6661   ,P_CONT_INFORMATION5            in      varchar2    default null
6662   ,P_CONT_INFORMATION6            in      varchar2    default null
6663   ,P_CONT_INFORMATION7            in      varchar2    default null
6664   ,P_CONT_INFORMATION8            in      varchar2    default null
6665   ,P_CONT_INFORMATION9            in      varchar2    default null
6666   ,P_CONT_INFORMATION10           in      varchar2    default null
6667   ,P_CONT_INFORMATION11           in      varchar2    default null
6668   ,P_CONT_INFORMATION12           in      varchar2    default null
6669   ,P_CONT_INFORMATION13           in      varchar2    default null
6670   ,P_CONT_INFORMATION14           in      varchar2    default null
6671   ,P_CONT_INFORMATION15           in      varchar2    default null
6672   ,P_CONT_INFORMATION16           in      varchar2    default null
6673   ,P_CONT_INFORMATION17           in      varchar2    default null
6674   ,P_CONT_INFORMATION18           in      varchar2    default null
6675   ,P_CONT_INFORMATION19           in      varchar2    default null
6676   ,P_CONT_INFORMATION20           in      varchar2    default null
6677 --bug 4634855
6678   ,P_MIRROR_CONT_INFORMATION_CAT  in      varchar2    default null
6679   ,P_MIRROR_CONT_INFORMATION1     in      varchar2    default null
6680   ,P_MIRROR_CONT_INFORMATION2     in      varchar2    default null
6681   ,P_MIRROR_CONT_INFORMATION3     in      varchar2    default null
6682   ,P_MIRROR_CONT_INFORMATION4     in      varchar2    default null
6683   ,P_MIRROR_CONT_INFORMATION5     in      varchar2    default null
6684   ,P_MIRROR_CONT_INFORMATION6     in      varchar2    default null
6685   ,P_MIRROR_CONT_INFORMATION7     in      varchar2    default null
6686   ,P_MIRROR_CONT_INFORMATION8     in      varchar2    default null
6687   ,P_MIRROR_CONT_INFORMATION9     in      varchar2    default null
6688   ,P_MIRROR_CONT_INFORMATION10     in      varchar2    default null
6689   ,P_MIRROR_CONT_INFORMATION11     in      varchar2    default null
6690   ,P_MIRROR_CONT_INFORMATION12     in      varchar2    default null
6691   ,P_MIRROR_CONT_INFORMATION13     in      varchar2    default null
6692   ,P_MIRROR_CONT_INFORMATION14     in      varchar2    default null
6693   ,P_MIRROR_CONT_INFORMATION15     in      varchar2    default null
6694   ,P_MIRROR_CONT_INFORMATION16     in      varchar2    default null
6695   ,P_MIRROR_CONT_INFORMATION17     in      varchar2    default null
6696   ,P_MIRROR_CONT_INFORMATION18     in      varchar2    default null
6697   ,P_MIRROR_CONT_INFORMATION19     in      varchar2    default null
6698   ,P_MIRROR_CONT_INFORMATION20     in      varchar2    default null
6699 
6700   ,p_contact_relationship_id      out nocopy number
6701   ,p_ctr_object_version_number    out nocopy number
6702   ,p_per_person_id                out nocopy number
6703   ,p_per_object_version_number    out nocopy number
6704   ,p_per_effective_start_date     out nocopy date
6705   ,p_per_effective_end_date       out nocopy date
6706   ,p_full_name                    out nocopy varchar2
6707   ,p_per_comment_id               out nocopy number
6708   ,p_con_name_combination_warning out nocopy varchar2
6709   ,p_per_name_combination_warning out nocopy varchar2
6710   ,p_con_orig_hire_warning            out nocopy varchar2
6711   ,p_per_orig_hire_warning            out nocopy varchar2
6712   ,p_per_assign_payroll_warning       out nocopy varchar2
6713   ,p_ni_duplicate_warn_or_err   out nocopy varchar2
6714 
6715  )
6716  IS
6717   l_count                        INTEGER := 0;
6718   l_transaction_table            hr_transaction_ss.transaction_table;
6719   l_transaction_step_id          hr_api_transaction_steps.transaction_step_id%type;
6720   l_object_version_number        hr_api_transaction_steps.object_version_number%type;
6721   l_attribute_update_mode        varchar2(100) default  null;
6722   l_validate_mode                boolean  default false;
6723   l_con_name_combination_warning boolean;
6724   l_per_name_combination_warning boolean;
6725   l_con_orig_hire_warning        boolean;
6726   l_per_orig_hire_warning        boolean;
6727   l_con_assign_payroll_warning   boolean;
6728   l_per_assign_payroll_warning   boolean;
6729   l_con_rec_changed              boolean default false ;
6730   --
6731   -- StartRegistration changes
6732   --
6733   l_start_life_reason_id              number := null;
6734   l_end_life_reason_id                number := null;
6735   l_contact_relationship_id           number := null;
6736   l_sequence_number                   number := null;
6737   l_person_type_id                    number := null;
6738   --
6739   l_person_id                         number := null;
6740   l_transaction_id                    number default null;
6741   l_trans_obj_vers_num                number default null;
6742   l_result                            varchar2(100) default null;
6743   l_reg_per_ovn                       number default null;
6744   l_reg_employee_number               number default null;
6745   l_reg_asg_ovn                       number default null;
6746   l_reg_full_name                     per_all_people_f.full_name%type default null;
6747   l_reg_assignment_id                 number;
6748   l_reg_per_effective_start_date      date;
6749   l_reg_per_effective_end_date        date;
6750   l_reg_per_comment_id                number;
6751   l_reg_assignment_sequence           number;
6752   l_reg_assignment_number             varchar2(50);
6753   l_reg_name_combination_warning      boolean;
6754   l_reg_assign_payroll_warning        boolean;
6755   l_reg_orig_hire_warning             boolean;
6756   --Startregistration
6757   l_contact_set                       number;
6758   l_primary_contact_added             number := 0;
6759   --
6760   -- EndRegistration
6761   -- bug# 2168275, 2123868
6762   l_validate_g_per_step_id            number;
6763   l_main_per_eff_start_date           date;
6764   l_main_per_date_of_birth            date;
6765   l_start_date                        date;
6766   -- bug# 2315163
6767   l_is_emergency_contact              varchar2(50) default null;
6768   l_is_dpdnt_bnf                      varchar2(50) default null;
6769   l_proc   varchar2(72)  := g_package||'create_contact_tt';
6770 
6771 --
6772 BEGIN
6773   --
6774 hr_utility.set_location('Entering:'||l_proc, 5);
6775 
6776 -- Bug no:2263008 fix begins
6777 
6778 check_ni_unique(
6779   p_national_identifier => p_national_identifier
6780   ,p_business_group_id => p_business_group_id
6781   ,p_person_id => p_contact_person_id
6782   ,p_ni_duplicate_warn_or_err => p_ni_duplicate_warn_or_err);
6783 
6784 --Bug no:2263008 fix ends.
6785   --
6786 -- bug#  2146328
6787   IF p_primary_contact_flag = 'Y' then
6788 
6789        -- Check if there are already any contacts as primary added.
6790        --
6791       hr_utility.set_location('IF p_primary_contact_flag =Y :'||l_proc,10 );
6792       BEGIN
6793          select count(hats.transaction_step_id)
6794          into   l_primary_contact_added
6795          from   hr_api_transaction_steps hats,
6796                 hr_api_transaction_values hatv
6797          where  hats.item_type = p_item_type
6798          and    hats.item_key  = p_item_key
6799          and    hats.api_name  = 'HR_PROCESS_CONTACT_SS.PROCESS_CREATE_CONTACT_API'
6800          and    hats.transaction_step_id = hatv.transaction_step_id
6801          and    hatv.varchar2_value = 'Y'
6802          and    hatv.name = upper('p_primary_contact_flag');
6803 
6804         hr_utility.set_location(
6805            'HR_PROCESS_CONTACT_SS.create_contact_tt : Check if primary contact already added in previous step : '||l_primary_contact_added, 2146328);
6806 
6807       EXCEPTION
6808          WHEN others THEN
6809            null;
6810 
6811       END;
6812 
6813       IF l_primary_contact_added >0 then
6814 
6815          hr_utility.set_location('l_primary_contact_added >0:'||l_proc,15 );
6816          hr_utility.set_message(800, 'PER_289574_EMP_CON_PRIMARY');
6817          hr_utility.raise_error;
6818 
6819 
6820       END IF;
6821 
6822   END IF;   --p_primary_contact_flag = 'Y'
6823 
6824 --end bug#2146328
6825 
6826   SAVEPOINT create_contact_tt_start;
6827   --
6828   IF upper(p_action) = g_change
6829   THEN
6830      l_attribute_update_mode := g_attribute_update;
6831   ELSE
6832      IF upper(p_action) = g_correct
6833      THEN
6834         l_attribute_update_mode := g_attribute_correct;
6835      END IF;
6836   END IF;
6837   hr_utility.set_location('Setting l_attribute_update_mode ', 20);
6838   --
6839   hr_utility.set_location('Calling hr_contact_rel_api.create_contact', 25);
6840   --
6841   -- Call the actual API.
6842   --
6843   -- Check if the record has changed is not necessary as it's a create.
6844   --
6845   -- The validate_mode for calling the create_contact
6846   -- api should always be set to true.
6847   --
6848   IF p_validate = 1 OR p_validate IS NULL
6849   THEN
6850       l_validate_mode := false;
6851   ELSE
6852       l_validate_mode := true;
6853   END IF;
6854   --
6855   -- StartRegistration changes
6856   --
6857   l_person_id := p_person_id;
6858 
6859  /*
6860 --  bug # 2168275
6861    requirement : If relation_ship_start_date < (DOB of Employee) or (DOB of Contact), then
6862                  raise error message PER_50386_CON_SDT_LES_EMP_BDT.
6863 
6864     1. Get emplyee record start date
6865 
6866         if employee id is available, then
6867             get  Employee_DOB from per_people_f
6868         else
6869             get Employee_DOB from transaction_step
6870 
6871     1. if l_main_per_date_of_birth is not null and l_main_per_date_of_birth > p_date_start then
6872         raise error;
6873         set errormessage .....
6874     elsif p_date_of_birth is not null and p_date_of_birth > p_date_start then
6875         raise error;
6876         set errormessage .....
6877 
6878     2. Compare the DOBs with  p_date_start
6879         If  Employee_DOB > p_date_start then
6880             raise error.
6881         Else
6882             If  p_date_of_birth > p_date_start then
6883             raise error.
6884 
6885 --  end bug # 2168275
6886 
6887 --  bug # 2123868
6888    requirement : Contact record Start Date should be last of
6889                 A.  Earliest contact Relation ship start dates
6890                 B.  Employee Person reocrd Start date
6891 
6892     1. Get emplyee record start date
6893 
6894         If employee id is available, then
6895             get employee_effective_start_date from per_people_f
6896         Else
6897             get the employee_effective_start_date from trx
6898 
6899     2. Set p_date_start to last of
6900 
6901          begin
6902          if contact_person_id not null them
6903             get l_ear_con_Rel_start_date from per_contact_relationships
6904             set l_ear_con_Rel_start_date to  l_start_date
6905          else
6906             set relation_ship_start_date to  l_start_date
6907          exception
6908          end
6909 
6910          If employee_effective_start_date > l_start_date  then
6911             set l_start_date to employee_effective_start_date
6912 
6913 --  end bug # 2123868
6914 
6915 
6916 
6917   --bug # 2168275,2123868
6918   begin
6919 
6920     if l_person_id is not null then
6921         select  min(p.date_of_birth) , min(p.effective_start_date)
6922         into    l_main_per_date_of_birth , l_main_per_eff_start_date
6923         from    per_people_f p
6924         where   p.person_id = l_person_id;
6925     else
6926         begin
6927             select nvl(max(hats1.transaction_step_id),0)
6928             into   l_validate_g_per_step_id
6929             from   hr_api_transaction_steps hats1
6930             where  hats1.item_type = 'HRSSA'
6931             and    hats1.item_key  = p_item_key
6932             and    hats1.api_name  in( 'HR_PROCESS_PERSON_SS.PROCESS_API', 'BEN_PROCESS_COBRA_PERSON_SS.PROCESS_API');
6933 
6934             l_main_per_date_of_birth := hr_transaction_api.get_date_value
6935                                 (p_transaction_step_id => l_validate_g_per_step_id
6936                                 ,p_name => 'P_DATE_OF_BIRTH') ;
6937 
6938             l_main_per_eff_start_date := hr_transaction_api.get_date_value
6939                                 (p_transaction_step_id => l_validate_g_per_step_id
6940                                 ,p_name => 'P_EFFECTIVE_DATE');
6941 
6942         exception
6943             when others then
6944             null;
6945         end;
6946 
6947     end if; --l_person_id is/not null
6948 
6949     -- raise error if relationship start date is earlier tahn date of birth
6950 -- fix for bug # 2221040
6951     if  nvl(p_save_mode, 'NVL') <> 'SAVE_FOR_LATER'
6952       then
6953        if l_main_per_date_of_birth is not null and l_main_per_date_of_birth > p_date_start then
6954           hr_utility.set_message(800, 'PER_50386_CON_SDT_LES_EMP_BDT');
6955           hr_utility.raise_error;
6956        elsif p_date_of_birth is not null and p_date_of_birth > p_date_start then
6957           hr_utility.set_message(800, 'PER_50386_CON_SDT_LES_EMP_BDT');
6958           hr_utility.raise_error;
6959        end if;
6960     end if;
6961 */
6962 begin
6963 
6964 l_main_per_eff_start_date := p_date_start;
6965 
6966 validate_rel_start_date (
6967    p_person_id     => p_person_id
6968   ,p_item_key      => p_item_key
6969   ,p_save_mode     => p_save_mode
6970   ,p_date_start    => l_main_per_eff_start_date
6971   ,p_date_of_birth => p_date_of_birth);
6972 
6973     l_start_date :=  p_start_date ;
6974 
6975     if p_contact_person_id is not null then
6976 
6977         begin
6978            hr_utility.set_location('if p_contact_person_id is not null then'||l_proc,30 );
6979             select min(date_start)
6980             into   l_start_date
6981             from   per_contact_relationships
6982             where  contact_person_id = p_contact_person_id;
6983         exception
6984             when others then
6985             null;
6986         end;
6987    /* bug #2224609
6988     else
6989         l_start_date := p_date_start;
6990    */
6991     end if;
6992 
6993     if l_main_per_eff_start_date > l_start_date  then
6994         l_start_date := l_main_per_eff_start_date;
6995     end if;
6996 
6997   end;
6998   -- end bug # 2168275,2123868
6999   --
7000   if (l_person_id is null or l_person_id = -1) and
7001      nvl(p_save_mode, 'NVL') <> 'SAVE_FOR_LATER'
7002   then
7003      hr_utility.set_location('l_person_id is null or l_person_id = -1 and not SFL'||l_proc,35 );
7004      --
7005      -- Either create a dummy person or temp solution use the p_login_person_id
7006      --
7007      -- l_person_id := p_login_person_id; This is for testing only.
7008       hr_employee_api.create_employee
7009       (p_validate                      => false  --in     boolean  default false
7010       --,p_hire_date                     => nvl(p_start_date,trunc(sysdate))
7011       ,p_hire_date                     => nvl(l_start_date,trunc(sysdate))
7012       ,p_business_group_id             => p_business_group_id
7013       ,p_last_name                     => 'XXX_MR_REGI'
7014       ,p_sex                           => 'M'
7015       ,p_employee_number               => l_reg_employee_number         --   in out varchar2
7016       ,p_person_id                     => l_person_id                   --   out number
7017       ,p_assignment_id                 => l_reg_assignment_id           --   out number
7018       ,p_per_object_version_number     => l_reg_per_ovn                 --   out number
7019       ,p_asg_object_version_number     => l_reg_asg_ovn                 --   out number
7020       ,p_per_effective_start_date      => l_reg_per_effective_start_date --   out date
7021       ,p_per_effective_end_date        => l_reg_per_effective_end_date   --   out date
7022       ,p_full_name                     => l_reg_full_name                --   out varchar2
7023       ,p_per_comment_id                => l_reg_per_comment_id           --   out number
7024       ,p_assignment_sequence           => l_reg_assignment_sequence      --   out number
7025       ,p_assignment_number             => l_reg_assignment_number        --   out varchar2
7026       ,p_name_combination_warning      => l_reg_name_combination_warning --   out boolean
7027       ,p_assign_payroll_warning        => l_reg_assign_payroll_warning   --   out boolean
7028       ,p_orig_hire_warning             => l_reg_orig_hire_warning        --  out boolean
7029       );
7030      --
7031   end if;
7032   --
7033   -- EndRegistration
7034   --
7035   l_start_life_reason_id  := p_start_life_reason_id;
7036   if  p_start_life_reason_id <=0 then
7037       l_start_life_reason_id  := null;
7038   end if;
7039 
7040   l_end_life_reason_id      := p_end_life_reason_id;
7041   if p_end_life_reason_id   <= 0 then
7042      l_end_life_reason_id      := null;
7043   end if;
7044 
7045   l_contact_relationship_id := p_contact_relationship_id;
7046   if p_contact_relationship_id  <= 0 then
7047      l_contact_relationship_id   := null;
7048   end if;
7049 
7050   l_sequence_number  := p_sequence_number;
7051   if p_sequence_number  <= 0 then
7052      l_sequence_number  := null;
7053   end if;
7054 
7055   l_person_type_id :=  p_person_type_id ;
7056   if (p_person_type_id <= 0 OR p_person_type_id is null) then
7057      l_person_type_id :=  hr_person_type_usage_info.get_default_person_type_id
7058                  (p_business_group_id,
7059               'OTHER');
7060   end if;
7061   --
7062   -- set the validation to false as the person_id is necessary for
7063   -- update_person api.
7064   --
7065   if  nvl(p_save_mode, 'NVL') <> 'SAVE_FOR_LATER'
7066   then
7067        hr_utility.set_location('p_save_mode not SFL'||l_proc,40 );
7068 
7069    --
7070  -- Bug 3152505 : calling call_contact_api
7071  --   hr_contact_rel_api.create_contact(
7072     call_contact_api(
7073     p_validate                 		=>  false -- l_validate_mode
7074    ,p_start_date               		=>  l_start_date --p_start_date
7075    ,p_business_group_id        		=>  p_business_group_id
7076    ,p_person_id                		=>  l_person_id
7077    ,p_contact_person_id        		=>  p_contact_person_id
7078    ,p_contact_type             		=>  p_contact_type
7079    ,p_ctr_comments             		=>  p_ctr_comments
7080    ,p_primary_contact_flag     		=>  p_primary_contact_flag
7081    ,p_date_start               		=>  p_date_start
7082    ,p_start_life_reason_id     		=>  l_start_life_reason_id
7083    ,p_date_end                 		=>  p_date_end
7084    ,p_end_life_reason_id       		=>  l_end_life_reason_id
7085    ,p_rltd_per_rsds_w_dsgntr_flag     	=>  p_rltd_per_rsds_w_dsgntr_flag
7086    ,p_personal_flag                   	=>  p_personal_flag
7087    ,p_sequence_number                 	=>  l_sequence_number
7088    ,p_cont_attribute_category     	=>  p_cont_attribute_category
7089    ,p_cont_attribute1                 	=>  p_cont_attribute1
7090    ,p_cont_attribute2                 	=>  p_cont_attribute2
7091    ,p_cont_attribute3                 	=>  p_cont_attribute3
7092    ,p_cont_attribute4                 	=>  p_cont_attribute4
7093    ,p_cont_attribute5     		=>  p_cont_attribute5
7094    ,p_cont_attribute6     		=>  p_cont_attribute6
7095    ,p_cont_attribute7     		=>  p_cont_attribute7
7096    ,p_cont_attribute8     		=>  p_cont_attribute8
7097    ,p_cont_attribute9     		=>  p_cont_attribute9
7098    ,p_cont_attribute10     		=>  p_cont_attribute10
7099    ,p_cont_attribute11     		=>  p_cont_attribute11
7100    ,p_cont_attribute12     		=>  p_cont_attribute12
7101    ,p_cont_attribute13     		=>  p_cont_attribute13
7102    ,p_cont_attribute14     		=>  p_cont_attribute14
7103    ,p_cont_attribute15     		=>  p_cont_attribute15
7104    ,p_cont_attribute16     		=>  p_cont_attribute16
7105    ,p_cont_attribute17     		=>  p_cont_attribute17
7106    ,p_cont_attribute18     		=>  p_cont_attribute18
7107    ,p_cont_attribute19     		=>  p_cont_attribute19
7108    ,p_cont_attribute20    		=>  p_cont_attribute20
7109    ,p_third_party_pay_flag     		=>  p_third_party_pay_flag
7110    ,p_bondholder_flag     		=>  p_bondholder_flag
7111    ,p_dependent_flag     		=>  p_dependent_flag
7112    ,p_beneficiary_flag     		=>  p_beneficiary_flag
7113    ,p_last_name     			=>  p_last_name
7114    ,p_sex     				=>  p_sex
7115    ,p_person_type_id     		=>  l_person_type_id
7116    ,p_per_comments     			=>  p_per_comments
7117    ,p_date_of_birth     		=>  p_date_of_birth
7118    ,p_email_address     		=>  p_email_address
7119    ,p_first_name     			=>  p_first_name
7120    ,p_known_as     			=>  p_known_as
7121    ,p_marital_status     		=>  p_marital_status
7122    ,p_middle_names     			=>  p_middle_names
7123    ,p_nationality     			=>  p_nationality
7124    ,p_national_identifier     		=>  p_national_identifier
7125    ,p_previous_last_name     		=>  p_previous_last_name
7126    ,p_registered_disabled_flag     	=>  p_registered_disabled_flag
7127    ,p_title     			=>  p_title
7128    ,p_work_telephone     		=>  p_work_telephone
7129    ,p_attribute_category     		=>  p_attribute_category
7130    ,p_attribute1     			=>  p_attribute1
7131    ,p_attribute2     			=>  p_attribute2
7132    ,p_attribute3     			=>  p_attribute3
7133    ,p_attribute4     			=>  p_attribute4
7134    ,p_attribute5     			=>  p_attribute5
7135    ,p_attribute6     			=>  p_attribute6
7136    ,p_attribute7     			=>  p_attribute7
7137    ,p_attribute8     			=>  p_attribute8
7138    ,p_attribute9     			=>  p_attribute9
7139    ,p_attribute10     			=>  p_attribute10
7140    ,p_attribute11     			=>  p_attribute11
7141    ,p_attribute12     			=>  p_attribute12
7142    ,p_attribute13     			=>  p_attribute13
7143    ,p_attribute14     			=>  p_attribute14
7144    ,p_attribute15     			=>  p_attribute15
7145    ,p_attribute16     			=>  p_attribute16
7146    ,p_attribute17     			=>  p_attribute17
7147    ,p_attribute18     			=>  p_attribute18
7148    ,p_attribute19     			=>  p_attribute19
7149    ,p_attribute20     			=>  p_attribute20
7150    ,p_attribute21     			=>  p_attribute21
7151    ,p_attribute22     			=>  p_attribute22
7152    ,p_attribute23     			=>  p_attribute23
7153    ,p_attribute24     			=>  p_attribute24
7154    ,p_attribute25     			=>  p_attribute25
7155    ,p_attribute26     			=>  p_attribute26
7156    ,p_attribute27     			=>  p_attribute27
7157    ,p_attribute28     			=>  p_attribute28
7158    ,p_attribute29     			=>  p_attribute29
7159    ,p_attribute30     			=>  p_attribute30
7160    ,p_per_information_category     	=>  p_per_information_category
7161    ,p_per_information1      =>  p_per_information1
7162    ,p_per_information2      =>  p_per_information2
7163    ,p_per_information3      =>  p_per_information3
7164    ,p_per_information4      =>  p_per_information4
7165    ,p_per_information5      =>  p_per_information5
7166    ,p_per_information6      =>  p_per_information6
7167    ,p_per_information7      =>  p_per_information7
7168    ,p_per_information8      =>  p_per_information8
7169    ,p_per_information9      =>  p_per_information9
7170    ,p_per_information10     =>  p_per_information10
7171    ,p_per_information11     =>  p_per_information11
7172    ,p_per_information12     =>  p_per_information12
7173    ,p_per_information13     =>  p_per_information13
7174    ,p_per_information14     =>  p_per_information14
7175    ,p_per_information15     =>  p_per_information15
7176    ,p_per_information16     =>  p_per_information16
7177    ,p_per_information17     =>  p_per_information17
7178    ,p_per_information18     =>  p_per_information18
7179    ,p_per_information19     =>  p_per_information19
7180    ,p_per_information20     =>  p_per_information20
7181    ,p_per_information21     =>  p_per_information21
7182    ,p_per_information22     =>  p_per_information22
7183    ,p_per_information23     =>  p_per_information23
7184    ,p_per_information24     =>  p_per_information24
7185    ,p_per_information25     =>  p_per_information25
7186    ,p_per_information26     =>  p_per_information26
7187    ,p_per_information27     =>  p_per_information27
7188    ,p_per_information28     =>  p_per_information28
7189    ,p_per_information29     =>  p_per_information29
7190    ,p_per_information30     =>  p_per_information30
7191    ,p_correspondence_language   =>  p_correspondence_language
7192    ,p_honors     		=>  p_honors
7193    ,p_pre_name_adjunct     	=>  p_pre_name_adjunct
7194    ,p_suffix     		=>  p_suffix
7195    ,p_create_mirror_flag     	=>  p_create_mirror_flag
7196    ,p_mirror_type     		=>  p_mirror_type
7197    ,p_mirror_cont_attribute_cat   =>  p_mirror_cont_attribute_cat
7198    ,p_mirror_cont_attribute1      =>  p_mirror_cont_attribute1
7199    ,p_mirror_cont_attribute2      =>  p_mirror_cont_attribute2
7200    ,p_mirror_cont_attribute3      =>  p_mirror_cont_attribute3
7201    ,p_mirror_cont_attribute4      =>  p_mirror_cont_attribute4
7202    ,p_mirror_cont_attribute5      =>  p_mirror_cont_attribute5
7203    ,p_mirror_cont_attribute6      =>  p_mirror_cont_attribute6
7204    ,p_mirror_cont_attribute7      =>  p_mirror_cont_attribute7
7205    ,p_mirror_cont_attribute8      =>  p_mirror_cont_attribute8
7206    ,p_mirror_cont_attribute9      =>  p_mirror_cont_attribute9
7207    ,p_mirror_cont_attribute10     =>  p_mirror_cont_attribute10
7208    ,p_mirror_cont_attribute11     =>  p_mirror_cont_attribute11
7209    ,p_mirror_cont_attribute12     =>  p_mirror_cont_attribute12
7210    ,p_mirror_cont_attribute13     =>  p_mirror_cont_attribute13
7211    ,p_mirror_cont_attribute14     =>  p_mirror_cont_attribute14
7212    ,p_mirror_cont_attribute15     =>  p_mirror_cont_attribute15
7213    ,p_mirror_cont_attribute16     =>  p_mirror_cont_attribute16
7214    ,p_mirror_cont_attribute17     =>  p_mirror_cont_attribute17
7215    ,p_mirror_cont_attribute18     =>  p_mirror_cont_attribute18
7216    ,p_mirror_cont_attribute19     =>  p_mirror_cont_attribute19
7217    ,p_mirror_cont_attribute20     =>  p_mirror_cont_attribute20
7218    ,P_CONT_INFORMATION_CATEGORY   => P_CONT_INFORMATION_CATEGORY
7219    ,P_CONT_INFORMATION1           => P_CONT_INFORMATION1
7220    ,P_CONT_INFORMATION2           => P_CONT_INFORMATION2
7221    ,P_CONT_INFORMATION3           => P_CONT_INFORMATION3
7222    ,P_CONT_INFORMATION4           => P_CONT_INFORMATION4
7223    ,P_CONT_INFORMATION5           => P_CONT_INFORMATION5
7224    ,P_CONT_INFORMATION6           => P_CONT_INFORMATION6
7225    ,P_CONT_INFORMATION7           => P_CONT_INFORMATION7
7226    ,P_CONT_INFORMATION8           => P_CONT_INFORMATION8
7227    ,P_CONT_INFORMATION9           => P_CONT_INFORMATION9
7228    ,P_CONT_INFORMATION10          => P_CONT_INFORMATION10
7229    ,P_CONT_INFORMATION11          => P_CONT_INFORMATION11
7230    ,P_CONT_INFORMATION12          => P_CONT_INFORMATION12
7231    ,P_CONT_INFORMATION13          => P_CONT_INFORMATION13
7232    ,P_CONT_INFORMATION14          => P_CONT_INFORMATION14
7233    ,P_CONT_INFORMATION15          => P_CONT_INFORMATION15
7234    ,P_CONT_INFORMATION16          => P_CONT_INFORMATION16
7235    ,P_CONT_INFORMATION17          => P_CONT_INFORMATION17
7236    ,P_CONT_INFORMATION18          => P_CONT_INFORMATION18
7237    ,P_CONT_INFORMATION19          => P_CONT_INFORMATION19
7238    ,P_CONT_INFORMATION20          => P_CONT_INFORMATION20
7239    ,P_MIRROR_CONT_INFORMATION_CAT => P_MIRROR_CONT_INFORMATION_CAT
7240    ,P_MIRROR_CONT_INFORMATION1    => P_MIRROR_CONT_INFORMATION1
7241    ,P_MIRROR_CONT_INFORMATION2    => P_MIRROR_CONT_INFORMATION2
7242    ,P_MIRROR_CONT_INFORMATION3    => P_MIRROR_CONT_INFORMATION3
7243    ,P_MIRROR_CONT_INFORMATION4    => P_MIRROR_CONT_INFORMATION4
7244    ,P_MIRROR_CONT_INFORMATION5    => P_MIRROR_CONT_INFORMATION5
7245    ,P_MIRROR_CONT_INFORMATION6    => P_MIRROR_CONT_INFORMATION6
7246    ,P_MIRROR_CONT_INFORMATION7    => P_MIRROR_CONT_INFORMATION7
7247    ,P_MIRROR_CONT_INFORMATION8    => P_MIRROR_CONT_INFORMATION8
7248    ,P_MIRROR_CONT_INFORMATION9    => P_MIRROR_CONT_INFORMATION9
7249    ,P_MIRROR_CONT_INFORMATION10    => P_MIRROR_CONT_INFORMATION10
7250    ,P_MIRROR_CONT_INFORMATION11    => P_MIRROR_CONT_INFORMATION11
7251    ,P_MIRROR_CONT_INFORMATION12    => P_MIRROR_CONT_INFORMATION12
7252    ,P_MIRROR_CONT_INFORMATION13    => P_MIRROR_CONT_INFORMATION13
7253    ,P_MIRROR_CONT_INFORMATION14    => P_MIRROR_CONT_INFORMATION14
7254    ,P_MIRROR_CONT_INFORMATION15    => P_MIRROR_CONT_INFORMATION15
7255    ,P_MIRROR_CONT_INFORMATION16    => P_MIRROR_CONT_INFORMATION16
7256    ,P_MIRROR_CONT_INFORMATION17    => P_MIRROR_CONT_INFORMATION17
7257    ,P_MIRROR_CONT_INFORMATION18    => P_MIRROR_CONT_INFORMATION18
7258    ,P_MIRROR_CONT_INFORMATION19    => P_MIRROR_CONT_INFORMATION19
7259    ,P_MIRROR_CONT_INFORMATION20    => P_MIRROR_CONT_INFORMATION20
7260    ,p_contact_relationship_id     => l_contact_relationship_id
7261    ,p_ctr_object_version_number   => p_ctr_object_version_number
7262    ,p_per_person_id               => p_per_person_id
7263    ,p_per_object_version_number   => p_per_object_version_number
7264    ,p_per_effective_start_date    => p_per_effective_start_date
7265    ,p_per_effective_end_date      => p_per_effective_end_date
7266    ,p_full_name                   => p_full_name
7267    ,p_per_comment_id              => p_per_comment_id
7268    ,p_name_combination_warning    => l_con_name_combination_warning
7269    ,p_orig_hire_warning           => l_con_orig_hire_warning
7270    ,p_contact_operation           => p_contact_operation
7271    ,p_emrg_cont_flag              => p_emrg_cont_flag
7272    );
7273    --
7274   end if;
7275   --
7276   -- Validating the update_person
7277   --
7278 
7279   hr_utility.set_location('After calling validate proceses ', 45);
7280   --
7281   IF hr_errors_api.errorExists
7282   THEN
7283      hr_utility.set_location('api error exists hr_contact_rel_api.create_contact', 50);
7284      rollback to create_contact_tt_start  ;
7285      raise g_data_error;
7286   END IF;
7287 
7288    l_con_rec_changed := is_con_rec_changed(
7289     p_adjusted_svc_date     	=>  p_adjusted_svc_date
7290    ,p_applicant_number     	=>  p_applicant_number
7291    ,p_background_check_status   =>  p_background_check_status
7292    ,p_background_date_check     =>  p_background_date_check
7293    ,p_benefit_group_id     	=>  p_benefit_group_id
7294    ,p_blood_type     		=>  p_blood_type
7295    ,p_coord_ben_med_pln_no     	=>  p_coord_ben_med_pln_no
7296    ,p_coord_ben_no_cvg_flag     =>  p_coord_ben_no_cvg_flag
7297    ,p_country_of_birth     	=>  p_country_of_birth
7298    ,p_date_employee_data_verified  =>  p_date_employee_data_verified
7299    ,p_date_of_death     	=>  p_date_of_death
7300    ,p_dpdnt_adoption_date     	=>  p_dpdnt_adoption_date
7301    ,p_dpdnt_vlntry_svce_flag    =>  p_dpdnt_vlntry_svce_flag
7302    ,p_expense_check_send_to_addres     =>  p_expense_check_send_to_addres
7303    ,p_fast_path_employee     	=>  p_fast_path_employee
7304    ,p_fte_capacity     		=>  p_fte_capacity
7305    ,p_global_person_id     	=>  p_global_person_id
7306    ,p_hold_applicant_date_until     =>  p_hold_applicant_date_until
7307    ,p_internal_location     	=>  p_internal_location
7308    ,p_last_medical_test_by      =>  p_last_medical_test_by
7309    ,p_last_medical_test_date    =>  p_last_medical_test_date
7310    ,p_mailstop     		=>  p_mailstop
7311    ,p_office_number     	=>  p_office_number
7312    ,p_on_military_service     	=>  p_on_military_service
7313    ,p_original_date_of_hire     =>  p_original_date_of_hire
7314    ,p_projected_start_date      =>  p_projected_start_date
7315    ,p_receipt_of_death_cert_date     =>  p_receipt_of_death_cert_date
7316    ,p_region_of_birth     	=>  p_region_of_birth
7317    ,p_rehire_authorizor     	=>  p_rehire_authorizor
7318    ,p_rehire_recommendation     =>  p_rehire_recommendation
7319    ,p_rehire_reason     	=>  p_rehire_reason
7320    ,p_resume_exists     	=>  p_resume_exists
7321    ,p_resume_last_updated     	=>  p_resume_last_updated
7322    ,p_second_passport_exists    =>  p_second_passport_exists
7323    ,p_student_status     	=>  p_student_status
7324    ,p_town_of_birth     	=>  p_town_of_birth
7325    ,p_uses_tobacco_flag     	=>  p_uses_tobacco_flag
7326    ,p_vendor_id     		=>  p_vendor_id
7327    ,p_work_schedule     	=>  p_work_schedule ) ;
7328 
7329  IF l_con_rec_changed and
7330     nvl(p_save_mode, 'NVL') <> 'SAVE_FOR_LATER'
7331  THEN
7332     --
7333     -- Get the Employee number from the Database;
7334     --
7335     hr_utility.set_location('Declaring the Cursor c_pap'||l_proc,50);
7336     DECLARE
7337                CURSOR c_pap IS SELECT employee_number FROM per_all_people_f
7338                             WHERE person_id = p_per_person_id
7339                             AND  p_start_date BETWEEN
7340                                  effective_start_date AND effective_end_date ;
7341                l_pap    c_pap%ROWTYPE;
7342 
7343     BEGIN
7344                --
7345                OPEN c_pap ;
7346                FETCH c_pap INTO l_pap ;
7347                CLOSE c_pap ;
7348                --
7349                p_employee_number := l_pap.employee_number ;
7350                --
7351     EXCEPTION WHEN OTHERS THEN
7352     hr_utility.set_location('Exception in c_pap Cursor:'||l_proc,555);
7353              raise ;
7354     END;
7355     --
7356     hr_utility.set_location('Calling hr_person_api.update_person '||l_proc,55);
7357     hr_person_api.update_person (
7358       p_validate      			=>  l_validate_mode
7359      ,p_effective_date      		=>  l_start_date
7360                                            --p_start_date  --9999p_effective_date
7361      ,p_datetrack_update_mode      	=>  hr_api.g_correction
7362                                             -- 9999 p_datetrack_update_mode
7363      ,p_person_id      			=>  p_per_person_id
7364      ,p_object_version_number      	=>  p_per_object_version_number
7365      --  ,p_person_type_id       	=>  p_person_type_id
7366      -- ,p_last_name       		=>  p_last_name
7367      ,p_applicant_number       	        =>  p_applicant_number
7368      --,p_comments       		=>  p_ctr_comments
7369      ,p_date_employee_data_verified     =>  p_date_employee_data_verified
7370      --  ,p_date_of_birth       	=>  p_date_of_birth
7371      --  ,p_email_address       	=>  p_email_address
7372      ,p_employee_number       	        =>  p_employee_number    --in out nocopy Param
7373      ,p_expense_check_send_to_addres    =>  p_expense_check_send_to_addres
7374      --  ,p_first_name        	        =>  p_first_name
7375      --  ,p_known_as        	        =>  p_known_as
7376      --  ,p_marital_status              =>  p_marital_status
7377      --  ,p_middle_names                =>  p_middle_names
7378      --  ,p_nationality       		=>  p_nationality
7379      --  ,p_national_identifier       	=>  p_national_identifier
7380      --  ,p_previous_last_name       	=>  p_previous_last_name
7381      --  ,p_registered_disabled_flag    =>  p_registered_disabled_flag
7382      --  ,p_sex       			=>  p_sex
7383      --  ,p_title       		=>  p_title
7384      ,p_vendor_id       		=>  p_vendor_id
7385      --  ,p_work_telephone       	=>  p_work_telephone
7386      ,p_date_of_death       	        =>  p_date_of_death
7387      ,p_background_check_status         =>  p_background_check_status
7388      ,p_background_date_check           =>  p_background_date_check
7389      ,p_blood_type       		=>  p_blood_type
7390      --   ,p_correspondence_language    =>  p_correspondence_language
7391      ,p_fast_path_employee       	=>  p_fast_path_employee
7392      ,p_fte_capacity       	        =>  p_fte_capacity
7393      ,p_hold_applicant_date_until       =>  p_hold_applicant_date_until
7394      --   ,p_honors       		=>  p_honors
7395      ,p_internal_location       	=>  p_internal_location
7396      ,p_last_medical_test_by            =>  p_last_medical_test_by
7397      ,p_last_medical_test_date          =>  p_last_medical_test_date
7398      ,p_mailstop       		        =>  p_mailstop
7399      ,p_office_number       	        =>  p_office_number
7400      ,p_on_military_service       	=>  p_on_military_service
7401      --   ,p_pre_name_adjunct       	=>  p_pre_name_adjunct
7402      ,p_projected_start_date            =>  p_projected_start_date
7403      ,p_rehire_authorizor       	=>  p_rehire_authorizor
7404      ,p_rehire_recommendation           =>  p_rehire_recommendation
7405      ,p_resume_exists            	=>  p_resume_exists
7406      ,p_resume_last_updated             =>  p_resume_last_updated
7407      ,p_second_passport_exists          =>  p_second_passport_exists
7408      ,p_student_status       	        =>  p_student_status
7409      ,p_work_schedule       	        =>  p_work_schedule
7410      ,p_rehire_reason       	        =>  p_rehire_reason
7411      --   ,p_suffix       		=>  p_suffix
7412      ,p_benefit_group_id       	        =>  p_benefit_group_id
7413      ,p_receipt_of_death_cert_date      =>  p_receipt_of_death_cert_date
7414      ,p_coord_ben_med_pln_no            =>  p_coord_ben_med_pln_no
7415      ,p_coord_ben_no_cvg_flag           =>  p_coord_ben_no_cvg_flag
7416      ,p_uses_tobacco_flag       	=>  p_uses_tobacco_flag
7417      ,p_dpdnt_adoption_date       	=>  p_dpdnt_adoption_date
7418      ,p_dpdnt_vlntry_svce_flag          =>  p_dpdnt_vlntry_svce_flag
7419      ,p_original_date_of_hire           =>  p_original_date_of_hire
7420      ,p_adjusted_svc_date       	=>  p_adjusted_svc_date
7421      ,p_town_of_birth       	        =>  p_town_of_birth
7422      ,p_region_of_birth       	        =>  p_region_of_birth
7423      ,p_country_of_birth       	        =>  p_country_of_birth
7424      ,p_global_person_id       	        =>  p_global_person_id
7425      -- Out Parameters
7426      ,p_effective_start_date            =>  p_per_effective_start_date
7427      ,p_effective_end_date       	=>  p_per_effective_end_date
7428      ,p_full_name       		=>  p_full_name
7429      ,p_comment_id       		=>  p_per_comment_id
7430      ,p_name_combination_warning        =>  l_per_name_combination_warning
7431      ,p_assign_payroll_warning          =>  l_per_assign_payroll_warning
7432      ,p_orig_hire_warning       	=>  l_per_orig_hire_warning
7433     );
7434     --
7435     hr_utility.set_location('After calling validate proceses ', 65);
7436     --
7437     IF hr_errors_api.errorExists
7438     THEN
7439       hr_utility.set_location('api error exists  hr_person_api.update_person ', 67);
7440       rollback to create_contact_tt_start  ;
7441       raise g_data_error;
7442     END IF;
7443 
7444   END IF; -- End if for is_con_rec_changed
7445 
7446   rollback to create_contact_tt_start  ;
7447 
7448   if l_per_assign_payroll_warning then
7449      p_per_assign_payroll_warning := 'Y';
7450   else
7451      p_per_assign_payroll_warning := 'N';
7452   end if;
7453   --
7454   if l_con_name_combination_warning then
7455      p_con_name_combination_warning := 'Y';
7456   else
7457      p_con_name_combination_warning := 'N';
7458   end if;
7459   --
7460   if l_per_name_combination_warning then
7461      p_per_name_combination_warning := 'Y';
7462   else
7463      p_per_name_combination_warning := 'N';
7464   end if;
7465   --
7466   if l_con_orig_hire_warning then
7467      p_con_orig_hire_warning := 'Y';
7468   else
7469      p_con_orig_hire_warning := 'N';
7470   end if;
7471   --
7472   if l_per_orig_hire_warning then
7473      p_per_orig_hire_warning := 'Y';
7474   else
7475      p_per_orig_hire_warning := 'N';
7476   end if;
7477   --
7478   -- --------------------------------------------------------------------------
7479   -- We will write the data to transaction tables.
7480   -- Determine if a transaction step exists for this activity
7481   -- if a transaction step does exist then the transaction_step_id and
7482   -- object_version_number are set (i.e. not null).
7483   -- --------------------------------------------------------------------------
7484   --
7485   /* StartRegistration : Begin code addition */
7486   --
7487   -- First, check if transaction id exists or not
7488   l_transaction_id := hr_transaction_ss.get_transaction_id
7489                      (p_item_type   => p_item_type
7490                      ,p_item_key    => p_item_key);
7491   --
7492   IF l_transaction_id is null THEN
7493      -- Start a Transaction
7494         hr_transaction_ss.start_transaction
7495            (itemtype   => p_item_type
7496            ,itemkey    => p_item_key
7497            ,actid      => p_activity_id
7498            ,funmode    => 'RUN'
7499            ,p_api_addtnl_info => p_contact_operation  --TEST
7500            ,p_login_person_id => nvl(p_login_person_id, p_person_id)
7501            ,result     => l_result);
7502 
7503         l_transaction_id := hr_transaction_ss.get_transaction_id
7504                         (p_item_type   => p_item_type
7505                         ,p_item_key    => p_item_key);
7506   END IF;
7507   --
7508   -- Create a transaction step
7509   --
7510   hr_transaction_api.create_transaction_step
7511      (p_validate              => false
7512      ,p_creator_person_id     => nvl(p_login_person_id, p_person_id)
7513      ,p_transaction_id        => l_transaction_id
7514      ,p_api_name              => g_package || '.PROCESS_CREATE_CONTACT_API'
7515      ,p_item_type             => p_item_type
7516      ,p_item_key              => p_item_key
7517      ,p_activity_id           => p_activity_id
7518      ,p_transaction_step_id   => l_transaction_step_id
7519      ,p_object_version_number => l_trans_obj_vers_num);
7520 
7521   /* EndRegistration : code addition */
7522 
7523   SAVEPOINT create_contact_tt;
7524 
7525   --
7526   -- This parameter will be used in the process_api for calling update_person
7527   l_count := l_count + 1;
7528   l_transaction_table(l_count).param_name := 'P_CONT_REC_CHANGED';
7529   l_transaction_table(l_count).param_value := 'CHANGED';
7530   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
7531   --
7532   --
7533   l_count := l_count + 1;
7534   l_transaction_table(l_count).param_name :=upper('p_contact_operation');
7535   l_transaction_table(l_count).param_value := p_contact_operation;
7536   l_transaction_table(l_count).param_data_type := upper('varchar2');
7537   --
7538   --
7539   l_count := l_count + 1;
7540   l_transaction_table(l_count).param_name :=upper('p_emrg_cont_flag');
7541   l_transaction_table(l_count).param_value := p_emrg_cont_flag;
7542   l_transaction_table(l_count).param_data_type := upper('varchar2');
7543   --
7544   --
7545   l_count := l_count + 1;
7546   l_transaction_table(l_count).param_name :=upper('p_dpdnt_bnf_flag');
7547   l_transaction_table(l_count).param_value := p_dpdnt_bnf_flag;
7548   l_transaction_table(l_count).param_data_type := upper('varchar2');
7549   --
7550   -- bug# 2315163
7551   --
7552   if p_contact_operation    in( 'EMER_CR_NEW_CONT','EMER_CR_NEW_REL', 'EMRG_OVRW_UPD')
7553      or p_emrg_cont_flag    =   'Y' then
7554 
7555       l_is_emergency_contact := 'Yes';
7556   else
7557       l_is_emergency_contact := 'No';
7558   end if;
7559 
7560   l_count := l_count + 1;
7561   l_transaction_table(l_count).param_name :=upper('p_is_emergency_contact');
7562   l_transaction_table(l_count).param_value := l_is_emergency_contact;
7563   l_transaction_table(l_count).param_data_type := upper('varchar2');
7564 
7565   if p_contact_operation  in ( 'DPDNT_CR_NEW_CONT', 'DPDNT_CR_NEW_REL',  'DPDNT_OVRW_UPD')
7566      or p_dpdnt_bnf_flag    =   'Y' then
7567 
7568       l_is_dpdnt_bnf := 'Yes';
7569   else
7570       l_is_dpdnt_bnf := 'No';
7571   end if;
7572 
7573   l_count := l_count + 1;
7574   l_transaction_table(l_count).param_name := upper('p_is_dpdnt_bnf');
7575   l_transaction_table(l_count).param_value := l_is_dpdnt_bnf;
7576   l_transaction_table(l_count).param_data_type := upper('varchar2');
7577   --
7578   --
7579   l_count:=l_count+1;
7580   l_transaction_table(l_count).param_name      := 'P_SAVE_MODE';
7581   l_transaction_table(l_count).param_value     :=  p_save_mode;
7582   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
7583   --
7584   l_count := l_count + 1;
7585   l_transaction_table(l_count).param_name :=upper('p_contact_relationship_id');
7586   l_transaction_table(l_count).param_value := null ;
7587   l_transaction_table(l_count).param_data_type := upper('number');
7588   --
7589   l_count := l_count + 1;
7590   l_transaction_table(l_count).param_name :=upper('p_cont_object_version_number');
7591   l_transaction_table(l_count).param_value := null ;
7592   l_transaction_table(l_count).param_data_type := upper('number');
7593 
7594   --
7595   l_count := l_count + 1;
7596   l_transaction_table(l_count).param_name :=upper('p_start_date');
7597   --  l_transaction_table(l_count).param_value := to_char(p_start_date
7598   l_transaction_table(l_count).param_value := to_char(l_start_date
7599                       , hr_transaction_ss.g_date_format);
7600   l_transaction_table(l_count).param_data_type := upper('date');
7601   --
7602   --
7603   l_count := l_count + 1;
7604   l_transaction_table(l_count).param_name :=upper('p_business_group_id');
7605   l_transaction_table(l_count).param_value := p_business_group_id;
7606   l_transaction_table(l_count).param_data_type := upper('number');
7607   --
7608   --
7609   l_count := l_count + 1;
7610   l_transaction_table(l_count).param_name :=upper('p_person_id');
7611   l_transaction_table(l_count).param_value := p_person_id;
7612   l_transaction_table(l_count).param_data_type := upper('number');
7613   --
7614   --
7615   l_count := l_count + 1;
7616   l_transaction_table(l_count).param_name :=upper('p_contact_person_id');
7617   l_transaction_table(l_count).param_value := p_contact_person_id;
7618   l_transaction_table(l_count).param_data_type := upper('number');
7619   --
7620   --
7621   l_count := l_count + 1;
7622   l_transaction_table(l_count).param_name :=upper('p_contact_type');
7623   l_transaction_table(l_count).param_value := p_contact_type;
7624   l_transaction_table(l_count).param_data_type := upper('varchar2');
7625   --
7626   --
7627   l_count := l_count + 1;
7628   l_transaction_table(l_count).param_name :=upper('p_ctr_comments');
7629   l_transaction_table(l_count).param_value := p_ctr_comments;
7630   l_transaction_table(l_count).param_data_type := upper('varchar2');
7631   --
7632   --
7633   l_count := l_count + 1;
7634   l_transaction_table(l_count).param_name :=upper('p_primary_contact_flag');
7635   l_transaction_table(l_count).param_value := p_primary_contact_flag;
7636   l_transaction_table(l_count).param_data_type := upper('varchar2');
7637   --
7638   --
7639   l_count := l_count + 1;
7640   l_transaction_table(l_count).param_name :=upper('p_date_start');
7641   l_transaction_table(l_count).param_value := to_char(p_date_start
7642                                           , hr_transaction_ss.g_date_format);
7643   l_transaction_table(l_count).param_data_type := upper('date');
7644   --
7645   -- StartRegistration
7646   --
7647   l_count := l_count + 1;
7648   l_transaction_table(l_count).param_name :=upper('p_start_life_reason_id');
7649   l_transaction_table(l_count).param_value := l_start_life_reason_id;
7650   l_transaction_table(l_count).param_data_type := upper('number');
7651   --
7652   --
7653   l_count := l_count + 1;
7654   l_transaction_table(l_count).param_name :=upper('p_date_end');
7655   l_transaction_table(l_count).param_value := to_char(p_date_end
7656                                           , hr_transaction_ss.g_date_format);
7657   l_transaction_table(l_count).param_data_type := upper('date');
7658   --
7659   -- StartRegistration
7660   --
7661   l_count := l_count + 1;
7662   l_transaction_table(l_count).param_name :=upper('p_end_life_reason_id');
7663   l_transaction_table(l_count).param_value := l_end_life_reason_id;
7664   l_transaction_table(l_count).param_data_type := upper('number');
7665   --
7666   --
7667   l_count := l_count + 1;
7668   l_transaction_table(l_count).param_name :=upper('p_rltd_per_rsds_w_dsgntr_flag');
7669   l_transaction_table(l_count).param_value := p_rltd_per_rsds_w_dsgntr_flag;
7670   l_transaction_table(l_count).param_data_type := upper('varchar2');
7671   --
7672   --
7673   l_count := l_count + 1;
7674   l_transaction_table(l_count).param_name :=upper('p_personal_flag');
7675   l_transaction_table(l_count).param_value := p_personal_flag;
7676   l_transaction_table(l_count).param_data_type := upper('varchar2');
7677   --
7678   -- StartRegistration
7679   --
7680   l_count := l_count + 1;
7681   l_transaction_table(l_count).param_name :=upper('p_sequence_number');
7682   l_transaction_table(l_count).param_value := l_sequence_number;
7683   l_transaction_table(l_count).param_data_type := upper('number');
7684   --
7685   --
7686   l_count := l_count + 1;
7687   l_transaction_table(l_count).param_name :=upper('p_cont_attribute_category');
7688   l_transaction_table(l_count).param_value := p_cont_attribute_category;
7689   l_transaction_table(l_count).param_data_type := upper('varchar2');
7690   --
7691   --
7692   l_count := l_count + 1;
7693   l_transaction_table(l_count).param_name :=upper('p_cont_attribute1');
7694   l_transaction_table(l_count).param_value := p_cont_attribute1;
7695   l_transaction_table(l_count).param_data_type := upper('varchar2');
7696   --
7697   --
7698   l_count := l_count + 1;
7699   l_transaction_table(l_count).param_name :=upper('p_cont_attribute2');
7700   l_transaction_table(l_count).param_value := p_cont_attribute2;
7701   l_transaction_table(l_count).param_data_type := upper('varchar2');
7702   --
7703   --
7704   l_count := l_count + 1;
7705   l_transaction_table(l_count).param_name :=upper('p_cont_attribute3');
7706   l_transaction_table(l_count).param_value := p_cont_attribute3;
7707   l_transaction_table(l_count).param_data_type := upper('varchar2');
7708   --
7709   --
7710   l_count := l_count + 1;
7711   l_transaction_table(l_count).param_name :=upper('p_cont_attribute4');
7712   l_transaction_table(l_count).param_value := p_cont_attribute4;
7713   l_transaction_table(l_count).param_data_type := upper('varchar2');
7714   --
7715   --
7716   l_count := l_count + 1;
7717   l_transaction_table(l_count).param_name :=upper('p_cont_attribute5');
7718   l_transaction_table(l_count).param_value := p_cont_attribute5;
7719   l_transaction_table(l_count).param_data_type := upper('varchar2');
7720   --
7721   --
7722   l_count := l_count + 1;
7723   l_transaction_table(l_count).param_name :=upper('p_cont_attribute6');
7724   l_transaction_table(l_count).param_value := p_cont_attribute6;
7725   l_transaction_table(l_count).param_data_type := upper('varchar2');
7726   --
7727   --
7728   l_count := l_count + 1;
7729   l_transaction_table(l_count).param_name :=upper('p_cont_attribute7');
7730   l_transaction_table(l_count).param_value := p_cont_attribute7;
7731   l_transaction_table(l_count).param_data_type := upper('varchar2');
7732   --
7733   --
7734   l_count := l_count + 1;
7735   l_transaction_table(l_count).param_name :=upper('p_cont_attribute8');
7736   l_transaction_table(l_count).param_value := p_cont_attribute8;
7737   l_transaction_table(l_count).param_data_type := upper('varchar2');
7738   --
7739   --
7740   l_count := l_count + 1;
7741   l_transaction_table(l_count).param_name :=upper('p_cont_attribute9');
7742   l_transaction_table(l_count).param_value := p_cont_attribute9;
7743   l_transaction_table(l_count).param_data_type := upper('varchar2');
7744   --
7745   --
7746   l_count := l_count + 1;
7747   l_transaction_table(l_count).param_name :=upper('p_cont_attribute10');
7748   l_transaction_table(l_count).param_value := p_cont_attribute10;
7749   l_transaction_table(l_count).param_data_type := upper('varchar2');
7750   --
7751   --
7752   l_count := l_count + 1;
7753   l_transaction_table(l_count).param_name :=upper('p_cont_attribute11');
7754   l_transaction_table(l_count).param_value := p_cont_attribute11;
7755   l_transaction_table(l_count).param_data_type := upper('varchar2');
7756   --
7757   --
7758   l_count := l_count + 1;
7759   l_transaction_table(l_count).param_name :=upper('p_cont_attribute12');
7760   l_transaction_table(l_count).param_value := p_cont_attribute12;
7761   l_transaction_table(l_count).param_data_type := upper('varchar2');
7762   --
7763   --
7764   l_count := l_count + 1;
7765   l_transaction_table(l_count).param_name :=upper('p_cont_attribute13');
7766   l_transaction_table(l_count).param_value := p_cont_attribute13;
7767   l_transaction_table(l_count).param_data_type := upper('varchar2');
7768   --
7769   --
7770   l_count := l_count + 1;
7771   l_transaction_table(l_count).param_name :=upper('p_cont_attribute14');
7772   l_transaction_table(l_count).param_value := p_cont_attribute14;
7773   l_transaction_table(l_count).param_data_type := upper('varchar2');
7774   --
7775   --
7776   l_count := l_count + 1;
7777   l_transaction_table(l_count).param_name :=upper('p_cont_attribute15');
7778   l_transaction_table(l_count).param_value := p_cont_attribute15;
7779   l_transaction_table(l_count).param_data_type := upper('varchar2');
7780   --
7781   --
7782   l_count := l_count + 1;
7783   l_transaction_table(l_count).param_name :=upper('p_cont_attribute16');
7784   l_transaction_table(l_count).param_value := p_cont_attribute16;
7785   l_transaction_table(l_count).param_data_type := upper('varchar2');
7786   --
7787   --
7788   l_count := l_count + 1;
7789   l_transaction_table(l_count).param_name :=upper('p_cont_attribute17');
7790   l_transaction_table(l_count).param_value := p_cont_attribute17;
7791   l_transaction_table(l_count).param_data_type := upper('varchar2');
7792   --
7793   --
7794   l_count := l_count + 1;
7795   l_transaction_table(l_count).param_name :=upper('p_cont_attribute18');
7796   l_transaction_table(l_count).param_value := p_cont_attribute18;
7797   l_transaction_table(l_count).param_data_type := upper('varchar2');
7798   --
7799   --
7800   l_count := l_count + 1;
7801   l_transaction_table(l_count).param_name :=upper('p_cont_attribute19');
7802   l_transaction_table(l_count).param_value := p_cont_attribute19;
7803   l_transaction_table(l_count).param_data_type := upper('varchar2');
7804   --
7805   --
7806   l_count := l_count + 1;
7807   l_transaction_table(l_count).param_name :=upper('p_cont_attribute20');
7808   l_transaction_table(l_count).param_value := p_cont_attribute20;
7809   l_transaction_table(l_count).param_data_type := upper('varchar2');
7810   --
7811   --
7812   l_count := l_count + 1;
7813   l_transaction_table(l_count).param_name :=upper('p_third_party_pay_flag');
7814   l_transaction_table(l_count).param_value := p_third_party_pay_flag;
7815   l_transaction_table(l_count).param_data_type := upper('varchar2');
7816   --
7817   --
7818   l_count := l_count + 1;
7819   l_transaction_table(l_count).param_name :=upper('p_bondholder_flag');
7820   l_transaction_table(l_count).param_value := p_bondholder_flag;
7821   l_transaction_table(l_count).param_data_type := upper('varchar2');
7822   --
7823   --
7824   l_count := l_count + 1;
7825   l_transaction_table(l_count).param_name :=upper('p_dependent_flag');
7826   l_transaction_table(l_count).param_value := p_dependent_flag;
7827   l_transaction_table(l_count).param_data_type := upper('varchar2');
7828   --
7829   --
7830   l_count := l_count + 1;
7831   l_transaction_table(l_count).param_name :=upper('p_beneficiary_flag');
7832   l_transaction_table(l_count).param_value := p_beneficiary_flag;
7833   l_transaction_table(l_count).param_data_type := upper('varchar2');
7834   --
7835   --
7836   l_count := l_count + 1;
7837   l_transaction_table(l_count).param_name :=upper('p_last_name');
7838   l_transaction_table(l_count).param_value := p_last_name;
7839   l_transaction_table(l_count).param_data_type := upper('varchar2');
7840   --
7841   --
7842   l_count := l_count + 1;
7843   l_transaction_table(l_count).param_name :=upper('p_sex');
7844   l_transaction_table(l_count).param_value := p_sex;
7845   l_transaction_table(l_count).param_data_type := upper('varchar2');
7846   --
7847   -- StartRegistration
7848   --
7849   l_count := l_count + 1;
7850   l_transaction_table(l_count).param_name :=upper('p_person_type_id');
7851   l_transaction_table(l_count).param_value := l_person_type_id;
7852   l_transaction_table(l_count).param_data_type := upper('number');
7853   --
7854   --
7855   l_count := l_count + 1;
7856   l_transaction_table(l_count).param_name :=upper('p_per_comments');
7857   l_transaction_table(l_count).param_value := p_per_comments;
7858   l_transaction_table(l_count).param_data_type := upper('varchar2');
7859   --
7860   --
7861   l_count := l_count + 1;
7862   l_transaction_table(l_count).param_name :=upper('p_date_of_birth');
7863   l_transaction_table(l_count).param_value :=
7864                 to_char(p_date_of_birth , hr_transaction_ss.g_date_format);
7865   l_transaction_table(l_count).param_data_type := upper('date');
7866   --
7867   --
7868   l_count := l_count + 1;
7869   l_transaction_table(l_count).param_name :=upper('p_email_address');
7870   l_transaction_table(l_count).param_value := p_email_address;
7871   l_transaction_table(l_count).param_data_type := upper('varchar2');
7872   --
7873   --
7874   l_count := l_count + 1;
7875   l_transaction_table(l_count).param_name :=upper('p_first_name');
7876   l_transaction_table(l_count).param_value := p_first_name;
7877   l_transaction_table(l_count).param_data_type := upper('varchar2');
7878   --
7879   --
7880   l_count := l_count + 1;
7881   l_transaction_table(l_count).param_name :=upper('p_known_as');
7882   l_transaction_table(l_count).param_value := p_known_as;
7883   l_transaction_table(l_count).param_data_type := upper('varchar2');
7884   --
7885   --
7886   l_count := l_count + 1;
7887   l_transaction_table(l_count).param_name :=upper('p_marital_status');
7888   l_transaction_table(l_count).param_value := p_marital_status;
7889   l_transaction_table(l_count).param_data_type := upper('varchar2');
7890   --
7891   --
7892   l_count := l_count + 1;
7893   l_transaction_table(l_count).param_name :=upper('p_middle_names');
7894   l_transaction_table(l_count).param_value := p_middle_names;
7895   l_transaction_table(l_count).param_data_type := upper('varchar2');
7896   --
7897   --
7898   l_count := l_count + 1;
7899   l_transaction_table(l_count).param_name :=upper('p_nationality');
7900   l_transaction_table(l_count).param_value := p_nationality;
7901   l_transaction_table(l_count).param_data_type := upper('varchar2');
7902   --
7903   --
7904   l_count := l_count + 1;
7905   l_transaction_table(l_count).param_name :=upper('p_national_identifier');
7906   l_transaction_table(l_count).param_value := p_national_identifier;
7907   l_transaction_table(l_count).param_data_type := upper('varchar2');
7908   --
7909   --
7910   l_count := l_count + 1;
7911   l_transaction_table(l_count).param_name :=upper('p_previous_last_name');
7912   l_transaction_table(l_count).param_value := p_previous_last_name;
7913   l_transaction_table(l_count).param_data_type := upper('varchar2');
7914   --
7915   --
7916   l_count := l_count + 1;
7917   l_transaction_table(l_count).param_name :=upper('p_registered_disabled_flag');
7918   l_transaction_table(l_count).param_value := p_registered_disabled_flag;
7919   l_transaction_table(l_count).param_data_type := upper('varchar2');
7920   --
7921   --
7922   l_count := l_count + 1;
7923   l_transaction_table(l_count).param_name :=upper('p_title');
7924   l_transaction_table(l_count).param_value := p_title;
7925   l_transaction_table(l_count).param_data_type := upper('varchar2');
7926   --
7927   --
7928   l_count := l_count + 1;
7929   l_transaction_table(l_count).param_name :=upper('p_work_telephone');
7930   l_transaction_table(l_count).param_value := p_work_telephone;
7931   l_transaction_table(l_count).param_data_type := upper('varchar2');
7932   --
7933   --
7934   l_count := l_count + 1;
7935   l_transaction_table(l_count).param_name :=upper('p_attribute_category');
7936   l_transaction_table(l_count).param_value := p_attribute_category;
7937   l_transaction_table(l_count).param_data_type := upper('varchar2');
7938   --
7939   --
7940   l_count := l_count + 1;
7941   l_transaction_table(l_count).param_name :=upper('p_attribute1');
7942   l_transaction_table(l_count).param_value := p_attribute1;
7943   l_transaction_table(l_count).param_data_type := upper('varchar2');
7944   --
7945   --
7946   l_count := l_count + 1;
7947   l_transaction_table(l_count).param_name :=upper('p_attribute2');
7948   l_transaction_table(l_count).param_value := p_attribute2;
7949   l_transaction_table(l_count).param_data_type := upper('varchar2');
7950   --
7951   --
7952   l_count := l_count + 1;
7953   l_transaction_table(l_count).param_name :=upper('p_attribute3');
7954   l_transaction_table(l_count).param_value := p_attribute3;
7955   l_transaction_table(l_count).param_data_type := upper('varchar2');
7956   --
7957   --
7958   l_count := l_count + 1;
7959   l_transaction_table(l_count).param_name :=upper('p_attribute4');
7960   l_transaction_table(l_count).param_value := p_attribute4;
7961   l_transaction_table(l_count).param_data_type := upper('varchar2');
7962   --
7963   --
7964   l_count := l_count + 1;
7965   l_transaction_table(l_count).param_name :=upper('p_attribute5');
7966   l_transaction_table(l_count).param_value := p_attribute5;
7967   l_transaction_table(l_count).param_data_type := upper('varchar2');
7968   --
7969   --
7970   l_count := l_count + 1;
7971   l_transaction_table(l_count).param_name :=upper('p_attribute6');
7972   l_transaction_table(l_count).param_value := p_attribute6;
7973   l_transaction_table(l_count).param_data_type := upper('varchar2');
7974   --
7975   --
7976   l_count := l_count + 1;
7977   l_transaction_table(l_count).param_name :=upper('p_attribute7');
7978   l_transaction_table(l_count).param_value := p_attribute7;
7979   l_transaction_table(l_count).param_data_type := upper('varchar2');
7980   --
7981   --
7982   l_count := l_count + 1;
7983   l_transaction_table(l_count).param_name :=upper('p_attribute8');
7984   l_transaction_table(l_count).param_value := p_attribute8;
7985   l_transaction_table(l_count).param_data_type := upper('varchar2');
7986   --
7987   --
7988   l_count := l_count + 1;
7989   l_transaction_table(l_count).param_name :=upper('p_attribute9');
7990   l_transaction_table(l_count).param_value := p_attribute9;
7991   l_transaction_table(l_count).param_data_type := upper('varchar2');
7992   --
7993   --
7994   l_count := l_count + 1;
7995   l_transaction_table(l_count).param_name :=upper('p_attribute10');
7996   l_transaction_table(l_count).param_value := p_attribute10;
7997   l_transaction_table(l_count).param_data_type := upper('varchar2');
7998   --
7999   --
8000   l_count := l_count + 1;
8001   l_transaction_table(l_count).param_name :=upper('p_attribute11');
8002   l_transaction_table(l_count).param_value := p_attribute11;
8003   l_transaction_table(l_count).param_data_type := upper('varchar2');
8004   --
8005   --
8006   l_count := l_count + 1;
8007   l_transaction_table(l_count).param_name :=upper('p_attribute12');
8008   l_transaction_table(l_count).param_value := p_attribute12;
8009   l_transaction_table(l_count).param_data_type := upper('varchar2');
8010   --
8011   --
8012   l_count := l_count + 1;
8013   l_transaction_table(l_count).param_name :=upper('p_attribute13');
8014   l_transaction_table(l_count).param_value := p_attribute13;
8015   l_transaction_table(l_count).param_data_type := upper('varchar2');
8016   --
8017   --
8018   l_count := l_count + 1;
8019   l_transaction_table(l_count).param_name :=upper('p_attribute14');
8020   l_transaction_table(l_count).param_value := p_attribute14;
8021   l_transaction_table(l_count).param_data_type := upper('varchar2');
8022   --
8023   --
8024   l_count := l_count + 1;
8025   l_transaction_table(l_count).param_name :=upper('p_attribute15');
8026   l_transaction_table(l_count).param_value := p_attribute15;
8027   l_transaction_table(l_count).param_data_type := upper('varchar2');
8028   --
8029   --
8030   l_count := l_count + 1;
8031   l_transaction_table(l_count).param_name :=upper('p_attribute16');
8032   l_transaction_table(l_count).param_value := p_attribute16;
8033   l_transaction_table(l_count).param_data_type := upper('varchar2');
8034   --
8035   --
8036   l_count := l_count + 1;
8037   l_transaction_table(l_count).param_name :=upper('p_attribute17');
8038   l_transaction_table(l_count).param_value := p_attribute17;
8039   l_transaction_table(l_count).param_data_type := upper('varchar2');
8040   --
8041   --
8042   l_count := l_count + 1;
8043   l_transaction_table(l_count).param_name :=upper('p_attribute18');
8044   l_transaction_table(l_count).param_value := p_attribute18;
8045   l_transaction_table(l_count).param_data_type := upper('varchar2');
8046   --
8047   --
8048   l_count := l_count + 1;
8049   l_transaction_table(l_count).param_name :=upper('p_attribute19');
8050   l_transaction_table(l_count).param_value := p_attribute19;
8051   l_transaction_table(l_count).param_data_type := upper('varchar2');
8052   --
8053   --
8054   l_count := l_count + 1;
8055   l_transaction_table(l_count).param_name :=upper('p_attribute20');
8056   l_transaction_table(l_count).param_value := p_attribute20;
8057   l_transaction_table(l_count).param_data_type := upper('varchar2');
8058   --
8059   --
8060   l_count := l_count + 1;
8061   l_transaction_table(l_count).param_name :=upper('p_attribute21');
8062   l_transaction_table(l_count).param_value := p_attribute21;
8063   l_transaction_table(l_count).param_data_type := upper('varchar2');
8064   --
8065   --
8066   l_count := l_count + 1;
8067   l_transaction_table(l_count).param_name :=upper('p_attribute22');
8068   l_transaction_table(l_count).param_value := p_attribute22;
8069   l_transaction_table(l_count).param_data_type := upper('varchar2');
8070   --
8071   --
8072   l_count := l_count + 1;
8073   l_transaction_table(l_count).param_name :=upper('p_attribute23');
8074   l_transaction_table(l_count).param_value := p_attribute23;
8075   l_transaction_table(l_count).param_data_type := upper('varchar2');
8076   --
8077   --
8078   l_count := l_count + 1;
8079   l_transaction_table(l_count).param_name :=upper('p_attribute24');
8080   l_transaction_table(l_count).param_value := p_attribute24;
8081   l_transaction_table(l_count).param_data_type := upper('varchar2');
8082   --
8083   --
8084   l_count := l_count + 1;
8085   l_transaction_table(l_count).param_name :=upper('p_attribute25');
8086   l_transaction_table(l_count).param_value := p_attribute25;
8087   l_transaction_table(l_count).param_data_type := upper('varchar2');
8088   --
8089   --
8090   l_count := l_count + 1;
8091   l_transaction_table(l_count).param_name :=upper('p_attribute26');
8092   l_transaction_table(l_count).param_value := p_attribute26;
8093   l_transaction_table(l_count).param_data_type := upper('varchar2');
8094   --
8095   --
8096   l_count := l_count + 1;
8097   l_transaction_table(l_count).param_name :=upper('p_attribute27');
8098   l_transaction_table(l_count).param_value := p_attribute27;
8099   l_transaction_table(l_count).param_data_type := upper('varchar2');
8100   --
8101   --
8102   l_count := l_count + 1;
8103   l_transaction_table(l_count).param_name :=upper('p_attribute28');
8104   l_transaction_table(l_count).param_value := p_attribute28;
8105   l_transaction_table(l_count).param_data_type := upper('varchar2');
8106   --
8107   --
8108   l_count := l_count + 1;
8109   l_transaction_table(l_count).param_name :=upper('p_attribute29');
8110   l_transaction_table(l_count).param_value := p_attribute29;
8111   l_transaction_table(l_count).param_data_type := upper('varchar2');
8112   --
8113   --
8114   l_count := l_count + 1;
8115   l_transaction_table(l_count).param_name :=upper('p_attribute30');
8116   l_transaction_table(l_count).param_value := p_attribute30;
8117   l_transaction_table(l_count).param_data_type := upper('varchar2');
8118   --
8119   --
8120   l_count := l_count + 1;
8121   l_transaction_table(l_count).param_name :=upper('p_per_information_category');
8122   l_transaction_table(l_count).param_value := p_per_information_category;
8123   l_transaction_table(l_count).param_data_type := upper('varchar2');
8124   --
8125   --
8126   l_count := l_count + 1;
8127   l_transaction_table(l_count).param_name :=upper('p_per_information1');
8128   l_transaction_table(l_count).param_value := p_per_information1;
8129   l_transaction_table(l_count).param_data_type := upper('varchar2');
8130   --
8131   --
8132   l_count := l_count + 1;
8133   l_transaction_table(l_count).param_name :=upper('p_per_information2');
8134   l_transaction_table(l_count).param_value := p_per_information2;
8135   l_transaction_table(l_count).param_data_type := upper('varchar2');
8136   --
8137   --
8138   l_count := l_count + 1;
8139   l_transaction_table(l_count).param_name :=upper('p_per_information3');
8140   l_transaction_table(l_count).param_value := p_per_information3;
8141   l_transaction_table(l_count).param_data_type := upper('varchar2');
8142   --
8143   --
8144   l_count := l_count + 1;
8145   l_transaction_table(l_count).param_name :=upper('p_per_information4');
8146   l_transaction_table(l_count).param_value := p_per_information4;
8147   l_transaction_table(l_count).param_data_type := upper('varchar2');
8148   --
8149   --
8150   l_count := l_count + 1;
8151   l_transaction_table(l_count).param_name :=upper('p_per_information5');
8152   l_transaction_table(l_count).param_value := p_per_information5;
8153   l_transaction_table(l_count).param_data_type := upper('varchar2');
8154   --
8155   --
8156   l_count := l_count + 1;
8157   l_transaction_table(l_count).param_name :=upper('p_per_information6');
8158   l_transaction_table(l_count).param_value := p_per_information6;
8159   l_transaction_table(l_count).param_data_type := upper('varchar2');
8160   --
8161   --
8162   l_count := l_count + 1;
8163   l_transaction_table(l_count).param_name :=upper('p_per_information7');
8164   l_transaction_table(l_count).param_value := p_per_information7;
8165   l_transaction_table(l_count).param_data_type := upper('varchar2');
8166   --
8167   --
8168   l_count := l_count + 1;
8169   l_transaction_table(l_count).param_name :=upper('p_per_information8');
8170   l_transaction_table(l_count).param_value := p_per_information8;
8171   l_transaction_table(l_count).param_data_type := upper('varchar2');
8172   --
8173   --
8174   l_count := l_count + 1;
8175   l_transaction_table(l_count).param_name :=upper('p_per_information9');
8176   l_transaction_table(l_count).param_value := p_per_information9;
8177   l_transaction_table(l_count).param_data_type := upper('varchar2');
8178   --
8179   --
8180   l_count := l_count + 1;
8181   l_transaction_table(l_count).param_name :=upper('p_per_information10');
8182   l_transaction_table(l_count).param_value := p_per_information10;
8183   l_transaction_table(l_count).param_data_type := upper('varchar2');
8184   --
8185   --
8186   l_count := l_count + 1;
8187   l_transaction_table(l_count).param_name :=upper('p_per_information11');
8188   l_transaction_table(l_count).param_value := p_per_information11;
8189   l_transaction_table(l_count).param_data_type := upper('varchar2');
8190   --
8191   --
8192   l_count := l_count + 1;
8193   l_transaction_table(l_count).param_name :=upper('p_per_information12');
8194   l_transaction_table(l_count).param_value := p_per_information12;
8195   l_transaction_table(l_count).param_data_type := upper('varchar2');
8196   --
8197   --
8198   l_count := l_count + 1;
8199   l_transaction_table(l_count).param_name :=upper('p_per_information13');
8200   l_transaction_table(l_count).param_value := p_per_information13;
8201   l_transaction_table(l_count).param_data_type := upper('varchar2');
8202   --
8203   --
8204   l_count := l_count + 1;
8205   l_transaction_table(l_count).param_name :=upper('p_per_information14');
8206   l_transaction_table(l_count).param_value := p_per_information14;
8207   l_transaction_table(l_count).param_data_type := upper('varchar2');
8208   --
8209   --
8210   l_count := l_count + 1;
8211   l_transaction_table(l_count).param_name :=upper('p_per_information15');
8212   l_transaction_table(l_count).param_value := p_per_information15;
8213   l_transaction_table(l_count).param_data_type := upper('varchar2');
8214   --
8215   --
8216   l_count := l_count + 1;
8217   l_transaction_table(l_count).param_name :=upper('p_per_information16');
8218   l_transaction_table(l_count).param_value := p_per_information16;
8219   l_transaction_table(l_count).param_data_type := upper('varchar2');
8220   --
8221   --
8222   l_count := l_count + 1;
8223   l_transaction_table(l_count).param_name :=upper('p_per_information17');
8224   l_transaction_table(l_count).param_value := p_per_information17;
8225   l_transaction_table(l_count).param_data_type := upper('varchar2');
8226   --
8227   --
8228   l_count := l_count + 1;
8229   l_transaction_table(l_count).param_name :=upper('p_per_information18');
8230   l_transaction_table(l_count).param_value := p_per_information18;
8231   l_transaction_table(l_count).param_data_type := upper('varchar2');
8232   --
8233   --
8234   l_count := l_count + 1;
8235   l_transaction_table(l_count).param_name :=upper('p_per_information19');
8236   l_transaction_table(l_count).param_value := p_per_information19;
8237   l_transaction_table(l_count).param_data_type := upper('varchar2');
8238   --
8239   --
8240   l_count := l_count + 1;
8241   l_transaction_table(l_count).param_name :=upper('p_per_information20');
8242   l_transaction_table(l_count).param_value := p_per_information20;
8243   l_transaction_table(l_count).param_data_type := upper('varchar2');
8244   --
8245   --
8246   l_count := l_count + 1;
8247   l_transaction_table(l_count).param_name :=upper('p_per_information21');
8248   l_transaction_table(l_count).param_value := p_per_information21;
8249   l_transaction_table(l_count).param_data_type := upper('varchar2');
8250   --
8251   --
8252   l_count := l_count + 1;
8253   l_transaction_table(l_count).param_name :=upper('p_per_information22');
8254   l_transaction_table(l_count).param_value := p_per_information22;
8255   l_transaction_table(l_count).param_data_type := upper('varchar2');
8256   --
8257   --
8258   l_count := l_count + 1;
8259   l_transaction_table(l_count).param_name :=upper('p_per_information23');
8260   l_transaction_table(l_count).param_value := p_per_information23;
8261   l_transaction_table(l_count).param_data_type := upper('varchar2');
8262   --
8263   --
8264   l_count := l_count + 1;
8265   l_transaction_table(l_count).param_name :=upper('p_per_information24');
8266   l_transaction_table(l_count).param_value := p_per_information24;
8267   l_transaction_table(l_count).param_data_type := upper('varchar2');
8268   --
8269   --
8270   l_count := l_count + 1;
8271   l_transaction_table(l_count).param_name :=upper('p_per_information25');
8272   l_transaction_table(l_count).param_value := p_per_information25;
8273   l_transaction_table(l_count).param_data_type := upper('varchar2');
8274   --
8275   --
8276   l_count := l_count + 1;
8277   l_transaction_table(l_count).param_name :=upper('p_per_information26');
8278   l_transaction_table(l_count).param_value := p_per_information26;
8279   l_transaction_table(l_count).param_data_type := upper('varchar2');
8280   --
8281   --
8282   l_count := l_count + 1;
8283   l_transaction_table(l_count).param_name :=upper('p_per_information27');
8284   l_transaction_table(l_count).param_value := p_per_information27;
8285   l_transaction_table(l_count).param_data_type := upper('varchar2');
8286   --
8287   --
8288   l_count := l_count + 1;
8289   l_transaction_table(l_count).param_name :=upper('p_per_information28');
8290   l_transaction_table(l_count).param_value := p_per_information28;
8291   l_transaction_table(l_count).param_data_type := upper('varchar2');
8292   --
8293   --
8294   l_count := l_count + 1;
8295   l_transaction_table(l_count).param_name :=upper('p_per_information29');
8296   l_transaction_table(l_count).param_value := p_per_information29;
8297   l_transaction_table(l_count).param_data_type := upper('varchar2');
8298   --
8299   --
8300   l_count := l_count + 1;
8301   l_transaction_table(l_count).param_name :=upper('p_per_information30');
8302   l_transaction_table(l_count).param_value := p_per_information30;
8303   l_transaction_table(l_count).param_data_type := upper('varchar2');
8304   --
8305   --
8306   l_count := l_count + 1;
8307   l_transaction_table(l_count).param_name :=upper('p_correspondence_language');
8308   l_transaction_table(l_count).param_value := p_correspondence_language;
8309   l_transaction_table(l_count).param_data_type := upper('varchar2');
8310   --
8311   --
8312   l_count := l_count + 1;
8313   l_transaction_table(l_count).param_name :=upper('p_honors');
8314   l_transaction_table(l_count).param_value := p_honors;
8315   l_transaction_table(l_count).param_data_type := upper('varchar2');
8316   --
8317   --
8318   l_count := l_count + 1;
8319   l_transaction_table(l_count).param_name :=upper('p_pre_name_adjunct');
8320   l_transaction_table(l_count).param_value := p_pre_name_adjunct;
8321   l_transaction_table(l_count).param_data_type := upper('varchar2');
8322   --
8323   --
8324   l_count := l_count + 1;
8325   l_transaction_table(l_count).param_name :=upper('p_suffix');
8326   l_transaction_table(l_count).param_value := p_suffix;
8327   l_transaction_table(l_count).param_data_type := upper('varchar2');
8328   --
8329   --
8330   l_count := l_count + 1;
8331   l_transaction_table(l_count).param_name :=upper('p_create_mirror_flag');
8332   l_transaction_table(l_count).param_value := p_create_mirror_flag;
8333   l_transaction_table(l_count).param_data_type := upper('varchar2');
8334   --
8335   --
8336   l_count := l_count + 1;
8337   l_transaction_table(l_count).param_name :=upper('p_mirror_type');
8338   l_transaction_table(l_count).param_value := p_mirror_type;
8339   l_transaction_table(l_count).param_data_type := upper('varchar2');
8340   --
8341   --
8342   l_count := l_count + 1;
8343   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute_cat');
8344   l_transaction_table(l_count).param_value := p_mirror_cont_attribute_cat;
8345   l_transaction_table(l_count).param_data_type := upper('varchar2');
8346   --
8347   --
8348   l_count := l_count + 1;
8349   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute1');
8350   l_transaction_table(l_count).param_value := p_mirror_cont_attribute1;
8351   l_transaction_table(l_count).param_data_type := upper('varchar2');
8352   --
8353   --
8354   l_count := l_count + 1;
8355   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute2');
8356   l_transaction_table(l_count).param_value := p_mirror_cont_attribute2;
8357   l_transaction_table(l_count).param_data_type := upper('varchar2');
8358   --
8359   --
8360   l_count := l_count + 1;
8361   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute3');
8362   l_transaction_table(l_count).param_value := p_mirror_cont_attribute3;
8363   l_transaction_table(l_count).param_data_type := upper('varchar2');
8364   --
8365   --
8366   l_count := l_count + 1;
8367   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute4');
8368   l_transaction_table(l_count).param_value := p_mirror_cont_attribute4;
8369   l_transaction_table(l_count).param_data_type := upper('varchar2');
8370   --
8371   --
8372   l_count := l_count + 1;
8373   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute5');
8374   l_transaction_table(l_count).param_value := p_mirror_cont_attribute5;
8375   l_transaction_table(l_count).param_data_type := upper('varchar2');
8376   --
8377   --
8378   l_count := l_count + 1;
8379   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute6');
8380   l_transaction_table(l_count).param_value := p_mirror_cont_attribute6;
8381   l_transaction_table(l_count).param_data_type := upper('varchar2');
8382   --
8383   --
8384   l_count := l_count + 1;
8385   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute7');
8386   l_transaction_table(l_count).param_value := p_mirror_cont_attribute7;
8387   l_transaction_table(l_count).param_data_type := upper('varchar2');
8388   --
8389   --
8390   l_count := l_count + 1;
8391   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute8');
8392   l_transaction_table(l_count).param_value := p_mirror_cont_attribute8;
8393   l_transaction_table(l_count).param_data_type := upper('varchar2');
8394   --
8395   --
8396   l_count := l_count + 1;
8397   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute9');
8398   l_transaction_table(l_count).param_value := p_mirror_cont_attribute9;
8399   l_transaction_table(l_count).param_data_type := upper('varchar2');
8400   --
8401   --
8402   l_count := l_count + 1;
8403   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute10');
8404   l_transaction_table(l_count).param_value := p_mirror_cont_attribute10;
8405   l_transaction_table(l_count).param_data_type := upper('varchar2');
8406   --
8407   --
8408   l_count := l_count + 1;
8409   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute11');
8410   l_transaction_table(l_count).param_value := p_mirror_cont_attribute11;
8411   l_transaction_table(l_count).param_data_type := upper('varchar2');
8412   --
8413   --
8414   l_count := l_count + 1;
8415   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute12');
8416   l_transaction_table(l_count).param_value := p_mirror_cont_attribute12;
8417   l_transaction_table(l_count).param_data_type := upper('varchar2');
8418   --
8419   --
8420   l_count := l_count + 1;
8421   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute13');
8422   l_transaction_table(l_count).param_value := p_mirror_cont_attribute13;
8423   l_transaction_table(l_count).param_data_type := upper('varchar2');
8424   --
8425   --
8426   l_count := l_count + 1;
8427   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute14');
8428   l_transaction_table(l_count).param_value := p_mirror_cont_attribute14;
8429   l_transaction_table(l_count).param_data_type := upper('varchar2');
8430   --
8431   --
8432   l_count := l_count + 1;
8433   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute15');
8434   l_transaction_table(l_count).param_value := p_mirror_cont_attribute15;
8435   l_transaction_table(l_count).param_data_type := upper('varchar2');
8436   --
8437   --
8438   l_count := l_count + 1;
8439   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute16');
8440   l_transaction_table(l_count).param_value := p_mirror_cont_attribute16;
8441   l_transaction_table(l_count).param_data_type := upper('varchar2');
8442   --
8443   --
8444   l_count := l_count + 1;
8445   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute17');
8446   l_transaction_table(l_count).param_value := p_mirror_cont_attribute17;
8447   l_transaction_table(l_count).param_data_type := upper('varchar2');
8448   --
8449   --
8450   l_count := l_count + 1;
8451   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute18');
8452   l_transaction_table(l_count).param_value := p_mirror_cont_attribute18;
8453   l_transaction_table(l_count).param_data_type := upper('varchar2');
8454   --
8455   --
8456   l_count := l_count + 1;
8457   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute19');
8458   l_transaction_table(l_count).param_value := p_mirror_cont_attribute19;
8459   l_transaction_table(l_count).param_data_type := upper('varchar2');
8460   --
8461   --
8462   l_count := l_count + 1;
8463   l_transaction_table(l_count).param_name :=upper('p_mirror_cont_attribute20');
8464   l_transaction_table(l_count).param_value := p_mirror_cont_attribute20;
8465   l_transaction_table(l_count).param_data_type := upper('varchar2');
8466   --
8467   --
8468   l_count := l_count + 1;
8469   l_transaction_table(l_count).param_name :=upper('p_item_type');
8470   l_transaction_table(l_count).param_value := p_item_type;
8471   l_transaction_table(l_count).param_data_type := upper('varchar2');
8472   --
8473   --
8474   l_count := l_count + 1;
8475   l_transaction_table(l_count).param_name :=upper('p_item_key');
8476   l_transaction_table(l_count).param_value := p_item_key;
8477   l_transaction_table(l_count).param_data_type := upper('varchar2');
8478   --
8479   -- 9999 This may not be necessary as it is same as P_REVIEW_ACTID.
8480   -- Check it and delete it after complete testing.
8481   --
8482   l_count := l_count + 1;
8483   l_transaction_table(l_count).param_name :=upper('p_activity_id');
8484   l_transaction_table(l_count).param_value := p_activity_id;
8485   l_transaction_table(l_count).param_data_type := upper('number');
8486   --
8487   --
8488   l_count := l_count + 1;
8489   l_transaction_table(l_count).param_name :=upper('p_action');
8490   l_transaction_table(l_count).param_value := p_action;
8491   l_transaction_table(l_count).param_data_type := upper('varchar2');
8492   --
8493   --
8494   l_count := l_count + 1;
8495   l_transaction_table(l_count).param_name :=upper('p_login_person_id');
8496   l_transaction_table(l_count).param_value := p_login_person_id;
8497   l_transaction_table(l_count).param_data_type := upper('number');
8498   --
8499   --
8500   l_count := l_count + 1;
8501   l_transaction_table(l_count).param_name :=upper('p_process_section_name');
8502   l_transaction_table(l_count).param_value := p_process_section_name;
8503   l_transaction_table(l_count).param_data_type := upper('varchar2');
8504   --
8505   -- 77777
8506   --
8507   l_count := l_count + 1;
8508   l_transaction_table(l_count).param_name :=upper('P_REVIEW_PROC_CALL');
8509   l_transaction_table(l_count).param_value := p_review_page_region_code;
8510   l_transaction_table(l_count).param_data_type := upper('varchar2');
8511   --
8512   --
8513   l_count := l_count + 1;
8514   l_transaction_table(l_count).param_name := 'P_REVIEW_ACTID';
8515   l_transaction_table(l_count).param_value := P_ACTIVITY_ID;
8516   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
8517   --
8518   --
8519   l_count := l_count + 1;
8520   l_transaction_table(l_count).param_name :=upper('p_adjusted_svc_date');
8521   l_transaction_table(l_count).param_value :=
8522             to_char(p_adjusted_svc_date , hr_transaction_ss.g_date_format);
8523   l_transaction_table(l_count).param_data_type := upper('date');
8524   --
8525   --
8526   l_count := l_count + 1;
8527   l_transaction_table(l_count).param_name :=upper('p_datetrack_update_mode');
8528   l_transaction_table(l_count).param_value := p_datetrack_update_mode;
8529   l_transaction_table(l_count).param_data_type := upper('varchar2');
8530   --
8531   --
8532   l_count := l_count + 1;
8533   l_transaction_table(l_count).param_name :=upper('p_applicant_number');
8534   l_transaction_table(l_count).param_value := p_applicant_number;
8535   l_transaction_table(l_count).param_data_type := upper('varchar2');
8536   --
8537   --
8538   l_count := l_count + 1;
8539   l_transaction_table(l_count).param_name :=upper('p_background_check_status');
8540   l_transaction_table(l_count).param_value := p_background_check_status;
8541   l_transaction_table(l_count).param_data_type := upper('varchar2');
8542   --
8543   --
8544   l_count := l_count + 1;
8545   l_transaction_table(l_count).param_name :=upper('p_background_date_check');
8546   l_transaction_table(l_count).param_value :=
8547             to_char(p_background_date_check , hr_transaction_ss.g_date_format);
8548   l_transaction_table(l_count).param_data_type := upper('date');
8549   --
8550   --
8551   l_count := l_count + 1;
8552   l_transaction_table(l_count).param_name :=upper('p_benefit_group_id');
8553   l_transaction_table(l_count).param_value := p_benefit_group_id;
8554   l_transaction_table(l_count).param_data_type := upper('number');
8555   --
8556   --
8557   l_count := l_count + 1;
8558   l_transaction_table(l_count).param_name :=upper('p_blood_type');
8559   l_transaction_table(l_count).param_value := p_blood_type;
8560   l_transaction_table(l_count).param_data_type := upper('varchar2');
8561   --
8562   --
8563   l_count := l_count + 1;
8564   l_transaction_table(l_count).param_name :=upper('p_coord_ben_med_pln_no');
8565   l_transaction_table(l_count).param_value := p_coord_ben_med_pln_no;
8566   l_transaction_table(l_count).param_data_type := upper('varchar2');
8567   --
8568   --
8569   l_count := l_count + 1;
8570   l_transaction_table(l_count).param_name :=upper('p_coord_ben_no_cvg_flag');
8571   l_transaction_table(l_count).param_value := p_coord_ben_no_cvg_flag;
8572   l_transaction_table(l_count).param_data_type := upper('varchar2');
8573   --
8574   --
8575   l_count := l_count + 1;
8576   l_transaction_table(l_count).param_name :=upper('p_country_of_birth');
8577   l_transaction_table(l_count).param_value := p_country_of_birth;
8578   l_transaction_table(l_count).param_data_type := upper('varchar2');
8579   --
8580   --
8581   l_count := l_count + 1;
8582   l_transaction_table(l_count).param_name :=upper('p_date_employee_data_verified');
8583   l_transaction_table(l_count).param_value :=
8584             to_char(p_date_employee_data_verified , hr_transaction_ss.g_date_format);
8585   l_transaction_table(l_count).param_data_type := upper('date');
8586   --
8587   --
8588   l_count := l_count + 1;
8589   l_transaction_table(l_count).param_name :=upper('p_date_of_death');
8590   l_transaction_table(l_count).param_value :=
8591             to_char(p_date_of_death , hr_transaction_ss.g_date_format);
8592   l_transaction_table(l_count).param_data_type := upper('date');
8593   --
8594   --
8595   l_count := l_count + 1;
8596   l_transaction_table(l_count).param_name :=upper('p_dpdnt_adoption_date');
8597   l_transaction_table(l_count).param_value :=
8598             to_char(p_dpdnt_adoption_date , hr_transaction_ss.g_date_format);
8599   l_transaction_table(l_count).param_data_type := upper('date');
8600   --
8601   --
8602   l_count := l_count + 1;
8603   l_transaction_table(l_count).param_name :=upper('p_dpdnt_vlntry_svce_flag');
8604   l_transaction_table(l_count).param_value := p_dpdnt_vlntry_svce_flag;
8605   l_transaction_table(l_count).param_data_type := upper('varchar2');
8606   --
8607   --
8608   l_count := l_count + 1;
8609   l_transaction_table(l_count).param_name :=upper('p_employee_number');
8610   l_transaction_table(l_count).param_value := p_employee_number;
8611   l_transaction_table(l_count).param_data_type := upper('varchar2');
8612   --
8613   --
8614   l_count := l_count + 1;
8615   l_transaction_table(l_count).param_name :=upper('p_expense_check_send_to_addres');
8616   l_transaction_table(l_count).param_value := p_expense_check_send_to_addres;
8617   l_transaction_table(l_count).param_data_type := upper('varchar2');
8618   --
8619   --
8620   l_count := l_count + 1;
8621   l_transaction_table(l_count).param_name :=upper('p_fast_path_employee');
8622   l_transaction_table(l_count).param_value := p_fast_path_employee;
8623   l_transaction_table(l_count).param_data_type := upper('varchar2');
8624   --
8625   --
8626   l_count := l_count + 1;
8627   l_transaction_table(l_count).param_name :=upper('p_fte_capacity');
8628   l_transaction_table(l_count).param_value := p_fte_capacity;
8629   l_transaction_table(l_count).param_data_type := upper('number');
8630   --
8631   --
8632   l_count := l_count + 1;
8633   l_transaction_table(l_count).param_name :=upper('p_global_person_id');
8634   l_transaction_table(l_count).param_value := p_global_person_id;
8635   l_transaction_table(l_count).param_data_type := upper('varchar2');
8636   --
8637   --
8638   l_count := l_count + 1;
8639   l_transaction_table(l_count).param_name :=upper('p_hold_applicant_date_until');
8640   l_transaction_table(l_count).param_value :=
8641             to_char(p_hold_applicant_date_until , hr_transaction_ss.g_date_format);
8642   l_transaction_table(l_count).param_data_type := upper('date');
8643   --
8644   --
8645   l_count := l_count + 1;
8646   l_transaction_table(l_count).param_name :=upper('p_internal_location');
8647   l_transaction_table(l_count).param_value := p_internal_location;
8648   l_transaction_table(l_count).param_data_type := upper('varchar2');
8649   --
8650   --
8651   l_count := l_count + 1;
8652   l_transaction_table(l_count).param_name :=upper('p_last_medical_test_by');
8653   l_transaction_table(l_count).param_value := p_last_medical_test_by;
8654   l_transaction_table(l_count).param_data_type := upper('varchar2');
8655   --
8656   --
8657   l_count := l_count + 1;
8658   l_transaction_table(l_count).param_name :=upper('p_last_medical_test_date');
8659   l_transaction_table(l_count).param_value :=
8660             to_char(p_last_medical_test_date , hr_transaction_ss.g_date_format);
8661   l_transaction_table(l_count).param_data_type := upper('date');
8662   --
8663   --
8664   l_count := l_count + 1;
8665   l_transaction_table(l_count).param_name :=upper('p_mailstop');
8666   l_transaction_table(l_count).param_value := p_mailstop;
8667   l_transaction_table(l_count).param_data_type := upper('varchar2');
8668   --
8669   --
8670   l_count := l_count + 1;
8671   l_transaction_table(l_count).param_name :=upper('p_office_number');
8672   l_transaction_table(l_count).param_value := p_office_number;
8673   l_transaction_table(l_count).param_data_type := upper('varchar2');
8674   --
8675   --
8676   l_count := l_count + 1;
8677   l_transaction_table(l_count).param_name :=upper('p_on_military_service');
8678   l_transaction_table(l_count).param_value := p_on_military_service;
8679   l_transaction_table(l_count).param_data_type := upper('varchar2');
8680   --
8681   --
8682   l_count := l_count + 1;
8683   l_transaction_table(l_count).param_name :=upper('p_original_date_of_hire');
8684   l_transaction_table(l_count).param_value :=
8685             to_char(p_original_date_of_hire , hr_transaction_ss.g_date_format);
8686   l_transaction_table(l_count).param_data_type := upper('date');
8687   --
8688   --
8689   l_count := l_count + 1;
8690   l_transaction_table(l_count).param_name :=upper('p_projected_start_date');
8691   l_transaction_table(l_count).param_value :=
8692             to_char(p_projected_start_date , hr_transaction_ss.g_date_format);
8693   l_transaction_table(l_count).param_data_type := upper('date');
8694   --
8695   --
8696   l_count := l_count + 1;
8697   l_transaction_table(l_count).param_name :=upper('p_receipt_of_death_cert_date');
8698   l_transaction_table(l_count).param_value :=
8699             to_char(p_receipt_of_death_cert_date , hr_transaction_ss.g_date_format);
8700   l_transaction_table(l_count).param_data_type := upper('date');
8701   --
8702   --
8703   l_count := l_count + 1;
8704   l_transaction_table(l_count).param_name :=upper('p_region_of_birth');
8705   l_transaction_table(l_count).param_value := p_region_of_birth;
8706   l_transaction_table(l_count).param_data_type := upper('varchar2');
8707   --
8708   --
8709   l_count := l_count + 1;
8710   l_transaction_table(l_count).param_name :=upper('p_rehire_authorizor');
8711   l_transaction_table(l_count).param_value := p_rehire_authorizor;
8712   l_transaction_table(l_count).param_data_type := upper('varchar2');
8713   --
8714   --
8715   l_count := l_count + 1;
8716   l_transaction_table(l_count).param_name :=upper('p_rehire_recommendation');
8717   l_transaction_table(l_count).param_value := p_rehire_recommendation;
8718   l_transaction_table(l_count).param_data_type := upper('varchar2');
8719   --
8720   --
8721   l_count := l_count + 1;
8722   l_transaction_table(l_count).param_name :=upper('p_rehire_reason');
8723   l_transaction_table(l_count).param_value := p_rehire_reason;
8724   l_transaction_table(l_count).param_data_type := upper('varchar2');
8725   --
8726   --
8727   l_count := l_count + 1;
8728   l_transaction_table(l_count).param_name :=upper('p_resume_exists');
8729   l_transaction_table(l_count).param_value := p_resume_exists;
8730   l_transaction_table(l_count).param_data_type := upper('varchar2');
8731   --
8732   --
8733   l_count := l_count + 1;
8734   l_transaction_table(l_count).param_name :=upper('p_resume_last_updated');
8735   l_transaction_table(l_count).param_value := to_char(p_resume_last_updated , hr_transaction_ss.g_date_format);
8736   l_transaction_table(l_count).param_data_type := upper('date');
8737   --
8738   --
8739   l_count := l_count + 1;
8740   l_transaction_table(l_count).param_name :=upper('p_second_passport_exists');
8741   l_transaction_table(l_count).param_value := p_second_passport_exists;
8742   l_transaction_table(l_count).param_data_type := upper('varchar2');
8743   --
8744   --
8745   l_count := l_count + 1;
8746   l_transaction_table(l_count).param_name :=upper('p_student_status');
8747   l_transaction_table(l_count).param_value := p_student_status;
8748   l_transaction_table(l_count).param_data_type := upper('varchar2');
8749   --
8750   --
8751   l_count := l_count + 1;
8752   l_transaction_table(l_count).param_name :=upper('p_town_of_birth');
8753   l_transaction_table(l_count).param_value := p_town_of_birth;
8754   l_transaction_table(l_count).param_data_type := upper('varchar2');
8755   --
8756   --
8757   l_count := l_count + 1;
8758   l_transaction_table(l_count).param_name :=upper('p_uses_tobacco_flag');
8759   l_transaction_table(l_count).param_value := p_uses_tobacco_flag;
8760   l_transaction_table(l_count).param_data_type := upper('varchar2');
8761   --
8762   --
8763   l_count := l_count + 1;
8764   l_transaction_table(l_count).param_name :=upper('p_vendor_id');
8765   l_transaction_table(l_count).param_value := p_vendor_id;
8766   l_transaction_table(l_count).param_data_type := upper('number');
8767   --
8768   --
8769   l_count := l_count + 1;
8770   l_transaction_table(l_count).param_name :=upper('p_work_schedule');
8771   l_transaction_table(l_count).param_value := p_work_schedule;
8772   l_transaction_table(l_count).param_data_type := upper('varchar2');
8773   --
8774   -- These are the parameters which are there in the update_contact.
8775   -- We need to populate null values so that we can have generic get
8776   -- function which works for create_contact and update_contact.
8777   --
8778   l_count := l_count + 1;
8779   l_transaction_table(l_count).param_name :=upper('p_cont_effective_date');
8780   l_transaction_table(l_count).param_value := null;
8781   l_transaction_table(l_count).param_data_type := upper('date');
8782   --
8783   l_transaction_table(l_count).param_name :=upper('p_cont_object_version_number');
8784   l_transaction_table(l_count).param_value := null;
8785   l_transaction_table(l_count).param_data_type := upper('number');
8786   --
8787   l_count := l_count + 1;
8788   l_transaction_table(l_count).param_name :=upper('p_per_effective_date');
8789   l_transaction_table(l_count).param_value := null;
8790   l_transaction_table(l_count).param_data_type := upper('date');
8791   --
8792   --
8793   l_count := l_count + 1;
8794   l_transaction_table(l_count).param_name :=upper('p_cont_person_id');
8795   l_transaction_table(l_count).param_value := p_contact_person_id;
8796   l_transaction_table(l_count).param_data_type := upper('number');
8797   --
8798   --
8799   l_count := l_count + 1;
8800   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION_CATEGORY');
8801   l_transaction_table(l_count).param_value := P_CONT_INFORMATION_CATEGORY;
8802   l_transaction_table(l_count).param_data_type := upper('varchar2');
8803 
8804   --
8805   --
8806 
8807   l_count := l_count + 1;
8808   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION1');
8809   l_transaction_table(l_count).param_value := P_CONT_INFORMATION1;
8810   l_transaction_table(l_count).param_data_type := upper('varchar2');
8811 
8812   --
8813   --
8814 
8815   l_count := l_count + 1;
8816   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION2');
8817   l_transaction_table(l_count).param_value := P_CONT_INFORMATION2;
8818   l_transaction_table(l_count).param_data_type := upper('varchar2');
8819 
8820   --
8821   --
8822 
8823   l_count := l_count + 1;
8824   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION3');
8825   l_transaction_table(l_count).param_value := P_CONT_INFORMATION3;
8826   l_transaction_table(l_count).param_data_type := upper('varchar2');
8827 
8828   --
8829   --
8830 
8831   l_count := l_count + 1;
8832   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION4');
8833   l_transaction_table(l_count).param_value := P_CONT_INFORMATION4;
8834   l_transaction_table(l_count).param_data_type := upper('varchar2');
8835 
8836   --
8837   --
8838 
8839   l_count := l_count + 1;
8840   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION5');
8841   l_transaction_table(l_count).param_value := P_CONT_INFORMATION5;
8842   l_transaction_table(l_count).param_data_type := upper('varchar2');
8843 
8844   --
8845   --
8846 
8847   l_count := l_count + 1;
8848   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION6');
8849   l_transaction_table(l_count).param_value := P_CONT_INFORMATION6;
8850   l_transaction_table(l_count).param_data_type := upper('varchar2');
8851 
8852   --
8853   --
8854 
8855   l_count := l_count + 1;
8856   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION7');
8857   l_transaction_table(l_count).param_value := P_CONT_INFORMATION7;
8858   l_transaction_table(l_count).param_data_type := upper('varchar2');
8859 
8860   --
8861   --
8862 
8863   l_count := l_count + 1;
8864   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION8');
8865   l_transaction_table(l_count).param_value := P_CONT_INFORMATION8;
8866   l_transaction_table(l_count).param_data_type := upper('varchar2');
8867 
8868   --
8869   --
8870 
8871   l_count := l_count + 1;
8872   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION9');
8873   l_transaction_table(l_count).param_value := P_CONT_INFORMATION9;
8874   l_transaction_table(l_count).param_data_type := upper('varchar2');
8875 
8876   --
8877   --
8878 
8879   l_count := l_count + 1;
8880   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION10');
8881   l_transaction_table(l_count).param_value := P_CONT_INFORMATION10;
8882   l_transaction_table(l_count).param_data_type := upper('varchar2');
8883 
8884   --
8885   --
8886 
8887   l_count := l_count + 1;
8888   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION11');
8889   l_transaction_table(l_count).param_value := P_CONT_INFORMATION11;
8890   l_transaction_table(l_count).param_data_type := upper('varchar2');
8891 
8892   --
8893   --
8894 
8895   l_count := l_count + 1;
8896   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION12');
8897   l_transaction_table(l_count).param_value := P_CONT_INFORMATION12;
8898   l_transaction_table(l_count).param_data_type := upper('varchar2');
8899 
8900   --
8901   --
8902 
8903   l_count := l_count + 1;
8904   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION13');
8905   l_transaction_table(l_count).param_value := P_CONT_INFORMATION13;
8906   l_transaction_table(l_count).param_data_type := upper('varchar2');
8907 
8908   --
8909   --
8910 
8911   l_count := l_count + 1;
8912   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION14');
8913   l_transaction_table(l_count).param_value := P_CONT_INFORMATION14;
8914   l_transaction_table(l_count).param_data_type := upper('varchar2');
8915 
8916   --
8917   --
8918 
8919   l_count := l_count + 1;
8920   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION15');
8921   l_transaction_table(l_count).param_value := P_CONT_INFORMATION15;
8922   l_transaction_table(l_count).param_data_type := upper('varchar2');
8923 
8924   --
8925   --
8926 
8927   l_count := l_count + 1;
8928   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION16');
8929   l_transaction_table(l_count).param_value := P_CONT_INFORMATION16;
8930   l_transaction_table(l_count).param_data_type := upper('varchar2');
8931 
8932   --
8933   --
8934 
8935   l_count := l_count + 1;
8936   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION17');
8937   l_transaction_table(l_count).param_value := P_CONT_INFORMATION17;
8938   l_transaction_table(l_count).param_data_type := upper('varchar2');
8939 
8940   --
8941   --
8942 
8943   l_count := l_count + 1;
8944   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION18');
8945   l_transaction_table(l_count).param_value := P_CONT_INFORMATION18;
8946   l_transaction_table(l_count).param_data_type := upper('varchar2');
8947 
8948   --
8949   --
8950 
8951   l_count := l_count + 1;
8952   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION19');
8953   l_transaction_table(l_count).param_value := P_CONT_INFORMATION19;
8954   l_transaction_table(l_count).param_data_type := upper('varchar2');
8955 
8956   --
8957   --
8958 
8959   l_count := l_count + 1;
8960   l_transaction_table(l_count).param_name :=upper('P_CONT_INFORMATION20');
8961   l_transaction_table(l_count).param_value := P_CONT_INFORMATION20;
8962   l_transaction_table(l_count).param_data_type := upper('varchar2');
8963 
8964   --
8965   --
8966 
8967   l_count := l_count + 1;
8968   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION_CAT');
8969   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION_CAT;
8970   l_transaction_table(l_count).param_data_type := upper('varchar2');
8971 
8972   --
8973   --
8974 
8975   l_count := l_count + 1;
8976   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION1');
8977   l_transaction_table(l_count).param_value := P_CONT_INFORMATION1;
8978   l_transaction_table(l_count).param_data_type := upper('varchar2');
8979 
8980   --
8981   --
8982 
8983   l_count := l_count + 1;
8984   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION2');
8985   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION2;
8986   l_transaction_table(l_count).param_data_type := upper('varchar2');
8987 
8988   --
8989   --
8990 
8991   l_count := l_count + 1;
8992   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION3');
8993   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION3;
8994   l_transaction_table(l_count).param_data_type := upper('varchar2');
8995 
8996   --
8997   --
8998 
8999   l_count := l_count + 1;
9000   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION4');
9001   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION4;
9002   l_transaction_table(l_count).param_data_type := upper('varchar2');
9003 
9004   --
9005   --
9006 
9007   l_count := l_count + 1;
9008   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION5');
9009   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION5;
9010   l_transaction_table(l_count).param_data_type := upper('varchar2');
9011 
9012   --
9013   --
9014 
9015   l_count := l_count + 1;
9016   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION6');
9017   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION6;
9018   l_transaction_table(l_count).param_data_type := upper('varchar2');
9019 
9020   --
9021   --
9022 
9023   l_count := l_count + 1;
9024   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION7');
9025   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION7;
9026   l_transaction_table(l_count).param_data_type := upper('varchar2');
9027 
9028   --
9029   --
9030 
9031   l_count := l_count + 1;
9032   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION8');
9033   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION8;
9034   l_transaction_table(l_count).param_data_type := upper('varchar2');
9035 
9036   --
9037   --
9038 
9039   l_count := l_count + 1;
9040   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION9');
9041   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION9;
9042   l_transaction_table(l_count).param_data_type := upper('varchar2');
9043 
9044   --
9045   --
9046 
9047   l_count := l_count + 1;
9048   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION10');
9049   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION10;
9050   l_transaction_table(l_count).param_data_type := upper('varchar2');
9051 
9052   --
9053   --
9054 
9055   l_count := l_count + 1;
9056   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION11');
9057   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION11;
9058   l_transaction_table(l_count).param_data_type := upper('varchar2');
9059 
9060   --
9061   --
9062 
9063   l_count := l_count + 1;
9064   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION12');
9065   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION12;
9066   l_transaction_table(l_count).param_data_type := upper('varchar2');
9067 
9068   --
9069   --
9070 
9071   l_count := l_count + 1;
9072   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION13');
9073   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION13;
9074   l_transaction_table(l_count).param_data_type := upper('varchar2');
9075 
9076   --
9077   --
9078 
9079   l_count := l_count + 1;
9080   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION14');
9081   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION14;
9082   l_transaction_table(l_count).param_data_type := upper('varchar2');
9083 
9084   --
9085   --
9086 
9087   l_count := l_count + 1;
9088   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION15');
9089   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION15;
9090   l_transaction_table(l_count).param_data_type := upper('varchar2');
9091 
9092   --
9093   --
9094 
9095   l_count := l_count + 1;
9096   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION16');
9097   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION16;
9098   l_transaction_table(l_count).param_data_type := upper('varchar2');
9099 
9100   --
9101   --
9102 
9103   l_count := l_count + 1;
9104   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION17');
9105   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION17;
9106   l_transaction_table(l_count).param_data_type := upper('varchar2');
9107 
9108   --
9109   --
9110 
9111   l_count := l_count + 1;
9112   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION18');
9113   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION18;
9114   l_transaction_table(l_count).param_data_type := upper('varchar2');
9115 
9116   --
9117   --
9118 
9119   l_count := l_count + 1;
9120   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION19');
9121   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION19;
9122   l_transaction_table(l_count).param_data_type := upper('varchar2');
9123 
9124   --
9125   --
9126 
9127   l_count := l_count + 1;
9128   l_transaction_table(l_count).param_name :=upper('P_MIRROR_CONT_INFORMATION20');
9129   l_transaction_table(l_count).param_value := P_MIRROR_CONT_INFORMATION20;
9130   l_transaction_table(l_count).param_data_type := upper('varchar2');
9131 
9132   --StartRegistration
9133   --  This is a marker for the contact person to be used to identify the Address
9134   --  to be retrieved for the contact person in context in review page.
9135   --  The HR_LAST_CONTACT_SET is in from the work flow attribute
9136   begin
9137        l_contact_set := wf_engine.GetItemAttrNumber(itemtype => p_item_type,
9138                                                     itemkey  => p_item_key,
9139                                                     aname    => 'HR_CONTACT_SET');
9140 
9141        exception when others then
9142             hr_utility.set_location('Exception:'||l_proc,560);
9143             l_contact_set := 0;
9144 
9145   end;
9146 
9147   l_count := l_count + 1;
9148   l_transaction_table(l_count).param_name := 'P_CONTACT_SET';
9149   l_transaction_table(l_count).param_value := l_contact_set;
9150   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
9151   --EndRegistration
9152   hr_utility.set_location('Before Calling :hr_transaction_ss.save_transaction_step', 90);
9153   --
9154   hr_transaction_ss.save_transaction_step
9155                 (p_item_type            => p_item_type
9156                 ,p_item_key             => p_item_key
9157                 ,p_login_person_id      => nvl(p_login_person_id, p_person_id) -- Registration
9158                 -- ,p_login_person_id      =>  p_person_id
9159                 ,p_actid                => p_activity_id
9160                 ,p_transaction_step_id  => l_transaction_step_id
9161                 ,p_api_name             => g_package || '.PROCESS_CREATE_CONTACT_API'
9162                 ,p_transaction_data     => l_transaction_table);
9163   --
9164 --  hr_utility.set_location('Leaving hr_contact_rel_api.create_contact_tt', 100);
9165 
9166   hr_utility.set_location('Exiting:'||l_proc,100);
9167   --
9168   -- 9999 What full_name code is doing? Do we need to add?
9169   -- 9999 Any warnings do we need to pass back to java code?
9170   -- 9999 Reset the object version number.
9171   --
9172   EXCEPTION
9173     WHEN hr_utility.hr_error THEN
9174          -- -------------------------------------------
9175          -- an application error has been raised so we must
9176          -- redisplay the web form to display the error
9177          -- --------------------------------------------
9178          hr_utility.set_location('Exception:'||l_proc,565);
9179          hr_message.provide_error;
9180          l_message_number := hr_message.last_message_number;
9181          --
9182          -- 99999 What error messages I have to trap here.
9183          --
9184          IF l_message_number = 'APP-7165' OR
9185             l_message_number = 'APP-7155' THEN
9186             hr_utility.set_message(800, 'HR_UPDATE_NOT_ALLOWED');
9187             hr_utility.raise_error;
9188          ELSE
9189             hr_utility.raise_error;
9190          END IF;
9191     WHEN OTHERS THEN
9192       hr_utility.set_location('Exception:'||l_proc,570);
9193       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
9194       hr_utility.raise_error;
9195       --RAISE;  -- Raise error here relevant to the new tech stack.
9196  --
9197  END create_contact_tt;
9198 --
9199 
9200 Function is_con_rec_changed (
9201   p_adjusted_svc_date            in      date     default hr_api.g_date
9202   ,p_applicant_number             in      varchar2 default hr_api.g_varchar2
9203   ,p_background_check_status      in      varchar2 default hr_api.g_varchar2
9204   ,p_background_date_check        in      date     default hr_api.g_date
9205   ,p_benefit_group_id             in      number   default hr_api.g_number
9206   ,p_blood_type                   in      varchar2 default hr_api.g_varchar2
9207   ,p_coord_ben_med_pln_no         in      varchar2 default hr_api.g_varchar2
9208   ,p_coord_ben_no_cvg_flag        in      varchar2 default hr_api.g_varchar2
9209   ,p_country_of_birth             in      varchar2 default hr_api.g_varchar2
9210   ,p_date_employee_data_verified  in      date     default hr_api.g_date
9211   ,p_date_of_death                in      date     default hr_api.g_date
9212   ,p_dpdnt_adoption_date          in      date     default hr_api.g_date
9213   ,p_dpdnt_vlntry_svce_flag       in      varchar2 default hr_api.g_varchar2
9214   ,p_expense_check_send_to_addres in      varchar2 default hr_api.g_varchar2
9215   ,p_fast_path_employee           in      varchar2 default hr_api.g_varchar2
9216   ,p_fte_capacity                 in      number   default hr_api.g_number
9217   ,p_global_person_id             in      varchar2 default hr_api.g_varchar2
9218   ,p_hold_applicant_date_until    in      date     default hr_api.g_date
9219   ,p_internal_location            in      varchar2 default hr_api.g_varchar2
9220   ,p_last_medical_test_by         in      varchar2 default hr_api.g_varchar2
9221   ,p_last_medical_test_date       in      date     default hr_api.g_date
9222   ,p_mailstop                     in      varchar2 default hr_api.g_varchar2
9223   ,p_office_number                in      varchar2 default hr_api.g_varchar2
9224   ,p_on_military_service          in      varchar2 default hr_api.g_varchar2
9225   ,p_original_date_of_hire        in      date     default hr_api.g_date
9226   ,p_projected_start_date         in      date     default hr_api.g_date
9227   ,p_receipt_of_death_cert_date   in      date     default hr_api.g_date
9228   ,p_region_of_birth              in      varchar2 default hr_api.g_varchar2
9229   ,p_rehire_authorizor            in      varchar2 default hr_api.g_varchar2
9230   ,p_rehire_recommendation        in      varchar2 default hr_api.g_varchar2
9231   ,p_rehire_reason                in      varchar2 default hr_api.g_varchar2
9232   ,p_resume_exists                in      varchar2 default hr_api.g_varchar2
9233   ,p_resume_last_updated          in      date     default hr_api.g_date
9234   ,p_second_passport_exists       in      varchar2 default hr_api.g_varchar2
9235   ,p_student_status               in      varchar2 default hr_api.g_varchar2
9236   ,p_town_of_birth                in      varchar2 default hr_api.g_varchar2
9237   ,p_uses_tobacco_flag            in      varchar2 default hr_api.g_varchar2
9238   ,p_vendor_id                    in      number   default hr_api.g_number
9239   ,p_work_schedule                in      varchar2 default hr_api.g_varchar2  )
9240   return boolean is
9241   --
9242   l_rec_changed                    boolean default FALSE;
9243   l_proc   varchar2(72)  := g_package||'is_con_rec_changed';
9244 
9245 BEGIN
9246    --
9247    hr_utility.set_location('Entering:'||l_proc, 5);
9248    IF p_adjusted_svc_date <> hr_api.g_date
9249    THEN
9250             l_rec_changed := TRUE;
9251             goto finish;
9252    END IF;
9253    --
9254    --
9255    IF p_applicant_number <> hr_api.g_varchar2
9256    THEN
9257             l_rec_changed := TRUE;
9258             goto finish;
9259    END IF;
9260    --
9261    --
9262    IF p_background_check_status <> hr_api.g_varchar2
9263    THEN
9264             l_rec_changed := TRUE;
9265             goto finish;
9266    END IF;
9267    --
9268    --
9269    IF p_background_date_check <> hr_api.g_date
9270    THEN
9271             l_rec_changed := TRUE;
9272             goto finish;
9273    END IF;
9274    --
9275    --
9276    IF p_benefit_group_id <> hr_api.g_number
9277    THEN
9278             l_rec_changed := TRUE;
9279             goto finish;
9280    END IF;
9281    --
9282    --
9283    IF p_blood_type <> hr_api.g_varchar2
9284    THEN
9285             l_rec_changed := TRUE;
9286             goto finish;
9287    END IF;
9288    --
9289    --
9290    IF p_coord_ben_med_pln_no <> hr_api.g_varchar2
9291    THEN
9292             l_rec_changed := TRUE;
9293             goto finish;
9294    END IF;
9295    --
9296    --
9297    IF p_coord_ben_no_cvg_flag <> hr_api.g_varchar2
9298    THEN
9299             l_rec_changed := TRUE;
9300             goto finish;
9301    END IF;
9302    --
9303    --
9304    IF p_country_of_birth <> hr_api.g_varchar2
9305    THEN
9306             l_rec_changed := TRUE;
9307             goto finish;
9308    END IF;
9309    --
9310    --
9311    IF p_date_employee_data_verified <> hr_api.g_date
9312    THEN
9313             l_rec_changed := TRUE;
9314             goto finish;
9315    END IF;
9316    --
9317    --
9318    IF p_date_of_death <> hr_api.g_date
9319    THEN
9320             l_rec_changed := TRUE;
9321             goto finish;
9322    END IF;
9323    --
9324    --
9325    IF p_dpdnt_adoption_date <> hr_api.g_date
9326    THEN
9327             l_rec_changed := TRUE;
9328             goto finish;
9329    END IF;
9330    --
9331    --
9332    IF p_dpdnt_vlntry_svce_flag <> hr_api.g_varchar2
9333    THEN
9334             l_rec_changed := TRUE;
9335             goto finish;
9336    END IF;
9337    --
9338    --
9339    IF p_expense_check_send_to_addres <> hr_api.g_varchar2
9340    THEN
9341             l_rec_changed := TRUE;
9342             goto finish;
9343    END IF;
9344    --
9345    --
9346    IF p_fast_path_employee <> hr_api.g_varchar2
9347    THEN
9348             l_rec_changed := TRUE;
9349             goto finish;
9350    END IF;
9351    --
9352    --
9353    IF p_fte_capacity <> hr_api.g_number
9354    THEN
9355             l_rec_changed := TRUE;
9356             goto finish;
9357    END IF;
9358    --
9359    --
9360    IF p_global_person_id <> hr_api.g_varchar2
9361    THEN
9362             l_rec_changed := TRUE;
9363             goto finish;
9364    END IF;
9365    --
9366    --
9367    IF p_hold_applicant_date_until <> hr_api.g_date
9368    THEN
9369             l_rec_changed := TRUE;
9370             goto finish;
9371    END IF;
9372    --
9373    --
9374    IF p_internal_location <> hr_api.g_varchar2
9375    THEN
9376             l_rec_changed := TRUE;
9377             goto finish;
9378    END IF;
9379    --
9380    --
9381    IF p_last_medical_test_by <> hr_api.g_varchar2
9382    THEN
9383             l_rec_changed := TRUE;
9384             goto finish;
9385    END IF;
9386    --
9387    --
9388    IF p_last_medical_test_date <> hr_api.g_date
9389    THEN
9390             l_rec_changed := TRUE;
9391             goto finish;
9392    END IF;
9393    --
9394    --
9395    IF p_mailstop <> hr_api.g_varchar2
9396    THEN
9397             l_rec_changed := TRUE;
9398             goto finish;
9399    END IF;
9400    --
9401    --
9402    IF p_office_number <> hr_api.g_varchar2
9403    THEN
9404             l_rec_changed := TRUE;
9405             goto finish;
9406    END IF;
9407    --
9408    --
9409    IF p_on_military_service <> hr_api.g_varchar2
9410    THEN
9411             l_rec_changed := TRUE;
9412             goto finish;
9413    END IF;
9414    --
9415    --
9416    IF p_original_date_of_hire <> hr_api.g_date
9417    THEN
9418             l_rec_changed := TRUE;
9419             goto finish;
9420    END IF;
9421    --
9422    --
9423    IF p_projected_start_date <> hr_api.g_date
9424    THEN
9425             l_rec_changed := TRUE;
9426             goto finish;
9427    END IF;
9428    --
9429    --
9430    IF p_receipt_of_death_cert_date <> hr_api.g_date
9431    THEN
9432             l_rec_changed := TRUE;
9433             goto finish;
9434    END IF;
9435    --
9436    --
9437    IF p_region_of_birth <> hr_api.g_varchar2
9438    THEN
9439             l_rec_changed := TRUE;
9440             goto finish;
9441    END IF;
9442    --
9443    --
9444    IF p_rehire_authorizor <> hr_api.g_varchar2
9445    THEN
9446             l_rec_changed := TRUE;
9447             goto finish;
9448    END IF;
9449    --
9450    --
9451    IF p_rehire_recommendation <> hr_api.g_varchar2
9452    THEN
9453             l_rec_changed := TRUE;
9454             goto finish;
9455    END IF;
9456    --
9457    --
9458    IF p_rehire_reason <> hr_api.g_varchar2
9459    THEN
9460             l_rec_changed := TRUE;
9461             goto finish;
9462    END IF;
9463    --
9464    --
9465    IF p_resume_exists <> hr_api.g_varchar2
9466    THEN
9467             l_rec_changed := TRUE;
9468             goto finish;
9469    END IF;
9470    --
9471    --
9472    IF p_resume_last_updated <> hr_api.g_date
9473    THEN
9474             l_rec_changed := TRUE;
9475             goto finish;
9476    END IF;
9477    --
9478    --
9479    IF p_second_passport_exists <> hr_api.g_varchar2
9480    THEN
9481             l_rec_changed := TRUE;
9482             goto finish;
9483    END IF;
9484    --
9485    --
9486    IF p_student_status <> hr_api.g_varchar2
9487    THEN
9488             l_rec_changed := TRUE;
9489             goto finish;
9490    END IF;
9491    --
9492    --
9493    IF p_town_of_birth <> hr_api.g_varchar2
9494    THEN
9495             l_rec_changed := TRUE;
9496             goto finish;
9497    END IF;
9498    --
9499    --
9500    IF p_uses_tobacco_flag <> hr_api.g_varchar2
9501    THEN
9502             l_rec_changed := TRUE;
9503             goto finish;
9504    END IF;
9505    --
9506    --
9507    IF p_vendor_id <> hr_api.g_number
9508    THEN
9509             l_rec_changed := TRUE;
9510             goto finish;
9511    END IF;
9512    --
9513    --
9514    IF p_work_schedule <> hr_api.g_varchar2
9515    THEN
9516             l_rec_changed := TRUE;
9517             goto finish;
9518    END IF;
9519    --
9520    hr_utility.set_location('Exiting:'||l_proc, 10);
9521     <<finish>>
9522     return l_rec_changed ;
9523 EXCEPTION
9524   When g_data_error THEN
9525   hr_utility.set_location('Exception g_data_error:'||l_proc,555);
9526        raise;
9527 
9528   When others THEN
9529        hr_utility.set_location('Exception others:'||l_proc,555);
9530       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
9531       hr_utility.raise_error;
9532        --raise;
9533 
9534 END is_con_rec_changed;
9535 --
9536 -- ---------------------------------------------------------------------------
9537 -- ----------------------------- < process_create_contact_api > --------------
9538 -- ---------------------------------------------------------------------------
9539 -- Purpose: This procedure will be invoked in workflow notification
9540 --          when an approver approves all the changes.  This procedure
9541 --          will call the api to update to the database with p_validate
9542 --          equal to false.
9543 -- ---------------------------------------------------------------------------
9544 PROCEDURE process_create_contact_api
9545           (p_validate IN BOOLEAN DEFAULT FALSE
9546           ,p_transaction_step_id IN NUMBER
9547           ,p_effective_date      in varchar2 default null
9548 )
9549 IS
9550 --
9551   l_person_id                        per_all_people_f.person_id%type
9552                                      default null;
9553   l_full_name                        per_all_people_f.full_name%type;
9554   l_per_comment_id                   per_all_people_f.comment_id%type;
9555   l_con_name_combination_warning boolean;
9556   l_per_name_combination_warning boolean;
9557   l_con_orig_hire_warning        boolean;
9558   l_per_orig_hire_warning        boolean;
9559   l_con_assign_payroll_warning   boolean;
9560   l_per_assign_payroll_warning   boolean;
9561 
9562   l_ovn                              number default null;
9563   l_per_person_id                    per_all_people_f.person_id%type
9564                                      default null;
9565   l_contact_relationship_id          number default null;
9566   l_ctr_object_version_number        number default null;
9567   l_per_object_version_number        number default null;
9568   l_per_effective_start_date         date default null;
9569   l_per_effective_end_date           date default null;
9570   l_con_rec_changed                  VARCHAR2(100) default null;
9571   l_effective_date                   date default null ;
9572   l_employee_number	             per_all_people_f.employee_number%type default null ;
9573   -- Bug 1919795
9574   l_contact_type                     varchar2(100);
9575   l_MIRROR_TYPE                      varchar2(100);
9576   l_CREATE_MIRROR_FLAG               varchar2(100);
9577   --
9578   l_contact_operation                varchar2(100);
9579   l_dpdnt_bnf_flag                   varchar2(100);
9580   l_emrg_cont_flag                   varchar2(100);
9581   l_dpdnt_bnf_contact_type           varchar2(100);
9582   l_dpdnt_bnf_personal_flag          varchar2(100);
9583   l_personal_flag                    varchar2(100);
9584   l_primary_contact_flag             varchar2(100);
9585   --
9586   l_full_name1                       per_all_people_f.full_name%type;
9587   l_per_comment_id1                  per_all_people_f.comment_id%type;
9588   l_con_name_combination_warnin1    boolean;
9589   l_con_orig_hire_warning1           boolean;
9590   l_per_person_id1                   per_all_people_f.person_id%type
9591                                      default null;
9592   l_contact_relationship_id1         number default null;
9593   l_ctr_object_version_number1       number default null;
9594   l_per_object_version_number1       number default null;
9595   l_per_effective_start_date1        date default null;
9596   l_per_effective_end_date1          date default null;
9597 
9598 -- 9564383 starts
9599   z_date_start   date;
9600   z_date_end   date;
9601   l_exists varchar2(1) := 'N';
9602   cursor csr_chk_primary_cnt is
9603   select 'Y'
9604   from   per_contact_relationships
9605   where  person_id = l_person_id
9606   and    primary_contact_flag = 'Y'
9607   and    (nvl(date_end,hr_general.end_of_time)
9608             > nvl(z_date_start,hr_general.start_of_time)
9609   and    nvl(date_start,hr_general.start_of_time)
9610             < nvl(z_date_end,hr_general.end_of_time));
9611  -- 9564383 ends
9612 
9613   -- bug# 2115552
9614   -- Using this value for  P_PRIMARY_CONTACT_FLAG for addl relationship
9615   l_addl_primary_contact_flag        varchar2(100);
9616   l_proc   varchar2(72)  := g_package||'process_create_contact_api';
9617   --
9618 BEGIN
9619   hr_utility.set_location('Entering:'||l_proc, 5);
9620   --
9621   --
9622   SAVEPOINT process_create_contact_api;
9623 
9624   --
9625   -- Get the person_id first.  If it is null, that means we'll create a new
9626   -- contact.  If it is not null, error out.
9627 
9628   l_person_id := hr_transaction_api.get_number_value
9629                                 (p_transaction_step_id => p_transaction_step_id
9630                                 ,p_name => 'P_PERSON_ID');
9631   --
9632   -- StartRegistration
9633   --
9634   if l_person_id is null or l_person_id < 0 then
9635   hr_utility.set_location('l_person_id is null or l_person_id < 0:'||l_proc,10 );
9636      --
9637       --
9638       -- l_person_id := hr_process_person_ss.g_person_id;
9639       -- Adding the session id check to avoid connection pooling problems.
9640         if (( hr_process_person_ss.g_person_id is not null) and
9641                 (hr_process_person_ss.g_session_id= ICX_SEC.G_SESSION_ID)) then
9642             l_person_id := hr_process_person_ss.g_person_id;
9643         end if;
9644 
9645      --
9646   end if;
9647   --
9648   -- EndRegistration
9649   --
9650   begin
9651     l_con_rec_changed := hr_transaction_api.get_VARCHAR2_value
9652                                 (p_transaction_step_id => p_transaction_step_id
9653                                 ,p_name                => 'P_CONT_REC_CHANGED') ;
9654   exception when others then
9655     hr_utility.set_location('Exception Others:'||l_proc,555);
9656     l_con_rec_changed := 'NOTCHANGED';
9657   end;
9658   --
9659   l_effective_date  := hr_transaction_api.get_DATE_value
9660                                 (p_transaction_step_id => p_transaction_step_id
9661                                 ,p_name                => 'P_START_DATE') ;
9662   --
9663   -- SFL changes.
9664   --
9665   if (p_effective_date is not null) then
9666   hr_utility.set_location('p_effective_date is not null:'||l_proc,15 );
9667     l_effective_date:= to_date(p_effective_date,g_date_format);
9668     --
9669   else
9670        --
9671        l_effective_date:= to_date(
9672         hr_transaction_ss.get_wf_effective_date
9673         (p_transaction_step_id => p_transaction_step_id),g_date_format);
9674        --
9675   end if;
9676   --
9677   -- For normal commit the effective date should come from txn tbales.
9678   --
9679   if not p_validate then
9680      --
9681      hr_utility.set_location('if not p_validate then:'||l_proc,20 );
9682      l_effective_date := hr_transaction_api.get_DATE_value
9683            (p_transaction_step_id => p_transaction_step_id
9684            ,p_name                => 'P_START_DATE');
9685      --
9686   end if;
9687   --
9688   --
9689   -- Bug 1919795 : create mirror relationship for contact types of
9690   --               P,C,S.
9691   --
9692   l_contact_type :=   hr_transaction_api.get_VARCHAR2_value
9693            (p_transaction_step_id => p_transaction_step_id
9694            ,p_name                => 'P_CONTACT_TYPE');
9695   --
9696   l_MIRROR_TYPE := hr_transaction_api.get_VARCHAR2_value
9697            (p_transaction_step_id => p_transaction_step_id
9698            ,p_name                => 'P_MIRROR_TYPE');
9699   --
9700   l_CREATE_MIRROR_FLAG := hr_transaction_api.get_VARCHAR2_value
9701            (p_transaction_step_id => p_transaction_step_id
9702            ,p_name                => 'P_MIRROR_TYPE');
9703   --
9704   if l_contact_type in ('P', 'C', 'S') then
9705       --
9706       l_CREATE_MIRROR_FLAG := 'Y';
9707       --
9708       if l_contact_type = 'P' then
9709          l_MIRROR_TYPE := 'C';
9710       elsif l_contact_type = 'C' then
9711          l_MIRROR_TYPE := 'P';
9712       elsif l_contact_type = 'S' then
9713          l_MIRROR_TYPE := 'S';
9714       end if;
9715       --
9716   end if;
9717   --
9718   --
9719   l_contact_operation :=   hr_transaction_api.get_VARCHAR2_value
9720            (p_transaction_step_id => p_transaction_step_id
9721            ,p_name                => 'P_CONTACT_OPERATION');
9722   --
9723   l_dpdnt_bnf_flag    :=   hr_transaction_api.get_VARCHAR2_value
9724            (p_transaction_step_id => p_transaction_step_id
9725            ,p_name                => 'P_DPDNT_BNF_FLAG');
9726   --
9727   l_emrg_cont_flag    :=   hr_transaction_api.get_VARCHAR2_value
9728            (p_transaction_step_id => p_transaction_step_id
9729            ,p_name                => 'P_EMRG_CONT_FLAG');
9730   --
9731   l_personal_flag     := hr_transaction_api.get_VARCHAR2_value
9732            (p_transaction_step_id => p_transaction_step_id
9733            ,p_name                => 'P_PERSONAL_FLAG');
9734   --
9735   l_primary_contact_flag :=hr_transaction_api.get_VARCHAR2_value
9736            (p_transaction_step_id => p_transaction_step_id
9737            ,p_name                => 'P_PRIMARY_CONTACT_FLAG');
9738   --
9739 
9740 
9741    z_date_start := hr_transaction_api.get_DATE_value
9742                              (p_transaction_step_id => p_transaction_step_id
9743                                    ,p_name                => 'P_DATE_START');
9744 
9745 
9746   if l_contact_operation = 'EMER_CR_NEW_CONT' then
9747        hr_utility.set_location('if l_contact_operation is EMER_CR_NEW_CONT:'||l_proc,25 );
9748      --
9749  -- Bug 3152505 : When in Emergency contact, we always will create two relationship.
9750  -- One as "Emergency" and other the selected Relationship.
9751      if /*l_dpdnt_bnf_flag = 'Y' and */l_contact_type <> 'EMRG' then
9752         --
9753         l_dpdnt_bnf_contact_type   := l_contact_type;
9754         l_dpdnt_bnf_personal_flag  := 'Y';
9755         --
9756      end if;
9757 
9758        z_date_end :=  hr_transaction_api.get_DATE_value
9759                                  (p_transaction_step_id => p_transaction_step_id
9760                                   ,p_name                => 'P_DATE_END');
9761 
9762          if l_primary_contact_flag = 'Y' then                --9564383
9763            open csr_chk_primary_cnt;
9764            fetch csr_chk_primary_cnt into l_exists;
9765            if csr_chk_primary_cnt%FOUND then
9766               z_date_start := sysdate;
9767           end if;
9768           close csr_chk_primary_cnt;
9769         end if;
9770 
9771      l_contact_type  := 'EMRG';
9772      l_personal_flag := 'N';
9773      l_MIRROR_TYPE := null ;
9774      l_CREATE_MIRROR_FLAG := 'N';
9775      --
9776   end if;
9777   --
9778   -- l_dpdnt_bnf_contact_type and  l_dpdnt_bnf_personal_flag are reused for
9779   -- Creation of Emergency Relation in the Depenendents process also.
9780   -- In this case for the Dependent Creation we need to change the
9781   -- primaryContactFlag to 'N' and what ever primaryContactFlag is passed
9782   -- from the java site, we need to pass it to the Emregency contact
9783   -- Creation.
9784   if l_contact_operation = 'DPDNT_CR_NEW_CONT' then
9785      --
9786      if l_emrg_cont_flag = 'Y' and l_contact_type <> 'EMRG' then
9787         --
9788         l_dpdnt_bnf_contact_type   := 'EMRG';
9789         l_dpdnt_bnf_personal_flag  := 'N';
9790         l_primary_contact_flag := 'N' ; -- This is not used for EMRG
9791         --
9792      end if;
9793      --
9794   end if;
9795   --
9796   IF l_person_id IS NOT NULL
9797   THEN
9798     hr_contact_rel_api.create_contact(
9799       P_VALIDATE  => p_validate
9800       --
9801       ,P_START_DATE  => l_effective_date
9802       --
9803       ,P_BUSINESS_GROUP_ID  =>
9804          hr_transaction_api.get_NUMBER_value
9805            (p_transaction_step_id => p_transaction_step_id
9806            ,p_name                => 'P_BUSINESS_GROUP_ID')
9807       --
9808       ,P_PERSON_ID  =>  l_person_id
9809       /* StartRegistration
9810          hr_transaction_api.get_NUMBER_value
9811            (p_transaction_step_id => p_transaction_step_id
9812            ,p_name                => 'P_PERSON_ID')
9813       EndRegistration */
9814       --
9815       -- 9999 In case of P_CONTACT_PERSON_ID is -1 then
9816       -- pass null value rather than -1
9817       --
9818       ,P_CONTACT_PERSON_ID  =>
9819          hr_transaction_api.get_NUMBER_value
9820            (p_transaction_step_id => p_transaction_step_id
9821            ,p_name                => 'P_CONTACT_PERSON_ID')
9822       --
9823       ,P_CONTACT_TYPE  =>  l_contact_type /*
9824          hr_transaction_api.get_VARCHAR2_value
9825            (p_transaction_step_id => p_transaction_step_id
9826            ,p_name                => 'P_CONTACT_TYPE') */
9827       --
9828       ,P_CTR_COMMENTS  =>
9829          hr_transaction_api.get_VARCHAR2_value
9830            (p_transaction_step_id => p_transaction_step_id
9831            ,p_name                => 'P_CTR_COMMENTS')
9832       --
9833       ,P_PRIMARY_CONTACT_FLAG  => l_primary_contact_flag /*
9834          hr_transaction_api.get_VARCHAR2_value
9835            (p_transaction_step_id => p_transaction_step_id
9836            ,p_name                => 'P_PRIMARY_CONTACT_FLAG')  */
9837       --
9838       ,P_DATE_START  =>  z_date_start
9839       --
9840       ,P_START_LIFE_REASON_ID  =>
9841          hr_transaction_api.get_NUMBER_value
9842            (p_transaction_step_id => p_transaction_step_id
9843            ,p_name                => 'P_START_LIFE_REASON_ID')
9844       --
9845       ,P_DATE_END  =>
9846          hr_transaction_api.get_DATE_value
9847            (p_transaction_step_id => p_transaction_step_id
9848            ,p_name                => 'P_DATE_END')
9849       --
9850       ,P_END_LIFE_REASON_ID  =>
9851          hr_transaction_api.get_NUMBER_value
9852            (p_transaction_step_id => p_transaction_step_id
9853            ,p_name                => 'P_END_LIFE_REASON_ID')
9854       --
9855       ,P_RLTD_PER_RSDS_W_DSGNTR_FLAG  =>
9856          hr_transaction_api.get_VARCHAR2_value
9857            (p_transaction_step_id => p_transaction_step_id
9858            ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG')
9859       --
9860       ,P_PERSONAL_FLAG  =>  l_personal_flag /*
9861          hr_transaction_api.get_VARCHAR2_value
9862            (p_transaction_step_id => p_transaction_step_id
9863            ,p_name                => 'P_PERSONAL_FLAG') */
9864       --
9865       ,P_SEQUENCE_NUMBER  =>
9866          hr_transaction_api.get_NUMBER_value
9867            (p_transaction_step_id => p_transaction_step_id
9868            ,p_name                => 'P_SEQUENCE_NUMBER')
9869       --
9870       ,P_CONT_ATTRIBUTE_CATEGORY  =>
9871          hr_transaction_api.get_VARCHAR2_value
9872            (p_transaction_step_id => p_transaction_step_id
9873            ,p_name                => 'P_CONT_ATTRIBUTE_CATEGORY')
9874       --
9875       ,P_CONT_ATTRIBUTE1  =>
9876          hr_transaction_api.get_VARCHAR2_value
9877            (p_transaction_step_id => p_transaction_step_id
9878            ,p_name                => 'P_CONT_ATTRIBUTE1')
9879       --
9880       ,P_CONT_ATTRIBUTE2  =>
9881          hr_transaction_api.get_VARCHAR2_value
9882            (p_transaction_step_id => p_transaction_step_id
9883            ,p_name                => 'P_CONT_ATTRIBUTE2')
9884       --
9885       ,P_CONT_ATTRIBUTE3  =>
9886          hr_transaction_api.get_VARCHAR2_value
9887            (p_transaction_step_id => p_transaction_step_id
9888            ,p_name                => 'P_CONT_ATTRIBUTE3')
9889       --
9890       ,P_CONT_ATTRIBUTE4  =>
9891          hr_transaction_api.get_VARCHAR2_value
9892            (p_transaction_step_id => p_transaction_step_id
9893            ,p_name                => 'P_CONT_ATTRIBUTE4')
9894       --
9895       ,P_CONT_ATTRIBUTE5  =>
9896          hr_transaction_api.get_VARCHAR2_value
9897            (p_transaction_step_id => p_transaction_step_id
9898            ,p_name                => 'P_CONT_ATTRIBUTE5')
9899       --
9900       ,P_CONT_ATTRIBUTE6  =>
9901          hr_transaction_api.get_VARCHAR2_value
9902            (p_transaction_step_id => p_transaction_step_id
9903            ,p_name                => 'P_CONT_ATTRIBUTE6')
9904       --
9905       ,P_CONT_ATTRIBUTE7  =>
9906          hr_transaction_api.get_VARCHAR2_value
9907            (p_transaction_step_id => p_transaction_step_id
9908            ,p_name                => 'P_CONT_ATTRIBUTE7')
9909       --
9910       ,P_CONT_ATTRIBUTE8  =>
9911          hr_transaction_api.get_VARCHAR2_value
9912            (p_transaction_step_id => p_transaction_step_id
9913            ,p_name                => 'P_CONT_ATTRIBUTE8')
9914       --
9915       ,P_CONT_ATTRIBUTE9  =>
9916          hr_transaction_api.get_VARCHAR2_value
9917            (p_transaction_step_id => p_transaction_step_id
9918            ,p_name                => 'P_CONT_ATTRIBUTE9')
9919       --
9920       ,P_CONT_ATTRIBUTE10  =>
9921          hr_transaction_api.get_VARCHAR2_value
9922            (p_transaction_step_id => p_transaction_step_id
9923            ,p_name                => 'P_CONT_ATTRIBUTE10')
9924       --
9925       ,P_CONT_ATTRIBUTE11  =>
9926          hr_transaction_api.get_VARCHAR2_value
9927            (p_transaction_step_id => p_transaction_step_id
9928            ,p_name                => 'P_CONT_ATTRIBUTE11')
9929       --
9930       ,P_CONT_ATTRIBUTE12  =>
9931          hr_transaction_api.get_VARCHAR2_value
9932            (p_transaction_step_id => p_transaction_step_id
9933            ,p_name                => 'P_CONT_ATTRIBUTE12')
9934       --
9935       ,P_CONT_ATTRIBUTE13  =>
9936          hr_transaction_api.get_VARCHAR2_value
9937            (p_transaction_step_id => p_transaction_step_id
9938            ,p_name                => 'P_CONT_ATTRIBUTE13')
9939       --
9940       ,P_CONT_ATTRIBUTE14  =>
9941          hr_transaction_api.get_VARCHAR2_value
9942            (p_transaction_step_id => p_transaction_step_id
9943            ,p_name                => 'P_CONT_ATTRIBUTE14')
9944       --
9945       ,P_CONT_ATTRIBUTE15  =>
9946          hr_transaction_api.get_VARCHAR2_value
9947            (p_transaction_step_id => p_transaction_step_id
9948            ,p_name                => 'P_CONT_ATTRIBUTE15')
9949       --
9950       ,P_CONT_ATTRIBUTE16  =>
9951          hr_transaction_api.get_VARCHAR2_value
9952            (p_transaction_step_id => p_transaction_step_id
9953            ,p_name                => 'P_CONT_ATTRIBUTE16')
9954       --
9955       ,P_CONT_ATTRIBUTE17  =>
9956          hr_transaction_api.get_VARCHAR2_value
9957            (p_transaction_step_id => p_transaction_step_id
9958            ,p_name                => 'P_CONT_ATTRIBUTE17')
9959       --
9960       ,P_CONT_ATTRIBUTE18  =>
9961          hr_transaction_api.get_VARCHAR2_value
9962            (p_transaction_step_id => p_transaction_step_id
9963            ,p_name                => 'P_CONT_ATTRIBUTE18')
9964       --
9965       ,P_CONT_ATTRIBUTE19  =>
9966          hr_transaction_api.get_VARCHAR2_value
9967            (p_transaction_step_id => p_transaction_step_id
9968            ,p_name                => 'P_CONT_ATTRIBUTE19')
9969       --
9970       ,P_CONT_ATTRIBUTE20  =>
9971          hr_transaction_api.get_VARCHAR2_value
9972            (p_transaction_step_id => p_transaction_step_id
9973            ,p_name                => 'P_CONT_ATTRIBUTE20')
9974       --
9975       ,P_THIRD_PARTY_PAY_FLAG  =>
9976          hr_transaction_api.get_VARCHAR2_value
9977            (p_transaction_step_id => p_transaction_step_id
9978            ,p_name                => 'P_THIRD_PARTY_PAY_FLAG')
9979       --
9980       ,P_BONDHOLDER_FLAG  =>
9981          hr_transaction_api.get_VARCHAR2_value
9982            (p_transaction_step_id => p_transaction_step_id
9983            ,p_name                => 'P_BONDHOLDER_FLAG')
9984       --
9985       ,P_DEPENDENT_FLAG  =>
9986          hr_transaction_api.get_VARCHAR2_value
9987            (p_transaction_step_id => p_transaction_step_id
9988            ,p_name                => 'P_DEPENDENT_FLAG')
9989       --
9990       ,P_BENEFICIARY_FLAG  =>
9991          hr_transaction_api.get_VARCHAR2_value
9992            (p_transaction_step_id => p_transaction_step_id
9993            ,p_name                => 'P_BENEFICIARY_FLAG')
9994       --
9995       ,P_LAST_NAME  =>
9996          hr_transaction_api.get_VARCHAR2_value
9997            (p_transaction_step_id => p_transaction_step_id
9998            ,p_name                => 'P_LAST_NAME')
9999       --
10000       ,P_SEX  =>
10001          hr_transaction_api.get_VARCHAR2_value
10002            (p_transaction_step_id => p_transaction_step_id
10003            ,p_name                => 'P_SEX')
10004       --
10005       ,P_PERSON_TYPE_ID  =>
10006          hr_transaction_api.get_NUMBER_value
10007            (p_transaction_step_id => p_transaction_step_id
10008            ,p_name                => 'P_PERSON_TYPE_ID')
10009       --
10010       ,P_PER_COMMENTS  =>
10011          hr_transaction_api.get_VARCHAR2_value
10012            (p_transaction_step_id => p_transaction_step_id
10013            ,p_name                => 'P_PER_COMMENTS')
10014       --
10015       ,P_DATE_OF_BIRTH  =>
10016          hr_transaction_api.get_DATE_value
10017            (p_transaction_step_id => p_transaction_step_id
10018            ,p_name                => 'P_DATE_OF_BIRTH')
10019       --
10020       ,P_EMAIL_ADDRESS  =>
10021          hr_transaction_api.get_VARCHAR2_value
10022            (p_transaction_step_id => p_transaction_step_id
10023            ,p_name                => 'P_EMAIL_ADDRESS')
10024       --
10025       ,P_FIRST_NAME  =>
10026          hr_transaction_api.get_VARCHAR2_value
10027            (p_transaction_step_id => p_transaction_step_id
10028            ,p_name                => 'P_FIRST_NAME')
10029       --
10030       ,P_KNOWN_AS  =>
10031          hr_transaction_api.get_VARCHAR2_value
10032            (p_transaction_step_id => p_transaction_step_id
10033            ,p_name                => 'P_KNOWN_AS')
10034       --
10035       ,P_MARITAL_STATUS  =>
10036          hr_transaction_api.get_VARCHAR2_value
10037            (p_transaction_step_id => p_transaction_step_id
10038            ,p_name                => 'P_MARITAL_STATUS')
10039       --
10040       ,P_MIDDLE_NAMES  =>
10041          hr_transaction_api.get_VARCHAR2_value
10042            (p_transaction_step_id => p_transaction_step_id
10043            ,p_name                => 'P_MIDDLE_NAMES')
10044       --
10045       ,P_NATIONALITY  =>
10046          hr_transaction_api.get_VARCHAR2_value
10047            (p_transaction_step_id => p_transaction_step_id
10048            ,p_name                => 'P_NATIONALITY')
10049       --
10050       ,P_NATIONAL_IDENTIFIER  =>
10051          hr_transaction_api.get_VARCHAR2_value
10052            (p_transaction_step_id => p_transaction_step_id
10053            ,p_name                => 'P_NATIONAL_IDENTIFIER')
10054       --
10055       ,P_PREVIOUS_LAST_NAME  =>
10056          hr_transaction_api.get_VARCHAR2_value
10057            (p_transaction_step_id => p_transaction_step_id
10058            ,p_name                => 'P_PREVIOUS_LAST_NAME')
10059       --
10060       ,P_REGISTERED_DISABLED_FLAG  =>
10061          hr_transaction_api.get_VARCHAR2_value
10062            (p_transaction_step_id => p_transaction_step_id
10063            ,p_name                => 'P_REGISTERED_DISABLED_FLAG')
10064       --
10065       ,P_TITLE  =>
10066          hr_transaction_api.get_VARCHAR2_value
10067            (p_transaction_step_id => p_transaction_step_id
10068            ,p_name                => 'P_TITLE')
10069       --
10070       ,P_WORK_TELEPHONE  =>
10071          hr_transaction_api.get_VARCHAR2_value
10072            (p_transaction_step_id => p_transaction_step_id
10073            ,p_name                => 'P_WORK_TELEPHONE')
10074       --
10075       ,P_ATTRIBUTE_CATEGORY  =>
10076          hr_transaction_api.get_VARCHAR2_value
10077            (p_transaction_step_id => p_transaction_step_id
10078            ,p_name                => 'P_ATTRIBUTE_CATEGORY')
10079       --
10080       ,P_ATTRIBUTE1  =>
10081          hr_transaction_api.get_VARCHAR2_value
10082            (p_transaction_step_id => p_transaction_step_id
10083            ,p_name                => 'P_ATTRIBUTE1')
10084       --
10085       ,P_ATTRIBUTE2  =>
10086          hr_transaction_api.get_VARCHAR2_value
10087            (p_transaction_step_id => p_transaction_step_id
10088            ,p_name                => 'P_ATTRIBUTE2')
10089       --
10090       ,P_ATTRIBUTE3  =>
10091          hr_transaction_api.get_VARCHAR2_value
10092            (p_transaction_step_id => p_transaction_step_id
10093            ,p_name                => 'P_ATTRIBUTE3')
10094       --
10095       ,P_ATTRIBUTE4  =>
10096          hr_transaction_api.get_VARCHAR2_value
10097            (p_transaction_step_id => p_transaction_step_id
10098            ,p_name                => 'P_ATTRIBUTE4')
10099       --
10100       ,P_ATTRIBUTE5  =>
10101          hr_transaction_api.get_VARCHAR2_value
10102            (p_transaction_step_id => p_transaction_step_id
10103            ,p_name                => 'P_ATTRIBUTE5')
10104       --
10105       ,P_ATTRIBUTE6  =>
10106          hr_transaction_api.get_VARCHAR2_value
10107            (p_transaction_step_id => p_transaction_step_id
10108            ,p_name                => 'P_ATTRIBUTE6')
10109       --
10110       ,P_ATTRIBUTE7  =>
10111          hr_transaction_api.get_VARCHAR2_value
10112            (p_transaction_step_id => p_transaction_step_id
10113            ,p_name                => 'P_ATTRIBUTE7')
10114       --
10115       ,P_ATTRIBUTE8  =>
10116          hr_transaction_api.get_VARCHAR2_value
10117            (p_transaction_step_id => p_transaction_step_id
10118            ,p_name                => 'P_ATTRIBUTE8')
10119       --
10120       ,P_ATTRIBUTE9  =>
10121          hr_transaction_api.get_VARCHAR2_value
10122            (p_transaction_step_id => p_transaction_step_id
10123            ,p_name                => 'P_ATTRIBUTE9')
10124       --
10125       ,P_ATTRIBUTE10  =>
10126          hr_transaction_api.get_VARCHAR2_value
10127            (p_transaction_step_id => p_transaction_step_id
10128            ,p_name                => 'P_ATTRIBUTE10')
10129       --
10130       ,P_ATTRIBUTE11  =>
10131          hr_transaction_api.get_VARCHAR2_value
10132            (p_transaction_step_id => p_transaction_step_id
10133            ,p_name                => 'P_ATTRIBUTE11')
10134       --
10135       ,P_ATTRIBUTE12  =>
10136          hr_transaction_api.get_VARCHAR2_value
10137            (p_transaction_step_id => p_transaction_step_id
10138            ,p_name                => 'P_ATTRIBUTE12')
10139       --
10140       ,P_ATTRIBUTE13  =>
10141          hr_transaction_api.get_VARCHAR2_value
10142            (p_transaction_step_id => p_transaction_step_id
10143            ,p_name                => 'P_ATTRIBUTE13')
10144       --
10145       ,P_ATTRIBUTE14  =>
10146          hr_transaction_api.get_VARCHAR2_value
10147            (p_transaction_step_id => p_transaction_step_id
10148            ,p_name                => 'P_ATTRIBUTE14')
10149       --
10150       ,P_ATTRIBUTE15  =>
10151          hr_transaction_api.get_VARCHAR2_value
10152            (p_transaction_step_id => p_transaction_step_id
10153            ,p_name                => 'P_ATTRIBUTE15')
10154       --
10155       ,P_ATTRIBUTE16  =>
10156          hr_transaction_api.get_VARCHAR2_value
10157            (p_transaction_step_id => p_transaction_step_id
10158            ,p_name                => 'P_ATTRIBUTE16')
10159       --
10160       ,P_ATTRIBUTE17  =>
10161          hr_transaction_api.get_VARCHAR2_value
10162            (p_transaction_step_id => p_transaction_step_id
10163            ,p_name                => 'P_ATTRIBUTE17')
10164       --
10165       ,P_ATTRIBUTE18  =>
10166          hr_transaction_api.get_VARCHAR2_value
10167            (p_transaction_step_id => p_transaction_step_id
10168            ,p_name                => 'P_ATTRIBUTE18')
10169       --
10170       ,P_ATTRIBUTE19  =>
10171          hr_transaction_api.get_VARCHAR2_value
10172            (p_transaction_step_id => p_transaction_step_id
10173            ,p_name                => 'P_ATTRIBUTE19')
10174       --
10175       ,P_ATTRIBUTE20  =>
10176          hr_transaction_api.get_VARCHAR2_value
10177            (p_transaction_step_id => p_transaction_step_id
10178            ,p_name                => 'P_ATTRIBUTE20')
10179       --
10180       ,P_ATTRIBUTE21  =>
10181          hr_transaction_api.get_VARCHAR2_value
10182            (p_transaction_step_id => p_transaction_step_id
10183            ,p_name                => 'P_ATTRIBUTE21')
10184       --
10185       ,P_ATTRIBUTE22  =>
10186          hr_transaction_api.get_VARCHAR2_value
10187            (p_transaction_step_id => p_transaction_step_id
10188            ,p_name                => 'P_ATTRIBUTE22')
10189       --
10190       ,P_ATTRIBUTE23  =>
10191          hr_transaction_api.get_VARCHAR2_value
10192            (p_transaction_step_id => p_transaction_step_id
10193            ,p_name                => 'P_ATTRIBUTE23')
10194       --
10195       ,P_ATTRIBUTE24  =>
10196          hr_transaction_api.get_VARCHAR2_value
10197            (p_transaction_step_id => p_transaction_step_id
10198            ,p_name                => 'P_ATTRIBUTE24')
10199       --
10200       ,P_ATTRIBUTE25  =>
10201          hr_transaction_api.get_VARCHAR2_value
10202            (p_transaction_step_id => p_transaction_step_id
10203            ,p_name                => 'P_ATTRIBUTE25')
10204       --
10205       ,P_ATTRIBUTE26  =>
10206          hr_transaction_api.get_VARCHAR2_value
10207            (p_transaction_step_id => p_transaction_step_id
10208            ,p_name                => 'P_ATTRIBUTE26')
10209       --
10210       ,P_ATTRIBUTE27  =>
10211          hr_transaction_api.get_VARCHAR2_value
10212            (p_transaction_step_id => p_transaction_step_id
10213            ,p_name                => 'P_ATTRIBUTE27')
10214       --
10215       ,P_ATTRIBUTE28  =>
10216          hr_transaction_api.get_VARCHAR2_value
10217            (p_transaction_step_id => p_transaction_step_id
10218            ,p_name                => 'P_ATTRIBUTE28')
10219       --
10220       ,P_ATTRIBUTE29  =>
10221          hr_transaction_api.get_VARCHAR2_value
10222            (p_transaction_step_id => p_transaction_step_id
10223            ,p_name                => 'P_ATTRIBUTE29')
10224       --
10225       ,P_ATTRIBUTE30  =>
10226          hr_transaction_api.get_VARCHAR2_value
10227            (p_transaction_step_id => p_transaction_step_id
10228            ,p_name                => 'P_ATTRIBUTE30')
10229       --
10230       ,P_PER_INFORMATION_CATEGORY  =>
10231          hr_transaction_api.get_VARCHAR2_value
10232            (p_transaction_step_id => p_transaction_step_id
10233            ,p_name                => 'P_PER_INFORMATION_CATEGORY')
10234       --
10235       ,P_PER_INFORMATION1  =>
10236          hr_transaction_api.get_VARCHAR2_value
10237            (p_transaction_step_id => p_transaction_step_id
10238            ,p_name                => 'P_PER_INFORMATION1')
10239       --
10240       ,P_PER_INFORMATION2  =>
10241          hr_transaction_api.get_VARCHAR2_value
10242            (p_transaction_step_id => p_transaction_step_id
10243            ,p_name                => 'P_PER_INFORMATION2')
10244       --
10245       ,P_PER_INFORMATION3  =>
10246          hr_transaction_api.get_VARCHAR2_value
10247            (p_transaction_step_id => p_transaction_step_id
10248            ,p_name                => 'P_PER_INFORMATION3')
10249       --
10250       ,P_PER_INFORMATION4  =>
10251          hr_transaction_api.get_VARCHAR2_value
10252            (p_transaction_step_id => p_transaction_step_id
10253            ,p_name                => 'P_PER_INFORMATION4')
10254       --
10255       ,P_PER_INFORMATION5  =>
10256          hr_transaction_api.get_VARCHAR2_value
10257            (p_transaction_step_id => p_transaction_step_id
10258            ,p_name                => 'P_PER_INFORMATION5')
10259       --
10260       ,P_PER_INFORMATION6  =>
10261          hr_transaction_api.get_VARCHAR2_value
10262            (p_transaction_step_id => p_transaction_step_id
10263            ,p_name                => 'P_PER_INFORMATION6')
10264       --
10265       ,P_PER_INFORMATION7  =>
10266          hr_transaction_api.get_VARCHAR2_value
10267            (p_transaction_step_id => p_transaction_step_id
10268            ,p_name                => 'P_PER_INFORMATION7')
10269       --
10270       ,P_PER_INFORMATION8  =>
10271          hr_transaction_api.get_VARCHAR2_value
10272            (p_transaction_step_id => p_transaction_step_id
10273            ,p_name                => 'P_PER_INFORMATION8')
10274       --
10275       ,P_PER_INFORMATION9  =>
10276          hr_transaction_api.get_VARCHAR2_value
10277            (p_transaction_step_id => p_transaction_step_id
10278            ,p_name                => 'P_PER_INFORMATION9')
10279       --
10280       ,P_PER_INFORMATION10  =>
10281          hr_transaction_api.get_VARCHAR2_value
10282            (p_transaction_step_id => p_transaction_step_id
10283            ,p_name                => 'P_PER_INFORMATION10')
10284       --
10285       ,P_PER_INFORMATION11  =>
10286          hr_transaction_api.get_VARCHAR2_value
10287            (p_transaction_step_id => p_transaction_step_id
10288            ,p_name                => 'P_PER_INFORMATION11')
10289       --
10290       ,P_PER_INFORMATION12  =>
10291          hr_transaction_api.get_VARCHAR2_value
10292            (p_transaction_step_id => p_transaction_step_id
10293            ,p_name                => 'P_PER_INFORMATION12')
10294       --
10295       ,P_PER_INFORMATION13  =>
10296          hr_transaction_api.get_VARCHAR2_value
10297            (p_transaction_step_id => p_transaction_step_id
10298            ,p_name                => 'P_PER_INFORMATION13')
10299       --
10300       ,P_PER_INFORMATION14  =>
10301          hr_transaction_api.get_VARCHAR2_value
10302            (p_transaction_step_id => p_transaction_step_id
10303            ,p_name                => 'P_PER_INFORMATION14')
10304       --
10305       ,P_PER_INFORMATION15  =>
10306          hr_transaction_api.get_VARCHAR2_value
10307            (p_transaction_step_id => p_transaction_step_id
10308            ,p_name                => 'P_PER_INFORMATION15')
10309       --
10310       ,P_PER_INFORMATION16  =>
10311          hr_transaction_api.get_VARCHAR2_value
10312            (p_transaction_step_id => p_transaction_step_id
10313            ,p_name                => 'P_PER_INFORMATION16')
10314       --
10315       ,P_PER_INFORMATION17  =>
10316          hr_transaction_api.get_VARCHAR2_value
10317            (p_transaction_step_id => p_transaction_step_id
10318            ,p_name                => 'P_PER_INFORMATION17')
10319       --
10320       ,P_PER_INFORMATION18  =>
10321          hr_transaction_api.get_VARCHAR2_value
10322            (p_transaction_step_id => p_transaction_step_id
10323            ,p_name                => 'P_PER_INFORMATION18')
10324       --
10325       ,P_PER_INFORMATION19  =>
10326          hr_transaction_api.get_VARCHAR2_value
10327            (p_transaction_step_id => p_transaction_step_id
10328            ,p_name                => 'P_PER_INFORMATION19')
10329       --
10330       ,P_PER_INFORMATION20  =>
10331          hr_transaction_api.get_VARCHAR2_value
10332            (p_transaction_step_id => p_transaction_step_id
10333            ,p_name                => 'P_PER_INFORMATION20')
10334       --
10335       ,P_PER_INFORMATION21  =>
10336          hr_transaction_api.get_VARCHAR2_value
10337            (p_transaction_step_id => p_transaction_step_id
10338            ,p_name                => 'P_PER_INFORMATION21')
10339       --
10340       ,P_PER_INFORMATION22  =>
10341          hr_transaction_api.get_VARCHAR2_value
10342            (p_transaction_step_id => p_transaction_step_id
10343            ,p_name                => 'P_PER_INFORMATION22')
10344       --
10345       ,P_PER_INFORMATION23  =>
10346          hr_transaction_api.get_VARCHAR2_value
10347            (p_transaction_step_id => p_transaction_step_id
10348            ,p_name                => 'P_PER_INFORMATION23')
10349       --
10350       ,P_PER_INFORMATION24  =>
10351          hr_transaction_api.get_VARCHAR2_value
10352            (p_transaction_step_id => p_transaction_step_id
10353            ,p_name                => 'P_PER_INFORMATION24')
10354       --
10355       ,P_PER_INFORMATION25  =>
10356          hr_transaction_api.get_VARCHAR2_value
10357            (p_transaction_step_id => p_transaction_step_id
10358            ,p_name                => 'P_PER_INFORMATION25')
10359       --
10360       ,P_PER_INFORMATION26  =>
10361          hr_transaction_api.get_VARCHAR2_value
10362            (p_transaction_step_id => p_transaction_step_id
10363            ,p_name                => 'P_PER_INFORMATION26')
10364       --
10365       ,P_PER_INFORMATION27  =>
10366          hr_transaction_api.get_VARCHAR2_value
10367            (p_transaction_step_id => p_transaction_step_id
10368            ,p_name                => 'P_PER_INFORMATION27')
10369       --
10370       ,P_PER_INFORMATION28  =>
10371          hr_transaction_api.get_VARCHAR2_value
10372            (p_transaction_step_id => p_transaction_step_id
10373            ,p_name                => 'P_PER_INFORMATION28')
10374       --
10375       ,P_PER_INFORMATION29  =>
10376          hr_transaction_api.get_VARCHAR2_value
10377            (p_transaction_step_id => p_transaction_step_id
10378            ,p_name                => 'P_PER_INFORMATION29')
10379       --
10380       ,P_PER_INFORMATION30  =>
10381          hr_transaction_api.get_VARCHAR2_value
10382            (p_transaction_step_id => p_transaction_step_id
10383            ,p_name                => 'P_PER_INFORMATION30')
10384       --
10385       ,P_CORRESPONDENCE_LANGUAGE  =>
10386          hr_transaction_api.get_VARCHAR2_value
10387            (p_transaction_step_id => p_transaction_step_id
10388            ,p_name                => 'P_CORRESPONDENCE_LANGUAGE')
10389       --
10390       ,P_HONORS  =>
10391          hr_transaction_api.get_VARCHAR2_value
10392            (p_transaction_step_id => p_transaction_step_id
10393            ,p_name                => 'P_HONORS')
10394       --
10395       ,P_PRE_NAME_ADJUNCT  =>
10396          hr_transaction_api.get_VARCHAR2_value
10397            (p_transaction_step_id => p_transaction_step_id
10398            ,p_name                => 'P_PRE_NAME_ADJUNCT')
10399       --
10400       ,P_SUFFIX  =>
10401          hr_transaction_api.get_VARCHAR2_value
10402            (p_transaction_step_id => p_transaction_step_id
10403            ,p_name                => 'P_SUFFIX')
10404       --
10405       ,P_CREATE_MIRROR_FLAG  =>  l_CREATE_MIRROR_FLAG
10406       /* Bug 1919795
10407          hr_transaction_api.get_VARCHAR2_value
10408            (p_transaction_step_id => p_transaction_step_id
10409            ,p_name                => 'P_CREATE_MIRROR_FLAG')
10410       */
10411       --
10412       ,P_MIRROR_TYPE  => l_MIRROR_TYPE
10413       /* Bug 1919795
10414          hr_transaction_api.get_VARCHAR2_value
10415            (p_transaction_step_id => p_transaction_step_id
10416            ,p_name                => 'P_MIRROR_TYPE')
10417       */
10418       --
10419       ,P_MIRROR_CONT_ATTRIBUTE_CAT  =>
10420          hr_transaction_api.get_VARCHAR2_value
10421            (p_transaction_step_id => p_transaction_step_id
10422            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE_CAT')
10423       --
10424       ,P_MIRROR_CONT_ATTRIBUTE1  =>
10425          hr_transaction_api.get_VARCHAR2_value
10426            (p_transaction_step_id => p_transaction_step_id
10427            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE1')
10428       --
10429       ,P_MIRROR_CONT_ATTRIBUTE2  =>
10430          hr_transaction_api.get_VARCHAR2_value
10431            (p_transaction_step_id => p_transaction_step_id
10432            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE2')
10433       --
10434       ,P_MIRROR_CONT_ATTRIBUTE3  =>
10435          hr_transaction_api.get_VARCHAR2_value
10436            (p_transaction_step_id => p_transaction_step_id
10437            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE3')
10438       --
10439       ,P_MIRROR_CONT_ATTRIBUTE4  =>
10440          hr_transaction_api.get_VARCHAR2_value
10441            (p_transaction_step_id => p_transaction_step_id
10442            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE4')
10443       --
10444       ,P_MIRROR_CONT_ATTRIBUTE5  =>
10445          hr_transaction_api.get_VARCHAR2_value
10446            (p_transaction_step_id => p_transaction_step_id
10447            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE5')
10448       --
10449       ,P_MIRROR_CONT_ATTRIBUTE6  =>
10450          hr_transaction_api.get_VARCHAR2_value
10451            (p_transaction_step_id => p_transaction_step_id
10452            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE6')
10453       --
10454       ,P_MIRROR_CONT_ATTRIBUTE7  =>
10455          hr_transaction_api.get_VARCHAR2_value
10456            (p_transaction_step_id => p_transaction_step_id
10457            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE7')
10458       --
10459       ,P_MIRROR_CONT_ATTRIBUTE8  =>
10460          hr_transaction_api.get_VARCHAR2_value
10461            (p_transaction_step_id => p_transaction_step_id
10462            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE8')
10463       --
10464       ,P_MIRROR_CONT_ATTRIBUTE9  =>
10465          hr_transaction_api.get_VARCHAR2_value
10466            (p_transaction_step_id => p_transaction_step_id
10467            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE9')
10468       --
10469       ,P_MIRROR_CONT_ATTRIBUTE10  =>
10470          hr_transaction_api.get_VARCHAR2_value
10471            (p_transaction_step_id => p_transaction_step_id
10472            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE10')
10473       --
10474       ,P_MIRROR_CONT_ATTRIBUTE11  =>
10475          hr_transaction_api.get_VARCHAR2_value
10476            (p_transaction_step_id => p_transaction_step_id
10477            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE11')
10478       --
10479       ,P_MIRROR_CONT_ATTRIBUTE12  =>
10480          hr_transaction_api.get_VARCHAR2_value
10481            (p_transaction_step_id => p_transaction_step_id
10482            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE12')
10483       --
10484       ,P_MIRROR_CONT_ATTRIBUTE13  =>
10485          hr_transaction_api.get_VARCHAR2_value
10486            (p_transaction_step_id => p_transaction_step_id
10487            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE13')
10488       --
10489       ,P_MIRROR_CONT_ATTRIBUTE14  =>
10490          hr_transaction_api.get_VARCHAR2_value
10491            (p_transaction_step_id => p_transaction_step_id
10492            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE14')
10493       --
10494       ,P_MIRROR_CONT_ATTRIBUTE15  =>
10495          hr_transaction_api.get_VARCHAR2_value
10496            (p_transaction_step_id => p_transaction_step_id
10497            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE15')
10498       --
10499       ,P_MIRROR_CONT_ATTRIBUTE16  =>
10500          hr_transaction_api.get_VARCHAR2_value
10501            (p_transaction_step_id => p_transaction_step_id
10502            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE16')
10503       --
10504       ,P_MIRROR_CONT_ATTRIBUTE17  =>
10505          hr_transaction_api.get_VARCHAR2_value
10506            (p_transaction_step_id => p_transaction_step_id
10507            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE17')
10508       --
10509       ,P_MIRROR_CONT_ATTRIBUTE18  =>
10510          hr_transaction_api.get_VARCHAR2_value
10511            (p_transaction_step_id => p_transaction_step_id
10512            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE18')
10513       --
10514       ,P_MIRROR_CONT_ATTRIBUTE19  =>
10515          hr_transaction_api.get_VARCHAR2_value
10516            (p_transaction_step_id => p_transaction_step_id
10517            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE19')
10518       --
10519       ,P_MIRROR_CONT_ATTRIBUTE20  =>
10520          hr_transaction_api.get_VARCHAR2_value
10521            (p_transaction_step_id => p_transaction_step_id
10522            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE20')
10523       --
10524       ,P_CONTACT_RELATIONSHIP_ID  	=> L_CONTACT_RELATIONSHIP_ID
10525       --
10526       ,P_CTR_OBJECT_VERSION_NUMBER  	=> L_CTR_OBJECT_VERSION_NUMBER
10527       --
10528       ,P_PER_PERSON_ID  		=> L_PER_PERSON_ID
10529       --
10530       ,P_PER_OBJECT_VERSION_NUMBER  	=> L_PER_OBJECT_VERSION_NUMBER
10531       --
10532       ,P_PER_EFFECTIVE_START_DATE  	=> L_PER_EFFECTIVE_START_DATE
10533       --
10534       ,P_PER_EFFECTIVE_END_DATE  	=> L_PER_EFFECTIVE_END_DATE
10535       --
10536       ,P_FULL_NAME  			=> L_FULL_NAME
10537       --
10538       ,P_PER_COMMENT_ID  		=> L_PER_COMMENT_ID
10539       --
10540       ,P_NAME_COMBINATION_WARNING  	=> L_CON_NAME_COMBINATION_WARNING
10541       --
10542       ,P_ORIG_HIRE_WARNING  		=> L_CON_ORIG_HIRE_WARNING
10543       --
10544 	,P_CONT_INFORMATION_CATEGORY  =>
10545                  hr_transaction_api.get_VARCHAR2_value
10546                    (p_transaction_step_id => p_transaction_step_id
10547                    ,p_name                => 'P_CONT_INFORMATION_CATEGORY')
10548               --
10549       ,P_CONT_INFORMATION1  =>
10550                  hr_transaction_api.get_VARCHAR2_value
10551                    (p_transaction_step_id => p_transaction_step_id
10552                    ,p_name                => 'P_CONT_INFORMATION1')
10553               --
10554       ,P_CONT_INFORMATION2  =>
10555                  hr_transaction_api.get_VARCHAR2_value
10556                    (p_transaction_step_id => p_transaction_step_id
10557                    ,p_name                => 'P_CONT_INFORMATION2')
10558               --
10559       ,P_CONT_INFORMATION3  =>
10560                  hr_transaction_api.get_VARCHAR2_value
10561                    (p_transaction_step_id => p_transaction_step_id
10562                    ,p_name                => 'P_CONT_INFORMATION3')
10563               --
10564       ,P_CONT_INFORMATION4  =>
10565                  hr_transaction_api.get_VARCHAR2_value
10566                    (p_transaction_step_id => p_transaction_step_id
10567                    ,p_name                => 'P_CONT_INFORMATION4')
10568               --
10569       ,P_CONT_INFORMATION5  =>
10570                  hr_transaction_api.get_VARCHAR2_value
10571                    (p_transaction_step_id => p_transaction_step_id
10572                    ,p_name                => 'P_CONT_INFORMATION5')
10573               --
10574       ,P_CONT_INFORMATION6  =>
10575                  hr_transaction_api.get_VARCHAR2_value
10576                    (p_transaction_step_id => p_transaction_step_id
10577                    ,p_name                => 'P_CONT_INFORMATION6')
10578               --
10579       ,P_CONT_INFORMATION7  =>
10580                  hr_transaction_api.get_VARCHAR2_value
10581                    (p_transaction_step_id => p_transaction_step_id
10582                    ,p_name                => 'P_CONT_INFORMATION7')
10583               --
10584       ,P_CONT_INFORMATION8  =>
10585                  hr_transaction_api.get_VARCHAR2_value
10586                    (p_transaction_step_id => p_transaction_step_id
10587                    ,p_name                => 'P_CONT_INFORMATION8')
10588               --
10589       ,P_CONT_INFORMATION9  =>
10590                  hr_transaction_api.get_VARCHAR2_value
10591                    (p_transaction_step_id => p_transaction_step_id
10592                    ,p_name                => 'P_CONT_INFORMATION9')
10593               --
10594       ,P_CONT_INFORMATION10  =>
10595                  hr_transaction_api.get_VARCHAR2_value
10596                    (p_transaction_step_id => p_transaction_step_id
10597                    ,p_name                => 'P_CONT_INFORMATION10')
10598               --
10599       ,P_CONT_INFORMATION11  =>
10600                  hr_transaction_api.get_VARCHAR2_value
10601                    (p_transaction_step_id => p_transaction_step_id
10602                    ,p_name                => 'P_CONT_INFORMATION11')
10603               --
10604       ,P_CONT_INFORMATION12  =>
10605                  hr_transaction_api.get_VARCHAR2_value
10606                    (p_transaction_step_id => p_transaction_step_id
10607                    ,p_name                => 'P_CONT_INFORMATION12')
10608               --
10609       ,P_CONT_INFORMATION13  =>
10610                  hr_transaction_api.get_VARCHAR2_value
10611                    (p_transaction_step_id => p_transaction_step_id
10612                    ,p_name                => 'P_CONT_INFORMATION13')
10613               --
10614       ,P_CONT_INFORMATION14  =>
10615                  hr_transaction_api.get_VARCHAR2_value
10616                    (p_transaction_step_id => p_transaction_step_id
10617                    ,p_name                => 'P_CONT_INFORMATION14')
10618               --
10619       ,P_CONT_INFORMATION15  =>
10620                  hr_transaction_api.get_VARCHAR2_value
10621                    (p_transaction_step_id => p_transaction_step_id
10622                    ,p_name                => 'P_CONT_INFORMATION15')
10623               --
10624       ,P_CONT_INFORMATION16  =>
10625                  hr_transaction_api.get_VARCHAR2_value
10626                    (p_transaction_step_id => p_transaction_step_id
10627                    ,p_name                => 'P_CONT_INFORMATION16')
10628               --
10629       ,P_CONT_INFORMATION17  =>
10630                  hr_transaction_api.get_VARCHAR2_value
10631                    (p_transaction_step_id => p_transaction_step_id
10632                    ,p_name                => 'P_CONT_INFORMATION17')
10633               --
10634       ,P_CONT_INFORMATION18  =>
10635                 hr_transaction_api.get_VARCHAR2_value
10636                    (p_transaction_step_id => p_transaction_step_id
10637                    ,p_name                => 'P_CONT_INFORMATION18')
10638               --
10639       ,P_CONT_INFORMATION19  =>
10640                  hr_transaction_api.get_VARCHAR2_value
10641                    (p_transaction_step_id => p_transaction_step_id
10642                    ,p_name                => 'P_CONT_INFORMATION19')
10643               --
10644       ,P_CONT_INFORMATION20  =>
10645                  hr_transaction_api.get_VARCHAR2_value
10646                    (p_transaction_step_id => p_transaction_step_id
10647                    ,p_name                => 'P_CONT_INFORMATION20')
10648               --
10649       ,P_MIRROR_CONT_INFORMATION_CAT  =>
10650                  hr_transaction_api.get_VARCHAR2_value
10651                    (p_transaction_step_id => p_transaction_step_id
10652                    ,p_name                => 'P_MIRROR_CONT_INFORMATION_CAT')
10653               --
10654       ,P_MIRROR_CONT_INFORMATION1  =>
10655                  hr_transaction_api.get_VARCHAR2_value
10656                    (p_transaction_step_id => p_transaction_step_id
10657                    ,p_name                => 'P_MIRROR_CONT_INFORMATION1')
10658               --
10659       ,P_MIRROR_CONT_INFORMATION2  =>
10660                  hr_transaction_api.get_VARCHAR2_value
10661                    (p_transaction_step_id => p_transaction_step_id
10662                    ,p_name                => 'P_MIRROR_CONT_INFORMATION2')
10663               --
10664       ,P_MIRROR_CONT_INFORMATION3  =>
10665                  hr_transaction_api.get_VARCHAR2_value
10666                    (p_transaction_step_id => p_transaction_step_id
10667                    ,p_name                => 'P_MIRROR_CONT_INFORMATION3')
10668               --
10669       ,P_MIRROR_CONT_INFORMATION4  =>
10670                  hr_transaction_api.get_VARCHAR2_value
10671                    (p_transaction_step_id => p_transaction_step_id
10672                    ,p_name                => 'P_MIRROR_CONT_INFORMATION4')
10673               --
10674       ,P_MIRROR_CONT_INFORMATION5  =>
10675                  hr_transaction_api.get_VARCHAR2_value
10676                    (p_transaction_step_id => p_transaction_step_id
10677                    ,p_name                => 'P_MIRROR_CONT_INFORMATION5')
10678               --
10679       ,P_MIRROR_CONT_INFORMATION6  =>
10680                  hr_transaction_api.get_VARCHAR2_value
10681                    (p_transaction_step_id => p_transaction_step_id
10682                    ,p_name                => 'P_MIRROR_CONT_INFORMATION6')
10683               --
10684       ,P_MIRROR_CONT_INFORMATION7  =>
10685                  hr_transaction_api.get_VARCHAR2_value
10686                    (p_transaction_step_id => p_transaction_step_id
10687                    ,p_name                => 'P_MIRROR_CONT_INFORMATION7')
10688               --
10689       ,P_MIRROR_CONT_INFORMATION8  =>
10690                  hr_transaction_api.get_VARCHAR2_value
10691                    (p_transaction_step_id => p_transaction_step_id
10692                    ,p_name                => 'P_MIRROR_CONT_INFORMATION8')
10693               --
10694       ,P_MIRROR_CONT_INFORMATION9  =>
10695                  hr_transaction_api.get_VARCHAR2_value
10696                    (p_transaction_step_id => p_transaction_step_id
10697                    ,p_name                => 'P_MIRROR_CONT_INFORMATION9')
10698               --
10699       ,P_MIRROR_CONT_INFORMATION10  =>
10700                  hr_transaction_api.get_VARCHAR2_value
10701                    (p_transaction_step_id => p_transaction_step_id
10702                    ,p_name                => 'P_MIRROR_CONT_INFORMATION10')
10703               --
10704       ,P_MIRROR_CONT_INFORMATION11  =>
10705                  hr_transaction_api.get_VARCHAR2_value
10706                    (p_transaction_step_id => p_transaction_step_id
10707                    ,p_name                => 'P_MIRROR_CONT_INFORMATION11')
10708               --
10709       ,P_MIRROR_CONT_INFORMATION12  =>
10710                  hr_transaction_api.get_VARCHAR2_value
10711                    (p_transaction_step_id => p_transaction_step_id
10712                    ,p_name                => 'P_MIRROR_CONT_INFORMATION12')
10713               --
10714       ,P_MIRROR_CONT_INFORMATION13  =>
10715                  hr_transaction_api.get_VARCHAR2_value
10716                    (p_transaction_step_id => p_transaction_step_id
10717                    ,p_name                => 'P_MIRROR_CONT_INFORMATION13')
10718               --
10719       ,P_MIRROR_CONT_INFORMATION14  =>
10720                  hr_transaction_api.get_VARCHAR2_value
10721                    (p_transaction_step_id => p_transaction_step_id
10722                    ,p_name                => 'P_MIRROR_CONT_INFORMATION14')
10723               --
10724       ,P_MIRROR_CONT_INFORMATION15  =>
10725                  hr_transaction_api.get_VARCHAR2_value
10726                    (p_transaction_step_id => p_transaction_step_id
10727                    ,p_name                => 'P_MIRROR_CONT_INFORMATION15')
10728               --
10729       ,P_MIRROR_CONT_INFORMATION16  =>
10730                  hr_transaction_api.get_VARCHAR2_value
10731                    (p_transaction_step_id => p_transaction_step_id
10732                    ,p_name                => 'P_MIRROR_CONT_INFORMATION16')
10733               --
10734       ,P_MIRROR_CONT_INFORMATION17  =>
10735                  hr_transaction_api.get_VARCHAR2_value
10736                    (p_transaction_step_id => p_transaction_step_id
10737                    ,p_name                => 'P_MIRROR_CONT_INFORMATION17')
10738               --
10739       ,P_MIRROR_CONT_INFORMATION18  =>
10740                  hr_transaction_api.get_VARCHAR2_value
10741                    (p_transaction_step_id => p_transaction_step_id
10742                    ,p_name                => 'P_MIRROR_CONT_INFORMATION18')
10743               --
10744       ,P_MIRROR_CONT_INFORMATION19 =>
10745                  hr_transaction_api.get_VARCHAR2_value
10746                    (p_transaction_step_id => p_transaction_step_id
10747                    ,p_name                => 'P_MIRROR_CONT_INFORMATION19')
10748               --
10749       ,P_MIRROR_CONT_INFORMATION20  =>
10750                  hr_transaction_api.get_VARCHAR2_value
10751                    (p_transaction_step_id => p_transaction_step_id
10752                    ,p_name                => 'P_MIRROR_CONT_INFORMATION20')
10753      );
10754      --
10755      IF l_con_rec_changed = 'CHANGED'
10756      THEN
10757         --
10758         -- Get the Employee number from the Database;
10759         --
10760         hr_utility.set_location('Before declaring the Cursor c_pap:'||l_proc, 30);
10761         DECLARE
10762                CURSOR c_pap IS SELECT employee_number FROM per_all_people_f
10763 			    WHERE person_id = L_PER_PERSON_ID
10764 			    AND  l_effective_date BETWEEN
10765 				 effective_start_date AND effective_end_date ;
10766                l_pap    c_pap%ROWTYPE;
10767 
10768         BEGIN
10769                --
10770         hr_utility.set_location('Working on the Cursor c_pap:'||l_proc, 35);
10771                OPEN c_pap ;
10772 	       FETCH c_pap INTO l_pap ;
10773                CLOSE c_pap ;
10774                --
10775                l_employee_number := l_pap.employee_number ;
10776                --
10777         EXCEPTION WHEN OTHERS THEN
10778         hr_utility.set_location('Exception: Others'||l_proc,555);
10779              raise ;
10780         END;
10781 
10782         -- For processing the update_person_api
10783         hr_person_api.update_person (
10784    	  p_validate                          =>  p_validate
10785    	 ,p_effective_date                    =>  l_effective_date
10786    	 ,p_datetrack_update_mode             =>  hr_api.g_correction
10787                                               -- 9999 p_datetrack_update_mode
10788    	 ,p_person_id                         =>  L_PER_PERSON_ID
10789      	 ,p_object_version_number             =>  L_PER_OBJECT_VERSION_NUMBER
10790          ,p_employee_number		      =>  l_employee_number
10791          -- Bug 2652114
10792          /*
10793          ,p_adjusted_svc_date  =>
10794              hr_transaction_api.get_date_value
10795                   (p_transaction_step_id   => p_transaction_step_id
10796                     ,p_name                =>upper('p_adjusted_svc_date'))
10797          */
10798          --
10799          ,p_applicant_number  =>
10800              hr_transaction_api.get_varchar2_value
10801                   (p_transaction_step_id   => p_transaction_step_id
10802                     ,p_name                =>upper('p_applicant_number'))
10803          --
10804          ,p_background_check_status  =>
10805              hr_transaction_api.get_varchar2_value
10806                   (p_transaction_step_id   => p_transaction_step_id
10807                     ,p_name                =>upper('p_background_check_status'))
10808          --
10809          ,p_background_date_check  =>
10810              hr_transaction_api.get_date_value
10811                   (p_transaction_step_id   => p_transaction_step_id
10812                     ,p_name                =>upper('p_background_date_check'))
10813          --
10814          ,p_benefit_group_id  =>
10815              hr_transaction_api.get_number_value
10816                   (p_transaction_step_id   => p_transaction_step_id
10817                     ,p_name                =>upper('p_benefit_group_id'))
10818          --
10819          ,p_blood_type  =>
10820              hr_transaction_api.get_varchar2_value
10821                   (p_transaction_step_id   => p_transaction_step_id
10822                     ,p_name                =>upper('p_blood_type'))
10823          --
10824          ,p_coord_ben_med_pln_no  =>
10825              hr_transaction_api.get_varchar2_value
10826                   (p_transaction_step_id   => p_transaction_step_id
10827                     ,p_name                =>upper('p_coord_ben_med_pln_no'))
10828          --
10829          ,p_coord_ben_no_cvg_flag  =>
10830              hr_transaction_api.get_varchar2_value
10831                   (p_transaction_step_id   => p_transaction_step_id
10832                     ,p_name                =>upper('p_coord_ben_no_cvg_flag'))
10833          --
10834          ,p_country_of_birth  =>
10835              hr_transaction_api.get_varchar2_value
10836                   (p_transaction_step_id   => p_transaction_step_id
10837                     ,p_name                =>upper('p_country_of_birth'))
10838          --
10839          ,p_date_employee_data_verified  =>
10840              hr_transaction_api.get_date_value
10841                   (p_transaction_step_id   => p_transaction_step_id
10842                     ,p_name                =>upper('p_date_employee_data_verified'))
10843          --
10844          ,p_date_of_death  =>
10845              hr_transaction_api.get_date_value
10846                   (p_transaction_step_id   => p_transaction_step_id
10847                     ,p_name                =>upper('p_date_of_death'))
10848          --
10849          ,p_dpdnt_adoption_date  =>
10850              hr_transaction_api.get_date_value
10851                   (p_transaction_step_id   => p_transaction_step_id
10852                     ,p_name                =>upper('p_dpdnt_adoption_date'))
10853          --
10854          ,p_dpdnt_vlntry_svce_flag  =>
10855              hr_transaction_api.get_varchar2_value
10856                   (p_transaction_step_id   => p_transaction_step_id
10857                     ,p_name                =>upper('p_dpdnt_vlntry_svce_flag'))
10858          --
10859          ,p_expense_check_send_to_addres  =>
10860              hr_transaction_api.get_varchar2_value
10861                   (p_transaction_step_id   => p_transaction_step_id
10862                     ,p_name                =>upper('p_expense_check_send_to_addres'))
10863          --
10864          ,p_fast_path_employee  =>
10865              hr_transaction_api.get_varchar2_value
10866                   (p_transaction_step_id   => p_transaction_step_id
10867                     ,p_name                =>upper('p_fast_path_employee'))
10868           --
10869          ,p_fte_capacity  =>
10870              hr_transaction_api.get_number_value
10871                   (p_transaction_step_id   => p_transaction_step_id
10872                     ,p_name                =>upper('p_fte_capacity'))
10873          --
10874          ,p_global_person_id  =>
10875              hr_transaction_api.get_varchar2_value
10876                   (p_transaction_step_id   => p_transaction_step_id
10877                     ,p_name                =>upper('p_global_person_id'))
10878          --
10879          ,p_hold_applicant_date_until  =>
10880              hr_transaction_api.get_date_value
10881                   (p_transaction_step_id   => p_transaction_step_id
10882                     ,p_name                =>upper('p_hold_applicant_date_until'))
10883          --
10884          ,p_internal_location  =>
10885              hr_transaction_api.get_varchar2_value
10886                   (p_transaction_step_id   => p_transaction_step_id
10887                     ,p_name                =>upper('p_internal_location'))
10888          --
10889          ,p_last_medical_test_by  =>
10890              hr_transaction_api.get_varchar2_value
10891                   (p_transaction_step_id   => p_transaction_step_id
10892                     ,p_name                =>upper('p_last_medical_test_by'))
10893          --
10894          ,p_last_medical_test_date  =>
10895              hr_transaction_api.get_date_value
10896                   (p_transaction_step_id   => p_transaction_step_id
10897                     ,p_name                =>upper('p_last_medical_test_date'))
10898          --
10899          ,p_mailstop  =>
10900              hr_transaction_api.get_varchar2_value
10901                   (p_transaction_step_id   => p_transaction_step_id
10902                     ,p_name                =>upper('p_mailstop'))
10903          --
10904          ,p_office_number  =>
10905              hr_transaction_api.get_varchar2_value
10906                   (p_transaction_step_id   => p_transaction_step_id
10907                     ,p_name                =>upper('p_office_number'))
10908          --
10909          ,p_on_military_service  =>
10910              hr_transaction_api.get_varchar2_value
10911                   (p_transaction_step_id   => p_transaction_step_id
10912                     ,p_name                =>upper('p_on_military_service'))
10913          --
10914          -- Bug 2652114
10915          /*
10916          ,p_original_date_of_hire  =>
10917              hr_transaction_api.get_date_value
10918                   (p_transaction_step_id   => p_transaction_step_id
10919                     ,p_name                =>upper('p_original_date_of_hire'))
10920          */
10921          --
10922          ,p_projected_start_date  =>
10923              hr_transaction_api.get_date_value
10924                   (p_transaction_step_id   => p_transaction_step_id
10925                     ,p_name                =>upper('p_projected_start_date'))
10926          --
10927          ,p_receipt_of_death_cert_date  =>
10928              hr_transaction_api.get_date_value
10929                   (p_transaction_step_id   => p_transaction_step_id
10930                     ,p_name                =>upper('p_receipt_of_death_cert_date'))
10931          --
10932          ,p_region_of_birth  =>
10933              hr_transaction_api.get_varchar2_value
10934                   (p_transaction_step_id   => p_transaction_step_id
10935                     ,p_name                =>upper('p_region_of_birth'))
10936          --
10937          ,p_rehire_authorizor  =>
10938              hr_transaction_api.get_varchar2_value
10939                   (p_transaction_step_id   => p_transaction_step_id
10940                     ,p_name                =>upper('p_rehire_authorizor'))
10941          --
10942          ,p_rehire_recommendation  =>
10943              hr_transaction_api.get_varchar2_value
10944                   (p_transaction_step_id   => p_transaction_step_id
10945                     ,p_name                =>upper('p_rehire_recommendation'))
10946          --
10947          ,p_rehire_reason  =>
10948              hr_transaction_api.get_varchar2_value
10949                   (p_transaction_step_id   => p_transaction_step_id
10950                     ,p_name                =>upper('p_rehire_reason'))
10951          --
10952          ,p_resume_exists  =>
10953              hr_transaction_api.get_varchar2_value
10954                   (p_transaction_step_id   => p_transaction_step_id
10955                     ,p_name                =>upper('p_resume_exists'))
10956          --
10957          ,p_resume_last_updated  =>
10958              hr_transaction_api.get_date_value
10959                   (p_transaction_step_id   => p_transaction_step_id
10960                     ,p_name                =>upper('p_resume_last_updated'))
10961          --
10962          ,p_second_passport_exists  =>
10963              hr_transaction_api.get_varchar2_value
10964                   (p_transaction_step_id   => p_transaction_step_id
10965                     ,p_name                =>upper('p_second_passport_exists'))
10966          --
10967          ,p_student_status  =>
10968              hr_transaction_api.get_varchar2_value
10969                   (p_transaction_step_id   => p_transaction_step_id
10970                     ,p_name                =>upper('p_student_status'))
10971          --
10972          ,p_town_of_birth  =>
10973              hr_transaction_api.get_varchar2_value
10974                   (p_transaction_step_id   => p_transaction_step_id
10975                     ,p_name                =>upper('p_town_of_birth'))
10976          --
10977          ,p_uses_tobacco_flag  =>
10978              hr_transaction_api.get_varchar2_value
10979                   (p_transaction_step_id   => p_transaction_step_id
10980                     ,p_name                =>upper('p_uses_tobacco_flag'))
10981          --
10982          ,p_vendor_id  =>
10983              hr_transaction_api.get_number_value
10984                   (p_transaction_step_id   => p_transaction_step_id
10985                     ,p_name                =>upper('p_vendor_id'))
10986          --
10987          ,p_work_schedule  =>
10988              hr_transaction_api.get_varchar2_value
10989                   (p_transaction_step_id   => p_transaction_step_id
10990                     ,p_name                =>upper('p_work_schedule'))
10991          --
10992          ,p_effective_start_date              =>  l_per_effective_start_date
10993          ,p_effective_end_date                =>  l_per_effective_end_date
10994          ,p_full_name                         =>  l_full_name
10995          ,p_comment_id                        =>  l_per_comment_id
10996          ,p_name_combination_warning          =>  l_per_name_combination_warning
10997          ,p_assign_payroll_warning            =>  l_per_assign_payroll_warning
10998          ,p_orig_hire_warning                 =>  l_per_orig_hire_warning
10999          );
11000 
11001        END IF ;
11002        --
11003        if l_contact_operation = 'EMER_CR_NEW_CONT' OR
11004           l_contact_operation = 'DPDNT_CR_NEW_CONT' then
11005           --
11006 
11007           hr_utility.set_location('EMER_CR_NEW_CONT or DPDNT_CR_NEW_CONT:'||l_proc, 35);
11008 -- Bug 3152505 : When in Emergency contact, we always will create two relationship.
11009 -- One as "Emergency" and other the selected Relationship.
11010           if ( /*l_dpdnt_bnf_flag = 'Y' and*/ l_dpdnt_bnf_contact_type <> 'EMRG'
11011                                       and l_contact_operation = 'EMER_CR_NEW_CONT' ) OR
11012              ( l_emrg_cont_flag = 'Y' and l_contact_operation = 'DPDNT_CR_NEW_CONT' ) then
11013 
11014 
11015             if l_dpdnt_bnf_contact_type in ('P', 'C', 'S') then
11016                 --
11017                 l_CREATE_MIRROR_FLAG := 'Y';
11018                 --
11019                 if l_dpdnt_bnf_contact_type = 'P' then
11020                    l_MIRROR_TYPE := 'C';
11021                 elsif l_dpdnt_bnf_contact_type = 'C' then
11022                    l_MIRROR_TYPE := 'P';
11023                 elsif l_dpdnt_bnf_contact_type = 'S' then
11024                    l_MIRROR_TYPE := 'S';
11025                 end if;
11026                 --
11027             else
11028                 --
11029                 l_CREATE_MIRROR_FLAG := 'N' ;
11030                 l_MIRROR_TYPE := null ;
11031                 --
11032             end if;
11033 
11034 --             l_CREATE_MIRROR_FLAG := 'N' ;
11035 --             l_MIRROR_TYPE := null ;
11036 --
11037 -- Bug # 2115552
11038           if l_contact_operation = 'EMER_CR_NEW_CONT' then
11039 
11040              l_addl_primary_contact_flag := 'N';
11041           else
11042              l_addl_primary_contact_flag  :=
11043                    hr_transaction_api.get_VARCHAR2_value
11044                      (p_transaction_step_id => p_transaction_step_id
11045                      ,p_name                => 'P_PRIMARY_CONTACT_FLAG');
11046           end if;
11047 --
11048 --
11049                hr_contact_rel_api.create_contact(
11050                 P_VALIDATE  => p_validate
11051                 --
11052                 ,P_START_DATE  =>          l_effective_date
11053                 --
11054                 ,P_BUSINESS_GROUP_ID  =>
11055                    hr_transaction_api.get_NUMBER_value
11056                      (p_transaction_step_id => p_transaction_step_id
11057                      ,p_name                => 'P_BUSINESS_GROUP_ID')
11058                 --
11059                 ,P_PERSON_ID  =>  l_person_id
11060                 --
11061                 ,P_CONTACT_PERSON_ID  =>   l_per_person_id
11062                 --
11063                 ,P_CONTACT_TYPE  => l_dpdnt_bnf_contact_type
11064                 --
11065                 ,P_CTR_COMMENTS  =>
11066                    hr_transaction_api.get_VARCHAR2_value
11067                      (p_transaction_step_id => p_transaction_step_id
11068                      ,p_name                => 'P_CTR_COMMENTS')
11069                 --
11070  -- Bug # 2115552
11071                 ,P_PRIMARY_CONTACT_FLAG  => l_addl_primary_contact_flag
11072 
11073 /*                ,P_PRIMARY_CONTACT_FLAG  =>
11074                    hr_transaction_api.get_VARCHAR2_value
11075                      (p_transaction_step_id => p_transaction_step_id
11076                      ,p_name                => 'P_PRIMARY_CONTACT_FLAG')
11077 */
11078                 --
11079                 ,P_DATE_START  =>
11080                    hr_transaction_api.get_DATE_value
11081                      (p_transaction_step_id => p_transaction_step_id
11082                      ,p_name                => 'P_DATE_START')
11083                 --
11084                 ,P_START_LIFE_REASON_ID  =>
11085                    hr_transaction_api.get_NUMBER_value
11086                      (p_transaction_step_id => p_transaction_step_id
11087                      ,p_name                => 'P_START_LIFE_REASON_ID')
11088                 --
11089                 ,P_DATE_END  =>
11090                    hr_transaction_api.get_DATE_value
11091                      (p_transaction_step_id => p_transaction_step_id
11092                      ,p_name                => 'P_DATE_END')
11093                 --
11094                 ,P_END_LIFE_REASON_ID  =>
11095                    hr_transaction_api.get_NUMBER_value
11096                      (p_transaction_step_id => p_transaction_step_id
11097                      ,p_name                => 'P_END_LIFE_REASON_ID')
11098                 --
11099                 ,P_RLTD_PER_RSDS_W_DSGNTR_FLAG  =>
11100                    hr_transaction_api.get_VARCHAR2_value
11101                      (p_transaction_step_id => p_transaction_step_id
11102                      ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG')
11103                 --
11104                 ,P_PERSONAL_FLAG  =>  l_dpdnt_bnf_personal_flag
11105                 --
11106                 ,P_SEQUENCE_NUMBER  =>
11107                    hr_transaction_api.get_NUMBER_value
11108                      (p_transaction_step_id => p_transaction_step_id
11109                      ,p_name                => 'P_SEQUENCE_NUMBER')
11110                 --
11111                 ,P_CONT_ATTRIBUTE_CATEGORY  =>
11112                    hr_transaction_api.get_VARCHAR2_value
11113                      (p_transaction_step_id => p_transaction_step_id
11114                      ,p_name                => 'P_CONT_ATTRIBUTE_CATEGORY')
11115                 --
11116                 ,P_CONT_ATTRIBUTE1  =>
11117                    hr_transaction_api.get_VARCHAR2_value
11118                      (p_transaction_step_id => p_transaction_step_id
11119                      ,p_name                => 'P_CONT_ATTRIBUTE1')
11120                 --
11121                 ,P_CONT_ATTRIBUTE2  =>
11122                    hr_transaction_api.get_VARCHAR2_value
11123                      (p_transaction_step_id => p_transaction_step_id
11124                      ,p_name                => 'P_CONT_ATTRIBUTE2')
11125                 --
11126                 ,P_CONT_ATTRIBUTE3  =>
11127                    hr_transaction_api.get_VARCHAR2_value
11128                      (p_transaction_step_id => p_transaction_step_id
11129                      ,p_name                => 'P_CONT_ATTRIBUTE3')
11130                 --
11131                 ,P_CONT_ATTRIBUTE4  =>
11132                    hr_transaction_api.get_VARCHAR2_value
11133                      (p_transaction_step_id => p_transaction_step_id
11134                      ,p_name                => 'P_CONT_ATTRIBUTE4')
11135                 --
11136                 ,P_CONT_ATTRIBUTE5  =>
11137                    hr_transaction_api.get_VARCHAR2_value
11138                      (p_transaction_step_id => p_transaction_step_id
11139                      ,p_name                => 'P_CONT_ATTRIBUTE5')
11140                 --
11141                 ,P_CONT_ATTRIBUTE6  =>
11142                    hr_transaction_api.get_VARCHAR2_value
11143                      (p_transaction_step_id => p_transaction_step_id
11144                      ,p_name                => 'P_CONT_ATTRIBUTE6')
11145                 --
11146                 ,P_CONT_ATTRIBUTE7  =>
11147                    hr_transaction_api.get_VARCHAR2_value
11148                      (p_transaction_step_id => p_transaction_step_id
11149                      ,p_name                => 'P_CONT_ATTRIBUTE7')
11150                 --
11151                 ,P_CONT_ATTRIBUTE8  =>
11152                    hr_transaction_api.get_VARCHAR2_value
11153                      (p_transaction_step_id => p_transaction_step_id
11154                      ,p_name                => 'P_CONT_ATTRIBUTE8')
11155                 --
11156                 ,P_CONT_ATTRIBUTE9  =>
11157                    hr_transaction_api.get_VARCHAR2_value
11158                      (p_transaction_step_id => p_transaction_step_id
11159                      ,p_name                => 'P_CONT_ATTRIBUTE9')
11160                 --
11161                 ,P_CONT_ATTRIBUTE10  =>
11162                    hr_transaction_api.get_VARCHAR2_value
11163                      (p_transaction_step_id => p_transaction_step_id
11164                      ,p_name                => 'P_CONT_ATTRIBUTE10')
11165                 --
11166                 ,P_CONT_ATTRIBUTE11  =>
11167                    hr_transaction_api.get_VARCHAR2_value
11168                      (p_transaction_step_id => p_transaction_step_id
11169                      ,p_name                => 'P_CONT_ATTRIBUTE11')
11170                 --
11171                 ,P_CONT_ATTRIBUTE12  =>
11172                    hr_transaction_api.get_VARCHAR2_value
11173                      (p_transaction_step_id => p_transaction_step_id
11174                      ,p_name                => 'P_CONT_ATTRIBUTE12')
11175                 --
11176                 ,P_CONT_ATTRIBUTE13  =>
11177                    hr_transaction_api.get_VARCHAR2_value
11178                      (p_transaction_step_id => p_transaction_step_id
11179                      ,p_name                => 'P_CONT_ATTRIBUTE13')
11180                 --
11181                 ,P_CONT_ATTRIBUTE14  =>
11182                    hr_transaction_api.get_VARCHAR2_value
11183                      (p_transaction_step_id => p_transaction_step_id
11184                      ,p_name                => 'P_CONT_ATTRIBUTE14')
11185                 --
11186                 ,P_CONT_ATTRIBUTE15  =>
11187                    hr_transaction_api.get_VARCHAR2_value
11188                      (p_transaction_step_id => p_transaction_step_id
11189                      ,p_name                => 'P_CONT_ATTRIBUTE15')
11190                 --
11191                 ,P_CONT_ATTRIBUTE16  =>
11192                    hr_transaction_api.get_VARCHAR2_value
11193                      (p_transaction_step_id => p_transaction_step_id
11194                      ,p_name                => 'P_CONT_ATTRIBUTE16')
11195                 --
11196                 ,P_CONT_ATTRIBUTE17  =>
11197                    hr_transaction_api.get_VARCHAR2_value
11198                      (p_transaction_step_id => p_transaction_step_id
11199                      ,p_name                => 'P_CONT_ATTRIBUTE17')
11200                 --
11201                 ,P_CONT_ATTRIBUTE18  =>
11202                    hr_transaction_api.get_VARCHAR2_value
11203                      (p_transaction_step_id => p_transaction_step_id
11204                      ,p_name                => 'P_CONT_ATTRIBUTE18')
11205                 --
11206                 ,P_CONT_ATTRIBUTE19  =>
11207                    hr_transaction_api.get_VARCHAR2_value
11208                      (p_transaction_step_id => p_transaction_step_id
11209                      ,p_name                => 'P_CONT_ATTRIBUTE19')
11210                 --
11211                 ,P_CONT_ATTRIBUTE20  =>
11212                    hr_transaction_api.get_VARCHAR2_value
11213                      (p_transaction_step_id => p_transaction_step_id
11214                      ,p_name                => 'P_CONT_ATTRIBUTE20')
11215                 --
11216                 ,P_THIRD_PARTY_PAY_FLAG  =>
11217                    hr_transaction_api.get_VARCHAR2_value
11218                      (p_transaction_step_id => p_transaction_step_id
11219                      ,p_name                => 'P_THIRD_PARTY_PAY_FLAG')
11220                 --
11221                 ,P_BONDHOLDER_FLAG  =>
11222                    hr_transaction_api.get_VARCHAR2_value
11223                      (p_transaction_step_id => p_transaction_step_id
11224                      ,p_name                => 'P_BONDHOLDER_FLAG')
11225                 --
11226                 ,P_DEPENDENT_FLAG  =>
11227                    hr_transaction_api.get_VARCHAR2_value
11228                      (p_transaction_step_id => p_transaction_step_id
11229                      ,p_name                => 'P_DEPENDENT_FLAG')
11230                 --
11231                 ,P_BENEFICIARY_FLAG  =>
11232                    hr_transaction_api.get_VARCHAR2_value
11233                      (p_transaction_step_id => p_transaction_step_id
11234                      ,p_name                => 'P_BENEFICIARY_FLAG')
11235                 --
11236                 ,P_CREATE_MIRROR_FLAG  =>  l_CREATE_MIRROR_FLAG
11237                 --
11238                 ,P_MIRROR_TYPE  => l_MIRROR_TYPE
11239                 --
11240                 ,P_MIRROR_CONT_ATTRIBUTE_CAT  =>
11241                    hr_transaction_api.get_VARCHAR2_value
11242                      (p_transaction_step_id => p_transaction_step_id
11243                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE_CAT')
11244                 --
11245                 ,P_MIRROR_CONT_ATTRIBUTE1  =>
11246                    hr_transaction_api.get_VARCHAR2_value
11247                      (p_transaction_step_id => p_transaction_step_id
11248                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE1')
11249                 --
11250                 ,P_MIRROR_CONT_ATTRIBUTE2  =>
11251                    hr_transaction_api.get_VARCHAR2_value
11252                      (p_transaction_step_id => p_transaction_step_id
11253                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE2')
11254                 --
11255                 ,P_MIRROR_CONT_ATTRIBUTE3  =>
11256                    hr_transaction_api.get_VARCHAR2_value
11257                      (p_transaction_step_id => p_transaction_step_id
11258                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE3')
11259                 --
11260                 ,P_MIRROR_CONT_ATTRIBUTE4  =>
11261                    hr_transaction_api.get_VARCHAR2_value
11262                      (p_transaction_step_id => p_transaction_step_id
11263                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE4')
11264                 --
11265                 ,P_MIRROR_CONT_ATTRIBUTE5  =>
11266                    hr_transaction_api.get_VARCHAR2_value
11267                      (p_transaction_step_id => p_transaction_step_id
11268                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE5')
11269                 --
11270                 ,P_MIRROR_CONT_ATTRIBUTE6  =>
11271                    hr_transaction_api.get_VARCHAR2_value
11272                      (p_transaction_step_id => p_transaction_step_id
11273                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE6')
11274                 --
11275                 ,P_MIRROR_CONT_ATTRIBUTE7  =>
11276                    hr_transaction_api.get_VARCHAR2_value
11277                      (p_transaction_step_id => p_transaction_step_id
11278                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE7')
11279                 --
11280                 ,P_MIRROR_CONT_ATTRIBUTE8  =>
11281                    hr_transaction_api.get_VARCHAR2_value
11282                      (p_transaction_step_id => p_transaction_step_id
11283                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE8')
11284                 --
11285                 ,P_MIRROR_CONT_ATTRIBUTE9  =>
11286                    hr_transaction_api.get_VARCHAR2_value
11287                      (p_transaction_step_id => p_transaction_step_id
11288                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE9')
11289                 --
11290                 ,P_MIRROR_CONT_ATTRIBUTE10  =>
11291                    hr_transaction_api.get_VARCHAR2_value
11292                      (p_transaction_step_id => p_transaction_step_id
11293                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE10')
11294                 --
11295                 ,P_MIRROR_CONT_ATTRIBUTE11  =>
11296                    hr_transaction_api.get_VARCHAR2_value
11297                      (p_transaction_step_id => p_transaction_step_id
11298                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE11')
11299                 --
11300                 ,P_MIRROR_CONT_ATTRIBUTE12  =>
11301                    hr_transaction_api.get_VARCHAR2_value
11302                      (p_transaction_step_id => p_transaction_step_id
11303                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE12')
11304                 --
11305                 ,P_MIRROR_CONT_ATTRIBUTE13  =>
11306                    hr_transaction_api.get_VARCHAR2_value
11307                      (p_transaction_step_id => p_transaction_step_id
11308                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE13')
11309                 --
11310                 ,P_MIRROR_CONT_ATTRIBUTE14  =>
11311                    hr_transaction_api.get_VARCHAR2_value
11312                      (p_transaction_step_id => p_transaction_step_id
11313                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE14')
11314                 --
11315                 ,P_MIRROR_CONT_ATTRIBUTE15  =>
11316                    hr_transaction_api.get_VARCHAR2_value
11317                      (p_transaction_step_id => p_transaction_step_id
11318                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE15')
11319                 --
11320                 ,P_MIRROR_CONT_ATTRIBUTE16  =>
11321                    hr_transaction_api.get_VARCHAR2_value
11322                      (p_transaction_step_id => p_transaction_step_id
11323                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE16')
11324                 --
11325                 ,P_MIRROR_CONT_ATTRIBUTE17  =>
11326                    hr_transaction_api.get_VARCHAR2_value
11327                      (p_transaction_step_id => p_transaction_step_id
11328                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE17')
11329                 --
11330                 ,P_MIRROR_CONT_ATTRIBUTE18  =>
11331                    hr_transaction_api.get_VARCHAR2_value
11332                      (p_transaction_step_id => p_transaction_step_id
11333                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE18')
11334                 --
11335                 ,P_MIRROR_CONT_ATTRIBUTE19  =>
11336                    hr_transaction_api.get_VARCHAR2_value
11337                      (p_transaction_step_id => p_transaction_step_id
11338                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE19')
11339                 --
11340                 ,P_MIRROR_CONT_ATTRIBUTE20  =>
11341                    hr_transaction_api.get_VARCHAR2_value
11342                      (p_transaction_step_id => p_transaction_step_id
11343                      ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE20')
11344                 --
11345 
11346                 ,P_CONTACT_RELATIONSHIP_ID  	=> L_CONTACT_RELATIONSHIP_ID1
11347                 --
11348                 ,P_CTR_OBJECT_VERSION_NUMBER 	=> L_CTR_OBJECT_VERSION_NUMBER1
11349                 --
11350                 ,P_PER_PERSON_ID  		=> L_PER_PERSON_ID1
11351                 --
11352                 ,P_PER_OBJECT_VERSION_NUMBER 	=> L_PER_OBJECT_VERSION_NUMBER1
11353                 --
11354                 ,P_PER_EFFECTIVE_START_DATE  	=> L_PER_EFFECTIVE_START_DATE1
11355                 --
11356                 ,P_PER_EFFECTIVE_END_DATE  	=> L_PER_EFFECTIVE_END_DATE1
11357                 --
11358                 ,P_FULL_NAME  		=> L_FULL_NAME1
11359                 --
11360                 ,P_PER_COMMENT_ID  		=> L_PER_COMMENT_ID1
11361                 --
11362                 ,P_NAME_COMBINATION_WARNING  	=> L_CON_NAME_COMBINATION_WARNIN1
11363                 --
11364                 ,P_ORIG_HIRE_WARNING  	=> L_CON_ORIG_HIRE_WARNING1
11365 		--
11366                ,P_CONT_INFORMATION_CATEGORY  =>
11367                  hr_transaction_api.get_VARCHAR2_value
11368                    (p_transaction_step_id => p_transaction_step_id
11369                    ,p_name                => 'P_CONT_INFORMATION_CATEGORY')
11370               --
11371               ,P_CONT_INFORMATION1  =>
11372                  hr_transaction_api.get_VARCHAR2_value
11373                    (p_transaction_step_id => p_transaction_step_id
11374                    ,p_name                => 'P_CONT_INFORMATION1')
11375               --
11376               ,P_CONT_INFORMATION2  =>
11377                  hr_transaction_api.get_VARCHAR2_value
11378                    (p_transaction_step_id => p_transaction_step_id
11379                    ,p_name                => 'P_CONT_INFORMATION2')
11380               --
11381               ,P_CONT_INFORMATION3  =>
11382                  hr_transaction_api.get_VARCHAR2_value
11383                    (p_transaction_step_id => p_transaction_step_id
11384                    ,p_name                => 'P_CONT_INFORMATION3')
11385               --
11386               ,P_CONT_INFORMATION4  =>
11387                  hr_transaction_api.get_VARCHAR2_value
11388                    (p_transaction_step_id => p_transaction_step_id
11389                    ,p_name                => 'P_CONT_INFORMATION4')
11390               --
11391               ,P_CONT_INFORMATION5  =>
11392                  hr_transaction_api.get_VARCHAR2_value
11393                    (p_transaction_step_id => p_transaction_step_id
11394                    ,p_name                => 'P_CONT_INFORMATION5')
11395               --
11396               ,P_CONT_INFORMATION6  =>
11397                  hr_transaction_api.get_VARCHAR2_value
11398                    (p_transaction_step_id => p_transaction_step_id
11399                    ,p_name                => 'P_CONT_INFORMATION6')
11400               --
11401               ,P_CONT_INFORMATION7  =>
11402                  hr_transaction_api.get_VARCHAR2_value
11403                    (p_transaction_step_id => p_transaction_step_id
11404                    ,p_name                => 'P_CONT_INFORMATION7')
11405               --
11406               ,P_CONT_INFORMATION8  =>
11407                  hr_transaction_api.get_VARCHAR2_value
11408                    (p_transaction_step_id => p_transaction_step_id
11409                    ,p_name                => 'P_CONT_INFORMATION8')
11410               --
11411               ,P_CONT_INFORMATION9  =>
11412                  hr_transaction_api.get_VARCHAR2_value
11413                    (p_transaction_step_id => p_transaction_step_id
11414                    ,p_name                => 'P_CONT_INFORMATION9')
11415               --
11416               ,P_CONT_INFORMATION10  =>
11417                  hr_transaction_api.get_VARCHAR2_value
11418                    (p_transaction_step_id => p_transaction_step_id
11419                    ,p_name                => 'P_CONT_INFORMATION10')
11420               --
11421               ,P_CONT_INFORMATION11  =>
11422                  hr_transaction_api.get_VARCHAR2_value
11423                    (p_transaction_step_id => p_transaction_step_id
11424                    ,p_name                => 'P_CONT_INFORMATION11')
11425               --
11426               ,P_CONT_INFORMATION12  =>
11427                  hr_transaction_api.get_VARCHAR2_value
11428                    (p_transaction_step_id => p_transaction_step_id
11429                    ,p_name                => 'P_CONT_INFORMATION12')
11430               --
11431               ,P_CONT_INFORMATION13  =>
11432                  hr_transaction_api.get_VARCHAR2_value
11433                    (p_transaction_step_id => p_transaction_step_id
11434                    ,p_name                => 'P_CONT_INFORMATION13')
11435               --
11436               ,P_CONT_INFORMATION14  =>
11437                  hr_transaction_api.get_VARCHAR2_value
11438                    (p_transaction_step_id => p_transaction_step_id
11439                    ,p_name                => 'P_CONT_INFORMATION14')
11440               --
11441               ,P_CONT_INFORMATION15  =>
11442                  hr_transaction_api.get_VARCHAR2_value
11443                    (p_transaction_step_id => p_transaction_step_id
11444                    ,p_name                => 'P_CONT_INFORMATION15')
11445               --
11446               ,P_CONT_INFORMATION16  =>
11447                  hr_transaction_api.get_VARCHAR2_value
11448                    (p_transaction_step_id => p_transaction_step_id
11449                    ,p_name                => 'P_CONT_INFORMATION16')
11450               --
11451               ,P_CONT_INFORMATION17  =>
11452                  hr_transaction_api.get_VARCHAR2_value
11453                    (p_transaction_step_id => p_transaction_step_id
11454                    ,p_name                => 'P_CONT_INFORMATION17')
11455               --
11456               ,P_CONT_INFORMATION18  =>
11457                  hr_transaction_api.get_VARCHAR2_value
11458                    (p_transaction_step_id => p_transaction_step_id
11459                    ,p_name                => 'P_CONT_INFORMATION18')
11460               --
11461               ,P_CONT_INFORMATION19  =>
11462                  hr_transaction_api.get_VARCHAR2_value
11463                    (p_transaction_step_id => p_transaction_step_id
11464                    ,p_name                => 'P_CONT_INFORMATION19')
11465               --
11466               ,P_CONT_INFORMATION20  =>
11467                  hr_transaction_api.get_VARCHAR2_value
11468                    (p_transaction_step_id => p_transaction_step_id
11469                    ,p_name                => 'P_CONT_INFORMATION20')
11470 	      --
11471       	     ,P_MIRROR_CONT_INFORMATION_CAT  =>
11472                  hr_transaction_api.get_VARCHAR2_value
11473                    (p_transaction_step_id => p_transaction_step_id
11474                    ,p_name                => 'P_MIRROR_CONT_INFORMATION_CAT')
11475               --
11476              ,P_MIRROR_CONT_INFORMATION1  =>
11477                  hr_transaction_api.get_VARCHAR2_value
11478                    (p_transaction_step_id => p_transaction_step_id
11479                    ,p_name                => 'P_MIRROR_CONT_INFORMATION1')
11480               --
11481              ,P_MIRROR_CONT_INFORMATION2  =>
11482                  hr_transaction_api.get_VARCHAR2_value
11483                    (p_transaction_step_id => p_transaction_step_id
11484                    ,p_name                => 'P_MIRROR_CONT_INFORMATION2')
11485               --
11486              ,P_MIRROR_CONT_INFORMATION3  =>
11487                  hr_transaction_api.get_VARCHAR2_value
11488                    (p_transaction_step_id => p_transaction_step_id
11489                    ,p_name                => 'P_MIRROR_CONT_INFORMATION3')
11490               --
11491              ,P_MIRROR_CONT_INFORMATION4  =>
11492                  hr_transaction_api.get_VARCHAR2_value
11493                    (p_transaction_step_id => p_transaction_step_id
11494                    ,p_name                => 'P_MIRROR_CONT_INFORMATION4')
11495               --
11496              ,P_MIRROR_CONT_INFORMATION5  =>
11497                  hr_transaction_api.get_VARCHAR2_value
11498                    (p_transaction_step_id => p_transaction_step_id
11499                    ,p_name                => 'P_MIRROR_CONT_INFORMATION5')
11500               --
11501              ,P_MIRROR_CONT_INFORMATION6  =>
11502                  hr_transaction_api.get_VARCHAR2_value
11503                    (p_transaction_step_id => p_transaction_step_id
11504                    ,p_name                => 'P_MIRROR_CONT_INFORMATION6')
11505               --
11506              ,P_MIRROR_CONT_INFORMATION7  =>
11507                  hr_transaction_api.get_VARCHAR2_value
11508                    (p_transaction_step_id => p_transaction_step_id
11509                    ,p_name                => 'P_MIRROR_CONT_INFORMATION7')
11510               --
11511              ,P_MIRROR_CONT_INFORMATION8  =>
11512                  hr_transaction_api.get_VARCHAR2_value
11513                    (p_transaction_step_id => p_transaction_step_id
11514                    ,p_name                => 'P_MIRROR_CONT_INFORMATION8')
11515               --
11516              ,P_MIRROR_CONT_INFORMATION9  =>
11517                  hr_transaction_api.get_VARCHAR2_value
11518                    (p_transaction_step_id => p_transaction_step_id
11519                    ,p_name                => 'P_MIRROR_CONT_INFORMATION9')
11520               --
11521              ,P_MIRROR_CONT_INFORMATION10  =>
11522                  hr_transaction_api.get_VARCHAR2_value
11523                    (p_transaction_step_id => p_transaction_step_id
11524                    ,p_name                => 'P_MIRROR_CONT_INFORMATION10')
11525               --
11526              ,P_MIRROR_CONT_INFORMATION11  =>
11527                  hr_transaction_api.get_VARCHAR2_value
11528                    (p_transaction_step_id => p_transaction_step_id
11529                    ,p_name                => 'P_MIRROR_CONT_INFORMATION11')
11530               --
11531              ,P_MIRROR_CONT_INFORMATION12  =>
11532                  hr_transaction_api.get_VARCHAR2_value
11533                    (p_transaction_step_id => p_transaction_step_id
11534                    ,p_name                => 'P_MIRROR_CONT_INFORMATION12')
11535               --
11536              ,P_MIRROR_CONT_INFORMATION13  =>
11537                  hr_transaction_api.get_VARCHAR2_value
11538                    (p_transaction_step_id => p_transaction_step_id
11539                    ,p_name                => 'P_MIRROR_CONT_INFORMATION13')
11540               --
11541              ,P_MIRROR_CONT_INFORMATION14  =>
11542                  hr_transaction_api.get_VARCHAR2_value
11543                    (p_transaction_step_id => p_transaction_step_id
11544                    ,p_name                => 'P_MIRROR_CONT_INFORMATION14')
11545               --
11546              ,P_MIRROR_CONT_INFORMATION15  =>
11547                  hr_transaction_api.get_VARCHAR2_value
11548                    (p_transaction_step_id => p_transaction_step_id
11549                    ,p_name                => 'P_MIRROR_CONT_INFORMATION15')
11550               --
11551              ,P_MIRROR_CONT_INFORMATION16  =>
11552                  hr_transaction_api.get_VARCHAR2_value
11553                    (p_transaction_step_id => p_transaction_step_id
11554                    ,p_name                => 'P_MIRROR_CONT_INFORMATION16')
11555               --
11556              ,P_MIRROR_CONT_INFORMATION17  =>
11557                  hr_transaction_api.get_VARCHAR2_value
11558                    (p_transaction_step_id => p_transaction_step_id
11559                    ,p_name                => 'P_MIRROR_CONT_INFORMATION17')
11560               --
11561              ,P_MIRROR_CONT_INFORMATION18  =>
11562                  hr_transaction_api.get_VARCHAR2_value
11563                    (p_transaction_step_id => p_transaction_step_id
11564                    ,p_name                => 'P_MIRROR_CONT_INFORMATION18')
11565               --
11566              ,P_MIRROR_CONT_INFORMATION19 =>
11567                  hr_transaction_api.get_VARCHAR2_value
11568                    (p_transaction_step_id => p_transaction_step_id
11569                    ,p_name                => 'P_MIRROR_CONT_INFORMATION19')
11570               --
11571              ,P_MIRROR_CONT_INFORMATION20  =>
11572                  hr_transaction_api.get_VARCHAR2_value
11573                    (p_transaction_step_id => p_transaction_step_id
11574                    ,p_name                => 'P_MIRROR_CONT_INFORMATION20')
11575 			  --
11576 			,P_DATE_OF_BIRTH  =>
11577 				hr_transaction_api.get_DATE_value
11578 				   (p_transaction_step_id => p_transaction_step_id
11579         		   ,p_name                => 'P_DATE_OF_BIRTH')
11580                );
11581              --
11582           end if;
11583           --
11584   end if;
11585   --
11586        --
11587        -- Store the l_per_person_id in package global so that it
11588        -- can be used by create phone.
11589        --
11590        g_contact_person_id := L_PER_PERSON_ID;
11591        --
11592   END IF;
11593   --
11594   IF l_per_assign_payroll_warning THEN
11595      -- ------------------------------------------------------------
11596      -- The assign payroll warning has been set so we must set the
11597      -- error so we can retrieve the text using fnd_message.get
11598      -- -------------------------------------------------------------
11599      -- as of now, 09/07/00, we don't know how to handle warnings yet. So, we
11600      -- just don't do anything.
11601      null;
11602   END IF;
11603   --
11604   IF p_validate = true THEN
11605      ROLLBACK TO process_create_contact_api;
11606   END IF;
11607 --
11608 
11609 EXCEPTION
11610   WHEN hr_utility.hr_error THEN
11611   hr_utility.set_location('Exception:WHEN hr_utility.hr_error THEN'||l_proc,565);
11612     -- -----------------------------------------------------------------
11613     -- An application error has been raised by the API so we must set
11614     -- the error.
11615     -- -----------------------------------------------------------------
11616         ROLLBACK TO process_create_contact_api;
11617         RAISE;
11618 
11619 END process_create_contact_api;
11620 --
11621 
11622 -- ---------------------------------------------------------------------------
11623 -- ----------------------------- < process_api > -----------------------------
11624 -- ---------------------------------------------------------------------------
11625 -- Purpose: This procedure will be invoked in workflow notification
11626 --          when an approver approves all the changes.  This procedure
11627 --          will call the api to update to the database with p_validate
11628 --          equal to false.
11629 -- ---------------------------------------------------------------------------
11630 PROCEDURE process_api
11631   (p_validate IN BOOLEAN DEFAULT FALSE
11632   ,p_transaction_step_id IN NUMBER
11633   ,p_effective_date      in varchar2 default null
11634 )
11635 IS
11636    cursor get_emrg_relid_ovn(p_contact_relationship_id     number
11637                             ,p_contact_person_id           number
11638                             ,p_person_id number)
11639    is
11640    select contact_relationship_id,
11641           object_version_number,
11642           primary_contact_flag,
11643           person_id,
11644           date_start,
11645           date_end
11646    from PER_CONTACT_RELATIONSHIPS
11647    where person_id = p_person_id
11648    and contact_person_id = p_contact_person_id
11649    and contact_type = 'EMRG'
11650    and trunc(sysdate) >= decode(date_start,null,trunc(sysdate),trunc(date_start))
11651    and trunc(sysdate) <  decode(date_end,null,trunc(sysdate)+1,trunc(date_end));
11652 
11653    cursor get_other_relid_ovn(p_contact_person_id           number
11654                             ,p_person_id number)
11655    is
11656    select contact_relationship_id,
11657           object_version_number
11658    from PER_CONTACT_RELATIONSHIPS
11659    where person_id = p_person_id
11660    and contact_person_id = p_contact_person_id
11661    and trunc(sysdate) >= decode(date_start,null,trunc(sysdate),trunc(date_start))
11662    and trunc(sysdate) <  decode(date_end,null,trunc(sysdate)+1,trunc(date_end));
11663 
11664 -- 9564383 starts
11665   z_primary_contact_flag   varchar2(2);
11666   z_person_id   number;
11667   z_date_start   date;
11668   z_date_end   date;
11669   l_exists varchar2(1) := 'N';
11670   cursor csr_chk_primary_cnt is
11671   select 'Y'
11672   from   per_contact_relationships
11673   where  person_id = z_person_id
11674   and    primary_contact_flag = 'Y'
11675   and    (nvl(date_end,hr_general.end_of_time)
11676             > nvl(z_date_start,hr_general.start_of_time)
11677   and    nvl(date_start,hr_general.start_of_time)
11678             < nvl(z_date_end,hr_general.end_of_time));
11679  -- 9564383 ends
11680   --
11681   l_effective_start_date             date default null;
11682   l_effective_end_date               date default null;
11683   l_ovn                              number default null;
11684   l_per_ovn			     number default null;
11685   l_employee_number		     per_all_people_f.employee_number%type default null;
11686   l_contact_relationship_id          number default null;
11687   l_per_rec_changed	             varchar2(100) default 'NOTCHANGED' ;
11688   l_cont_rec_changed                 varchar2(100) default 'NOTCHANGED' ;
11689   l_full_name                        per_all_people_f.full_name%type default null;
11690   l_comment_id                       number default null;
11691   l_name_combination_warning         boolean default null ;
11692   l_assign_payroll_warning           boolean default null ;
11693   l_orig_hire_warning                boolean default null ;
11694   l_datetrack_update_mode            varchar2(100);
11695   l_process_section                  varchar2(100);
11696   --
11697   l_contact_operation                varchar2(100);
11698   l_contact_type                     varchar2(100);
11699   l_personal_flag                    varchar2(100);
11700   l_full_name1                       per_all_people_f.full_name%type;
11701   l_per_comment_id1                  per_all_people_f.comment_id%type;
11702   l_con_name_combination_warnin1    boolean;
11703   l_con_orig_hire_warning1           boolean;
11704   l_per_person_id1                   per_all_people_f.person_id%type
11705                                      default null;
11706   l_contact_relationship_id1         number default null;
11707   l_ctr_object_version_number1       number default null;
11708   l_per_object_version_number1       number default null;
11709   l_per_effective_start_date1        date default null;
11710   l_per_effective_end_date1          date default null;
11711   l_effective_date                   date default null;
11712   --
11713   l_date_sart                        date;
11714   l_date_end                         date;
11715   l_action                           varchar2(20);
11716   l_orig_rel_type                    varchar2(30);
11717   l_primary_contact_flag             varchar2(100);
11718   l_emrg_ovn                         number default null;
11719   l_emrg_relid                       number default null;
11720   l_other_ovn                         number default null;
11721   l_other_relid                       number default null;
11722   l_emrg_primary_cont_flag           varchar2(100);
11723   l_proc   varchar2(72)  := g_package||'process_api';
11724 
11725 --- bug 5894873
11726   l_start_contact_date                date;
11727   l_old_contact_relationship_id       number;
11728 
11729   p_rowid varchar2(300);
11730   l_CONTACT_RELATIONSHIP_ID_1 number;
11731   skip_contact_create_flg number := 0;
11732 
11733 --- bug 5894873
11734 
11735 BEGIN
11736   --
11737   --  hr_utility.set_location('Entering hr_process_contact_ss.process_api', 100);
11738     hr_utility.set_location('Entering:'||l_proc, 5);
11739   --
11740   SAVEPOINT update_cont_relationship;
11741 
11742   -- Change for Approvals for contact.
11743   -- Get the process section.
11744   --
11745   l_process_section := hr_transaction_api.get_varchar2_value
11746                         (p_transaction_step_id => p_transaction_step_id
11747                          ,p_name =>upper( 'P_PROCESS_SECTION_NAME'));
11748   --
11749   if l_process_section = 'DELETE_CONTACTS' then
11750      --
11751      hr_utility.set_location('DELETE_CONTACTS:'||l_proc, 10);
11752      process_end_api
11753           (p_validate            => p_validate
11754           ,p_transaction_step_id => p_transaction_step_id
11755           -- SFL changes
11756           ,p_effective_date      => p_effective_date
11757      );
11758      --
11759      hr_utility.set_location('Leaving hr_process_contact_ss.process_api', 100);
11760      return;
11761      --
11762  -- end if;
11763   else -- l_process_section is not 'DELETE_CONTACTS'
11764  --
11765   -- SFL changes
11766 
11767          is_address_updated(
11768                                  P_CONTACT_RELATIONSHIP_ID  => hr_transaction_api.get_NUMBER_value
11769                                                                                                (p_transaction_step_id => p_transaction_step_id
11770 			                 ,p_name                => 'P_CONTACT_RELATIONSHIP_ID')
11771                                 ,P_DATE_START  =>                            hr_transaction_api.get_DATE_value
11772 			                 (p_transaction_step_id => p_transaction_step_id
11773          	                                                                     ,p_name                => 'P_DATE_START')
11774                                ,p_transaction_step_id => p_transaction_step_id
11775  	    ,p_CONTACT_PERSON_ID =>                hr_transaction_api.get_NUMBER_value
11776 			                (p_transaction_step_id => p_transaction_step_id
11777         			                 ,p_name                => 'P_CONTACT_PERSON_ID')
11778            	    , p_PERSON_ID =>       	                  hr_transaction_api.get_NUMBER_value
11779 			                 (p_transaction_step_id => p_transaction_step_id
11780          			                 ,p_name                => 'P_PERSON_ID'));
11781   begin
11782      --
11783      l_per_rec_changed   := hr_transaction_api.get_varchar2_value
11784 	   (p_transaction_step_id => p_transaction_step_id
11785 	   ,p_name                => 'p_per_rec_changed') ;
11786      --
11787   exception
11788      when others then
11789        l_per_rec_changed   := 'NULL';
11790   end;
11791 
11792   IF l_per_rec_changed = 'CHANGED' THEN
11793            --
11794     l_per_ovn           :=  hr_transaction_api.get_number_value
11795 	   (p_transaction_step_id => p_transaction_step_id
11796 	   ,p_name                => 'p_per_object_version_number') ;
11797          --
11798     l_employee_number   :=  hr_transaction_api.get_varchar2_value
11799 	   (p_transaction_step_id => p_transaction_step_id
11800 	   ,p_name                => 'p_employee_number') ;
11801 
11802     l_datetrack_update_mode :=
11803 		 hr_transaction_api.get_varchar2_value
11804 		 (p_transaction_step_id   => p_transaction_step_id
11805 		  ,p_name                 =>upper('p_datetrack_update_mode'));
11806     --
11807     if l_datetrack_update_mode = 'CORRECT' then
11808        l_datetrack_update_mode := 'CORRECTION';
11809     else
11810        -- 9999 Do we need a different mode.
11811        l_datetrack_update_mode := 'CORRECTION';
11812     end if;
11813     --
11814     if not p_validate then
11815      --
11816      l_effective_date := hr_transaction_api.get_DATE_value
11817            (p_transaction_step_id => p_transaction_step_id
11818            ,p_name                => 'P_PER_EFFECTIVE_DATE');
11819      --
11820     end if;
11821     --
11822     hr_person_api.update_person(
11823 
11824 	 p_validate  =>  p_validate
11825       --
11826 	 ,p_effective_date  => l_effective_date
11827                  /*
11828 		 hr_transaction_api.get_date_value
11829 		 (p_transaction_step_id   => p_transaction_step_id
11830 		  ,p_name                 =>upper('p_per_effective_date'))
11831                  */
11832       --
11833 	 ,p_datetrack_update_mode  =>  l_datetrack_update_mode
11834       -- 9999
11835       --          hr_transaction_api.get_varchar2_value
11836       --          (p_transaction_step_id   => p_transaction_step_id
11837       --               ,p_name             =>upper('p_datetrack_update_mode'))
11838       --
11839 	 ,p_person_id  =>
11840 		 hr_transaction_api.get_number_value
11841 		 (p_transaction_step_id   => p_transaction_step_id
11842 		  ,p_name                 =>upper('p_cont_person_id'))
11843       --
11844 	 ,p_object_version_number  => l_per_ovn
11845       --
11846 
11847     ---------------------------------------------------------------------------
11848     -- Bug 1937643 Fix Begins - 08/04/2002
11849     -- With the PTU model, the per_all_people_f.person_type_id stores only the
11850     -- default user flavor of the system_person_type.  The true user flavor
11851     -- for the system_person_type is stored in per_person_type_usages_f table.
11852     -- Since the current Personal Information Contacts region
11853     -- does not allow a user to choose any user flavor, so we do not pass in
11854     -- p_person_type_id when calling the hr_person_api.update_person.  That way,
11855     -- the api will understand that the person_type is not changed and will not
11856     -- update the person_type_id in per_person_type_usages_f table as is.  If we
11857     -- pass the per_all_people_f.person_type_id to the api,the person_type_id in
11858     -- per_person_type_usages_f table will be updated with that value which will
11859     -- overwrite the true user flavor of the system person type with the
11860     -- default user flavor person type.  This may not be desirable.
11861     -- When we allow a user to select user flavors of person type in Contacts
11862     -- region, the commented out code needs to change and the whole package
11863     -- of this hrconwrs.pkb needs to get the true person_type_id from the
11864     -- per_person_type_usages_f table.
11865     ---------------------------------------------------------------------------
11866     /*
11867 	 ,p_person_type_id  =>
11868 		 hr_transaction_api.get_number_value
11869 		 (p_transaction_step_id   => p_transaction_step_id
11870 		  ,p_name                 =>upper('p_person_type_id'))
11871     */
11872       --
11873 	 ,p_last_name  =>
11874 		 hr_transaction_api.get_varchar2_value
11875                 (p_transaction_step_id   => p_transaction_step_id
11876                  ,p_name                 =>upper('p_last_name'))
11877       --
11878         ,p_applicant_number  =>
11879                  hr_transaction_api.get_varchar2_value
11880                  (p_transaction_step_id   => p_transaction_step_id
11881                   ,p_name                 =>upper('p_applicant_number'))
11882       --
11883          ,p_comments  =>
11884                  hr_transaction_api.get_varchar2_value
11885                  (p_transaction_step_id   => p_transaction_step_id
11886                   ,p_name                 =>upper('p_per_comments'))
11887       --
11888          ,p_date_employee_data_verified  =>
11889                  hr_transaction_api.get_date_value
11890                  (p_transaction_step_id   => p_transaction_step_id
11891                   ,p_name                 =>upper('p_date_employee_data_verified'))
11892       --
11893          ,p_date_of_birth  =>
11894                  hr_transaction_api.get_date_value
11895                  (p_transaction_step_id   => p_transaction_step_id
11896                   ,p_name                 =>upper('p_date_of_birth'))
11897       --
11898          ,p_email_address  =>
11899                  hr_transaction_api.get_varchar2_value
11900                  (p_transaction_step_id   => p_transaction_step_id
11901                   ,p_name                 =>upper('p_email_address'))
11902       --
11903          ,p_employee_number  =>  l_employee_number
11904       --
11905          ,p_expense_check_send_to_addres  =>
11906                  hr_transaction_api.get_varchar2_value
11907                  (p_transaction_step_id   => p_transaction_step_id
11908                   ,p_name                 =>upper('p_expense_check_send_to_addres'))
11909       --
11910          ,p_first_name  =>
11911                  hr_transaction_api.get_varchar2_value
11912                  (p_transaction_step_id   => p_transaction_step_id
11913                   ,p_name                 =>upper('p_first_name'))
11914       --
11915          ,p_known_as  =>
11916                  hr_transaction_api.get_varchar2_value
11917                  (p_transaction_step_id   => p_transaction_step_id
11918                   ,p_name                 =>upper('p_known_as'))
11919       --
11920          ,p_marital_status  =>
11921                  hr_transaction_api.get_varchar2_value
11922                  (p_transaction_step_id   => p_transaction_step_id
11923                   ,p_name                 =>upper('p_marital_status'))
11924       --
11925          ,p_middle_names  =>
11926                  hr_transaction_api.get_varchar2_value
11927                  (p_transaction_step_id   => p_transaction_step_id
11928                   ,p_name                 =>upper('p_middle_names'))
11929       --
11930          ,p_nationality  =>
11931                  hr_transaction_api.get_varchar2_value
11932                  (p_transaction_step_id   => p_transaction_step_id
11933                   ,p_name                 =>upper('p_nationality'))
11934       --
11935          ,p_national_identifier  =>
11936                  hr_transaction_api.get_varchar2_value
11937                  (p_transaction_step_id   => p_transaction_step_id
11938                   ,p_name                 =>upper('p_national_identifier'))
11939       --
11940          ,p_previous_last_name  =>
11941                  hr_transaction_api.get_varchar2_value
11942                  (p_transaction_step_id   => p_transaction_step_id
11943                   ,p_name                 =>upper('p_previous_last_name'))
11944       --
11945          ,p_registered_disabled_flag  =>
11946                  hr_transaction_api.get_varchar2_value
11947                  (p_transaction_step_id   => p_transaction_step_id
11948                   ,p_name                 =>upper('p_registered_disabled_flag'))
11949       --
11950          ,p_sex  =>
11951                  hr_transaction_api.get_varchar2_value
11952                  (p_transaction_step_id   => p_transaction_step_id
11953                   ,p_name                 =>upper('p_sex'))
11954       --
11955          ,p_title  =>
11956                  hr_transaction_api.get_varchar2_value
11957                  (p_transaction_step_id   => p_transaction_step_id
11958                   ,p_name                 =>upper('p_title'))
11959       --
11960          ,p_vendor_id  =>
11961                  hr_transaction_api.get_number_value
11962                  (p_transaction_step_id   => p_transaction_step_id
11963                   ,p_name                 =>upper('p_vendor_id'))
11964       --
11965          ,p_work_telephone  =>
11966                  hr_transaction_api.get_varchar2_value
11967                  (p_transaction_step_id   => p_transaction_step_id
11968                   ,p_name                 =>upper('p_work_telephone'))
11969       --
11970          ,p_attribute_category  =>
11971                  hr_transaction_api.get_varchar2_value
11972                  (p_transaction_step_id   => p_transaction_step_id
11973                   ,p_name                 =>upper('p_attribute_category'))
11974       --
11975          ,p_attribute1  =>
11976                  hr_transaction_api.get_varchar2_value
11977                  (p_transaction_step_id   => p_transaction_step_id
11978                   ,p_name                 =>upper('p_attribute1'))
11979       --
11980          ,p_attribute2  =>
11981                  hr_transaction_api.get_varchar2_value
11982                  (p_transaction_step_id   => p_transaction_step_id
11983                   ,p_name                 =>upper('p_attribute2'))
11984       --
11985          ,p_attribute3  =>
11986                  hr_transaction_api.get_varchar2_value
11987                  (p_transaction_step_id   => p_transaction_step_id
11988                   ,p_name                 =>upper('p_attribute3'))
11989       --
11990          ,p_attribute4  =>
11991                  hr_transaction_api.get_varchar2_value
11992                  (p_transaction_step_id   => p_transaction_step_id
11993                   ,p_name                 =>upper('p_attribute4'))
11994       --
11995          ,p_attribute5  =>
11996                  hr_transaction_api.get_varchar2_value
11997                  (p_transaction_step_id   => p_transaction_step_id
11998                   ,p_name                 =>upper('p_attribute5'))
11999       --
12000          ,p_attribute6  =>
12001                  hr_transaction_api.get_varchar2_value
12002                  (p_transaction_step_id   => p_transaction_step_id
12003                   ,p_name                 =>upper('p_attribute6'))
12004       --
12005          ,p_attribute7  =>
12006                  hr_transaction_api.get_varchar2_value
12007                  (p_transaction_step_id   => p_transaction_step_id
12008                   ,p_name                 =>upper('p_attribute7'))
12009       --
12010          ,p_attribute8  =>
12011                  hr_transaction_api.get_varchar2_value
12012                  (p_transaction_step_id   => p_transaction_step_id
12013                   ,p_name                 =>upper('p_attribute8'))
12014       --
12015          ,p_attribute9  =>
12016                  hr_transaction_api.get_varchar2_value
12017                  (p_transaction_step_id   => p_transaction_step_id
12018                   ,p_name                 =>upper('p_attribute9'))
12019       --
12020          ,p_attribute10  =>
12021                  hr_transaction_api.get_varchar2_value
12022                  (p_transaction_step_id   => p_transaction_step_id
12023                   ,p_name                 =>upper('p_attribute10'))
12024       --
12025          ,p_attribute11  =>
12026                  hr_transaction_api.get_varchar2_value
12027                  (p_transaction_step_id   => p_transaction_step_id
12028                   ,p_name                 =>upper('p_attribute11'))
12029       --
12030          ,p_attribute12  =>
12031                  hr_transaction_api.get_varchar2_value
12032                  (p_transaction_step_id   => p_transaction_step_id
12033                   ,p_name                 =>upper('p_attribute12'))
12034       --
12035          ,p_attribute13  =>
12036                  hr_transaction_api.get_varchar2_value
12037                  (p_transaction_step_id   => p_transaction_step_id
12038                   ,p_name                 =>upper('p_attribute13'))
12039       --
12040          ,p_attribute14  =>
12041                  hr_transaction_api.get_varchar2_value
12042                  (p_transaction_step_id   => p_transaction_step_id
12043                   ,p_name                 =>upper('p_attribute14'))
12044       --
12045          ,p_attribute15  =>
12046                  hr_transaction_api.get_varchar2_value
12047                  (p_transaction_step_id   => p_transaction_step_id
12048                   ,p_name                 =>upper('p_attribute15'))
12049       --
12050          ,p_attribute16  =>
12051                  hr_transaction_api.get_varchar2_value
12052                  (p_transaction_step_id   => p_transaction_step_id
12053                   ,p_name                 =>upper('p_attribute16'))
12054       --
12055          ,p_attribute17  =>
12056                  hr_transaction_api.get_varchar2_value
12057                  (p_transaction_step_id   => p_transaction_step_id
12058                   ,p_name                 =>upper('p_attribute17'))
12059       --
12060          ,p_attribute18  =>
12061                  hr_transaction_api.get_varchar2_value
12062                  (p_transaction_step_id   => p_transaction_step_id
12063                   ,p_name                 =>upper('p_attribute18'))
12064       --
12065          ,p_attribute19  =>
12066                  hr_transaction_api.get_varchar2_value
12067                  (p_transaction_step_id   => p_transaction_step_id
12068                   ,p_name                 =>upper('p_attribute19'))
12069       --
12070          ,p_attribute20  =>
12071                  hr_transaction_api.get_varchar2_value
12072                  (p_transaction_step_id   => p_transaction_step_id
12073                   ,p_name                 =>upper('p_attribute20'))
12074       --
12075          ,p_attribute21  =>
12076                  hr_transaction_api.get_varchar2_value
12077                  (p_transaction_step_id   => p_transaction_step_id
12078                   ,p_name                 =>upper('p_attribute21'))
12079       --
12080          ,p_attribute22  =>
12081                  hr_transaction_api.get_varchar2_value
12082                  (p_transaction_step_id   => p_transaction_step_id
12083                   ,p_name                 =>upper('p_attribute22'))
12084       --
12085          ,p_attribute23  =>
12086                  hr_transaction_api.get_varchar2_value
12087                  (p_transaction_step_id   => p_transaction_step_id
12088                   ,p_name                 =>upper('p_attribute23'))
12089       --
12090          ,p_attribute24  =>
12091                  hr_transaction_api.get_varchar2_value
12092                  (p_transaction_step_id   => p_transaction_step_id
12093                   ,p_name                 =>upper('p_attribute24'))
12094       --
12095          ,p_attribute25  =>
12096                  hr_transaction_api.get_varchar2_value
12097                  (p_transaction_step_id   => p_transaction_step_id
12098                   ,p_name                 =>upper('p_attribute25'))
12099       --
12100          ,p_attribute26  =>
12101                  hr_transaction_api.get_varchar2_value
12102                  (p_transaction_step_id   => p_transaction_step_id
12103                   ,p_name                 =>upper('p_attribute26'))
12104       --
12105          ,p_attribute27  =>
12106                  hr_transaction_api.get_varchar2_value
12107                  (p_transaction_step_id   => p_transaction_step_id
12108                   ,p_name                 =>upper('p_attribute27'))
12109       --
12110          ,p_attribute28  =>
12111                  hr_transaction_api.get_varchar2_value
12112                  (p_transaction_step_id   => p_transaction_step_id
12113                   ,p_name                 =>upper('p_attribute28'))
12114       --
12115          ,p_attribute29  =>
12116                  hr_transaction_api.get_varchar2_value
12117                  (p_transaction_step_id   => p_transaction_step_id
12118                   ,p_name                 =>upper('p_attribute29'))
12119       --
12120          ,p_attribute30  =>
12121                  hr_transaction_api.get_varchar2_value
12122                  (p_transaction_step_id   => p_transaction_step_id
12123                   ,p_name                 =>upper('p_attribute30'))
12124       --
12125          ,p_per_information_category  =>
12126                  hr_transaction_api.get_varchar2_value
12127                  (p_transaction_step_id   => p_transaction_step_id
12128                   ,p_name                 =>upper('p_per_information_category'))
12129       --
12130          ,p_per_information1  =>
12131                  hr_transaction_api.get_varchar2_value
12132                  (p_transaction_step_id   => p_transaction_step_id
12133                   ,p_name                 =>upper('p_per_information1'))
12134       --
12135          ,p_per_information2  =>
12136                  hr_transaction_api.get_varchar2_value
12137                  (p_transaction_step_id   => p_transaction_step_id
12138                   ,p_name                 =>upper('p_per_information2'))
12139       --
12140          ,p_per_information3  =>
12141                  hr_transaction_api.get_varchar2_value
12142                  (p_transaction_step_id   => p_transaction_step_id
12143                   ,p_name                 =>upper('p_per_information3'))
12144       --
12145          ,p_per_information4  =>
12146                  hr_transaction_api.get_varchar2_value
12147                  (p_transaction_step_id   => p_transaction_step_id
12148                   ,p_name                 =>upper('p_per_information4'))
12149       --
12150          ,p_per_information5  =>
12151                  hr_transaction_api.get_varchar2_value
12152                  (p_transaction_step_id   => p_transaction_step_id
12153                   ,p_name                 =>upper('p_per_information5'))
12154       --
12155          ,p_per_information6  =>
12156                  hr_transaction_api.get_varchar2_value
12157                  (p_transaction_step_id   => p_transaction_step_id
12158                   ,p_name                 =>upper('p_per_information6'))
12159       --
12160          ,p_per_information7  =>
12161                  hr_transaction_api.get_varchar2_value
12162                  (p_transaction_step_id   => p_transaction_step_id
12163                   ,p_name                 =>upper('p_per_information7'))
12164       --
12165          ,p_per_information8  =>
12166                  hr_transaction_api.get_varchar2_value
12167                  (p_transaction_step_id   => p_transaction_step_id
12168                   ,p_name                 =>upper('p_per_information8'))
12169       --
12170          ,p_per_information9  =>
12171                  hr_transaction_api.get_varchar2_value
12172                  (p_transaction_step_id   => p_transaction_step_id
12173                   ,p_name                 =>upper('p_per_information9'))
12174       --
12175          ,p_per_information10  =>
12176                  hr_transaction_api.get_varchar2_value
12177                  (p_transaction_step_id   => p_transaction_step_id
12178                   ,p_name                 =>upper('p_per_information10'))
12179       --
12180          ,p_per_information11  =>
12181                  hr_transaction_api.get_varchar2_value
12182                  (p_transaction_step_id   => p_transaction_step_id
12183                   ,p_name                 =>upper('p_per_information11'))
12184       --
12185          ,p_per_information12  =>
12186                  hr_transaction_api.get_varchar2_value
12187                  (p_transaction_step_id   => p_transaction_step_id
12188                   ,p_name                 =>upper('p_per_information12'))
12189       --
12190          ,p_per_information13  =>
12191                  hr_transaction_api.get_varchar2_value
12192                  (p_transaction_step_id   => p_transaction_step_id
12193                   ,p_name                 =>upper('p_per_information13'))
12194       --
12195          ,p_per_information14  =>
12196                  hr_transaction_api.get_varchar2_value
12197                  (p_transaction_step_id   => p_transaction_step_id
12198                   ,p_name                 =>upper('p_per_information14'))
12199       --
12200          ,p_per_information15  =>
12201                  hr_transaction_api.get_varchar2_value
12202                  (p_transaction_step_id   => p_transaction_step_id
12203                   ,p_name                 =>upper('p_per_information15'))
12204       --
12205          ,p_per_information16  =>
12206                  hr_transaction_api.get_varchar2_value
12207                  (p_transaction_step_id   => p_transaction_step_id
12208                   ,p_name                 =>upper('p_per_information16'))
12209       --
12210          ,p_per_information17  =>
12211                  hr_transaction_api.get_varchar2_value
12212                  (p_transaction_step_id   => p_transaction_step_id
12213                   ,p_name                 =>upper('p_per_information17'))
12214       --
12215          ,p_per_information18  =>
12216                  hr_transaction_api.get_varchar2_value
12217                  (p_transaction_step_id   => p_transaction_step_id
12218                   ,p_name                 =>upper('p_per_information18'))
12219       --
12220          ,p_per_information19  =>
12221                  hr_transaction_api.get_varchar2_value
12222                  (p_transaction_step_id   => p_transaction_step_id
12223                   ,p_name                 =>upper('p_per_information19'))
12224       --
12225          ,p_per_information20  =>
12226                  hr_transaction_api.get_varchar2_value
12227                  (p_transaction_step_id   => p_transaction_step_id
12228                   ,p_name                 =>upper('p_per_information20'))
12229       --
12230          ,p_per_information21  =>
12231                  hr_transaction_api.get_varchar2_value
12232                  (p_transaction_step_id   => p_transaction_step_id
12233                   ,p_name                 =>upper('p_per_information21'))
12234       --
12235          ,p_per_information22  =>
12236                  hr_transaction_api.get_varchar2_value
12237                  (p_transaction_step_id   => p_transaction_step_id
12238                   ,p_name                 =>upper('p_per_information22'))
12239       --
12240          ,p_per_information23  =>
12241                  hr_transaction_api.get_varchar2_value
12242                  (p_transaction_step_id   => p_transaction_step_id
12243                   ,p_name                 =>upper('p_per_information23'))
12244       --
12245          ,p_per_information24  =>
12246                  hr_transaction_api.get_varchar2_value
12247                  (p_transaction_step_id   => p_transaction_step_id
12248                   ,p_name                 =>upper('p_per_information24'))
12249       --
12250          ,p_per_information25  =>
12251                  hr_transaction_api.get_varchar2_value
12252                  (p_transaction_step_id   => p_transaction_step_id
12253                   ,p_name                 =>upper('p_per_information25'))
12254       --
12255          ,p_per_information26  =>
12256                  hr_transaction_api.get_varchar2_value
12257                  (p_transaction_step_id   => p_transaction_step_id
12258                   ,p_name                 =>upper('p_per_information26'))
12259       --
12260          ,p_per_information27  =>
12261                  hr_transaction_api.get_varchar2_value
12262                  (p_transaction_step_id   => p_transaction_step_id
12263                   ,p_name                 =>upper('p_per_information27'))
12264       --
12265          ,p_per_information28  =>
12266                  hr_transaction_api.get_varchar2_value
12267                  (p_transaction_step_id   => p_transaction_step_id
12268                   ,p_name                 =>upper('p_per_information28'))
12269       --
12270          ,p_per_information29  =>
12271                  hr_transaction_api.get_varchar2_value
12272                  (p_transaction_step_id   => p_transaction_step_id
12273                   ,p_name                 =>upper('p_per_information29'))
12274       --
12275          ,p_per_information30  =>
12276                  hr_transaction_api.get_varchar2_value
12277                  (p_transaction_step_id   => p_transaction_step_id
12278                   ,p_name                 =>upper('p_per_information30'))
12279       --
12280          ,p_date_of_death  =>
12281                  hr_transaction_api.get_date_value
12282                  (p_transaction_step_id   => p_transaction_step_id
12283                   ,p_name                 =>upper('p_date_of_death'))
12284       --
12285          ,p_background_check_status  =>
12286                  hr_transaction_api.get_varchar2_value
12287                  (p_transaction_step_id   => p_transaction_step_id
12288                   ,p_name                 =>upper('p_background_check_status'))
12289       --
12290          ,p_background_date_check  =>
12291                  hr_transaction_api.get_date_value
12292                  (p_transaction_step_id   => p_transaction_step_id
12293                   ,p_name                 =>upper('p_background_date_check'))
12294       --
12295          ,p_blood_type  =>
12296                  hr_transaction_api.get_varchar2_value
12297                  (p_transaction_step_id   => p_transaction_step_id
12298                   ,p_name                 =>upper('p_blood_type'))
12299       --
12300          ,p_correspondence_language  =>
12301                  hr_transaction_api.get_varchar2_value
12302                  (p_transaction_step_id   => p_transaction_step_id
12303                   ,p_name                 =>upper('p_correspondence_language'))
12304       --
12305          ,p_fast_path_employee  =>
12306                  hr_transaction_api.get_varchar2_value
12307                  (p_transaction_step_id   => p_transaction_step_id
12308                   ,p_name                 =>upper('p_fast_path_employee'))
12309       --
12310          ,p_fte_capacity  =>
12311                  hr_transaction_api.get_number_value
12312                  (p_transaction_step_id   => p_transaction_step_id
12313                   ,p_name                 =>upper('p_fte_capacity'))
12314       --
12315          ,p_hold_applicant_date_until  =>
12316                  hr_transaction_api.get_date_value
12317                  (p_transaction_step_id   => p_transaction_step_id
12318                   ,p_name                 =>upper('p_hold_applicant_date_until'))
12319       --
12320          ,p_honors  =>
12321                  hr_transaction_api.get_varchar2_value
12322                  (p_transaction_step_id   => p_transaction_step_id
12323                   ,p_name                 =>upper('p_honors'))
12324       --
12325          ,p_internal_location  =>
12326                  hr_transaction_api.get_varchar2_value
12327                  (p_transaction_step_id   => p_transaction_step_id
12328                   ,p_name                 =>upper('p_internal_location'))
12329       --
12330          ,p_last_medical_test_by  =>
12331                  hr_transaction_api.get_varchar2_value
12332                  (p_transaction_step_id   => p_transaction_step_id
12333                   ,p_name                 =>upper('p_last_medical_test_by'))
12334       --
12335          ,p_last_medical_test_date  =>
12336                  hr_transaction_api.get_date_value
12337                  (p_transaction_step_id   => p_transaction_step_id
12338                   ,p_name                 =>upper('p_last_medical_test_date'))
12339       --
12340          ,p_mailstop  =>
12341                  hr_transaction_api.get_varchar2_value
12342                  (p_transaction_step_id   => p_transaction_step_id
12343                   ,p_name                 =>upper('p_mailstop'))
12344       --
12345          ,p_office_number  =>
12346                  hr_transaction_api.get_varchar2_value
12347                  (p_transaction_step_id   => p_transaction_step_id
12348                   ,p_name                 =>upper('p_office_number'))
12349       --
12350          ,p_on_military_service  =>
12351                  hr_transaction_api.get_varchar2_value
12352                  (p_transaction_step_id   => p_transaction_step_id
12353                   ,p_name                 =>upper('p_on_military_service'))
12354       --
12355          ,p_pre_name_adjunct  =>
12356                  hr_transaction_api.get_varchar2_value
12357                  (p_transaction_step_id   => p_transaction_step_id
12358                   ,p_name                 =>upper('p_pre_name_adjunct'))
12359       --
12360          ,p_projected_start_date  =>
12361                  hr_transaction_api.get_date_value
12362                  (p_transaction_step_id   => p_transaction_step_id
12363                   ,p_name                 =>upper('p_projected_start_date'))
12364       --
12365          ,p_rehire_authorizor  =>
12366                  hr_transaction_api.get_varchar2_value
12367                  (p_transaction_step_id   => p_transaction_step_id
12368                   ,p_name                 =>upper('p_rehire_authorizor'))
12369       --
12370          ,p_rehire_recommendation  =>
12371                  hr_transaction_api.get_varchar2_value
12372                  (p_transaction_step_id   => p_transaction_step_id
12373                   ,p_name                 =>upper('p_rehire_recommendation'))
12374       --
12375          ,p_resume_exists  =>
12376                  hr_transaction_api.get_varchar2_value
12377                  (p_transaction_step_id   => p_transaction_step_id
12378                   ,p_name                 =>upper('p_resume_exists'))
12379       --
12380          ,p_resume_last_updated  =>
12381                  hr_transaction_api.get_date_value
12382                  (p_transaction_step_id   => p_transaction_step_id
12383                   ,p_name                 =>upper('p_resume_last_updated'))
12384       --
12385          ,p_second_passport_exists  =>
12386                  hr_transaction_api.get_varchar2_value
12387                  (p_transaction_step_id   => p_transaction_step_id
12388                   ,p_name                 =>upper('p_second_passport_exists'))
12389       --
12390          ,p_student_status  =>
12391                  hr_transaction_api.get_varchar2_value
12392                  (p_transaction_step_id   => p_transaction_step_id
12393                   ,p_name                 =>upper('p_student_status'))
12394       --
12395          ,p_work_schedule  =>
12396                  hr_transaction_api.get_varchar2_value
12397                  (p_transaction_step_id   => p_transaction_step_id
12398                   ,p_name                 =>upper('p_work_schedule'))
12399       --
12400          ,p_rehire_reason  =>
12401                  hr_transaction_api.get_varchar2_value
12402                  (p_transaction_step_id   => p_transaction_step_id
12403                   ,p_name                 =>upper('p_rehire_reason'))
12404       --
12405          ,p_suffix  =>
12406                  hr_transaction_api.get_varchar2_value
12407                  (p_transaction_step_id   => p_transaction_step_id
12408                   ,p_name                 =>upper('p_suffix'))
12409       --
12410          ,p_benefit_group_id  =>
12411                  hr_transaction_api.get_number_value
12412                  (p_transaction_step_id   => p_transaction_step_id
12413                   ,p_name                 =>upper('p_benefit_group_id'))
12414       --
12415          ,p_receipt_of_death_cert_date  =>
12416                  hr_transaction_api.get_date_value
12417                  (p_transaction_step_id   => p_transaction_step_id
12418                   ,p_name                 =>upper('p_receipt_of_death_cert_date'))
12419       --
12420          ,p_coord_ben_med_pln_no  =>
12421                  hr_transaction_api.get_varchar2_value
12422                  (p_transaction_step_id   => p_transaction_step_id
12423                   ,p_name                 =>upper('p_coord_ben_med_pln_no'))
12424       --
12425          ,p_coord_ben_no_cvg_flag  =>
12426                  hr_transaction_api.get_varchar2_value
12427                  (p_transaction_step_id   => p_transaction_step_id
12428                   ,p_name                 =>upper('p_coord_ben_no_cvg_flag'))
12429       --
12430          ,p_uses_tobacco_flag  =>
12431                  hr_transaction_api.get_varchar2_value
12432                  (p_transaction_step_id   => p_transaction_step_id
12433                   ,p_name                 =>upper('p_uses_tobacco_flag'))
12434       --
12435          ,p_dpdnt_adoption_date  =>
12436                  hr_transaction_api.get_date_value
12437                  (p_transaction_step_id   => p_transaction_step_id
12438                   ,p_name                 =>upper('p_dpdnt_adoption_date'))
12439       --
12440          ,p_dpdnt_vlntry_svce_flag  =>
12441                  hr_transaction_api.get_varchar2_value
12442                  (p_transaction_step_id   => p_transaction_step_id
12443                   ,p_name                 =>upper('p_dpdnt_vlntry_svce_flag'))
12444       --
12445       /*
12446       -- Bug 2652114 : As the java code passes null value do not pass the null value
12447       -- to api. SS contacts module is not allowed to modify adjusted service date
12448       -- and original_date_of_hire
12449       -- So not necessary to pass the parameter.
12450       --
12451          ,p_original_date_of_hire  =>
12452                  hr_transaction_api.get_date_value
12453                  (p_transaction_step_id   => p_transaction_step_id
12454                   ,p_name                 =>upper('p_original_date_of_hire'))
12455       --
12456          ,p_adjusted_svc_date  =>
12457                  hr_transaction_api.get_date_value
12458                  (p_transaction_step_id   => p_transaction_step_id
12459                   ,p_name                 =>upper('p_adjusted_svc_date'))
12460       */
12461       --
12462          ,p_town_of_birth  =>
12463                  hr_transaction_api.get_varchar2_value
12464                  (p_transaction_step_id   => p_transaction_step_id
12465                   ,p_name                 =>upper('p_town_of_birth'))
12466       --
12467          ,p_region_of_birth  =>
12468                  hr_transaction_api.get_varchar2_value
12469                  (p_transaction_step_id   => p_transaction_step_id
12470                   ,p_name                 =>upper('p_region_of_birth'))
12471       --
12472          ,p_country_of_birth  =>
12473                  hr_transaction_api.get_varchar2_value
12474                  (p_transaction_step_id   => p_transaction_step_id
12475                   ,p_name                 =>upper('p_country_of_birth'))
12476       --
12477          ,p_global_person_id  =>
12478                  hr_transaction_api.get_varchar2_value
12479                  (p_transaction_step_id   => p_transaction_step_id
12480                   ,p_name                 =>upper('p_global_person_id'))
12481       --
12482          ,p_effective_start_date  =>      l_effective_start_date
12483       --
12484          ,p_effective_end_date  =>        l_effective_end_date
12485       --
12486          ,p_full_name  =>                 l_full_name
12487       --
12488          ,p_comment_id  =>                l_comment_id
12489       --
12490          ,p_name_combination_warning  =>  l_name_combination_warning
12491       --
12492          ,p_assign_payroll_warning  =>    l_assign_payroll_warning
12493       --
12494          ,p_orig_hire_warning  =>         l_orig_hire_warning
12495       --
12496     );
12497     --
12498   END IF;
12499 
12500   hr_utility.set_location('p_effective_date = ' || p_effective_date, 999);
12501   if (p_effective_date is not null) then
12502 
12503     l_effective_date:= to_date(p_effective_date,g_date_format);
12504 
12505   else
12506        l_effective_date:= to_date(
12507          hr_transaction_ss.get_wf_effective_date
12508         (p_transaction_step_id => p_transaction_step_id),g_date_format);
12509 
12510   end if;
12511   --
12512   -- For normal commit the effective date should come from txn tbales.
12513   --
12514   if not p_validate then
12515   --
12516      l_effective_date := hr_transaction_api.get_DATE_value
12517            (p_transaction_step_id => p_transaction_step_id
12518            ,p_name                => 'P_CONT_EFFECTIVE_DATE');
12519   --
12520   end if;
12521   hr_utility.set_location('l_effective_date = ' || l_effective_date, 999);
12522   --
12523   --
12524   -- Get the contact_relationship_id  first.  If it is null, that means
12525   -- this is error and raise the error. -- add the error name 99999.
12526   --
12527   l_cont_rec_changed := hr_transaction_api.get_varchar2_value
12528                          (p_transaction_step_id => p_transaction_step_id
12529                          ,p_name =>upper( 'p_cont_rec_changed'));
12530 
12531   --
12532   l_contact_relationship_id := hr_transaction_api.get_number_value
12533 			(p_transaction_step_id => p_transaction_step_id
12534 				,p_name => 'P_CONTACT_RELATIONSHIP_ID');
12535   --
12536   l_ovn := hr_transaction_api.get_number_value
12537 	     (p_transaction_step_id => p_transaction_step_id
12538 	     ,p_name => 'P_CONT_OBJECT_VERSION_NUMBER');
12539 
12540   --
12541   l_action := hr_transaction_api.get_varchar2_value
12542              (p_transaction_step_id => p_transaction_step_id
12543              ,p_name =>upper( 'p_action'));
12544   --
12545   l_orig_rel_type :=  hr_transaction_api.get_VARCHAR2_value
12546 	       (p_transaction_step_id => p_transaction_step_id
12547                ,p_name                => upper('p_orig_rel_type'));
12548 
12549    --
12550   l_contact_operation  :=
12551       hr_transaction_api.get_varchar2_value
12552         (p_transaction_step_id => p_transaction_step_id
12553         ,p_name                =>upper( 'p_contact_operation'));
12554 
12555 
12556   IF l_contact_relationship_id IS NOT NULL AND
12557      l_cont_rec_changed = 'CHANGED' and l_contact_relationship_id > 0
12558   THEN
12559     --
12560     -- If shared residence flag is yes then delete the contacts primary
12561     -- address.
12562     --
12563     if (hr_transaction_api.get_VARCHAR2_value
12564            (p_transaction_step_id => p_transaction_step_id
12565            ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG') = 'Y') then
12566        --
12567        p_del_cont_primary_addr
12568        (p_contact_relationship_id
12569             => hr_transaction_api.get_NUMBER_value
12570                (p_transaction_step_id => p_transaction_step_id
12571                ,p_name                => 'P_CONTACT_RELATIONSHIP_ID')
12572        );
12573        --
12574     end if;
12575 
12576     l_date_sart := hr_transaction_api.get_DATE_value
12577            (p_transaction_step_id => p_transaction_step_id
12578            ,p_name                => 'P_DATE_START');
12579     --
12580    l_primary_contact_flag :=
12581          hr_transaction_api.get_VARCHAR2_value
12582            (p_transaction_step_id => p_transaction_step_id
12583            ,p_name                => 'P_PRIMARY_CONTACT_FLAG');
12584    if l_primary_contact_flag = null then
12585       l_primary_contact_flag := 'N';
12586    end if;
12587 
12588 
12589   if l_action = 'UPDATE' then
12590    if l_orig_rel_type <> 'EMRG' then
12591 
12592 ---bug 5894873
12593 ---if earlier start date of contact is greater than or equals to the new date, then delete the contact,
12594 ---and create a new one. Else update the contact, and then create one.
12595 
12596    l_old_contact_relationship_id :=
12597         hr_transaction_api.get_NUMBER_value
12598            (p_transaction_step_id => p_transaction_step_id
12599            ,p_name                => 'P_CONTACT_RELATIONSHIP_ID');
12600 
12601     begin
12602         select nvl(date_start,trunc(sysdate))
12603         into l_start_contact_date
12604         from per_contact_relationships
12605         where contact_relationship_id = l_old_contact_relationship_id
12606         and object_version_number = l_ovn;
12607     exception
12608      when others then
12609      l_start_contact_date := l_date_sart;
12610     end;
12611 
12612 
12613     if l_start_contact_date > l_date_sart then
12614     /***********************************************************************************************
12615      hr_contact_rel_api.delete_contact_relationship method is commented out as this method
12616      did not support when contact is only one, i.e, it is not dual maintained. So from now
12617      PER_CONTACT_RELATIONSHIPS_PKG.Update_Row is called as core HR team is use it for the same pourpose.
12618      This row handler makes all necessary changes of the per_all_people_f and per_contact_relationships table
12619      One new check is add here with the help of the variable of skip_contact_create_flg
12620      This is, do not create a contact if already did so with this row handler method and has not set
12621      the end date of that row
12622      ***********************************************************************************************
12623      */
12624 
12625     /*hr_contact_rel_api.delete_contact_relationship(
12626        p_validate                => p_validate
12627       ,P_CONTACT_RELATIONSHIP_ID  =>
12628          hr_transaction_api.get_NUMBER_value
12629            (p_transaction_step_id => p_transaction_step_id
12630            ,p_name                => 'P_CONTACT_RELATIONSHIP_ID')
12631       ,p_object_version_number   => l_ovn
12632      );
12633     */
12634         l_CONTACT_RELATIONSHIP_ID_1 := hr_transaction_api.get_number_value
12635          (p_transaction_step_id => p_transaction_step_id
12636     	 ,p_name => 'P_CONTACT_RELATIONSHIP_ID');
12637 
12638     select rowid
12639     into p_rowid
12640     from per_contact_relationships
12641     where CONTACT_RELATIONSHIP_ID = l_CONTACT_RELATIONSHIP_ID_1;
12642 
12643     hr_utility.set_location('before call PER_CONTACT_RELATIONSHIPS_PKG.Update_Row:X_Contact_Relationship_Id:' || l_CONTACT_RELATIONSHIP_ID_1 , 5);
12644 
12645     PER_CONTACT_RELATIONSHIPS_PKG.Update_Row(
12646                      X_Rowid => p_rowid
12647                      , X_Contact_Relationship_Id => l_CONTACT_RELATIONSHIP_ID_1
12648                      , X_Business_Group_Id => hr_transaction_api.get_NUMBER_value
12649            					   (p_transaction_step_id => p_transaction_step_id
12650            					   ,p_name                => 'P_BUSINESS_GROUP_ID')
12651                      , X_Person_Id => hr_transaction_api.get_number_value
12652 	                                           (p_transaction_step_id   => p_transaction_step_id
12653                                                    ,p_name                 =>upper('p_person_id'))
12654                      , X_Contact_Person_Id => hr_transaction_api.get_number_value
12655                                               (p_transaction_step_id   => p_transaction_step_id
12656                                               ,p_name                 =>upper('p_cont_person_id'))
12657                      , X_Contact_Type => hr_transaction_api.get_VARCHAR2_value
12658 	   			       (p_transaction_step_id => p_transaction_step_id
12659            			       ,p_name                => 'P_CONTACT_TYPE')
12660                      , X_Comments => hr_transaction_api.get_VARCHAR2_value
12661                                    (p_transaction_step_id => p_transaction_step_id
12662            		           ,p_name                => 'P_CTR_COMMENTS')
12663                      , X_Bondholder_Flag => hr_transaction_api.get_VARCHAR2_value
12664            				  (p_transaction_step_id => p_transaction_step_id
12665 		           		  ,p_name                => 'P_BONDHOLDER_FLAG')
12666                      , X_Third_Party_Pay_Flag => hr_transaction_api.get_VARCHAR2_value
12667            				       (p_transaction_step_id => p_transaction_step_id
12668            				       ,p_name                => 'P_THIRD_PARTY_PAY_FLAG')
12669                      , X_Primary_Contact_Flag => hr_transaction_api.get_VARCHAR2_value
12670                                                (p_transaction_step_id => p_transaction_step_id
12671                                                ,p_name                => 'P_PRIMARY_CONTACT_FLAG')
12672                      , X_Cont_Attribute_Category => hr_transaction_api.get_VARCHAR2_value
12673            					  (p_transaction_step_id => p_transaction_step_id
12674            				          ,p_name                => 'P_CONT_ATTRIBUTE_CATEGORY')
12675                      , X_Cont_Attribute1 => hr_transaction_api.get_VARCHAR2_value
12676                                           (p_transaction_step_id => p_transaction_step_id
12677                                           ,p_name                => 'P_CONT_ATTRIBUTE1')
12678                      , X_Cont_Attribute2 => hr_transaction_api.get_VARCHAR2_value
12679                                           (p_transaction_step_id => p_transaction_step_id
12680                                           ,p_name                => 'P_CONT_ATTRIBUTE2')
12681                      , X_Cont_Attribute3 => hr_transaction_api.get_VARCHAR2_value
12682                                           (p_transaction_step_id => p_transaction_step_id
12683                                           ,p_name                => 'P_CONT_ATTRIBUTE3')
12684                      , X_Cont_Attribute4 => hr_transaction_api.get_VARCHAR2_value
12685                                           (p_transaction_step_id => p_transaction_step_id
12686                                           ,p_name                => 'P_CONT_ATTRIBUTE4')
12687                      , X_Cont_Attribute5 => hr_transaction_api.get_VARCHAR2_value
12688                                           (p_transaction_step_id => p_transaction_step_id
12689                                           ,p_name                => 'P_CONT_ATTRIBUTE5')
12690                      , X_Cont_Attribute6 => hr_transaction_api.get_VARCHAR2_value
12691                                           (p_transaction_step_id => p_transaction_step_id
12692                                           ,p_name                => 'P_CONT_ATTRIBUTE6')
12693                      , X_Cont_Attribute7 => hr_transaction_api.get_VARCHAR2_value
12694                                           (p_transaction_step_id => p_transaction_step_id
12695                                           ,p_name                => 'P_CONT_ATTRIBUTE7')
12696                      , X_Cont_Attribute8 => hr_transaction_api.get_VARCHAR2_value
12697                                           (p_transaction_step_id => p_transaction_step_id
12698                                           ,p_name                => 'P_CONT_ATTRIBUTE8')
12699                      , X_Cont_Attribute9 => hr_transaction_api.get_VARCHAR2_value
12700                                           (p_transaction_step_id => p_transaction_step_id
12701                                           ,p_name                => 'P_CONT_ATTRIBUTE9')
12702                      , X_Cont_Attribute10 => hr_transaction_api.get_VARCHAR2_value
12703                                           (p_transaction_step_id => p_transaction_step_id
12704                                           ,p_name                => 'P_CONT_ATTRIBUTE10')
12705                      , X_Cont_Attribute11 => hr_transaction_api.get_VARCHAR2_value
12706                                           (p_transaction_step_id => p_transaction_step_id
12707                                           ,p_name                => 'P_CONT_ATTRIBUTE11')
12708                      , X_Cont_Attribute12 => hr_transaction_api.get_VARCHAR2_value
12709                                           (p_transaction_step_id => p_transaction_step_id
12710                                           ,p_name                => 'P_CONT_ATTRIBUTE12')
12711                      , X_Cont_Attribute13 => hr_transaction_api.get_VARCHAR2_value
12712                                           (p_transaction_step_id => p_transaction_step_id
12713                                           ,p_name                => 'P_CONT_ATTRIBUTE13')
12714                      , X_Cont_Attribute14 => hr_transaction_api.get_VARCHAR2_value
12715                                           (p_transaction_step_id => p_transaction_step_id
12716                                           ,p_name                => 'P_CONT_ATTRIBUTE14')
12717                      , X_Cont_Attribute15 => hr_transaction_api.get_VARCHAR2_value
12718                                           (p_transaction_step_id => p_transaction_step_id
12719                                           ,p_name                => 'P_CONT_ATTRIBUTE15')
12720                      , X_Cont_Attribute16 => hr_transaction_api.get_VARCHAR2_value
12721                                           (p_transaction_step_id => p_transaction_step_id
12722                                           ,p_name                => 'P_CONT_ATTRIBUTE16')
12723                      , X_Cont_Attribute17 => hr_transaction_api.get_VARCHAR2_value
12724                                           (p_transaction_step_id => p_transaction_step_id
12725                                           ,p_name                => 'P_CONT_ATTRIBUTE17')
12726                      , X_Cont_Attribute18 => hr_transaction_api.get_VARCHAR2_value
12727                                           (p_transaction_step_id => p_transaction_step_id
12728                                           ,p_name                => 'P_CONT_ATTRIBUTE18')
12729                      , X_Cont_Attribute19 => hr_transaction_api.get_VARCHAR2_value
12730                                           (p_transaction_step_id => p_transaction_step_id
12731                                           ,p_name                => 'P_CONT_ATTRIBUTE19')
12732                      , X_Cont_Attribute20 => hr_transaction_api.get_VARCHAR2_value
12733                                           (p_transaction_step_id => p_transaction_step_id
12734                                           ,p_name                => 'P_CONT_ATTRIBUTE20')
12735                      , X_Cont_Information_Category => hr_transaction_api.get_VARCHAR2_value
12736            				  (p_transaction_step_id => p_transaction_step_id
12737            				  ,p_name                => 'P_PER_INFORMATION_CATEGORY')
12738                      , X_Cont_Information1 => hr_transaction_api.get_VARCHAR2_value
12739             				    (p_transaction_step_id => p_transaction_step_id
12740            				    ,p_name                => 'P_CONT_INFORMATION1')
12741                      , X_Cont_Information2 => hr_transaction_api.get_VARCHAR2_value
12742             				    (p_transaction_step_id => p_transaction_step_id
12743            				    ,p_name                => 'P_CONT_INFORMATION2')
12744                      , X_Cont_Information3 => hr_transaction_api.get_VARCHAR2_value
12745             				    (p_transaction_step_id => p_transaction_step_id
12746            				    ,p_name                => 'P_CONT_INFORMATION3')
12747                      , X_Cont_Information4 => hr_transaction_api.get_VARCHAR2_value
12748             				    (p_transaction_step_id => p_transaction_step_id
12749            				    ,p_name                => 'P_CONT_INFORMATION4')
12750                      , X_Cont_Information5 => hr_transaction_api.get_VARCHAR2_value
12751             				    (p_transaction_step_id => p_transaction_step_id
12752            				    ,p_name                => 'P_CONT_INFORMATION5')
12753                      , X_Cont_Information6 => hr_transaction_api.get_VARCHAR2_value
12754             				    (p_transaction_step_id => p_transaction_step_id
12755            				    ,p_name                => 'P_CONT_INFORMATION6')
12756                      , X_Cont_Information7 => hr_transaction_api.get_VARCHAR2_value
12757             				    (p_transaction_step_id => p_transaction_step_id
12758            				    ,p_name                => 'P_CONT_INFORMATION7')
12759                      , X_Cont_Information8 => hr_transaction_api.get_VARCHAR2_value
12760             				    (p_transaction_step_id => p_transaction_step_id
12761            				    ,p_name                => 'P_CONT_INFORMATION8')
12762                      , X_Cont_Information9 => hr_transaction_api.get_VARCHAR2_value
12763             				    (p_transaction_step_id => p_transaction_step_id
12764            				    ,p_name                => 'P_CONT_INFORMATION9')
12765                      , X_Cont_Information10 => hr_transaction_api.get_VARCHAR2_value
12766             				    (p_transaction_step_id => p_transaction_step_id
12767            				    ,p_name                => 'P_CONT_INFORMATION10')
12768                      , X_Cont_Information11 => hr_transaction_api.get_VARCHAR2_value
12769             				    (p_transaction_step_id => p_transaction_step_id
12770            				    ,p_name                => 'P_CONT_INFORMATION11')
12771                      , X_Cont_Information12 => hr_transaction_api.get_VARCHAR2_value
12772             				    (p_transaction_step_id => p_transaction_step_id
12773            				    ,p_name                => 'P_CONT_INFORMATION12')
12774                      , X_Cont_Information13 => hr_transaction_api.get_VARCHAR2_value
12775             				    (p_transaction_step_id => p_transaction_step_id
12776            				    ,p_name                => 'P_CONT_INFORMATION13')
12777                      , X_Cont_Information14 => hr_transaction_api.get_VARCHAR2_value
12778             				    (p_transaction_step_id => p_transaction_step_id
12779            				    ,p_name                => 'P_CONT_INFORMATION14')
12780                      , X_Cont_Information15 => hr_transaction_api.get_VARCHAR2_value
12781             				    (p_transaction_step_id => p_transaction_step_id
12782            				    ,p_name                => 'P_CONT_INFORMATION15')
12783                      , X_Cont_Information16 => hr_transaction_api.get_VARCHAR2_value
12784             				    (p_transaction_step_id => p_transaction_step_id
12785            				    ,p_name                => 'P_CONT_INFORMATION16')
12786                      , X_Cont_Information17 => hr_transaction_api.get_VARCHAR2_value
12787             				    (p_transaction_step_id => p_transaction_step_id
12788            				    ,p_name                => 'P_CONT_INFORMATION17')
12789                      , X_Cont_Information18 => hr_transaction_api.get_VARCHAR2_value
12790             				    (p_transaction_step_id => p_transaction_step_id
12791            				    ,p_name                => 'P_CONT_INFORMATION18')
12792                      , X_Cont_Information19 => hr_transaction_api.get_VARCHAR2_value
12793             				    (p_transaction_step_id => p_transaction_step_id
12794            				    ,p_name                => 'P_CONT_INFORMATION19')
12795                      , X_Cont_Information20 => hr_transaction_api.get_VARCHAR2_value
12796             				    (p_transaction_step_id => p_transaction_step_id
12797            				    ,p_name                => 'P_CONT_INFORMATION20')
12798                      , X_Session_Date => null --- this session_date is not used in PER_CONTACT_RELATIONSHIPS_PKG.update_row method, so null is pass here
12799                      , X_Date_Start => hr_transaction_api.get_DATE_value
12800            			     (p_transaction_step_id => p_transaction_step_id
12801            			     ,p_name                => 'P_DATE_START')
12802                      , X_Start_Life_Reason_Id => hr_transaction_api.get_NUMBER_value
12803            				       (p_transaction_step_id => p_transaction_step_id
12804            				       ,p_name                => 'P_START_LIFE_REASON_ID')
12805                      , X_Date_End => hr_transaction_api.get_DATE_value
12806            			   (p_transaction_step_id => p_transaction_step_id
12807            			   ,p_name                => 'P_DATE_END')
12808                      , X_End_Life_Reason_Id => hr_transaction_api.get_NUMBER_value
12809            				     (p_transaction_step_id => p_transaction_step_id
12810            				     ,p_name                => 'P_END_LIFE_REASON_ID')
12811                      , X_Rltd_Per_Rsds_W_Dsgntr_Flag => hr_transaction_api.get_VARCHAR2_value
12812            					      (p_transaction_step_id => p_transaction_step_id
12813            					      ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG')
12814                      , X_Personal_Flag => hr_transaction_api.get_VARCHAR2_value
12815            				(p_transaction_step_id => p_transaction_step_id
12816            				,p_name                => 'P_PERSONAL_FLAG')
12817 		     , X_Sequence_Number => hr_transaction_api.get_NUMBER_value
12818                                         (p_transaction_step_id => p_transaction_step_id
12819            				,p_name                => 'P_SEQUENCE_NUMBER')
12820                      , X_Dependent_Flag => hr_transaction_api.get_varchar2_value
12821         				 (p_transaction_step_id => p_transaction_step_id
12822         				 ,p_name                => 'P_DEPENDENT_FLAG')
12823                      , X_Beneficiary_Flag => hr_transaction_api.get_varchar2_value
12824         				   (p_transaction_step_id => p_transaction_step_id
12825         				   ,p_name                => 'P_BENEFICIARY_FLAG')
12826     );
12827     skip_contact_create_flg := 1;
12828 
12829     else
12830     l_date_end := trunc(l_date_sart) -1;
12831     hr_contact_rel_api.update_contact_relationship(
12832        p_validate                => p_validate
12833       ,P_EFFECTIVE_DATE         =>l_effective_date
12834       ,p_object_version_number   => l_ovn
12835       ,P_CONTACT_RELATIONSHIP_ID  =>
12836          hr_transaction_api.get_NUMBER_value
12837            (p_transaction_step_id => p_transaction_step_id
12838            ,p_name                => 'P_CONTACT_RELATIONSHIP_ID')
12839       ,p_date_end     => l_date_end
12840      );
12841      end if;
12842 ---bug 5894873
12843 
12844 
12845     -- end date the old relationship
12846 /* commented for the bug bug 5894873
12847     l_date_end := trunc(l_date_sart) -1;
12848     hr_contact_rel_api.update_contact_relationship(
12849        p_validate                => p_validate
12850       ,P_EFFECTIVE_DATE         =>l_effective_date
12851       ,p_object_version_number   => l_ovn
12852       ,P_CONTACT_RELATIONSHIP_ID  =>
12853          hr_transaction_api.get_NUMBER_value
12854            (p_transaction_step_id => p_transaction_step_id
12855            ,p_name                => 'P_CONTACT_RELATIONSHIP_ID')
12856       ,p_date_end     => l_date_end
12857      );
12858 commented for the bug bug 5894873
12859 */
12860    end if;
12861    -- if primary contact flag is checked/unchecked apply it emrg record and not for
12862    -- other personal relationship record
12863     open get_emrg_relid_ovn(
12864             hr_transaction_api.get_NUMBER_value
12865            (p_transaction_step_id => p_transaction_step_id
12866            ,p_name                => 'P_CONTACT_RELATIONSHIP_ID')
12867            ,hr_transaction_api.get_number_value
12868                  (p_transaction_step_id   => p_transaction_step_id
12869                   ,p_name                 => 'P_CONTACT_PERSON_ID')
12870            ,hr_transaction_api.get_number_value
12871                  (p_transaction_step_id   => p_transaction_step_id
12872                   ,p_name                 => 'P_PERSON_ID'));
12873     fetch get_emrg_relid_ovn into l_emrg_relid, l_emrg_ovn, l_emrg_primary_cont_flag,
12874                                                       z_person_id, z_date_start, z_date_end;
12875     if get_emrg_relid_ovn%found then
12876      if((l_emrg_primary_cont_flag <> 'Y' and l_primary_contact_flag = 'Y') OR
12877         (l_emrg_primary_cont_flag <> 'N' and l_primary_contact_flag = 'N')) then
12878 
12879          if l_primary_contact_flag = 'Y' then                --9564383
12880            open csr_chk_primary_cnt;
12881            fetch csr_chk_primary_cnt into l_exists;
12882            if csr_chk_primary_cnt%FOUND then
12883               z_date_start := sysdate;
12884           end if;
12885           close csr_chk_primary_cnt;
12886         end if;
12887 
12888 -- Bug 3504216 :  passing date_start as sysdate
12889         hr_contact_rel_api.update_contact_relationship(
12890          p_validate                => p_validate
12891         ,P_EFFECTIVE_DATE         =>l_effective_date
12892         ,p_object_version_number   => l_emrg_ovn
12893         ,P_CONTACT_RELATIONSHIP_ID  => l_emrg_relid
12894         ,P_PRIMARY_CONTACT_FLAG     => l_primary_contact_flag
12895 	,P_DATE_START              => z_date_start
12896        );
12897      end if;
12898      l_primary_contact_flag := 'N';
12899     end if;
12900     close get_emrg_relid_ovn;
12901    if skip_contact_create_flg <> 1 then -- 5894873
12902     hr_contact_rel_api.create_contact(
12903       P_VALIDATE  => p_validate
12904       --
12905       ,P_START_DATE  => l_effective_date
12906       --
12907       ,P_BUSINESS_GROUP_ID  =>
12908          hr_transaction_api.get_NUMBER_value
12909            (p_transaction_step_id => p_transaction_step_id
12910            ,p_name                => 'P_BUSINESS_GROUP_ID')
12911       --
12912       ,P_PERSON_ID  =>
12913           hr_transaction_api.get_number_value
12914 	          (p_transaction_step_id   => p_transaction_step_id
12915                   ,p_name                 =>upper('p_person_id'))
12916       --
12917       ,P_CONTACT_PERSON_ID  =>
12918          hr_transaction_api.get_number_value
12919 	          (p_transaction_step_id   => p_transaction_step_id
12920                   ,p_name                 =>upper('p_cont_person_id'))
12921       --
12922       ,P_CONTACT_TYPE  =>
12923          hr_transaction_api.get_VARCHAR2_value
12924 	   (p_transaction_step_id => p_transaction_step_id
12925            ,p_name                => 'P_CONTACT_TYPE')
12926       --
12927       ,P_CTR_COMMENTS  =>
12928          hr_transaction_api.get_VARCHAR2_value
12929            (p_transaction_step_id => p_transaction_step_id
12930            ,p_name                => 'P_CTR_COMMENTS')
12931       --
12932       ,P_PRIMARY_CONTACT_FLAG  => l_primary_contact_flag
12933       --
12934       ,P_DATE_START  => l_date_sart
12935 
12936       --
12937       ,P_START_LIFE_REASON_ID  =>
12938          hr_transaction_api.get_NUMBER_value
12939            (p_transaction_step_id => p_transaction_step_id
12940            ,p_name                => 'P_START_LIFE_REASON_ID')
12941       --
12942       ,P_DATE_END  =>
12943          hr_transaction_api.get_DATE_value
12944            (p_transaction_step_id => p_transaction_step_id
12945            ,p_name                => 'P_DATE_END')
12946       --
12947       ,P_END_LIFE_REASON_ID  =>
12948          hr_transaction_api.get_NUMBER_value
12949            (p_transaction_step_id => p_transaction_step_id
12950            ,p_name                => 'P_END_LIFE_REASON_ID')
12951       --
12952       ,P_RLTD_PER_RSDS_W_DSGNTR_FLAG  =>
12953          hr_transaction_api.get_VARCHAR2_value
12954            (p_transaction_step_id => p_transaction_step_id
12955            ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG')
12956       --
12957       ,P_PERSONAL_FLAG  =>
12958          hr_transaction_api.get_VARCHAR2_value
12959            (p_transaction_step_id => p_transaction_step_id
12960            ,p_name                => 'P_PERSONAL_FLAG')
12961       --
12962       ,P_SEQUENCE_NUMBER  =>
12963          hr_transaction_api.get_NUMBER_value
12964            (p_transaction_step_id => p_transaction_step_id
12965            ,p_name                => 'P_SEQUENCE_NUMBER')
12966       --
12967       ,P_CONT_ATTRIBUTE_CATEGORY  =>
12968          hr_transaction_api.get_VARCHAR2_value
12969            (p_transaction_step_id => p_transaction_step_id
12970            ,p_name                => 'P_CONT_ATTRIBUTE_CATEGORY')
12971       --
12972       ,P_CONT_ATTRIBUTE1  =>
12973          hr_transaction_api.get_VARCHAR2_value
12974            (p_transaction_step_id => p_transaction_step_id
12975            ,p_name                => 'P_CONT_ATTRIBUTE1')
12976       --
12977       ,P_CONT_ATTRIBUTE2  =>
12978          hr_transaction_api.get_VARCHAR2_value
12979            (p_transaction_step_id => p_transaction_step_id
12980            ,p_name                => 'P_CONT_ATTRIBUTE2')
12981       --
12982       ,P_CONT_ATTRIBUTE3  =>
12983          hr_transaction_api.get_VARCHAR2_value
12984            (p_transaction_step_id => p_transaction_step_id
12985            ,p_name                => 'P_CONT_ATTRIBUTE3')
12986       --
12987       ,P_CONT_ATTRIBUTE4  =>
12988          hr_transaction_api.get_VARCHAR2_value
12989            (p_transaction_step_id => p_transaction_step_id
12990            ,p_name                => 'P_CONT_ATTRIBUTE4')
12991       --
12992       ,P_CONT_ATTRIBUTE5  =>
12993          hr_transaction_api.get_VARCHAR2_value
12994            (p_transaction_step_id => p_transaction_step_id
12995            ,p_name                => 'P_CONT_ATTRIBUTE5')
12996       --
12997       ,P_CONT_ATTRIBUTE6  =>
12998          hr_transaction_api.get_VARCHAR2_value
12999            (p_transaction_step_id => p_transaction_step_id
13000            ,p_name                => 'P_CONT_ATTRIBUTE6')
13001       --
13002       ,P_CONT_ATTRIBUTE7  =>
13003          hr_transaction_api.get_VARCHAR2_value
13004            (p_transaction_step_id => p_transaction_step_id
13005            ,p_name                => 'P_CONT_ATTRIBUTE7')
13006       --
13007       ,P_CONT_ATTRIBUTE8  =>
13008          hr_transaction_api.get_VARCHAR2_value
13009            (p_transaction_step_id => p_transaction_step_id
13010            ,p_name                => 'P_CONT_ATTRIBUTE8')
13011       --
13012       ,P_CONT_ATTRIBUTE9  =>
13013          hr_transaction_api.get_VARCHAR2_value
13014            (p_transaction_step_id => p_transaction_step_id
13015            ,p_name                => 'P_CONT_ATTRIBUTE9')
13016       --
13017       ,P_CONT_ATTRIBUTE10  =>
13018          hr_transaction_api.get_VARCHAR2_value
13019            (p_transaction_step_id => p_transaction_step_id
13020            ,p_name                => 'P_CONT_ATTRIBUTE10')
13021       --
13022       ,P_CONT_ATTRIBUTE11  =>
13023          hr_transaction_api.get_VARCHAR2_value
13024            (p_transaction_step_id => p_transaction_step_id
13025            ,p_name                => 'P_CONT_ATTRIBUTE11')
13026       --
13027       ,P_CONT_ATTRIBUTE12  =>
13028          hr_transaction_api.get_VARCHAR2_value
13029            (p_transaction_step_id => p_transaction_step_id
13030            ,p_name                => 'P_CONT_ATTRIBUTE12')
13031       --
13032       ,P_CONT_ATTRIBUTE13  =>
13033          hr_transaction_api.get_VARCHAR2_value
13034            (p_transaction_step_id => p_transaction_step_id
13035            ,p_name                => 'P_CONT_ATTRIBUTE13')
13036       --
13037       ,P_CONT_ATTRIBUTE14  =>
13038          hr_transaction_api.get_VARCHAR2_value
13039            (p_transaction_step_id => p_transaction_step_id
13040            ,p_name                => 'P_CONT_ATTRIBUTE14')
13041       --
13042       ,P_CONT_ATTRIBUTE15  =>
13043          hr_transaction_api.get_VARCHAR2_value
13044            (p_transaction_step_id => p_transaction_step_id
13045            ,p_name                => 'P_CONT_ATTRIBUTE15')
13046       --
13047       ,P_CONT_ATTRIBUTE16  =>
13048          hr_transaction_api.get_VARCHAR2_value
13049            (p_transaction_step_id => p_transaction_step_id
13050            ,p_name                => 'P_CONT_ATTRIBUTE16')
13051       --
13052       ,P_CONT_ATTRIBUTE17  =>
13053          hr_transaction_api.get_VARCHAR2_value
13054            (p_transaction_step_id => p_transaction_step_id
13055            ,p_name                => 'P_CONT_ATTRIBUTE17')
13056       --
13057       ,P_CONT_ATTRIBUTE18  =>
13058          hr_transaction_api.get_VARCHAR2_value
13059            (p_transaction_step_id => p_transaction_step_id
13060            ,p_name                => 'P_CONT_ATTRIBUTE18')
13061       --
13062       ,P_CONT_ATTRIBUTE19  =>
13063          hr_transaction_api.get_VARCHAR2_value
13064            (p_transaction_step_id => p_transaction_step_id
13065            ,p_name                => 'P_CONT_ATTRIBUTE19')
13066       --
13067       ,P_CONT_ATTRIBUTE20  =>
13068          hr_transaction_api.get_VARCHAR2_value
13069            (p_transaction_step_id => p_transaction_step_id
13070            ,p_name                => 'P_CONT_ATTRIBUTE20')
13071       --
13072       ,P_THIRD_PARTY_PAY_FLAG  =>
13073          hr_transaction_api.get_VARCHAR2_value
13074            (p_transaction_step_id => p_transaction_step_id
13075            ,p_name                => 'P_THIRD_PARTY_PAY_FLAG')
13076       --
13077       ,P_BONDHOLDER_FLAG  =>
13078          hr_transaction_api.get_VARCHAR2_value
13079            (p_transaction_step_id => p_transaction_step_id
13080            ,p_name                => 'P_BONDHOLDER_FLAG')
13081       --
13082       ,P_DEPENDENT_FLAG  =>
13083          hr_transaction_api.get_VARCHAR2_value
13084            (p_transaction_step_id => p_transaction_step_id
13085            ,p_name                => 'P_DEPENDENT_FLAG')
13086       --
13087       ,P_BENEFICIARY_FLAG  =>
13088          hr_transaction_api.get_VARCHAR2_value
13089            (p_transaction_step_id => p_transaction_step_id
13090            ,p_name                => 'P_BENEFICIARY_FLAG')
13091       --
13092       ,P_LAST_NAME  =>
13093          hr_transaction_api.get_VARCHAR2_value
13094            (p_transaction_step_id => p_transaction_step_id
13095            ,p_name                => 'P_LAST_NAME')
13096       --
13097       ,P_SEX  =>
13098          hr_transaction_api.get_VARCHAR2_value
13099            (p_transaction_step_id => p_transaction_step_id
13100            ,p_name                => 'P_SEX')
13101       --
13102       ,P_PERSON_TYPE_ID  =>
13103          hr_transaction_api.get_NUMBER_value
13104            (p_transaction_step_id => p_transaction_step_id
13105            ,p_name                => 'P_PERSON_TYPE_ID')
13106       --
13107       ,P_PER_COMMENTS  =>
13108          hr_transaction_api.get_VARCHAR2_value
13109            (p_transaction_step_id => p_transaction_step_id
13110            ,p_name                => 'P_PER_COMMENTS')
13111       --
13112       ,P_DATE_OF_BIRTH  =>
13113          hr_transaction_api.get_DATE_value
13114            (p_transaction_step_id => p_transaction_step_id
13115            ,p_name                => 'P_DATE_OF_BIRTH')
13116       --
13117       ,P_EMAIL_ADDRESS  =>
13118          hr_transaction_api.get_VARCHAR2_value
13119            (p_transaction_step_id => p_transaction_step_id
13120            ,p_name                => 'P_EMAIL_ADDRESS')
13121       --
13122       ,P_FIRST_NAME  =>
13123          hr_transaction_api.get_VARCHAR2_value
13124            (p_transaction_step_id => p_transaction_step_id
13125            ,p_name                => 'P_FIRST_NAME')
13126       --
13127       ,P_KNOWN_AS  =>
13128          hr_transaction_api.get_VARCHAR2_value
13129            (p_transaction_step_id => p_transaction_step_id
13130            ,p_name                => 'P_KNOWN_AS')
13131       --
13132       ,P_MARITAL_STATUS  =>
13133          hr_transaction_api.get_VARCHAR2_value
13134            (p_transaction_step_id => p_transaction_step_id
13135            ,p_name                => 'P_MARITAL_STATUS')
13136       --
13137       ,P_MIDDLE_NAMES  =>
13138          hr_transaction_api.get_VARCHAR2_value
13139            (p_transaction_step_id => p_transaction_step_id
13140            ,p_name                => 'P_MIDDLE_NAMES')
13141       --
13142       ,P_NATIONALITY  =>
13143          hr_transaction_api.get_VARCHAR2_value
13144            (p_transaction_step_id => p_transaction_step_id
13145            ,p_name                => 'P_NATIONALITY')
13146       --
13147       ,P_NATIONAL_IDENTIFIER  =>
13148          hr_transaction_api.get_VARCHAR2_value
13149            (p_transaction_step_id => p_transaction_step_id
13150            ,p_name                => 'P_NATIONAL_IDENTIFIER')
13151       --
13152       ,P_PREVIOUS_LAST_NAME  =>
13153          hr_transaction_api.get_VARCHAR2_value
13154            (p_transaction_step_id => p_transaction_step_id
13155            ,p_name                => 'P_PREVIOUS_LAST_NAME')
13156       --
13157       ,P_REGISTERED_DISABLED_FLAG  =>
13158          hr_transaction_api.get_VARCHAR2_value
13159            (p_transaction_step_id => p_transaction_step_id
13160            ,p_name                => 'P_REGISTERED_DISABLED_FLAG')
13161       --
13162       ,P_TITLE  =>
13163          hr_transaction_api.get_VARCHAR2_value
13164            (p_transaction_step_id => p_transaction_step_id
13165            ,p_name                => 'P_TITLE')
13166       --
13167       ,P_WORK_TELEPHONE  =>
13168          hr_transaction_api.get_VARCHAR2_value
13169            (p_transaction_step_id => p_transaction_step_id
13170            ,p_name                => 'P_WORK_TELEPHONE')
13171       --
13172       ,P_ATTRIBUTE_CATEGORY  =>
13173          hr_transaction_api.get_VARCHAR2_value
13174            (p_transaction_step_id => p_transaction_step_id
13175            ,p_name                => 'P_ATTRIBUTE_CATEGORY')
13176       --
13177       ,P_ATTRIBUTE1  =>
13178          hr_transaction_api.get_VARCHAR2_value
13179            (p_transaction_step_id => p_transaction_step_id
13180            ,p_name                => 'P_ATTRIBUTE1')
13181       --
13182       ,P_ATTRIBUTE2  =>
13183          hr_transaction_api.get_VARCHAR2_value
13184            (p_transaction_step_id => p_transaction_step_id
13185            ,p_name                => 'P_ATTRIBUTE2')
13186       --
13187       ,P_ATTRIBUTE3  =>
13188          hr_transaction_api.get_VARCHAR2_value
13189            (p_transaction_step_id => p_transaction_step_id
13190            ,p_name                => 'P_ATTRIBUTE3')
13191       --
13192       ,P_ATTRIBUTE4  =>
13193          hr_transaction_api.get_VARCHAR2_value
13194            (p_transaction_step_id => p_transaction_step_id
13195            ,p_name                => 'P_ATTRIBUTE4')
13196       --
13197       ,P_ATTRIBUTE5  =>
13198          hr_transaction_api.get_VARCHAR2_value
13199            (p_transaction_step_id => p_transaction_step_id
13200            ,p_name                => 'P_ATTRIBUTE5')
13201       --
13202       ,P_ATTRIBUTE6  =>
13203          hr_transaction_api.get_VARCHAR2_value
13204            (p_transaction_step_id => p_transaction_step_id
13205            ,p_name                => 'P_ATTRIBUTE6')
13206       --
13207       ,P_ATTRIBUTE7  =>
13208          hr_transaction_api.get_VARCHAR2_value
13209            (p_transaction_step_id => p_transaction_step_id
13210            ,p_name                => 'P_ATTRIBUTE7')
13211       --
13212       ,P_ATTRIBUTE8  =>
13213          hr_transaction_api.get_VARCHAR2_value
13214            (p_transaction_step_id => p_transaction_step_id
13215            ,p_name                => 'P_ATTRIBUTE8')
13216       --
13217       ,P_ATTRIBUTE9  =>
13218          hr_transaction_api.get_VARCHAR2_value
13219            (p_transaction_step_id => p_transaction_step_id
13220            ,p_name                => 'P_ATTRIBUTE9')
13221       --
13222       ,P_ATTRIBUTE10  =>
13223          hr_transaction_api.get_VARCHAR2_value
13224            (p_transaction_step_id => p_transaction_step_id
13225            ,p_name                => 'P_ATTRIBUTE10')
13226       --
13227       ,P_ATTRIBUTE11  =>
13228          hr_transaction_api.get_VARCHAR2_value
13229            (p_transaction_step_id => p_transaction_step_id
13230            ,p_name                => 'P_ATTRIBUTE11')
13231       --
13232       ,P_ATTRIBUTE12  =>
13233          hr_transaction_api.get_VARCHAR2_value
13234            (p_transaction_step_id => p_transaction_step_id
13235            ,p_name                => 'P_ATTRIBUTE12')
13236       --
13237       ,P_ATTRIBUTE13  =>
13238          hr_transaction_api.get_VARCHAR2_value
13239            (p_transaction_step_id => p_transaction_step_id
13240            ,p_name                => 'P_ATTRIBUTE13')
13241       --
13242       ,P_ATTRIBUTE14  =>
13243          hr_transaction_api.get_VARCHAR2_value
13244            (p_transaction_step_id => p_transaction_step_id
13245            ,p_name                => 'P_ATTRIBUTE14')
13246       --
13247       ,P_ATTRIBUTE15  =>
13248          hr_transaction_api.get_VARCHAR2_value
13249            (p_transaction_step_id => p_transaction_step_id
13250            ,p_name                => 'P_ATTRIBUTE15')
13251       --
13252       ,P_ATTRIBUTE16  =>
13253          hr_transaction_api.get_VARCHAR2_value
13254            (p_transaction_step_id => p_transaction_step_id
13255            ,p_name                => 'P_ATTRIBUTE16')
13256       --
13257       ,P_ATTRIBUTE17  =>
13258          hr_transaction_api.get_VARCHAR2_value
13259            (p_transaction_step_id => p_transaction_step_id
13260            ,p_name                => 'P_ATTRIBUTE17')
13261       --
13262       ,P_ATTRIBUTE18  =>
13263          hr_transaction_api.get_VARCHAR2_value
13264            (p_transaction_step_id => p_transaction_step_id
13265            ,p_name                => 'P_ATTRIBUTE18')
13266       --
13267       ,P_ATTRIBUTE19  =>
13268          hr_transaction_api.get_VARCHAR2_value
13269            (p_transaction_step_id => p_transaction_step_id
13270            ,p_name                => 'P_ATTRIBUTE19')
13271       --
13272       ,P_ATTRIBUTE20  =>
13273          hr_transaction_api.get_VARCHAR2_value
13274            (p_transaction_step_id => p_transaction_step_id
13275            ,p_name                => 'P_ATTRIBUTE20')
13276       --
13277       ,P_ATTRIBUTE21  =>
13278          hr_transaction_api.get_VARCHAR2_value
13279            (p_transaction_step_id => p_transaction_step_id
13280            ,p_name                => 'P_ATTRIBUTE21')
13281       --
13282       ,P_ATTRIBUTE22  =>
13283          hr_transaction_api.get_VARCHAR2_value
13284            (p_transaction_step_id => p_transaction_step_id
13285            ,p_name                => 'P_ATTRIBUTE22')
13286       --
13287       ,P_ATTRIBUTE23  =>
13288          hr_transaction_api.get_VARCHAR2_value
13289            (p_transaction_step_id => p_transaction_step_id
13290            ,p_name                => 'P_ATTRIBUTE23')
13291       --
13292       ,P_ATTRIBUTE24  =>
13293          hr_transaction_api.get_VARCHAR2_value
13294            (p_transaction_step_id => p_transaction_step_id
13295            ,p_name                => 'P_ATTRIBUTE24')
13296       --
13297       ,P_ATTRIBUTE25  =>
13298          hr_transaction_api.get_VARCHAR2_value
13299            (p_transaction_step_id => p_transaction_step_id
13300            ,p_name                => 'P_ATTRIBUTE25')
13301       --
13302       ,P_ATTRIBUTE26  =>
13303          hr_transaction_api.get_VARCHAR2_value
13304            (p_transaction_step_id => p_transaction_step_id
13305            ,p_name                => 'P_ATTRIBUTE26')
13306       --
13307       ,P_ATTRIBUTE27  =>
13308          hr_transaction_api.get_VARCHAR2_value
13309            (p_transaction_step_id => p_transaction_step_id
13310            ,p_name                => 'P_ATTRIBUTE27')
13311       --
13312       ,P_ATTRIBUTE28  =>
13313          hr_transaction_api.get_VARCHAR2_value
13314            (p_transaction_step_id => p_transaction_step_id
13315            ,p_name                => 'P_ATTRIBUTE28')
13316       --
13317       ,P_ATTRIBUTE29  =>
13318          hr_transaction_api.get_VARCHAR2_value
13319            (p_transaction_step_id => p_transaction_step_id
13320            ,p_name                => 'P_ATTRIBUTE29')
13321       --
13322       ,P_ATTRIBUTE30  =>
13323          hr_transaction_api.get_VARCHAR2_value
13324            (p_transaction_step_id => p_transaction_step_id
13325            ,p_name                => 'P_ATTRIBUTE30')
13326       --
13327       ,P_PER_INFORMATION_CATEGORY  =>
13328          hr_transaction_api.get_VARCHAR2_value
13329            (p_transaction_step_id => p_transaction_step_id
13330            ,p_name                => 'P_PER_INFORMATION_CATEGORY')
13331       --
13332       ,P_PER_INFORMATION1  =>
13333          hr_transaction_api.get_VARCHAR2_value
13334            (p_transaction_step_id => p_transaction_step_id
13335            ,p_name                => 'P_PER_INFORMATION1')
13336       --
13337       ,P_PER_INFORMATION2  =>
13338          hr_transaction_api.get_VARCHAR2_value
13339            (p_transaction_step_id => p_transaction_step_id
13340            ,p_name                => 'P_PER_INFORMATION2')
13341       --
13342       ,P_PER_INFORMATION3  =>
13343          hr_transaction_api.get_VARCHAR2_value
13344            (p_transaction_step_id => p_transaction_step_id
13345            ,p_name                => 'P_PER_INFORMATION3')
13346       --
13347       ,P_PER_INFORMATION4  =>
13348          hr_transaction_api.get_VARCHAR2_value
13349            (p_transaction_step_id => p_transaction_step_id
13350            ,p_name                => 'P_PER_INFORMATION4')
13351       --
13352       ,P_PER_INFORMATION5  =>
13353          hr_transaction_api.get_VARCHAR2_value
13354            (p_transaction_step_id => p_transaction_step_id
13355            ,p_name                => 'P_PER_INFORMATION5')
13356       --
13357       ,P_PER_INFORMATION6  =>
13358          hr_transaction_api.get_VARCHAR2_value
13359            (p_transaction_step_id => p_transaction_step_id
13360            ,p_name                => 'P_PER_INFORMATION6')
13361       --
13362       ,P_PER_INFORMATION7  =>
13363          hr_transaction_api.get_VARCHAR2_value
13364            (p_transaction_step_id => p_transaction_step_id
13365            ,p_name                => 'P_PER_INFORMATION7')
13366       --
13367       ,P_PER_INFORMATION8  =>
13368          hr_transaction_api.get_VARCHAR2_value
13369            (p_transaction_step_id => p_transaction_step_id
13370            ,p_name                => 'P_PER_INFORMATION8')
13371       --
13372       ,P_PER_INFORMATION9  =>
13373          hr_transaction_api.get_VARCHAR2_value
13374            (p_transaction_step_id => p_transaction_step_id
13375            ,p_name                => 'P_PER_INFORMATION9')
13376       --
13377       ,P_PER_INFORMATION10  =>
13378          hr_transaction_api.get_VARCHAR2_value
13379            (p_transaction_step_id => p_transaction_step_id
13380            ,p_name                => 'P_PER_INFORMATION10')
13381       --
13382       ,P_PER_INFORMATION11  =>
13383          hr_transaction_api.get_VARCHAR2_value
13384            (p_transaction_step_id => p_transaction_step_id
13385            ,p_name                => 'P_PER_INFORMATION11')
13386       --
13387       ,P_PER_INFORMATION12  =>
13388          hr_transaction_api.get_VARCHAR2_value
13389            (p_transaction_step_id => p_transaction_step_id
13390            ,p_name                => 'P_PER_INFORMATION12')
13391       --
13392       ,P_PER_INFORMATION13  =>
13393          hr_transaction_api.get_VARCHAR2_value
13394            (p_transaction_step_id => p_transaction_step_id
13395            ,p_name                => 'P_PER_INFORMATION13')
13396       --
13397       ,P_PER_INFORMATION14  =>
13398          hr_transaction_api.get_VARCHAR2_value
13399            (p_transaction_step_id => p_transaction_step_id
13400            ,p_name                => 'P_PER_INFORMATION14')
13401       --
13402       ,P_PER_INFORMATION15  =>
13403          hr_transaction_api.get_VARCHAR2_value
13404            (p_transaction_step_id => p_transaction_step_id
13405            ,p_name                => 'P_PER_INFORMATION15')
13406       --
13407       ,P_PER_INFORMATION16  =>
13408          hr_transaction_api.get_VARCHAR2_value
13409            (p_transaction_step_id => p_transaction_step_id
13410            ,p_name                => 'P_PER_INFORMATION16')
13411       --
13412       ,P_PER_INFORMATION17  =>
13413          hr_transaction_api.get_VARCHAR2_value
13414            (p_transaction_step_id => p_transaction_step_id
13415            ,p_name                => 'P_PER_INFORMATION17')
13416       --
13417       ,P_PER_INFORMATION18  =>
13418          hr_transaction_api.get_VARCHAR2_value
13419            (p_transaction_step_id => p_transaction_step_id
13420            ,p_name                => 'P_PER_INFORMATION18')
13421       --
13422       ,P_PER_INFORMATION19  =>
13423          hr_transaction_api.get_VARCHAR2_value
13424            (p_transaction_step_id => p_transaction_step_id
13425            ,p_name                => 'P_PER_INFORMATION19')
13426       --
13427       ,P_PER_INFORMATION20  =>
13428          hr_transaction_api.get_VARCHAR2_value
13429            (p_transaction_step_id => p_transaction_step_id
13430            ,p_name                => 'P_PER_INFORMATION20')
13431       --
13432       ,P_PER_INFORMATION21  =>
13433          hr_transaction_api.get_VARCHAR2_value
13434            (p_transaction_step_id => p_transaction_step_id
13435            ,p_name                => 'P_PER_INFORMATION21')
13436       --
13437       ,P_PER_INFORMATION22  =>
13438          hr_transaction_api.get_VARCHAR2_value
13439            (p_transaction_step_id => p_transaction_step_id
13440            ,p_name                => 'P_PER_INFORMATION22')
13441       --
13442       ,P_PER_INFORMATION23  =>
13443          hr_transaction_api.get_VARCHAR2_value
13444            (p_transaction_step_id => p_transaction_step_id
13445            ,p_name                => 'P_PER_INFORMATION23')
13446       --
13447       ,P_PER_INFORMATION24  =>
13448          hr_transaction_api.get_VARCHAR2_value
13449            (p_transaction_step_id => p_transaction_step_id
13450            ,p_name                => 'P_PER_INFORMATION24')
13451       --
13452       ,P_PER_INFORMATION25  =>
13453          hr_transaction_api.get_VARCHAR2_value
13454            (p_transaction_step_id => p_transaction_step_id
13455            ,p_name                => 'P_PER_INFORMATION25')
13456       --
13457       ,P_PER_INFORMATION26  =>
13458          hr_transaction_api.get_VARCHAR2_value
13459            (p_transaction_step_id => p_transaction_step_id
13460            ,p_name                => 'P_PER_INFORMATION26')
13461       --
13462       ,P_PER_INFORMATION27  =>
13463          hr_transaction_api.get_VARCHAR2_value
13464            (p_transaction_step_id => p_transaction_step_id
13465            ,p_name                => 'P_PER_INFORMATION27')
13466       --
13467       ,P_PER_INFORMATION28  =>
13468          hr_transaction_api.get_VARCHAR2_value
13469            (p_transaction_step_id => p_transaction_step_id
13470            ,p_name                => 'P_PER_INFORMATION28')
13471       --
13472       ,P_PER_INFORMATION29  =>
13473          hr_transaction_api.get_VARCHAR2_value
13474            (p_transaction_step_id => p_transaction_step_id
13475            ,p_name                => 'P_PER_INFORMATION29')
13476       --
13477       ,P_PER_INFORMATION30  =>
13478          hr_transaction_api.get_VARCHAR2_value
13479            (p_transaction_step_id => p_transaction_step_id
13480            ,p_name                => 'P_PER_INFORMATION30')
13481       --
13482       ,P_CORRESPONDENCE_LANGUAGE  =>
13483          hr_transaction_api.get_VARCHAR2_value
13484            (p_transaction_step_id => p_transaction_step_id
13485            ,p_name                => 'P_CORRESPONDENCE_LANGUAGE')
13486       --
13487       ,P_HONORS  =>
13488          hr_transaction_api.get_VARCHAR2_value
13489            (p_transaction_step_id => p_transaction_step_id
13490            ,p_name                => 'P_HONORS')
13491       --
13492       ,P_PRE_NAME_ADJUNCT  =>
13493          hr_transaction_api.get_VARCHAR2_value
13494            (p_transaction_step_id => p_transaction_step_id
13495            ,p_name                => 'P_PRE_NAME_ADJUNCT')
13496       --
13497       ,P_SUFFIX  =>
13498          hr_transaction_api.get_VARCHAR2_value
13499            (p_transaction_step_id => p_transaction_step_id
13500            ,p_name                => 'P_SUFFIX')
13501       --
13502       ,P_CREATE_MIRROR_FLAG  =>
13503          hr_transaction_api.get_VARCHAR2_value
13504            (p_transaction_step_id => p_transaction_step_id
13505            ,p_name                => 'P_CREATE_MIRROR_FLAG')
13506 
13507       --
13508       ,P_MIRROR_TYPE  =>
13509          hr_transaction_api.get_VARCHAR2_value
13510            (p_transaction_step_id => p_transaction_step_id
13511            ,p_name                => 'P_MIRROR_TYPE')
13512 
13513       --
13514       ,P_MIRROR_CONT_ATTRIBUTE_CAT  =>
13515          hr_transaction_api.get_VARCHAR2_value
13516            (p_transaction_step_id => p_transaction_step_id
13517            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE_CAT')
13518       --
13519       ,P_MIRROR_CONT_ATTRIBUTE1  =>
13520          hr_transaction_api.get_VARCHAR2_value
13521            (p_transaction_step_id => p_transaction_step_id
13522            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE1')
13523       --
13524       ,P_MIRROR_CONT_ATTRIBUTE2  =>
13525          hr_transaction_api.get_VARCHAR2_value
13526            (p_transaction_step_id => p_transaction_step_id
13527            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE2')
13528       --
13529       ,P_MIRROR_CONT_ATTRIBUTE3  =>
13530          hr_transaction_api.get_VARCHAR2_value
13531            (p_transaction_step_id => p_transaction_step_id
13532            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE3')
13533       --
13534       ,P_MIRROR_CONT_ATTRIBUTE4  =>
13535          hr_transaction_api.get_VARCHAR2_value
13536            (p_transaction_step_id => p_transaction_step_id
13537            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE4')
13538       --
13539       ,P_MIRROR_CONT_ATTRIBUTE5  =>
13540          hr_transaction_api.get_VARCHAR2_value
13541            (p_transaction_step_id => p_transaction_step_id
13542            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE5')
13543       --
13544       ,P_MIRROR_CONT_ATTRIBUTE6  =>
13545          hr_transaction_api.get_VARCHAR2_value
13546            (p_transaction_step_id => p_transaction_step_id
13547            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE6')
13548       --
13549       ,P_MIRROR_CONT_ATTRIBUTE7  =>
13550          hr_transaction_api.get_VARCHAR2_value
13551            (p_transaction_step_id => p_transaction_step_id
13552            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE7')
13553       --
13554       ,P_MIRROR_CONT_ATTRIBUTE8  =>
13555          hr_transaction_api.get_VARCHAR2_value
13556            (p_transaction_step_id => p_transaction_step_id
13557            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE8')
13558       --
13559       ,P_MIRROR_CONT_ATTRIBUTE9  =>
13560          hr_transaction_api.get_VARCHAR2_value
13561            (p_transaction_step_id => p_transaction_step_id
13562            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE9')
13563       --
13564       ,P_MIRROR_CONT_ATTRIBUTE10  =>
13565          hr_transaction_api.get_VARCHAR2_value
13566            (p_transaction_step_id => p_transaction_step_id
13567            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE10')
13568       --
13569       ,P_MIRROR_CONT_ATTRIBUTE11  =>
13570          hr_transaction_api.get_VARCHAR2_value
13571            (p_transaction_step_id => p_transaction_step_id
13572            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE11')
13573       --
13574       ,P_MIRROR_CONT_ATTRIBUTE12  =>
13575          hr_transaction_api.get_VARCHAR2_value
13576            (p_transaction_step_id => p_transaction_step_id
13577            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE12')
13578       --
13579       ,P_MIRROR_CONT_ATTRIBUTE13  =>
13580          hr_transaction_api.get_VARCHAR2_value
13581            (p_transaction_step_id => p_transaction_step_id
13582            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE13')
13583       --
13584       ,P_MIRROR_CONT_ATTRIBUTE14  =>
13585          hr_transaction_api.get_VARCHAR2_value
13586            (p_transaction_step_id => p_transaction_step_id
13587            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE14')
13588       --
13589       ,P_MIRROR_CONT_ATTRIBUTE15  =>
13590          hr_transaction_api.get_VARCHAR2_value
13591            (p_transaction_step_id => p_transaction_step_id
13592            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE15')
13593       --
13594       ,P_MIRROR_CONT_ATTRIBUTE16  =>
13595          hr_transaction_api.get_VARCHAR2_value
13596            (p_transaction_step_id => p_transaction_step_id
13597            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE16')
13598       --
13599       ,P_MIRROR_CONT_ATTRIBUTE17  =>
13600          hr_transaction_api.get_VARCHAR2_value
13601            (p_transaction_step_id => p_transaction_step_id
13602            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE17')
13603       --
13604       ,P_MIRROR_CONT_ATTRIBUTE18  =>
13605          hr_transaction_api.get_VARCHAR2_value
13606            (p_transaction_step_id => p_transaction_step_id
13607            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE18')
13608       --
13609       ,P_MIRROR_CONT_ATTRIBUTE19  =>
13610          hr_transaction_api.get_VARCHAR2_value
13611            (p_transaction_step_id => p_transaction_step_id
13612            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE19')
13613       --
13614       ,P_MIRROR_CONT_ATTRIBUTE20  =>
13615          hr_transaction_api.get_VARCHAR2_value
13616            (p_transaction_step_id => p_transaction_step_id
13617            ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE20')
13618       --
13619       ,P_CONTACT_RELATIONSHIP_ID  	=> l_contact_relationship_id1
13620       --
13621       ,P_CTR_OBJECT_VERSION_NUMBER  	=> l_ctr_object_version_number1
13622       --
13623       ,P_PER_PERSON_ID  		=> l_per_person_id1
13624       --
13625       ,P_PER_OBJECT_VERSION_NUMBER  	=> l_per_object_version_number1
13626       --
13627       ,P_PER_EFFECTIVE_START_DATE  	=> l_per_effective_start_date1
13628       --
13629       ,P_PER_EFFECTIVE_END_DATE  	=> l_per_effective_end_date1
13630       --
13631       ,P_FULL_NAME  			=> l_full_name
13632       --
13633       ,P_PER_COMMENT_ID  		=> l_per_comment_id1
13634       --
13635       ,P_NAME_COMBINATION_WARNING  	=> l_con_name_combination_warnin1
13636       --
13637       ,P_ORIG_HIRE_WARNING  		=> l_con_orig_hire_warning1
13638       --
13639       ,P_CONT_INFORMATION_CATEGORY  =>
13640          hr_transaction_api.get_VARCHAR2_value
13641            (p_transaction_step_id => p_transaction_step_id
13642            ,p_name                => 'P_CONT_INFORMATION_CATEGORY')
13643       --
13644       ,P_CONT_INFORMATION1  =>
13645          hr_transaction_api.get_VARCHAR2_value
13646            (p_transaction_step_id => p_transaction_step_id
13647            ,p_name                => 'P_CONT_INFORMATION1')
13648       --
13649       ,P_CONT_INFORMATION2  =>
13650          hr_transaction_api.get_VARCHAR2_value
13651            (p_transaction_step_id => p_transaction_step_id
13652            ,p_name                => 'P_CONT_INFORMATION2')
13653       --
13654       ,P_CONT_INFORMATION3  =>
13655          hr_transaction_api.get_VARCHAR2_value
13656            (p_transaction_step_id => p_transaction_step_id
13657            ,p_name                => 'P_CONT_INFORMATION3')
13658       --
13659       ,P_CONT_INFORMATION4  =>
13660          hr_transaction_api.get_VARCHAR2_value
13661            (p_transaction_step_id => p_transaction_step_id
13662            ,p_name                => 'P_CONT_INFORMATION4')
13663       --
13664       ,P_CONT_INFORMATION5  =>
13665          hr_transaction_api.get_VARCHAR2_value
13666            (p_transaction_step_id => p_transaction_step_id
13667            ,p_name                => 'P_CONT_INFORMATION5')
13668       --
13669       ,P_CONT_INFORMATION6  =>
13670          hr_transaction_api.get_VARCHAR2_value
13671            (p_transaction_step_id => p_transaction_step_id
13672            ,p_name                => 'P_CONT_INORMATION6')
13673       --
13674       ,P_CONT_INFORMATION7  =>
13675          hr_transaction_api.get_VARCHAR2_value
13676            (p_transaction_step_id => p_transaction_step_id
13677            ,p_name                => 'P_CONT_INFORMATION7')
13678       --
13679       ,P_CONT_INFORMATION8  =>
13680          hr_transaction_api.get_VARCHAR2_value
13681            (p_transaction_step_id => p_transaction_step_id
13682            ,p_name                => 'P_CONT_INFORMATION8')
13683       --
13684       ,P_CONT_INFORMATION9  =>
13685          hr_transaction_api.get_VARCHAR2_value
13686            (p_transaction_step_id => p_transaction_step_id
13687            ,p_name                => 'P_CONT_INFORMATION9')
13688       --
13689       ,P_CONT_INFORMATION10  =>
13690          hr_transaction_api.get_VARCHAR2_value
13691            (p_transaction_step_id => p_transaction_step_id
13692            ,p_name                => 'P_CONT_INFORMATION10')
13693       --
13694       ,P_CONT_INFORMATION11  =>
13695          hr_transaction_api.get_VARCHAR2_value
13696            (p_transaction_step_id => p_transaction_step_id
13697            ,p_name                => 'P_CONT_INFORMATION11')
13698       --
13699       ,P_CONT_INFORMATION12  =>
13700          hr_transaction_api.get_VARCHAR2_value
13701            (p_transaction_step_id => p_transaction_step_id
13702            ,p_name                => 'P_CONT_INFORMATION12')
13703       --
13704       ,P_CONT_INFORMATION13  =>
13705          hr_transaction_api.get_VARCHAR2_value
13706            (p_transaction_step_id => p_transaction_step_id
13707            ,p_name                => 'P_CONT_INFORMATION13')
13708       --
13709       ,P_CONT_INFORMATION14  =>
13710          hr_transaction_api.get_VARCHAR2_value
13711            (p_transaction_step_id => p_transaction_step_id
13712            ,p_name                => 'P_CONT_INFORMATION14')
13713       --
13714       ,P_CONT_INFORMATION15  =>
13715          hr_transaction_api.get_VARCHAR2_value
13716            (p_transaction_step_id => p_transaction_step_id
13717            ,p_name                => 'P_CONT_INFORMATION15')
13718       --
13719       ,P_CONT_INFORMATION16  =>
13720          hr_transaction_api.get_VARCHAR2_value
13721            (p_transaction_step_id => p_transaction_step_id
13722            ,p_name                => 'P_CONT_INFORMATION16')
13723       --
13724       ,P_CONT_INFORMATION17  =>
13725          hr_transaction_api.get_VARCHAR2_value
13726            (p_transaction_step_id => p_transaction_step_id
13727            ,p_name                => 'P_CONT_INFORMATION17')
13728       --
13729       ,P_CONT_INFORMATION18  =>
13730          hr_transaction_api.get_VARCHAR2_value
13731            (p_transaction_step_id => p_transaction_step_id
13732            ,p_name                => 'P_CONT_INFORMATION18')
13733       --
13734       ,P_CONT_INFORMATION19  =>
13735          hr_transaction_api.get_VARCHAR2_value
13736            (p_transaction_step_id => p_transaction_step_id
13737            ,p_name                => 'P_CONT_INFORMATION19')
13738       --
13739       ,P_CONT_INFORMATION20  =>
13740          hr_transaction_api.get_VARCHAR2_value
13741            (p_transaction_step_id => p_transaction_step_id
13742            ,p_name                => 'P_CONT_INFORMATION20')
13743      );
13744 
13745     end if; -- end if of skip_contact_create_flg --- 5894873
13746 
13747     else
13748 
13749    -- if primary contact flag is checked apply it emrg record and not for
13750    -- other personal relationship record
13751 
13752    if (l_contact_operation = 'EMRG_OVRW_UPD' and (l_primary_contact_flag = 'Y' or
13753        l_primary_contact_flag = 'N')) then
13754     open get_emrg_relid_ovn(
13755             hr_transaction_api.get_NUMBER_value
13756            (p_transaction_step_id => p_transaction_step_id
13757            ,p_name                => 'P_CONTACT_RELATIONSHIP_ID')
13758            ,hr_transaction_api.get_number_value
13759                  (p_transaction_step_id   => p_transaction_step_id
13760                   ,p_name                 => 'P_CONTACT_PERSON_ID')
13761            ,hr_transaction_api.get_number_value
13762                  (p_transaction_step_id   => p_transaction_step_id
13763                   ,p_name                 => 'P_PERSON_ID'));
13764 -- Bug 3469145 : updating the primary cont flag if it has changed.
13765 -- Bug 3504216 :  passing date_start as sysdate
13766     fetch get_emrg_relid_ovn into l_emrg_relid, l_emrg_ovn, l_emrg_primary_cont_flag,
13767                                                       z_person_id, z_date_start, z_date_end;
13768     if get_emrg_relid_ovn%found then
13769      if((l_emrg_primary_cont_flag <> 'Y' and l_primary_contact_flag = 'Y') OR
13770         (l_emrg_primary_cont_flag <> 'N' and l_primary_contact_flag = 'N')) then
13771 
13772          if l_primary_contact_flag = 'Y' then             --9564383
13773            open csr_chk_primary_cnt;
13774            fetch csr_chk_primary_cnt into l_exists;
13775            if csr_chk_primary_cnt%FOUND then
13776               z_date_start := sysdate;
13777           end if;
13778           close csr_chk_primary_cnt;
13779         end if;
13780 
13781         hr_contact_rel_api.update_contact_relationship(
13782          p_validate                => p_validate
13783         ,P_EFFECTIVE_DATE          =>l_effective_date
13784         ,p_object_version_number   => l_emrg_ovn
13785         ,P_CONTACT_RELATIONSHIP_ID => l_emrg_relid
13786         ,P_PRIMARY_CONTACT_FLAG    => l_primary_contact_flag
13787 	,P_DATE_START              => z_date_start
13788        );
13789      end if;
13790      l_primary_contact_flag := 'N';
13791     end if;
13792     close get_emrg_relid_ovn;
13793    end if;
13794 
13795     hr_contact_rel_api.update_contact_relationship(
13796 
13797       P_VALIDATE  =>  p_validate
13798       --
13799       ,P_EFFECTIVE_DATE  =>  l_effective_date
13800          /* SFL changes
13801          hr_transaction_api.get_DATE_value
13802            (p_transaction_step_id => p_transaction_step_id
13803            ,p_name                => 'p_cont_EFFECTIVE_DATE')
13804          */
13805       --
13806       ,P_CONTACT_RELATIONSHIP_ID  =>
13807          hr_transaction_api.get_NUMBER_value
13808            (p_transaction_step_id => p_transaction_step_id
13809            ,p_name                => 'P_CONTACT_RELATIONSHIP_ID')
13810       --
13811       ,P_CONTACT_TYPE  =>
13812          hr_transaction_api.get_VARCHAR2_value
13813            (p_transaction_step_id => p_transaction_step_id
13814            ,p_name                => 'P_CONTACT_TYPE')
13815       --
13816 
13817       ,P_COMMENTS  =>
13818          hr_transaction_api.get_VARCHAR2_value
13819            (p_transaction_step_id => p_transaction_step_id
13820            ,p_name                => 'P_CTR_COMMENTS')
13821       --
13822  -- Bug 3617667 : Not passign Primary Cont flag.Its only availaible in Emerg region.
13823  --     ,P_PRIMARY_CONTACT_FLAG  => l_primary_contact_flag
13824       --
13825       ,P_THIRD_PARTY_PAY_FLAG  =>
13826          hr_transaction_api.get_VARCHAR2_value
13827            (p_transaction_step_id => p_transaction_step_id
13828            ,p_name                => 'P_THIRD_PARTY_PAY_FLAG')
13829       --
13830       ,P_BONDHOLDER_FLAG  =>
13831          hr_transaction_api.get_VARCHAR2_value
13832            (p_transaction_step_id => p_transaction_step_id
13833            ,p_name                => 'P_BONDHOLDER_FLAG')
13834       --
13835       ,P_DATE_START  =>
13836          hr_transaction_api.get_DATE_value
13837            (p_transaction_step_id => p_transaction_step_id
13838            ,p_name                => 'P_DATE_START')
13839       --
13840       ,P_START_LIFE_REASON_ID  =>
13841          hr_transaction_api.get_NUMBER_value
13842            (p_transaction_step_id => p_transaction_step_id
13843            ,p_name                => 'P_START_LIFE_REASON_ID')
13844       --
13845       ,P_DATE_END  =>
13846          hr_transaction_api.get_DATE_value
13847            (p_transaction_step_id => p_transaction_step_id
13848            ,p_name                => 'P_DATE_END')
13849       --
13850       ,P_END_LIFE_REASON_ID  =>
13851          hr_transaction_api.get_NUMBER_value
13852            (p_transaction_step_id => p_transaction_step_id
13853            ,p_name                => 'P_END_LIFE_REASON_ID')
13854       --
13855       ,P_RLTD_PER_RSDS_W_DSGNTR_FLAG  =>
13856          hr_transaction_api.get_VARCHAR2_value
13857            (p_transaction_step_id => p_transaction_step_id
13858            ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG')
13859       --
13860       ,P_PERSONAL_FLAG  =>
13861          hr_transaction_api.get_VARCHAR2_value
13862            (p_transaction_step_id => p_transaction_step_id
13863            ,p_name                => 'P_PERSONAL_FLAG')
13864       --
13865    /*   ,P_SEQUENCE_NUMBER  =>
13866          hr_transaction_api.get_NUMBER_value
13867            (p_transaction_step_id => p_transaction_step_id
13868            ,p_name                => 'P_SEQUENCE_NUMBER') */
13869 
13870       --
13871       ,P_DEPENDENT_FLAG  =>
13872          hr_transaction_api.get_VARCHAR2_value
13873            (p_transaction_step_id => p_transaction_step_id
13874            ,p_name                => 'P_DEPENDENT_FLAG')
13875       --
13876       ,P_BENEFICIARY_FLAG  =>
13877          hr_transaction_api.get_VARCHAR2_value
13878            (p_transaction_step_id => p_transaction_step_id
13879            ,p_name                => 'P_BENEFICIARY_FLAG')
13880       --
13881       ,P_CONT_ATTRIBUTE_CATEGORY  =>
13882          hr_transaction_api.get_VARCHAR2_value
13883            (p_transaction_step_id => p_transaction_step_id
13884            ,p_name                => 'P_CONT_ATTRIBUTE_CATEGORY')
13885       --
13886       ,P_CONT_ATTRIBUTE1  =>
13887          hr_transaction_api.get_VARCHAR2_value
13888            (p_transaction_step_id => p_transaction_step_id
13889            ,p_name                => 'P_CONT_ATTRIBUTE1')
13890       --
13891       ,P_CONT_ATTRIBUTE2  =>
13892          hr_transaction_api.get_VARCHAR2_value
13893            (p_transaction_step_id => p_transaction_step_id
13894            ,p_name                => 'P_CONT_ATTRIBUTE2')
13895       --
13896       ,P_CONT_ATTRIBUTE3  =>
13897          hr_transaction_api.get_VARCHAR2_value
13898            (p_transaction_step_id => p_transaction_step_id
13899            ,p_name                => 'P_CONT_ATTRIBUTE3')
13900       --
13901       ,P_CONT_ATTRIBUTE4  =>
13902          hr_transaction_api.get_VARCHAR2_value
13903            (p_transaction_step_id => p_transaction_step_id
13904            ,p_name                => 'P_CONT_ATTRIBUTE4')
13905       --
13906       ,P_CONT_ATTRIBUTE5  =>
13907          hr_transaction_api.get_VARCHAR2_value
13908            (p_transaction_step_id => p_transaction_step_id
13909            ,p_name                => 'P_CONT_ATTRIBUTE5')
13910       --
13911       ,P_CONT_ATTRIBUTE6  =>
13912          hr_transaction_api.get_VARCHAR2_value
13913            (p_transaction_step_id => p_transaction_step_id
13914            ,p_name                => 'P_CONT_ATTRIBUTE6')
13915       --
13916       ,P_CONT_ATTRIBUTE7  =>
13917          hr_transaction_api.get_VARCHAR2_value
13918            (p_transaction_step_id => p_transaction_step_id
13919            ,p_name                => 'P_CONT_ATTRIBUTE7')
13920       --
13921       ,P_CONT_ATTRIBUTE8  =>
13922          hr_transaction_api.get_VARCHAR2_value
13923            (p_transaction_step_id => p_transaction_step_id
13924            ,p_name                => 'P_CONT_ATTRIBUTE8')
13925       --
13926       ,P_CONT_ATTRIBUTE9  =>
13927          hr_transaction_api.get_VARCHAR2_value
13928            (p_transaction_step_id => p_transaction_step_id
13929            ,p_name                => 'P_CONT_ATTRIBUTE9')
13930       --
13931       ,P_CONT_ATTRIBUTE10  =>
13932          hr_transaction_api.get_VARCHAR2_value
13933            (p_transaction_step_id => p_transaction_step_id
13934            ,p_name                => 'P_CONT_ATTRIBUTE10')
13935       --
13936       ,P_CONT_ATTRIBUTE11  =>
13937          hr_transaction_api.get_VARCHAR2_value
13938            (p_transaction_step_id => p_transaction_step_id
13939            ,p_name                => 'P_CONT_ATTRIBUTE11')
13940       --
13941       ,P_CONT_ATTRIBUTE12  =>
13942          hr_transaction_api.get_VARCHAR2_value
13943            (p_transaction_step_id => p_transaction_step_id
13944            ,p_name                => 'P_CONT_ATTRIBUTE12')
13945       --
13946       ,P_CONT_ATTRIBUTE13  =>
13947          hr_transaction_api.get_VARCHAR2_value
13948            (p_transaction_step_id => p_transaction_step_id
13949            ,p_name                => 'P_CONT_ATTRIBUTE13')
13950       --
13951       ,P_CONT_ATTRIBUTE14  =>
13952          hr_transaction_api.get_VARCHAR2_value
13953            (p_transaction_step_id => p_transaction_step_id
13954            ,p_name                => 'P_CONT_ATTRIBUTE14')
13955       --
13956       ,P_CONT_ATTRIBUTE15  =>
13957          hr_transaction_api.get_VARCHAR2_value
13958            (p_transaction_step_id => p_transaction_step_id
13959            ,p_name                => 'P_CONT_ATTRIBUTE15')
13960       --
13961       ,P_CONT_ATTRIBUTE16  =>
13962          hr_transaction_api.get_VARCHAR2_value
13963            (p_transaction_step_id => p_transaction_step_id
13964            ,p_name                => 'P_CONT_ATTRIBUTE16')
13965       --
13966       ,P_CONT_ATTRIBUTE17  =>
13967          hr_transaction_api.get_VARCHAR2_value
13968            (p_transaction_step_id => p_transaction_step_id
13969            ,p_name                => 'P_CONT_ATTRIBUTE17')
13970       --
13971       ,P_CONT_ATTRIBUTE18  =>
13972          hr_transaction_api.get_VARCHAR2_value
13973            (p_transaction_step_id => p_transaction_step_id
13974            ,p_name                => 'P_CONT_ATTRIBUTE18')
13975       --
13976       ,P_CONT_ATTRIBUTE19  =>
13977          hr_transaction_api.get_VARCHAR2_value
13978            (p_transaction_step_id => p_transaction_step_id
13979            ,p_name                => 'P_CONT_ATTRIBUTE19')
13980       --
13981       ,P_CONT_ATTRIBUTE20  =>
13982          hr_transaction_api.get_VARCHAR2_value
13983            (p_transaction_step_id => p_transaction_step_id
13984            ,p_name                => 'P_CONT_ATTRIBUTE20')
13985       --
13986       ,P_CONT_INFORMATION_CATEGORY  =>
13987          hr_transaction_api.get_VARCHAR2_value
13988            (p_transaction_step_id => p_transaction_step_id
13989            ,p_name                => 'P_CONT_INFORMATION_CATEGORY')
13990       --
13991       ,P_CONT_INFORMATION1  =>
13992          hr_transaction_api.get_VARCHAR2_value
13993            (p_transaction_step_id => p_transaction_step_id
13994            ,p_name                => 'P_CONT_INFORMATION1')
13995       --
13996       ,P_CONT_INFORMATION2  =>
13997          hr_transaction_api.get_VARCHAR2_value
13998            (p_transaction_step_id => p_transaction_step_id
13999            ,p_name                => 'P_CONT_INFORMATION2')
14000       --
14001       ,P_CONT_INFORMATION3  =>
14002          hr_transaction_api.get_VARCHAR2_value
14003            (p_transaction_step_id => p_transaction_step_id
14004            ,p_name                => 'P_CONT_INFORMATION3')
14005       --
14006       ,P_CONT_INFORMATION4  =>
14007          hr_transaction_api.get_VARCHAR2_value
14008            (p_transaction_step_id => p_transaction_step_id
14009            ,p_name                => 'P_CONT_INFORMATION4')
14010       --
14011       ,P_CONT_INFORMATION5  =>
14012          hr_transaction_api.get_VARCHAR2_value
14013            (p_transaction_step_id => p_transaction_step_id
14014            ,p_name                => 'P_CONT_INFORMATION5')
14015       --
14016       ,P_CONT_INFORMATION6  =>
14017          hr_transaction_api.get_VARCHAR2_value
14018            (p_transaction_step_id => p_transaction_step_id
14019            ,p_name                => 'P_CONT_INFORMATION6')
14020       --
14021       ,P_CONT_INFORMATION7  =>
14022          hr_transaction_api.get_VARCHAR2_value
14023            (p_transaction_step_id => p_transaction_step_id
14024            ,p_name                => 'P_CONT_INFORMATION7')
14025       --
14026       ,P_CONT_INFORMATION8  =>
14027          hr_transaction_api.get_VARCHAR2_value
14028            (p_transaction_step_id => p_transaction_step_id
14029            ,p_name                => 'P_CONT_INFORMATION8')
14030       --
14031       ,P_CONT_INFORMATION9  =>
14032          hr_transaction_api.get_VARCHAR2_value
14033            (p_transaction_step_id => p_transaction_step_id
14034            ,p_name                => 'P_CONT_INFORMATION9')
14035       --
14036       ,P_CONT_INFORMATION10  =>
14037          hr_transaction_api.get_VARCHAR2_value
14038            (p_transaction_step_id => p_transaction_step_id
14039            ,p_name                => 'P_CONT_INFORMATION10')
14040       --
14041       ,P_CONT_INFORMATION11  =>
14042          hr_transaction_api.get_VARCHAR2_value
14043            (p_transaction_step_id => p_transaction_step_id
14044            ,p_name                => 'P_CONT_INFORMATION11')
14045       --
14046       ,P_CONT_INFORMATION12  =>
14047          hr_transaction_api.get_VARCHAR2_value
14048            (p_transaction_step_id => p_transaction_step_id
14049            ,p_name                => 'P_CONT_INFORMATION12')
14050       --
14051       ,P_CONT_INFORMATION13  =>
14052          hr_transaction_api.get_VARCHAR2_value
14053            (p_transaction_step_id => p_transaction_step_id
14054            ,p_name                => 'P_CONT_INFORMATION13')
14055       --
14056       ,P_CONT_INFORMATION14  =>
14057          hr_transaction_api.get_VARCHAR2_value
14058            (p_transaction_step_id => p_transaction_step_id
14059            ,p_name                => 'P_CONT_INFORMATION14')
14060       --
14061       ,P_CONT_INFORMATION15  =>
14062          hr_transaction_api.get_VARCHAR2_value
14063            (p_transaction_step_id => p_transaction_step_id
14064            ,p_name                => 'P_CONT_INFORMATION15')
14065       --
14066       ,P_CONT_INFORMATION16  =>
14067          hr_transaction_api.get_VARCHAR2_value
14068            (p_transaction_step_id => p_transaction_step_id
14069            ,p_name                => 'P_CONT_INFORMATION16')
14070       --
14071       ,P_CONT_INFORMATION17  =>
14072          hr_transaction_api.get_VARCHAR2_value
14073            (p_transaction_step_id => p_transaction_step_id
14074            ,p_name                => 'P_CONT_INFORMATION17')
14075       --
14076       ,P_CONT_INFORMATION18  =>
14077          hr_transaction_api.get_VARCHAR2_value
14078            (p_transaction_step_id => p_transaction_step_id
14079            ,p_name                => 'P_CONT_INFORMATION18')
14080       --
14081       ,P_CONT_INFORMATION19  =>
14082          hr_transaction_api.get_VARCHAR2_value
14083            (p_transaction_step_id => p_transaction_step_id
14084            ,p_name                => 'P_CONT_INFORMATION19')
14085       --
14086       ,P_CONT_INFORMATION20  =>
14087          hr_transaction_api.get_VARCHAR2_value
14088            (p_transaction_step_id => p_transaction_step_id
14089            ,p_name                => 'P_CONT_INFORMATION20')
14090       --
14091       ,P_OBJECT_VERSION_NUMBER  =>  l_ovn
14092       --
14093     );
14094   end if;
14095   ELSE
14096     --
14097     l_contact_type :=
14098        hr_transaction_api.get_VARCHAR2_value
14099          (p_transaction_step_id => p_transaction_step_id
14100           ,p_name                => 'P_CONTACT_TYPE') ;
14101 
14102     --
14103     l_personal_flag :=
14104        hr_transaction_api.get_VARCHAR2_value
14105           (p_transaction_step_id => p_transaction_step_id
14106            ,p_name                => 'P_PERSONAL_FLAG') ;
14107     --
14108     if l_contact_operation = 'EMER_CR_NEW_REL' then
14109       --
14110       l_contact_type := 'EMRG' ;
14111       l_personal_flag:= 'N' ;
14112       --
14113     else
14114       --
14115       l_personal_flag := 'Y' ;
14116       --
14117     end if;
14118     --
14119     if  l_contact_operation in ( 'EMER_CR_NEW_REL', 'DPDNT_CR_NEW_REL') then
14120         --
14121 
14122 	open get_other_relid_ovn(
14123             hr_transaction_api.get_number_value
14124                  (p_transaction_step_id   => p_transaction_step_id
14125                   ,p_name                 => 'P_CONTACT_PERSON_ID')
14126            ,hr_transaction_api.get_number_value
14127                  (p_transaction_step_id   => p_transaction_step_id
14128                   ,p_name                 => 'P_PERSON_ID'));
14129     fetch get_other_relid_ovn into l_other_relid, l_other_ovn;
14130     if get_other_relid_ovn%found then
14131          hr_contact_rel_api.update_contact_relationship(
14132 
14133       P_VALIDATE  =>  p_validate
14134       --
14135       ,P_EFFECTIVE_DATE  =>  l_effective_date
14136 
14137       ,P_CONTACT_RELATIONSHIP_ID  =>     l_other_relid
14138       --
14139       ,P_CONTACT_TYPE  =>
14140             hr_transaction_api.get_VARCHAR2_value
14141                 (p_transaction_step_id => p_transaction_step_id
14142                 ,p_name                => 'P_CONTACT_TYPE')
14143       --
14144       ,P_COMMENTS  =>
14145          hr_transaction_api.get_VARCHAR2_value
14146            (p_transaction_step_id => p_transaction_step_id
14147            ,p_name                => 'P_CTR_COMMENTS')
14148 
14149       ,P_THIRD_PARTY_PAY_FLAG  =>
14150          hr_transaction_api.get_VARCHAR2_value
14151            (p_transaction_step_id => p_transaction_step_id
14152            ,p_name                => 'P_THIRD_PARTY_PAY_FLAG')
14153       --
14154       ,P_BONDHOLDER_FLAG  =>
14155          hr_transaction_api.get_VARCHAR2_value
14156            (p_transaction_step_id => p_transaction_step_id
14157            ,p_name                => 'P_BONDHOLDER_FLAG')
14158       --
14159       ,P_DATE_START  =>
14160          hr_transaction_api.get_DATE_value
14161            (p_transaction_step_id => p_transaction_step_id
14162            ,p_name                => 'P_DATE_START')
14163       --
14164      -- bug 4775133 ,P_START_LIFE_REASON_ID  =>
14165        --  hr_transaction_api.get_NUMBER_value
14166        --    (p_transaction_step_id => p_transaction_step_id
14167        --    ,p_name                => 'P_START_LIFE_REASON_ID')
14168       --
14169       ,P_DATE_END  =>
14170          hr_transaction_api.get_DATE_value
14171            (p_transaction_step_id => p_transaction_step_id
14172            ,p_name                => 'P_DATE_END')
14173       --
14174       ,P_END_LIFE_REASON_ID  =>
14175          hr_transaction_api.get_NUMBER_value
14176            (p_transaction_step_id => p_transaction_step_id
14177            ,p_name                => 'P_END_LIFE_REASON_ID')
14178       --
14179       ,P_RLTD_PER_RSDS_W_DSGNTR_FLAG  =>
14180          hr_transaction_api.get_VARCHAR2_value
14181            (p_transaction_step_id => p_transaction_step_id
14182            ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG')
14183       --
14184       ,P_PERSONAL_FLAG  => 'Y'
14185       --
14186       ,P_DEPENDENT_FLAG  =>
14187          hr_transaction_api.get_VARCHAR2_value
14188            (p_transaction_step_id => p_transaction_step_id
14189            ,p_name                => 'P_DEPENDENT_FLAG')
14190       --
14191       ,P_BENEFICIARY_FLAG  =>
14192          hr_transaction_api.get_VARCHAR2_value
14193            (p_transaction_step_id => p_transaction_step_id
14194            ,p_name                => 'P_BENEFICIARY_FLAG')
14195       --
14196       ,P_CONT_ATTRIBUTE_CATEGORY  =>
14197          hr_transaction_api.get_VARCHAR2_value
14198            (p_transaction_step_id => p_transaction_step_id
14199            ,p_name                => 'P_CONT_ATTRIBUTE_CATEGORY')
14200       --
14201       ,P_CONT_ATTRIBUTE1  =>
14202          hr_transaction_api.get_VARCHAR2_value
14203            (p_transaction_step_id => p_transaction_step_id
14204            ,p_name                => 'P_CONT_ATTRIBUTE1')
14205       --
14206       ,P_CONT_ATTRIBUTE2  =>
14207          hr_transaction_api.get_VARCHAR2_value
14208            (p_transaction_step_id => p_transaction_step_id
14209            ,p_name                => 'P_CONT_ATTRIBUTE2')
14210       --
14211       ,P_CONT_ATTRIBUTE3  =>
14212          hr_transaction_api.get_VARCHAR2_value
14213            (p_transaction_step_id => p_transaction_step_id
14214            ,p_name                => 'P_CONT_ATTRIBUTE3')
14215       --
14216       ,P_CONT_ATTRIBUTE4  =>
14217          hr_transaction_api.get_VARCHAR2_value
14218            (p_transaction_step_id => p_transaction_step_id
14219            ,p_name                => 'P_CONT_ATTRIBUTE4')
14220       --
14221       ,P_CONT_ATTRIBUTE5  =>
14222          hr_transaction_api.get_VARCHAR2_value
14223            (p_transaction_step_id => p_transaction_step_id
14224            ,p_name                => 'P_CONT_ATTRIBUTE5')
14225       --
14226       ,P_CONT_ATTRIBUTE6  =>
14227          hr_transaction_api.get_VARCHAR2_value
14228            (p_transaction_step_id => p_transaction_step_id
14229            ,p_name                => 'P_CONT_ATTRIBUTE6')
14230       --
14231       ,P_CONT_ATTRIBUTE7  =>
14232          hr_transaction_api.get_VARCHAR2_value
14233            (p_transaction_step_id => p_transaction_step_id
14234            ,p_name                => 'P_CONT_ATTRIBUTE7')
14235       --
14236       ,P_CONT_ATTRIBUTE8  =>
14237          hr_transaction_api.get_VARCHAR2_value
14238            (p_transaction_step_id => p_transaction_step_id
14239            ,p_name                => 'P_CONT_ATTRIBUTE8')
14240       --
14241       ,P_CONT_ATTRIBUTE9  =>
14242          hr_transaction_api.get_VARCHAR2_value
14243            (p_transaction_step_id => p_transaction_step_id
14244            ,p_name                => 'P_CONT_ATTRIBUTE9')
14245       --
14246       ,P_CONT_ATTRIBUTE10  =>
14247          hr_transaction_api.get_VARCHAR2_value
14248            (p_transaction_step_id => p_transaction_step_id
14249            ,p_name                => 'P_CONT_ATTRIBUTE10')
14250       --
14251       ,P_CONT_ATTRIBUTE11  =>
14252          hr_transaction_api.get_VARCHAR2_value
14253            (p_transaction_step_id => p_transaction_step_id
14254            ,p_name                => 'P_CONT_ATTRIBUTE11')
14255       --
14256       ,P_CONT_ATTRIBUTE12  =>
14257          hr_transaction_api.get_VARCHAR2_value
14258            (p_transaction_step_id => p_transaction_step_id
14259            ,p_name                => 'P_CONT_ATTRIBUTE12')
14260       --
14261       ,P_CONT_ATTRIBUTE13  =>
14262          hr_transaction_api.get_VARCHAR2_value
14263            (p_transaction_step_id => p_transaction_step_id
14264            ,p_name                => 'P_CONT_ATTRIBUTE13')
14265       --
14266       ,P_CONT_ATTRIBUTE14  =>
14267          hr_transaction_api.get_VARCHAR2_value
14268            (p_transaction_step_id => p_transaction_step_id
14269            ,p_name                => 'P_CONT_ATTRIBUTE14')
14270       --
14271       ,P_CONT_ATTRIBUTE15  =>
14272          hr_transaction_api.get_VARCHAR2_value
14273            (p_transaction_step_id => p_transaction_step_id
14274            ,p_name                => 'P_CONT_ATTRIBUTE15')
14275       --
14276       ,P_CONT_ATTRIBUTE16  =>
14277          hr_transaction_api.get_VARCHAR2_value
14278            (p_transaction_step_id => p_transaction_step_id
14279            ,p_name                => 'P_CONT_ATTRIBUTE16')
14280       --
14281       ,P_CONT_ATTRIBUTE17  =>
14282          hr_transaction_api.get_VARCHAR2_value
14283            (p_transaction_step_id => p_transaction_step_id
14284            ,p_name                => 'P_CONT_ATTRIBUTE17')
14285       --
14286       ,P_CONT_ATTRIBUTE18  =>
14287          hr_transaction_api.get_VARCHAR2_value
14288            (p_transaction_step_id => p_transaction_step_id
14289            ,p_name                => 'P_CONT_ATTRIBUTE18')
14290       --
14291       ,P_CONT_ATTRIBUTE19  =>
14292          hr_transaction_api.get_VARCHAR2_value
14293            (p_transaction_step_id => p_transaction_step_id
14294            ,p_name                => 'P_CONT_ATTRIBUTE19')
14295       --
14296       ,P_CONT_ATTRIBUTE20  =>
14297          hr_transaction_api.get_VARCHAR2_value
14298            (p_transaction_step_id => p_transaction_step_id
14299            ,p_name                => 'P_CONT_ATTRIBUTE20')
14300       --
14301       ,P_CONT_INFORMATION_CATEGORY  =>
14302          hr_transaction_api.get_VARCHAR2_value
14303            (p_transaction_step_id => p_transaction_step_id
14304            ,p_name                => 'P_CONT_INFORMATION_CATEGORY')
14305       --
14306       ,P_CONT_INFORMATION1  =>
14307          hr_transaction_api.get_VARCHAR2_value
14308            (p_transaction_step_id => p_transaction_step_id
14309            ,p_name                => 'P_CONT_INFORMATION1')
14310       --
14311       ,P_CONT_INFORMATION2  =>
14312          hr_transaction_api.get_VARCHAR2_value
14313            (p_transaction_step_id => p_transaction_step_id
14314            ,p_name                => 'P_CONT_INFORMATION2')
14315       --
14316       ,P_CONT_INFORMATION3  =>
14317          hr_transaction_api.get_VARCHAR2_value
14318            (p_transaction_step_id => p_transaction_step_id
14319            ,p_name                => 'P_CONT_INFORMATION3')
14320       --
14321       ,P_CONT_INFORMATION4  =>
14322          hr_transaction_api.get_VARCHAR2_value
14323            (p_transaction_step_id => p_transaction_step_id
14324            ,p_name                => 'P_CONT_INFORMATION4')
14325       --
14326       ,P_CONT_INFORMATION5  =>
14327          hr_transaction_api.get_VARCHAR2_value
14328            (p_transaction_step_id => p_transaction_step_id
14329            ,p_name                => 'P_CONT_INFORMATION5')
14330       --
14331       ,P_CONT_INFORMATION6  =>
14332          hr_transaction_api.get_VARCHAR2_value
14333            (p_transaction_step_id => p_transaction_step_id
14334            ,p_name                => 'P_CONT_INFORMATION6')
14335       --
14336       ,P_CONT_INFORMATION7  =>
14337          hr_transaction_api.get_VARCHAR2_value
14338            (p_transaction_step_id => p_transaction_step_id
14339            ,p_name                => 'P_CONT_INFORMATION7')
14340       --
14341       ,P_CONT_INFORMATION8  =>
14342          hr_transaction_api.get_VARCHAR2_value
14343            (p_transaction_step_id => p_transaction_step_id
14344            ,p_name                => 'P_CONT_INFORMATION8')
14345       --
14346       ,P_CONT_INFORMATION9  =>
14347          hr_transaction_api.get_VARCHAR2_value
14348            (p_transaction_step_id => p_transaction_step_id
14349            ,p_name                => 'P_CONT_INFORMATION9')
14350       --
14351       ,P_CONT_INFORMATION10  =>
14352          hr_transaction_api.get_VARCHAR2_value
14353            (p_transaction_step_id => p_transaction_step_id
14354            ,p_name                => 'P_CONT_INFORMATION10')
14355       --
14356       ,P_CONT_INFORMATION11  =>
14357          hr_transaction_api.get_VARCHAR2_value
14358            (p_transaction_step_id => p_transaction_step_id
14359            ,p_name                => 'P_CONT_INFORMATION11')
14360       --
14361       ,P_CONT_INFORMATION12  =>
14362          hr_transaction_api.get_VARCHAR2_value
14363            (p_transaction_step_id => p_transaction_step_id
14364            ,p_name                => 'P_CONT_INFORMATION12')
14365       --
14366       ,P_CONT_INFORMATION13  =>
14367          hr_transaction_api.get_VARCHAR2_value
14368            (p_transaction_step_id => p_transaction_step_id
14369            ,p_name                => 'P_CONT_INFORMATION13')
14370       --
14371       ,P_CONT_INFORMATION14  =>
14372          hr_transaction_api.get_VARCHAR2_value
14373            (p_transaction_step_id => p_transaction_step_id
14374            ,p_name                => 'P_CONT_INFORMATION14')
14375       --
14376       ,P_CONT_INFORMATION15  =>
14377          hr_transaction_api.get_VARCHAR2_value
14378            (p_transaction_step_id => p_transaction_step_id
14379            ,p_name                => 'P_CONT_INFORMATION15')
14380       --
14381       ,P_CONT_INFORMATION16  =>
14382          hr_transaction_api.get_VARCHAR2_value
14383            (p_transaction_step_id => p_transaction_step_id
14384            ,p_name                => 'P_CONT_INFORMATION16')
14385       --
14386       ,P_CONT_INFORMATION17  =>
14387          hr_transaction_api.get_VARCHAR2_value
14388            (p_transaction_step_id => p_transaction_step_id
14389            ,p_name                => 'P_CONT_INFORMATION17')
14390       --
14391       ,P_CONT_INFORMATION18  =>
14392          hr_transaction_api.get_VARCHAR2_value
14393            (p_transaction_step_id => p_transaction_step_id
14394            ,p_name                => 'P_CONT_INFORMATION18')
14395       --
14396       ,P_CONT_INFORMATION19  =>
14397          hr_transaction_api.get_VARCHAR2_value
14398            (p_transaction_step_id => p_transaction_step_id
14399            ,p_name                => 'P_CONT_INFORMATION19')
14400       --
14401       ,P_CONT_INFORMATION20  =>
14402          hr_transaction_api.get_VARCHAR2_value
14403            (p_transaction_step_id => p_transaction_step_id
14404            ,p_name                => 'P_CONT_INFORMATION20')
14405       --
14406       ,P_OBJECT_VERSION_NUMBER  =>  l_other_ovn
14407       --
14408     );
14409     end if;
14410       close get_other_relid_ovn;
14411 
14412       -- 9564383 starts
14413        z_primary_contact_flag := hr_transaction_api.get_VARCHAR2_value
14414                                                   (p_transaction_step_id => p_transaction_step_id
14415                                                    ,p_name                => 'P_PRIMARY_CONTACT_FLAG');
14416        z_date_start := hr_transaction_api.get_DATE_value
14417                                   (p_transaction_step_id => p_transaction_step_id
14418                                    ,p_name                => 'P_DATE_START');
14419        z_date_end :=  hr_transaction_api.get_DATE_value
14420                                  (p_transaction_step_id => p_transaction_step_id
14421                                   ,p_name                => 'P_DATE_END');
14422        z_person_id :=   hr_transaction_api.get_number_value
14423                                    (p_transaction_step_id   => p_transaction_step_id
14424                                    ,p_name                 =>upper('p_person_id'));
14425         if (z_primary_contact_flag = 'Y') then
14426           open csr_chk_primary_cnt;
14427           fetch csr_chk_primary_cnt into l_exists;
14428           if csr_chk_primary_cnt%FOUND then
14429               z_date_start := sysdate;
14430          end if;
14431          close csr_chk_primary_cnt;
14432        end if;
14433       -- 9564383 ends
14434 
14435          hr_contact_rel_api.create_contact(
14436           P_VALIDATE  => p_validate
14437           --
14438           ,P_START_DATE  =>          l_effective_date
14439              /*
14440              hr_transaction_api.get_DATE_value
14441                (p_transaction_step_id => p_transaction_step_id
14442                ,p_name                => 'P_CONT_EFFECTIVE_DATE')
14443              */
14444           --
14445           ,P_BUSINESS_GROUP_ID  =>
14446              hr_transaction_api.get_NUMBER_value
14447                (p_transaction_step_id => p_transaction_step_id
14448                ,p_name                => 'P_BUSINESS_GROUP_ID')
14449           --
14450           ,P_PERSON_ID  =>
14451               hr_transaction_api.get_number_value
14452                  (p_transaction_step_id   => p_transaction_step_id
14453                   ,p_name                 =>upper('p_person_id'))
14454           --
14455           ,P_CONTACT_PERSON_ID  =>
14456               hr_transaction_api.get_number_value
14457                  (p_transaction_step_id   => p_transaction_step_id
14458                   ,p_name                 =>upper('p_cont_person_id'))
14459           --
14460           ,P_CONTACT_TYPE  => l_contact_type
14461           --
14462           ,P_CTR_COMMENTS  =>
14463              hr_transaction_api.get_VARCHAR2_value
14464                (p_transaction_step_id => p_transaction_step_id
14465                ,p_name                => 'P_CTR_COMMENTS')
14466           --
14467           ,P_PRIMARY_CONTACT_FLAG  =>
14468              hr_transaction_api.get_VARCHAR2_value
14469                (p_transaction_step_id => p_transaction_step_id
14470                ,p_name                => 'P_PRIMARY_CONTACT_FLAG')
14471           --
14472           ,P_DATE_START  =>  z_date_start
14473           --
14474           ,P_START_LIFE_REASON_ID  =>
14475              hr_transaction_api.get_NUMBER_value
14476                (p_transaction_step_id => p_transaction_step_id
14477                ,p_name                => 'P_START_LIFE_REASON_ID')
14478           --
14479           ,P_DATE_END  =>
14480              hr_transaction_api.get_DATE_value
14481                (p_transaction_step_id => p_transaction_step_id
14482                ,p_name                => 'P_DATE_END')
14483           --
14484           ,P_END_LIFE_REASON_ID  =>
14485              hr_transaction_api.get_NUMBER_value
14486                (p_transaction_step_id => p_transaction_step_id
14487                ,p_name                => 'P_END_LIFE_REASON_ID')
14488           --
14489           ,P_RLTD_PER_RSDS_W_DSGNTR_FLAG  =>
14490              hr_transaction_api.get_VARCHAR2_value
14491                (p_transaction_step_id => p_transaction_step_id
14492                ,p_name                => 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG')
14493           --
14494           ,P_PERSONAL_FLAG  =>  l_personal_flag
14495           --
14496           ,P_SEQUENCE_NUMBER  =>
14497              hr_transaction_api.get_NUMBER_value
14498                (p_transaction_step_id => p_transaction_step_id
14499                ,p_name                => 'P_SEQUENCE_NUMBER')
14500           --
14501           ,P_CONT_ATTRIBUTE_CATEGORY  =>
14502              hr_transaction_api.get_VARCHAR2_value
14503                (p_transaction_step_id => p_transaction_step_id
14504                ,p_name                => 'P_CONT_ATTRIBUTE_CATEGORY')
14505           --
14506           ,P_CONT_ATTRIBUTE1  =>
14507              hr_transaction_api.get_VARCHAR2_value
14508                (p_transaction_step_id => p_transaction_step_id
14509                ,p_name                => 'P_CONT_ATTRIBUTE1')
14510           --
14511           ,P_CONT_ATTRIBUTE2  =>
14512              hr_transaction_api.get_VARCHAR2_value
14513                (p_transaction_step_id => p_transaction_step_id
14514                ,p_name                => 'P_CONT_ATTRIBUTE2')
14515           --
14516           ,P_CONT_ATTRIBUTE3  =>
14517              hr_transaction_api.get_VARCHAR2_value
14518                (p_transaction_step_id => p_transaction_step_id
14519                ,p_name                => 'P_CONT_ATTRIBUTE3')
14520           --
14521           ,P_CONT_ATTRIBUTE4  =>
14522              hr_transaction_api.get_VARCHAR2_value
14523                (p_transaction_step_id => p_transaction_step_id
14524                ,p_name                => 'P_CONT_ATTRIBUTE4')
14525           --
14526           ,P_CONT_ATTRIBUTE5  =>
14527              hr_transaction_api.get_VARCHAR2_value
14528                (p_transaction_step_id => p_transaction_step_id
14529                ,p_name                => 'P_CONT_ATTRIBUTE5')
14530           --
14531           ,P_CONT_ATTRIBUTE6  =>
14532              hr_transaction_api.get_VARCHAR2_value
14533                (p_transaction_step_id => p_transaction_step_id
14534                ,p_name                => 'P_CONT_ATTRIBUTE6')
14535           --
14536           ,P_CONT_ATTRIBUTE7  =>
14537              hr_transaction_api.get_VARCHAR2_value
14538                (p_transaction_step_id => p_transaction_step_id
14539                ,p_name                => 'P_CONT_ATTRIBUTE7')
14540           --
14541           ,P_CONT_ATTRIBUTE8  =>
14542              hr_transaction_api.get_VARCHAR2_value
14543                (p_transaction_step_id => p_transaction_step_id
14544                ,p_name                => 'P_CONT_ATTRIBUTE8')
14545           --
14546           ,P_CONT_ATTRIBUTE9  =>
14547              hr_transaction_api.get_VARCHAR2_value
14548                (p_transaction_step_id => p_transaction_step_id
14549                ,p_name                => 'P_CONT_ATTRIBUTE9')
14550           --
14551           ,P_CONT_ATTRIBUTE10  =>
14552              hr_transaction_api.get_VARCHAR2_value
14553                (p_transaction_step_id => p_transaction_step_id
14554                ,p_name                => 'P_CONT_ATTRIBUTE10')
14555           --
14556           ,P_CONT_ATTRIBUTE11  =>
14557              hr_transaction_api.get_VARCHAR2_value
14558                (p_transaction_step_id => p_transaction_step_id
14559                ,p_name                => 'P_CONT_ATTRIBUTE11')
14560           --
14561           ,P_CONT_ATTRIBUTE12  =>
14562              hr_transaction_api.get_VARCHAR2_value
14563                (p_transaction_step_id => p_transaction_step_id
14564                ,p_name                => 'P_CONT_ATTRIBUTE12')
14565           --
14566           ,P_CONT_ATTRIBUTE13  =>
14567              hr_transaction_api.get_VARCHAR2_value
14568                (p_transaction_step_id => p_transaction_step_id
14569                ,p_name                => 'P_CONT_ATTRIBUTE13')
14570           --
14571           ,P_CONT_ATTRIBUTE14  =>
14572              hr_transaction_api.get_VARCHAR2_value
14573                (p_transaction_step_id => p_transaction_step_id
14574                ,p_name                => 'P_CONT_ATTRIBUTE14')
14575           --
14576           ,P_CONT_ATTRIBUTE15  =>
14577              hr_transaction_api.get_VARCHAR2_value
14578                (p_transaction_step_id => p_transaction_step_id
14579                ,p_name                => 'P_CONT_ATTRIBUTE15')
14580           --
14581           ,P_CONT_ATTRIBUTE16  =>
14582              hr_transaction_api.get_VARCHAR2_value
14583                (p_transaction_step_id => p_transaction_step_id
14584                ,p_name                => 'P_CONT_ATTRIBUTE16')
14585           --
14586           ,P_CONT_ATTRIBUTE17  =>
14587              hr_transaction_api.get_VARCHAR2_value
14588                (p_transaction_step_id => p_transaction_step_id
14589                ,p_name                => 'P_CONT_ATTRIBUTE17')
14590           --
14591           ,P_CONT_ATTRIBUTE18  =>
14592              hr_transaction_api.get_VARCHAR2_value
14593                (p_transaction_step_id => p_transaction_step_id
14594                ,p_name                => 'P_CONT_ATTRIBUTE18')
14595           --
14596           ,P_CONT_ATTRIBUTE19  =>
14597              hr_transaction_api.get_VARCHAR2_value
14598                (p_transaction_step_id => p_transaction_step_id
14599                ,p_name                => 'P_CONT_ATTRIBUTE19')
14600           --
14601           ,P_CONT_ATTRIBUTE20  =>
14602              hr_transaction_api.get_VARCHAR2_value
14603                (p_transaction_step_id => p_transaction_step_id
14604                ,p_name                => 'P_CONT_ATTRIBUTE20')
14605           --
14606           ,P_THIRD_PARTY_PAY_FLAG  =>
14607              hr_transaction_api.get_VARCHAR2_value
14608                (p_transaction_step_id => p_transaction_step_id
14609                ,p_name                => 'P_THIRD_PARTY_PAY_FLAG')
14610           --
14611           ,P_BONDHOLDER_FLAG  =>
14612              hr_transaction_api.get_VARCHAR2_value
14613                (p_transaction_step_id => p_transaction_step_id
14614                ,p_name                => 'P_BONDHOLDER_FLAG')
14615           --
14616           ,P_DEPENDENT_FLAG  =>
14617              hr_transaction_api.get_VARCHAR2_value
14618                (p_transaction_step_id => p_transaction_step_id
14619                ,p_name                => 'P_DEPENDENT_FLAG')
14620           --
14621           ,P_BENEFICIARY_FLAG  =>
14622              hr_transaction_api.get_VARCHAR2_value
14623                (p_transaction_step_id => p_transaction_step_id
14624                ,p_name                => 'P_BENEFICIARY_FLAG')
14625           --
14626           ,P_CREATE_MIRROR_FLAG  =>  'N' -- Change later get from txn tables.
14627           --
14628           ,P_MIRROR_TYPE  => null
14629           --
14630           ,P_MIRROR_CONT_ATTRIBUTE_CAT  =>
14631              hr_transaction_api.get_VARCHAR2_value
14632                (p_transaction_step_id => p_transaction_step_id
14633                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE_CAT')
14634           --
14635           ,P_MIRROR_CONT_ATTRIBUTE1  =>
14636              hr_transaction_api.get_VARCHAR2_value
14637                (p_transaction_step_id => p_transaction_step_id
14638                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE1')
14639           --
14640           ,P_MIRROR_CONT_ATTRIBUTE2  =>
14641              hr_transaction_api.get_VARCHAR2_value
14642                (p_transaction_step_id => p_transaction_step_id
14643                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE2')
14644           --
14645           ,P_MIRROR_CONT_ATTRIBUTE3  =>
14646              hr_transaction_api.get_VARCHAR2_value
14647                (p_transaction_step_id => p_transaction_step_id
14648                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE3')
14649           --
14650           ,P_MIRROR_CONT_ATTRIBUTE4  =>
14651              hr_transaction_api.get_VARCHAR2_value
14652                (p_transaction_step_id => p_transaction_step_id
14653                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE4')
14654           --
14655           ,P_MIRROR_CONT_ATTRIBUTE5  =>
14656              hr_transaction_api.get_VARCHAR2_value
14657                (p_transaction_step_id => p_transaction_step_id
14658                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE5')
14659           --
14660           ,P_MIRROR_CONT_ATTRIBUTE6  =>
14661              hr_transaction_api.get_VARCHAR2_value
14662                (p_transaction_step_id => p_transaction_step_id
14663                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE6')
14664           --
14665           ,P_MIRROR_CONT_ATTRIBUTE7  =>
14666              hr_transaction_api.get_VARCHAR2_value
14667                (p_transaction_step_id => p_transaction_step_id
14668                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE7')
14669           --
14670           ,P_MIRROR_CONT_ATTRIBUTE8  =>
14671              hr_transaction_api.get_VARCHAR2_value
14672                (p_transaction_step_id => p_transaction_step_id
14673                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE8')
14674           --
14675           ,P_MIRROR_CONT_ATTRIBUTE9  =>
14676              hr_transaction_api.get_VARCHAR2_value
14677                (p_transaction_step_id => p_transaction_step_id
14678                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE9')
14679           --
14680           ,P_MIRROR_CONT_ATTRIBUTE10  =>
14681              hr_transaction_api.get_VARCHAR2_value
14682                (p_transaction_step_id => p_transaction_step_id
14683                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE10')
14684           --
14685           ,P_MIRROR_CONT_ATTRIBUTE11  =>
14686              hr_transaction_api.get_VARCHAR2_value
14687                (p_transaction_step_id => p_transaction_step_id
14688                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE11')
14689           --
14690           ,P_MIRROR_CONT_ATTRIBUTE12  =>
14691              hr_transaction_api.get_VARCHAR2_value
14692                (p_transaction_step_id => p_transaction_step_id
14693                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE12')
14694           --
14695           ,P_MIRROR_CONT_ATTRIBUTE13  =>
14696              hr_transaction_api.get_VARCHAR2_value
14697                (p_transaction_step_id => p_transaction_step_id
14698                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE13')
14699           --
14700           ,P_MIRROR_CONT_ATTRIBUTE14  =>
14701              hr_transaction_api.get_VARCHAR2_value
14702                (p_transaction_step_id => p_transaction_step_id
14703                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE14')
14704           --
14705           ,P_MIRROR_CONT_ATTRIBUTE15  =>
14706              hr_transaction_api.get_VARCHAR2_value
14707                (p_transaction_step_id => p_transaction_step_id
14708                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE15')
14709           --
14710           ,P_MIRROR_CONT_ATTRIBUTE16  =>
14711              hr_transaction_api.get_VARCHAR2_value
14712                (p_transaction_step_id => p_transaction_step_id
14713                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE16')
14714           --
14715           ,P_MIRROR_CONT_ATTRIBUTE17  =>
14716              hr_transaction_api.get_VARCHAR2_value
14717                (p_transaction_step_id => p_transaction_step_id
14718                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE17')
14719           --
14720           ,P_MIRROR_CONT_ATTRIBUTE18  =>
14721              hr_transaction_api.get_VARCHAR2_value
14722                (p_transaction_step_id => p_transaction_step_id
14723                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE18')
14724           --
14725           ,P_MIRROR_CONT_ATTRIBUTE19  =>
14726              hr_transaction_api.get_VARCHAR2_value
14727                (p_transaction_step_id => p_transaction_step_id
14728                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE19')
14729           --
14730           ,P_MIRROR_CONT_ATTRIBUTE20  =>
14731              hr_transaction_api.get_VARCHAR2_value
14732                (p_transaction_step_id => p_transaction_step_id
14733                ,p_name                => 'P_MIRROR_CONT_ATTRIBUTE20')
14734           --
14735 
14736           ,P_CONTACT_RELATIONSHIP_ID  	=> L_CONTACT_RELATIONSHIP_ID1
14737           --
14738           ,P_CTR_OBJECT_VERSION_NUMBER 	=> L_CTR_OBJECT_VERSION_NUMBER1
14739           --
14740           ,P_PER_PERSON_ID  		=> L_PER_PERSON_ID1
14741           --
14742           ,P_PER_OBJECT_VERSION_NUMBER 	=> L_PER_OBJECT_VERSION_NUMBER1
14743           --
14744           ,P_PER_EFFECTIVE_START_DATE  	=> L_PER_EFFECTIVE_START_DATE1
14745           --
14746           ,P_PER_EFFECTIVE_END_DATE  	=> L_PER_EFFECTIVE_END_DATE1
14747           --
14748           ,P_FULL_NAME  		=> L_FULL_NAME1
14749           --
14750           ,P_PER_COMMENT_ID  		=> L_PER_COMMENT_ID1
14751           --
14752           ,P_NAME_COMBINATION_WARNING  	=> L_CON_NAME_COMBINATION_WARNIN1
14753           --
14754           ,P_ORIG_HIRE_WARNING  	=> L_CON_ORIG_HIRE_WARNING1
14755           --
14756           ,P_CONT_INFORMATION_CATEGORY  =>
14757          hr_transaction_api.get_VARCHAR2_value
14758            (p_transaction_step_id => p_transaction_step_id
14759            ,p_name                => 'P_CONT_INFORMATION_CATEGORY')
14760       --
14761       ,P_CONT_INFORMATION1  =>
14762          hr_transaction_api.get_VARCHAR2_value
14763            (p_transaction_step_id => p_transaction_step_id
14764            ,p_name                => 'P_CONT_INFORMATION1')
14765       --
14766       ,P_CONT_INFORMATION2  =>
14767          hr_transaction_api.get_VARCHAR2_value
14768            (p_transaction_step_id => p_transaction_step_id
14769            ,p_name                => 'P_CONT_INFORMATION2')
14770       --
14771       ,P_CONT_INFORMATION3  =>
14772          hr_transaction_api.get_VARCHAR2_value
14773            (p_transaction_step_id => p_transaction_step_id
14774            ,p_name                => 'P_CONT_INFORMATION3')
14775       --
14776       ,P_CONT_INFORMATION4  =>
14777          hr_transaction_api.get_VARCHAR2_value
14778            (p_transaction_step_id => p_transaction_step_id
14779            ,p_name                => 'P_CONT_INFORMATION4')
14780       --
14781       ,P_CONT_INFORMATION5  =>
14782          hr_transaction_api.get_VARCHAR2_value
14783            (p_transaction_step_id => p_transaction_step_id
14784            ,p_name                => 'P_CONT_INFORMATION5')
14785       --
14786       ,P_CONT_INFORMATION6  =>
14787          hr_transaction_api.get_VARCHAR2_value
14788            (p_transaction_step_id => p_transaction_step_id
14789            ,p_name                => 'P_CONT_INFORMATION6')
14790       --
14791       ,P_CONT_INFORMATION7  =>
14792          hr_transaction_api.get_VARCHAR2_value
14793            (p_transaction_step_id => p_transaction_step_id
14794            ,p_name                => 'P_CONT_INFORMATION7')
14795       --
14796       ,P_CONT_INFORMATION8  =>
14797          hr_transaction_api.get_VARCHAR2_value
14798            (p_transaction_step_id => p_transaction_step_id
14799            ,p_name                => 'P_CONT_INFORMATION8')
14800       --
14801       ,P_CONT_INFORMATION9  =>
14802          hr_transaction_api.get_VARCHAR2_value
14803            (p_transaction_step_id => p_transaction_step_id
14804            ,p_name                => 'P_CONT_INFORMATION9')
14805       --
14806       ,P_CONT_INFORMATION10  =>
14807          hr_transaction_api.get_VARCHAR2_value
14808            (p_transaction_step_id => p_transaction_step_id
14809            ,p_name                => 'P_CONT_INFORMATION10')
14810       --
14811       ,P_CONT_INFORMATION11  =>
14812          hr_transaction_api.get_VARCHAR2_value
14813            (p_transaction_step_id => p_transaction_step_id
14814            ,p_name                => 'P_CONT_INFORMATION11')
14815       --
14816       ,P_CONT_INFORMATION12  =>
14817          hr_transaction_api.get_VARCHAR2_value
14818            (p_transaction_step_id => p_transaction_step_id
14819            ,p_name                => 'P_CONT_INFORMATION12')
14820       --
14821       ,P_CONT_INFORMATION13  =>
14822          hr_transaction_api.get_VARCHAR2_value
14823            (p_transaction_step_id => p_transaction_step_id
14824            ,p_name                => 'P_CONT_INFORMATION13')
14825       --
14826       ,P_CONT_INFORMATION14  =>
14827          hr_transaction_api.get_VARCHAR2_value
14828            (p_transaction_step_id => p_transaction_step_id
14829            ,p_name                => 'P_CONT_INFORMATION14')
14830       --
14831       ,P_CONT_INFORMATION15  =>
14832          hr_transaction_api.get_VARCHAR2_value
14833            (p_transaction_step_id => p_transaction_step_id
14834            ,p_name                => 'P_CONT_INFORMATION15')
14835       --
14836       ,P_CONT_INFORMATION16  =>
14837          hr_transaction_api.get_VARCHAR2_value
14838            (p_transaction_step_id => p_transaction_step_id
14839            ,p_name                => 'P_CONT_INFORMATION16')
14840       --
14841       ,P_CONT_INFORMATION17  =>
14842          hr_transaction_api.get_VARCHAR2_value
14843            (p_transaction_step_id => p_transaction_step_id
14844            ,p_name                => 'P_CONT_INFORMATION17')
14845       --
14846       ,P_CONT_INFORMATION18  =>
14847          hr_transaction_api.get_VARCHAR2_value
14848            (p_transaction_step_id => p_transaction_step_id
14849            ,p_name                => 'P_CONT_INFORMATION18')
14850       --
14851       ,P_CONT_INFORMATION19  =>
14852          hr_transaction_api.get_VARCHAR2_value
14853            (p_transaction_step_id => p_transaction_step_id
14854            ,p_name                => 'P_CONT_INFORMATION19')
14855       --
14856       ,P_CONT_INFORMATION20  =>
14857          hr_transaction_api.get_VARCHAR2_value
14858            (p_transaction_step_id => p_transaction_step_id
14859            ,p_name                => 'P_CONT_INFORMATION20')
14860          );
14861          --
14862     end if;
14863     --
14864   END IF;
14865 
14866   --
14867   IF p_validate THEN
14868      hr_utility.set_location('Rollback hr_process_contact_ss.process_api', 100);
14869      ROLLBACK TO update_cont_relationship;
14870   END IF;
14871   --
14872   -- bug# 2080032
14873   end if; -- l_process_section = 'DELETE_CONTACTS'
14874 
14875   hr_utility.set_location('Leaving hr_process_contact_ss.process_api', 100);
14876   --
14877 EXCEPTION
14878   WHEN hr_utility.hr_error THEN
14879   hr_utility.set_location('Exception:  WHEN hr_utility.hr_error THEN'||l_proc,555);
14880     -- -----------------------------------------------------------------
14881     -- An application error has been raised by the API so we must set
14882     -- the error.
14883     -- -----------------------------------------------------------------
14884     ROLLBACK TO update_cont_relationship;
14885     RAISE;
14886     --
14887 END process_api;
14888 --
14889  --
14890 -- bug 5652542
14891 -- In same transaction if we update both the contact and his address details and also change the relationship start date to a lower value
14892 -- per_people12_pkg updates the contact's person and address data. This changes the ovn and hence error. Contact's person data was
14893 -- taken care by calling person api before contact api. But address issue is fixed with below code. This checks for the conditions when address
14894 -- could have been updated and sets the global variable. Address api checks for this variable and increases the ovn by 1 if it is true.
14895 
14896 procedure is_address_updated
14897   (P_CONTACT_RELATIONSHIP_ID in number
14898             ,P_DATE_START  in date
14899             ,p_transaction_step_id IN NUMBER
14900             ,p_contact_person_id in number
14901             ,p_person_id in number) is
14902   l_date_start   date := hr_api.g_date;
14903   l_pds_date_start date;
14904   l_cont_start_date date;
14905   l_proc   varchar2(72)  := g_package||'will_address_be_changed';
14906   l_cov_date_start date;
14907   l_dummy varchar2(10);
14908   cursor csr_address(c_person_id number, c_date_from date) is
14909     select 'Y'
14910     from per_addresses
14911     where person_id = c_person_id
14912     and date_from = c_date_from
14913     and primary_flag='Y';
14914 
14915   cursor csr_contact_api(c_transaction_step_id number) is
14916     select 'Y' from hr_api_transaction_steps where transaction_id =
14917     (select transaction_id from hr_api_transaction_steps where transaction_step_id =
14918     c_transaction_step_id) and api_name='HR_PROCESS_ADDRESS_SS.PROCESS_API';
14919 
14920 begin
14921   hr_utility.set_location('Entering:'||l_proc, 5);
14922   open csr_contact_api(p_transaction_step_id);
14923   fetch csr_contact_api into l_dummy;
14924   if csr_contact_api%found then
14925     if p_contact_relationship_id is not null then
14926       select date_start into l_date_start from per_contact_relationships where
14927       contact_relationship_id = p_contact_relationship_id;
14928     end if;
14929     if (p_date_start < l_date_start or l_date_start = hr_api.g_date) then
14930       select max(date_start) into l_pds_date_start from per_periods_of_service
14931       where person_id = p_person_id;
14932         if l_pds_date_start > p_date_start then
14933           l_cov_date_start := l_pds_date_start;
14934         else
14935           l_cov_date_start := p_date_start;
14936         end if;
14937         select min(effective_start_date) into l_cont_start_date from per_all_people_f
14938         where person_id=p_contact_person_id;
14939         if (l_cov_date_start < l_cont_start_date) then
14940           open csr_address(p_contact_person_id,l_cont_start_date);
14941           fetch csr_address into l_dummy;
14942           if csr_address%found then
14943             hr_process_contact_ss.g_is_address_updated := true;
14944           end if;
14945           close csr_address;
14946         end if;
14947     end if;
14948   end if;
14949   close csr_contact_api;
14950   hr_utility.set_location('Leaving:'||l_proc, 20);
14951 
14952 end is_address_updated;
14953 
14954   /*
14955   ||===========================================================================
14956   || PROCEDURE: end_contact_relationship
14957   ||---------------------------------------------------------------------------
14958   ||
14959   || Description:
14960   || Description:
14961   ||     This procedure will call the actual API -
14962   ||                hr_contact_rel_api.update_contact_relationship()
14963   ||
14964   || Pre Conditions:
14965   ||
14966   || In Arguments:
14967   ||     Contains entire list of parameters that are defined in the actual
14968   ||     API. For details see peaddapi.pkb file.
14969   ||
14970   || out nocopy Arguments:
14971   ||
14972   || In out nocopy Arguments:
14973   ||
14974   || Post Success:
14975   ||     Executes the API call.
14976   ||
14977   || Post Failure:
14978   ||     Raises an exception
14979   ||
14980   || Access Status:
14981   ||     Public.
14982   ||
14983   ||===========================================================================
14984   */
14985 
14986 PROCEDURE end_contact_relationship
14987   (p_validate                      in        number  default 0
14988   ,p_effective_date                in        date
14989   ,p_contact_relationship_id       in        number
14990   ,p_contact_type                  in        varchar2  default hr_api.g_varchar2
14991   ,p_comments                      in        clob      default hr_api.g_varchar2	-- Bug#13362792
14992   ,p_primary_contact_flag          in        varchar2  default hr_api.g_varchar2
14993   ,p_third_party_pay_flag          in        varchar2  default hr_api.g_varchar2
14994   ,p_bondholder_flag               in        varchar2  default hr_api.g_varchar2
14995   ,p_date_start                    in        date      default hr_api.g_date
14996   ,p_start_life_reason_id          in        number    default hr_api.g_number
14997   ,p_date_end                      in        date      default hr_api.g_date
14998   ,p_end_life_reason_id            in        number    default hr_api.g_number
14999   ,p_rltd_per_rsds_w_dsgntr_flag   in        varchar2  default hr_api.g_varchar2
15000   ,p_personal_flag                 in        varchar2  default hr_api.g_varchar2
15001   ,p_sequence_number               in        number    default hr_api.g_number
15002   ,p_dependent_flag                in        varchar2  default hr_api.g_varchar2
15003   ,p_beneficiary_flag              in        varchar2  default hr_api.g_varchar2
15004   ,p_cont_attribute_category       in        varchar2  default hr_api.g_varchar2
15005   ,p_cont_attribute1               in        varchar2  default hr_api.g_varchar2
15006   ,p_cont_attribute2               in        varchar2  default hr_api.g_varchar2
15007   ,p_cont_attribute3               in        varchar2  default hr_api.g_varchar2
15008   ,p_cont_attribute4               in        varchar2  default hr_api.g_varchar2
15009   ,p_cont_attribute5               in        varchar2  default hr_api.g_varchar2
15010   ,p_cont_attribute6               in        varchar2  default hr_api.g_varchar2
15011   ,p_cont_attribute7               in        varchar2  default hr_api.g_varchar2
15012   ,p_cont_attribute8               in        varchar2  default hr_api.g_varchar2
15013   ,p_cont_attribute9               in        varchar2  default hr_api.g_varchar2
15014   ,p_cont_attribute10              in        varchar2  default hr_api.g_varchar2
15015   ,p_cont_attribute11              in        varchar2  default hr_api.g_varchar2
15016   ,p_cont_attribute12              in        varchar2  default hr_api.g_varchar2
15017   ,p_cont_attribute13              in        varchar2  default hr_api.g_varchar2
15018   ,p_cont_attribute14              in        varchar2  default hr_api.g_varchar2
15019   ,p_cont_attribute15              in        varchar2  default hr_api.g_varchar2
15020   ,p_cont_attribute16              in        varchar2  default hr_api.g_varchar2
15021   ,p_cont_attribute17              in        varchar2  default hr_api.g_varchar2
15022   ,p_cont_attribute18              in        varchar2  default hr_api.g_varchar2
15023   ,p_cont_attribute19              in        varchar2  default hr_api.g_varchar2
15024   ,p_cont_attribute20              in        varchar2  default hr_api.g_varchar2
15025   ,p_person_id                     in        number
15026   ,p_object_version_number         in out nocopy    number
15027   ,p_item_type                     in        varchar2
15028   ,p_item_key                      in        varchar2
15029   ,p_activity_id                   in        number
15030   ,p_action                        in        varchar2
15031   ,p_process_section_name          in        varchar2
15032   ,p_review_page_region_code       in        varchar2 default hr_api.g_varchar2
15033   ,p_save_mode                     in        varchar2  default null
15034  -- SFL needs it bug #2082333
15035   ,p_login_person_id               in        number
15036   ,p_contact_person_id             in        number
15037   -- Bug 2723267
15038   ,p_contact_operation             in        varchar2
15039   -- Bug 3152505
15040   ,p_end_other_rel                 in        varchar2
15041   ,p_other_rel_id                  in        number
15042  ) IS
15043   --
15044 
15045    cursor get_other_rel_ovn(p_contact_relationship_id  number)
15046    is
15047 	select object_version_number
15048 	from per_contact_relationships
15049 	where contact_relationship_id = p_contact_relationship_id
15050 	and trunc(sysdate) between nvl(date_start, trunc(sysdate))
15051 	and nvl(date_end, trunc(sysdate));
15052 
15053   l_transaction_table            hr_transaction_ss.transaction_table;
15054   l_transaction_step_id          hr_api_transaction_steps.transaction_step_id%type;
15055   l_trs_object_version_number    hr_api_transaction_steps.object_version_number%type;
15056   l_old_ovn                      number;
15057   l_old_contact_relationship_id  number;
15058   l_count                        INTEGER := 0;
15059   l_transaction_id             number default null;
15060   l_trans_obj_vers_num         number default null;
15061   l_result                     varchar2(100) default null;
15062   l_end_life_reason            varchar2(100) default null;
15063 
15064   l_other_rel_object_ver_no    number;
15065   l_proc   varchar2(72)  := g_package||'end_contact_relationship';
15066   --
15067  BEGIN
15068   --
15069 
15070 
15071   hr_utility.set_location('Entering:'||l_proc, 5);
15072   --
15073   l_old_ovn := p_object_version_number;
15074   l_old_contact_relationship_id := p_contact_relationship_id;
15075   if(p_contact_operation = 'EMRG_OVRW_DEL' and p_other_rel_id is not null and p_other_rel_id <> -1 ) then
15076      l_old_contact_relationship_id := p_other_rel_id;
15077   end if;
15078 
15079   --
15080   -- Call the actual API.
15081   --
15082   hr_utility.set_location('Calling hr_contact_rel_api.update_contact_relationship', 10);
15083   --
15084   if nvl(p_save_mode, 'NVL') <> 'SAVE_FOR_LATER' then
15085      --
15086      hr_contact_rel_api.update_contact_relationship(
15087         p_validate                          =>  hr_java_conv_util_ss.get_boolean (
15088                                                     p_number => p_validate)
15089        ,p_effective_date                    => p_effective_date
15090        ,p_contact_relationship_id           => p_contact_relationship_id
15091        ,p_contact_type                      => p_contact_type
15092        ,p_comments                          => p_comments
15093        ,p_primary_contact_flag              => p_primary_contact_flag
15094        ,p_third_party_pay_flag              => p_third_party_pay_flag
15095        ,p_bondholder_flag                   => p_bondholder_flag
15096        ,p_date_start                        => p_date_start
15097        ,p_start_life_reason_id              => p_start_life_reason_id
15098        ,p_date_end                          => p_date_end
15099        ,p_end_life_reason_id                => p_end_life_reason_id
15100        ,p_rltd_per_rsds_w_dsgntr_flag       => p_rltd_per_rsds_w_dsgntr_flag
15101        ,p_personal_flag                     => p_personal_flag
15102        ,p_sequence_number                   => p_sequence_number
15103        ,p_dependent_flag                    => p_dependent_flag
15104        ,p_beneficiary_flag                  => p_beneficiary_flag
15105        ,p_cont_attribute_category           => p_cont_attribute_category
15106        ,p_cont_attribute1                   => p_cont_attribute1
15107        ,p_cont_attribute2                   => p_cont_attribute2
15108        ,p_cont_attribute3                   => p_cont_attribute3
15109        ,p_cont_attribute4                   => p_cont_attribute4
15110        ,p_cont_attribute5                   => p_cont_attribute5
15111        ,p_cont_attribute6                   => p_cont_attribute6
15112        ,p_cont_attribute7                   => p_cont_attribute7
15113        ,p_cont_attribute8                   => p_cont_attribute8
15114        ,p_cont_attribute9                   => p_cont_attribute9
15115        ,p_cont_attribute10                  => p_cont_attribute10
15116        ,p_cont_attribute11                  => p_cont_attribute11
15117        ,p_cont_attribute12                  => p_cont_attribute12
15118        ,p_cont_attribute13                  => p_cont_attribute13
15119        ,p_cont_attribute14                  => p_cont_attribute14
15120        ,p_cont_attribute15                  => p_cont_attribute15
15121        ,p_cont_attribute16                  => p_cont_attribute16
15122        ,p_cont_attribute17                  => p_cont_attribute17
15123        ,p_cont_attribute18                  => p_cont_attribute18
15124        ,p_cont_attribute19                  => p_cont_attribute19
15125        ,p_cont_attribute20                  => p_cont_attribute20
15126        ,p_object_version_number             => p_object_version_number
15127      );
15128 
15129      if p_end_other_rel = 'Y' then
15130       hr_utility.set_location('Fecthing l_other_rel_object_ver_no:'||l_proc, 15);
15131       open get_other_rel_ovn(p_other_rel_id);
15132       fetch get_other_rel_ovn into l_other_rel_object_ver_no;
15133       if get_other_rel_ovn%notfound then
15134          l_other_rel_object_ver_no := 1;
15135       end if;
15136       close get_other_rel_ovn;
15137 
15138       hr_contact_rel_api.update_contact_relationship(
15139         p_validate                          =>  hr_java_conv_util_ss.get_boolean (
15140                                                     p_number => p_validate)
15141        ,p_effective_date                    => p_effective_date
15142 -- Bug 3152505 : Passing the other contact relationship id
15143        ,p_contact_relationship_id           => p_other_rel_id
15144        ,p_contact_type                      => p_contact_type
15145        ,p_comments                          => p_comments
15146        ,p_primary_contact_flag              => p_primary_contact_flag
15147        ,p_third_party_pay_flag              => p_third_party_pay_flag
15148        ,p_bondholder_flag                   => p_bondholder_flag
15149        ,p_date_start                        => p_date_start
15150        ,p_start_life_reason_id              => p_start_life_reason_id
15151        ,p_date_end                          => p_date_end
15152        ,p_end_life_reason_id                => p_end_life_reason_id
15153        ,p_rltd_per_rsds_w_dsgntr_flag       => p_rltd_per_rsds_w_dsgntr_flag
15154        ,p_personal_flag                     => p_personal_flag
15155        ,p_sequence_number                   => p_sequence_number
15156        ,p_dependent_flag                    => p_dependent_flag
15157        ,p_beneficiary_flag                  => p_beneficiary_flag
15158        ,p_cont_attribute_category           => p_cont_attribute_category
15159        ,p_cont_attribute1                   => p_cont_attribute1
15160        ,p_cont_attribute2                   => p_cont_attribute2
15161        ,p_cont_attribute3                   => p_cont_attribute3
15162        ,p_cont_attribute4                   => p_cont_attribute4
15163        ,p_cont_attribute5                   => p_cont_attribute5
15164        ,p_cont_attribute6                   => p_cont_attribute6
15165        ,p_cont_attribute7                   => p_cont_attribute7
15166        ,p_cont_attribute8                   => p_cont_attribute8
15167        ,p_cont_attribute9                   => p_cont_attribute9
15168        ,p_cont_attribute10                  => p_cont_attribute10
15169        ,p_cont_attribute11                  => p_cont_attribute11
15170        ,p_cont_attribute12                  => p_cont_attribute12
15171        ,p_cont_attribute13                  => p_cont_attribute13
15172        ,p_cont_attribute14                  => p_cont_attribute14
15173        ,p_cont_attribute15                  => p_cont_attribute15
15174        ,p_cont_attribute16                  => p_cont_attribute16
15175        ,p_cont_attribute17                  => p_cont_attribute17
15176        ,p_cont_attribute18                  => p_cont_attribute18
15177        ,p_cont_attribute19                  => p_cont_attribute19
15178        ,p_cont_attribute20                  => p_cont_attribute20
15179        ,p_object_version_number             => l_other_rel_object_ver_no
15180      );
15181     end if;
15182      --
15183   end if;
15184   --
15185   -- --------------------------------------------------------------------------
15186   -- We will write the data to transaction tables.
15187   -- Determine if a transaction step exists for this activity
15188   -- if a transaction step does exist then the transaction_step_id and
15189   -- object_version_number are set (i.e. not null).
15190   -- --------------------------------------------------------------------------
15191   hr_utility.set_location('Call :get_transaction_step_info'||l_proc, 20);
15192   hr_transaction_api.get_transaction_step_info
15193                 (p_item_type             => p_item_type
15194                 ,p_item_key              => p_item_key
15195                 ,p_activity_id           => p_activity_id
15196                 ,p_transaction_step_id   => l_transaction_step_id
15197                 ,p_object_version_number => l_trs_object_version_number);
15198   --
15199   hr_utility.set_location('l_transaction_step_id = ' || to_char(l_transaction_step_id), 25);
15200   --
15201   l_count := l_count + 1;
15202   l_transaction_table(l_count).param_name := 'P_EFFECTIVE_DATE';
15203   l_transaction_table(l_count).param_value := to_char(P_EFFECTIVE_DATE,
15204                                               hr_transaction_ss.g_date_format);
15205   l_transaction_table(l_count).param_data_type := 'DATE';
15206   --
15207   l_count:=l_count+1;
15208   l_transaction_table(l_count).param_name      := 'P_SAVE_MODE';
15209   l_transaction_table(l_count).param_value     :=  p_save_mode;
15210   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15211   -- SFL changes bug #2082333
15212   --
15213   l_count := l_count + 1;
15214   l_transaction_table(l_count).param_name := 'P_PERSON_ID';
15215   l_transaction_table(l_count).param_value := p_person_id;
15216   l_transaction_table(l_count).param_data_type := 'NUMBER';
15217   --
15218   l_count := l_count + 1;
15219   l_transaction_table(l_count).param_name := 'P_LOGIN_PERSON_ID';
15220   l_transaction_table(l_count).param_value := p_login_person_id;
15221   l_transaction_table(l_count).param_data_type := 'NUMBER';
15222   --
15223   l_count := l_count + 1;
15224   l_transaction_table(l_count).param_name := 'P_CONTACT_PERSON_ID';
15225   l_transaction_table(l_count).param_value := p_contact_person_id;
15226   l_transaction_table(l_count).param_data_type := 'NUMBER';
15227   --
15228   l_count := l_count + 1;
15229   l_transaction_table(l_count).param_name :='P_ITEM_TYPE';
15230   l_transaction_table(l_count).param_value := p_item_type;
15231   l_transaction_table(l_count).param_data_type := upper('varchar2');
15232   --
15233   --
15234   l_count := l_count + 1;
15235   l_transaction_table(l_count).param_name :='P_ITEM_KEY';
15236   l_transaction_table(l_count).param_value := p_item_key;
15237   l_transaction_table(l_count).param_data_type := upper('varchar2');
15238 -- End SFL changes bug #2082333
15239   --
15240   l_count := l_count + 1;
15241   l_transaction_table(l_count).param_name := 'P_OLD_OBJECT_VERSION_NUMBER';
15242   l_transaction_table(l_count).param_value := l_old_ovn;
15243   l_transaction_table(l_count).param_data_type := 'NUMBER';
15244   --
15245   l_count := l_count + 1;
15246   l_transaction_table(l_count).param_name := 'P_CONTACT_RELATIONSHIP_ID';
15247   l_transaction_table(l_count).param_value := P_CONTACT_RELATIONSHIP_ID;
15248   l_transaction_table(l_count).param_data_type := 'NUMBER';
15249   --
15250   -- 9999 What does this do
15251   --
15252   l_count := l_count + 1;
15253   l_transaction_table(l_count).param_name := 'P_OLD_CONTACT_RELATIONSHIP_ID';
15254   l_transaction_table(l_count).param_value := l_OLD_CONTACT_RELATIONSHIP_ID;
15255   l_transaction_table(l_count).param_data_type := 'NUMBER';
15256   --
15257   l_count := l_count + 1;
15258   l_transaction_table(l_count).param_name := 'P_CONTACT_TYPE';
15259   l_transaction_table(l_count).param_value := P_CONTACT_TYPE;
15260   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15261   --
15262   l_count := l_count + 1;
15263   l_transaction_table(l_count).param_name := 'P_COMMENTS';
15264   l_transaction_table(l_count).param_value := P_COMMENTS;
15265   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15266   --
15267   l_count := l_count + 1;
15268   l_transaction_table(l_count).param_name := 'P_PRIMARY_CONTACT_FLAG';
15269   l_transaction_table(l_count).param_value := P_PRIMARY_CONTACT_FLAG;
15270   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15271   --
15272   l_count := l_count + 1;
15273   l_transaction_table(l_count).param_name := 'P_THIRD_PARTY_PAY_FLAG';
15274   l_transaction_table(l_count).param_value := P_THIRD_PARTY_PAY_FLAG;
15275   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15276   --
15277   l_count := l_count + 1;
15278   l_transaction_table(l_count).param_name := 'P_BONDHOLDER_FLAG';
15279   l_transaction_table(l_count).param_value := P_BONDHOLDER_FLAG;
15280   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15281   --
15282   l_count := l_count + 1;
15283   l_transaction_table(l_count).param_name := 'P_DATE_START';
15284   l_transaction_table(l_count).param_value := to_char(P_DATE_START,
15285                                               hr_transaction_ss.g_date_format);
15286   l_transaction_table(l_count).param_data_type := 'DATE';
15287   --
15288   l_count := l_count + 1;
15289   l_transaction_table(l_count).param_name := 'P_START_LIFE_REASON_ID';
15290   l_transaction_table(l_count).param_value := P_START_LIFE_REASON_ID;
15291   l_transaction_table(l_count).param_data_type := 'NUMBER';
15292   --
15293   hr_utility.set_location('P_DATE_END = ' || to_char(P_DATE_END), 30);
15294   l_count := l_count + 1;
15295   l_transaction_table(l_count).param_name := 'P_DATE_END';
15296   l_transaction_table(l_count).param_value := to_char(P_DATE_END,
15297                                               hr_transaction_ss.g_date_format);
15298   l_transaction_table(l_count).param_data_type := 'DATE';
15299   --
15300   l_count := l_count + 1;
15301   l_transaction_table(l_count).param_name := 'P_END_LIFE_REASON_ID';
15302   l_transaction_table(l_count).param_value := P_END_LIFE_REASON_ID;
15303   l_transaction_table(l_count).param_data_type := 'NUMBER';
15304  --
15305  -- bug # 2080032
15306   if P_END_LIFE_REASON_ID IS NOT NULL THEN
15307 
15308     select   max(BLF.NAME) End_Relation_Reason
15309     into l_end_life_reason
15310     from BEN_LER_F BLF
15311     where BLF.LER_ID = P_END_LIFE_REASON_ID;
15312 
15313    end if;
15314 
15315   l_count := l_count + 1;
15316   l_transaction_table(l_count).param_name := 'P_END_LIFE_REASON';
15317   l_transaction_table(l_count).param_value := l_end_life_reason;
15318   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15319   --
15320   l_count := l_count + 1;
15321   l_transaction_table(l_count).param_name := 'P_RLTD_PER_RSDS_W_DSGNTR_FLAG';
15322   l_transaction_table(l_count).param_value := P_RLTD_PER_RSDS_W_DSGNTR_FLAG;
15323   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15324   --
15325   l_count := l_count + 1;
15326   l_transaction_table(l_count).param_name := 'P_PERSONAL_FLAG';
15327   l_transaction_table(l_count).param_value := P_PERSONAL_FLAG;
15328   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15329   --
15330   l_count := l_count + 1;
15331   l_transaction_table(l_count).param_name := 'P_SEQUENCE_NUMBER';
15332   l_transaction_table(l_count).param_value := P_SEQUENCE_NUMBER;
15333   l_transaction_table(l_count).param_data_type := 'NUMBER';
15334   --
15335   l_count := l_count + 1;
15336   l_transaction_table(l_count).param_name := 'P_DEPENDENT_FLAG';
15337   l_transaction_table(l_count).param_value := P_DEPENDENT_FLAG;
15338   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15339   --
15340   l_count := l_count + 1;
15341   l_transaction_table(l_count).param_name := 'P_BENEFICIARY_FLAG';
15342   l_transaction_table(l_count).param_value := P_BENEFICIARY_FLAG;
15343   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15344   --
15345   l_count := l_count + 1;
15346   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE_CATEGORY';
15347   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE_CATEGORY;
15348   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15349   --
15350   l_count := l_count + 1;
15351   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE1';
15352   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE1;
15353   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15354   --
15355   l_count := l_count + 1;
15356   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE2';
15357   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE2;
15358   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15359   --
15360   l_count := l_count + 1;
15361   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE3';
15362   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE3;
15363   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15364   --
15365   l_count := l_count + 1;
15366   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE4';
15367   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE4;
15368   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15369   --
15370   l_count := l_count + 1;
15371   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE5';
15372   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE5;
15373   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15374   --
15375   l_count := l_count + 1;
15376   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE6';
15377   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE6;
15378   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15379   --
15380   l_count := l_count + 1;
15381   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE7';
15382   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE7;
15383   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15384   --
15385   l_count := l_count + 1;
15386   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE8';
15387   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE8;
15388   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15389   --
15390   l_count := l_count + 1;
15391   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE9';
15392   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE9;
15393   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15394   --
15395   l_count := l_count + 1;
15396   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE10';
15397   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE10;
15398   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15399   --
15400   l_count := l_count + 1;
15401   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE11';
15402   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE11;
15403   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15404   --
15405   l_count := l_count + 1;
15406   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE12';
15407   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE12;
15408   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15409   --
15410   l_count := l_count + 1;
15411   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE13';
15412   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE13;
15413   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15414   --
15415   l_count := l_count + 1;
15416   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE14';
15417   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE14;
15418   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15419   --
15420   l_count := l_count + 1;
15421   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE15';
15422   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE15;
15423   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15424   --
15425   l_count := l_count + 1;
15426   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE16';
15427   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE16;
15428   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15429   --
15430   l_count := l_count + 1;
15431   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE17';
15432   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE17;
15433   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15434   --
15435   l_count := l_count + 1;
15436   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE18';
15437   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE18;
15438   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15439   --
15440 
15441   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE19';
15442   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE19;
15443   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15444   --
15445   l_count := l_count + 1;
15446   l_transaction_table(l_count).param_name := 'P_CONT_ATTRIBUTE20';
15447   l_transaction_table(l_count).param_value := P_CONT_ATTRIBUTE20;
15448   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15449   --
15450   l_count := l_count + 1;
15451   l_transaction_table(l_count).param_name := 'P_OBJECT_VERSION_NUMBER';
15452   l_transaction_table(l_count).param_value := P_OBJECT_VERSION_NUMBER;
15453   l_transaction_table(l_count).param_data_type := 'NUMBER';
15454   --
15455   l_count := l_count + 1;
15456   l_transaction_table(l_count).param_name := 'P_REVIEW_PROC_CALL';
15457   l_transaction_table(l_count).param_value := p_review_page_region_code;
15458   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15459   --
15460   l_count := l_count + 1;
15461   l_transaction_table(l_count).param_name := 'P_REVIEW_ACTID';
15462   l_transaction_table(l_count).param_value := p_activity_id;
15463   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15464   --
15465   l_count := l_count + 1;
15466   l_transaction_table(l_count).param_name := 'P_PROCESS_SECTION_NAME';
15467   l_transaction_table(l_count).param_value := p_process_section_name;
15468   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15469   --
15470 
15471  -- Bug 2723267 Fix Start
15472     l_count := l_count + 1;
15473     l_transaction_table(l_count).param_name := 'P_CONTACT_OPERATION';
15474     l_transaction_table(l_count).param_value := p_contact_operation;
15475     l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15476  -- Bug 2723267 Fix End
15477 
15478 -- Bug 3152505 : adding 3 new params.
15479 
15480   l_count := l_count + 1;
15481   l_transaction_table(l_count).param_name := 'P_OTHER_REL_ID';
15482   l_transaction_table(l_count).param_value := p_other_rel_id;
15483   l_transaction_table(l_count).param_data_type := 'NUMBER';
15484 
15485   l_count := l_count + 1;
15486   l_transaction_table(l_count).param_name := 'P_END_OTHER_REL';
15487   l_transaction_table(l_count).param_value := p_end_other_rel;
15488   l_transaction_table(l_count).param_data_type := 'VARCHAR2';
15489 
15490   l_count := l_count + 1;
15491   l_transaction_table(l_count).param_name := 'P_OTHER_REL_OBJ_VER_NO';
15492   l_transaction_table(l_count).param_value := l_other_rel_object_ver_no;
15493   l_transaction_table(l_count).param_data_type := 'NUMBER';
15494 
15495   hr_utility.set_location('Before Calling :hr_transaction_ss.save_transaction_step', 30);
15496   hr_utility.set_location('Before Calling :hr_transaction_ss.save_transaction_step ' || to_char(l_transaction_table.count), 35);
15497   --
15498   hr_transaction_ss.save_transaction_step
15499                 (p_item_type => p_item_type
15500                 ,p_item_key => p_item_key
15501                 ,p_login_person_id => nvl(p_login_person_id,p_person_id)
15502                 ,p_actid => p_activity_id
15503                 ,p_transaction_step_id => l_transaction_step_id
15504                 ,p_api_addtnl_info => p_contact_operation
15505                 -- ,p_api_name => g_package || '.PROCESS_END_API'
15506                 -- Change for contacts approvals.
15507                 ,p_api_name => g_package || '.PROCESS_API'
15508                 ,p_transaction_data => l_transaction_table);
15509   --
15510   hr_utility.set_location('Leaving hr_contact_rel_api.update_contact_relationship', 40);
15511   --
15512   EXCEPTION
15513     WHEN hr_utility.hr_error THEN
15514     hr_utility.set_location('Exception:hr_utility.hr_error THEN'||l_proc,555);
15515          -- -------------------------------------------
15516          -- an application error has been raised so we must
15517          -- redisplay the web form to display the error
15518          -- --------------------------------------------
15519          hr_message.provide_error;
15520          l_message_number := hr_message.Last_message_number;
15521          --
15522          -- 99999 What error messages I have to trap here.
15523          --
15524          IF l_message_number = 'APP-7165' OR
15525             l_message_number = 'APP-7155' THEN
15526             hr_utility.set_message(800, 'HR_UPDATE_NOT_ALLOWED');
15527             hr_utility.raise_error;
15528          ELSE
15529             hr_utility.raise_error;
15530          END IF;
15531     WHEN OTHERS THEN
15532         hr_utility.set_location('Exception:Others'||l_proc,555);
15533       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
15534       hr_utility.raise_error;
15535 --      RAISE;  -- Raise error here relevant to the new tech stack.
15536   --
15537  end end_contact_relationship;
15538  --
15539  --
15540  -- ---------------------------------------------------------------------------
15541  -- ----------------------------- < process_end_api > -----------------------------
15542  -- ---------------------------------------------------------------------------
15543  -- Purpose: This procedure will be invoked in workflow notification
15544  --          when an approver approves all the changes.  This procedure
15545  --          will call the api to update to the database with p_validate
15546  --          equal to false.
15547  -- ---------------------------------------------------------------------------
15548  PROCEDURE process_end_api
15549           (p_validate IN BOOLEAN DEFAULT FALSE
15550           ,p_transaction_step_id IN NUMBER
15551           ,p_effective_date      in varchar2 default null
15552 )
15553  IS
15554   --
15555   l_effective_start_date             date default null;
15556   l_effective_end_date               date default null;
15557   l_ovn                              number default null;
15558   l_contact_relationship_id          number default null;
15559   l_effective_date                   date;
15560 
15561   l_del_other_rel                    varchar2(5);
15562   --
15563   l_other_rel_ovn                    number default null;
15564   l_proc   varchar2(72)  := g_package||'process_end_api';
15565 
15566  BEGIN
15567   --
15568   hr_utility.set_location('Entering:'||l_proc, 5);
15569 
15570   SAVEPOINT end_cont_relationship;
15571   --
15572   -- SFL changes
15573   --
15574   if (p_effective_date is not null) then
15575   hr_utility.set_location('Eff date is not Null:'||l_proc, 10);
15576     l_effective_date := to_date(p_effective_date,g_date_format);
15577   else
15578        --
15579          hr_utility.set_location('Eff date is  Null:'||l_proc, 15);
15580        l_effective_date:= to_date(
15581          hr_transaction_ss.get_wf_effective_date
15582         (p_transaction_step_id => p_transaction_step_id),g_date_format);
15583        --
15584   end if;
15585   -- For normal commit the effective date should come from txn tbales.
15586   --
15587   if not p_validate then
15588      --
15589        hr_utility.set_location(' not p_validate:'||l_proc, 20);
15590      l_effective_date := hr_transaction_api.get_DATE_value
15591            (p_transaction_step_id => p_transaction_step_id
15592            ,p_name                => 'P_EFFECTIVE_DATE');
15593      --
15594   end if;
15595   --
15596   -- Get the contact_relationship_id  first.  If it is null, that means
15597   -- this is error and raise the error. -- add the error name 99999.
15598   --
15599   l_contact_relationship_id := hr_transaction_api.get_number_value
15600                                 (p_transaction_step_id => p_transaction_step_id
15601                                 ,p_name => 'P_CONTACT_RELATIONSHIP_ID');
15602   --
15603   l_ovn := hr_transaction_api.get_number_value
15604              (p_transaction_step_id => p_transaction_step_id
15605              ,p_name => 'P_OBJECT_VERSION_NUMBER');
15606   --
15607   l_other_rel_ovn := hr_transaction_api.get_NUMBER_value
15608            (p_transaction_step_id => p_transaction_step_id
15609            ,p_name                => 'P_OTHER_REL_OBJ_VER_NO') ;
15610   --
15611   IF l_contact_relationship_id IS NOT NULL
15612   THEN
15613     hr_utility.set_location('l_contact_relationship_id is not NULL:'||l_proc, 25);
15614     --
15615     hr_contact_rel_api.update_contact_relationship(
15616       p_validate                => p_validate
15617       --
15618       ,P_EFFECTIVE_DATE         =>l_effective_date
15619          /*
15620          hr_transaction_api.get_DATE_value
15621            (p_transaction_step_id => p_transaction_step_id
15622            ,p_name                => 'P_EFFECTIVE_DATE')
15623          */
15624       --
15625       ,p_object_version_number   => l_ovn
15626       --
15627       -- 9999 What value to pass on.
15628       /* ,p_attribute_update_mode   => hr_transaction_api.get_varchar2_value
15629                                 (p_transaction_step_id => p_transaction_step_id
15630                                 ,p_name => 'P_ATTRIBUTE_UPDATE_MODE')
15631       */
15632       --
15633       ,P_CONTACT_RELATIONSHIP_ID  =>
15634          hr_transaction_api.get_NUMBER_value
15635            (p_transaction_step_id => p_transaction_step_id
15636            ,p_name                => 'P_CONTACT_RELATIONSHIP_ID')
15637       --
15638      /*
15639       ,P_CONTACT_TYPE  =>
15640          hr_transaction_api.get_VARCHAR2_value
15641            (p_transaction_step_id => p_transaction_step_id
15642            ,p_name                => 'P_CONTACT_TYPE')
15643       --
15644       ,P_COMMENTS  =>
15645          hr_transaction_api.get_varchar2_value
15646            (p_transaction_step_id => p_transaction_step_id
15647            ,p_name                => 'P_COMMENTS')
15648       --
15649       ,P_PRIMARY_CONTACT_FLAG  =>
15650          hr_transaction_api.get_VARCHAR2_value
15651            (p_transaction_step_id => p_transaction_step_id
15652            ,p_name                => 'P_PRIMARY_CONTACT_FLAG')
15653       --
15654       ,P_THIRD_PARTY_PAY_FLAG  =>
15655          hr_transaction_api.get_VARCHAR2_value
15656            (p_transaction_step_id => p_transaction_step_id
15657            ,p_name                => 'P_THIRD_PARTY_PAY_FLAG')
15658       --
15659       ,p_bondholder_flag  =>
15660          hr_transaction_api.get_varchar2_value
15661            (p_transaction_step_id => p_transaction_step_id
15662            ,p_name                => 'p_bondholder_flag')
15663       --
15664       ,p_date_start  =>
15665          hr_transaction_api.get_date_value
15666            (p_transaction_step_id => p_transaction_step_id
15667            ,p_name                => 'p_date_start')
15668       --
15669       ,p_start_life_reason_id  =>
15670          hr_transaction_api.get_number_value
15671            (p_transaction_step_id => p_transaction_step_id
15672            ,p_name                => 'p_start_life_reason_id')
15673       --
15674       */
15675       ,p_date_end  =>
15676          hr_transaction_api.get_date_value
15677            (p_transaction_step_id => p_transaction_step_id
15678            ,p_name                => 'p_date_end')
15679       --
15680       --bug# 2080032
15681       ,p_end_life_reason_id  =>
15682          hr_transaction_api.get_number_value
15683            (p_transaction_step_id => p_transaction_step_id
15684            ,p_name                => 'p_end_life_reason_id')
15685       --
15686    /*
15687      ,p_rltd_per_rsds_w_dsgntr_flag  =>
15688          hr_transaction_api.get_varchar2_value
15689            (p_transaction_step_id => p_transaction_step_id
15690            ,p_name                => 'p_rltd_per_rsds_w_dsgntr_flag')
15691       --
15692       ,p_personal_flag  =>
15693          hr_transaction_api.get_varchar2_value
15694            (p_transaction_step_id => p_transaction_step_id
15695            ,p_name                => 'p_personal_flag')
15696       --
15697       ,p_sequence_number  =>
15698          hr_transaction_api.get_number_value
15699            (p_transaction_step_id => p_transaction_step_id
15700            ,p_name                => 'p_sequence_number')
15701       --
15702       ,p_dependent_flag  =>
15703          hr_transaction_api.get_varchar2_value
15704            (p_transaction_step_id => p_transaction_step_id
15705            ,p_name                => 'p_dependent_flag')
15706       --
15707       ,p_beneficiary_flag  =>
15708          hr_transaction_api.get_varchar2_value
15709            (p_transaction_step_id => p_transaction_step_id
15710            ,p_name                => 'p_beneficiary_flag')
15711       --
15712       ,p_cont_attribute_category  =>
15713          hr_transaction_api.get_varchar2_value
15714            (p_transaction_step_id => p_transaction_step_id
15715            ,p_name                => 'p_cont_attribute_category')
15716       --
15717       ,p_cont_attribute1  =>
15718          hr_transaction_api.get_varchar2_value
15719            (p_transaction_step_id => p_transaction_step_id
15720            ,p_name                => 'p_cont_attribute1')
15721       --
15722       ,p_cont_attribute2  =>
15723          hr_transaction_api.get_varchar2_value
15724            (p_transaction_step_id => p_transaction_step_id
15725            ,p_name                => 'p_cont_attribute2')
15726       --
15727       ,p_cont_attribute3  =>
15728          hr_transaction_api.get_varchar2_value
15729            (p_transaction_step_id => p_transaction_step_id
15730            ,p_name                => 'p_cont_attribute3')
15731       --
15732       ,p_cont_attribute4  =>
15733          hr_transaction_api.get_varchar2_value
15734            (p_transaction_step_id => p_transaction_step_id
15735            ,p_name                => 'p_cont_attribute4')
15736       --
15737       ,p_cont_attribute5  =>
15738          hr_transaction_api.get_varchar2_value
15739            (p_transaction_step_id => p_transaction_step_id
15740            ,p_name                => 'p_cont_attribute5')
15741       --
15742       ,p_cont_attribute6  =>
15743          hr_transaction_api.get_varchar2_value
15744            (p_transaction_step_id => p_transaction_step_id
15745            ,p_name                => 'p_cont_attribute6')
15746       --
15747       ,p_cont_attribute7  =>
15748          hr_transaction_api.get_varchar2_value
15749            (p_transaction_step_id => p_transaction_step_id
15750            ,p_name                => 'p_cont_attribute7')
15751       --
15752       ,p_cont_attribute8  =>
15753          hr_transaction_api.get_varchar2_value
15754            (p_transaction_step_id => p_transaction_step_id
15755            ,p_name                => 'p_cont_attribute8')
15756       --
15757       ,p_cont_attribute9  =>
15758          hr_transaction_api.get_varchar2_value
15759            (p_transaction_step_id => p_transaction_step_id
15760            ,p_name                => 'p_cont_attribute9')
15761       --
15762       ,p_cont_attribute10  =>
15763          hr_transaction_api.get_varchar2_value
15764            (p_transaction_step_id => p_transaction_step_id
15765            ,p_name                => 'p_cont_attribute10')
15766       --
15767       ,p_cont_attribute11  =>
15768          hr_transaction_api.get_varchar2_value
15769            (p_transaction_step_id => p_transaction_step_id
15770            ,p_name                => 'p_cont_attribute11')
15771       --
15772       ,p_cont_attribute12  =>
15773          hr_transaction_api.get_varchar2_value
15774            (p_transaction_step_id => p_transaction_step_id
15775            ,p_name                => 'p_cont_attribute12')
15776       --
15777       ,p_cont_attribute13  =>
15778          hr_transaction_api.get_varchar2_value
15779            (p_transaction_step_id => p_transaction_step_id
15780            ,p_name                => 'p_cont_attribute13')
15781       --
15782       ,p_cont_attribute14  =>
15783          hr_transaction_api.get_varchar2_value
15784            (p_transaction_step_id => p_transaction_step_id
15785            ,p_name                => 'p_cont_attribute14')
15786       --
15787       ,p_cont_attribute15  =>
15788          hr_transaction_api.get_varchar2_value
15789            (p_transaction_step_id => p_transaction_step_id
15790            ,p_name                => 'p_cont_attribute15')
15791       --
15792       ,p_cont_attribute16  =>
15793          hr_transaction_api.get_varchar2_value
15794            (p_transaction_step_id => p_transaction_step_id
15795            ,p_name                => 'p_cont_attribute16')
15796       --
15797       ,p_cont_attribute17  =>
15798          hr_transaction_api.get_varchar2_value
15799            (p_transaction_step_id => p_transaction_step_id
15800            ,p_name                => 'p_cont_attribute17')
15801       --
15802       ,p_cont_attribute18  =>
15803          hr_transaction_api.get_varchar2_value
15804            (p_transaction_step_id => p_transaction_step_id
15805            ,p_name                => 'p_cont_attribute18')
15806       --
15807       ,p_cont_attribute19  =>
15808          hr_transaction_api.get_varchar2_value
15809            (p_transaction_step_id => p_transaction_step_id
15810            ,p_name                => 'p_cont_attribute19')
15811       --
15812       ,p_cont_attribute20  =>
15813          hr_transaction_api.get_varchar2_value
15814            (p_transaction_step_id => p_transaction_step_id
15815            ,p_name                => 'p_cont_attribute20')
15816       --
15817       */
15818     );
15819 -- Bug 3152505 : calling the update_api for second time if user has checked the check bux for deleting
15820 -- the other relationship also.
15821     l_del_other_rel := hr_transaction_api.get_VARCHAR2_value
15822                              (p_transaction_step_id => p_transaction_step_id
15823                              ,p_name                => 'P_END_OTHER_REL');
15824 
15825     if  l_del_other_rel = 'Y' then
15826     hr_utility.set_location('if  l_del_other_rel Y:'||l_proc, 30);
15827     hr_contact_rel_api.update_contact_relationship(
15828        p_validate                => p_validate
15829       ,P_EFFECTIVE_DATE         =>l_effective_date
15830       ,p_object_version_number   => l_other_rel_ovn
15831       ,P_CONTACT_RELATIONSHIP_ID  =>
15832          hr_transaction_api.get_NUMBER_value
15833            (p_transaction_step_id => p_transaction_step_id
15834            ,p_name                => 'P_OTHER_REL_ID')
15835       ,p_date_end  =>
15836          hr_transaction_api.get_date_value
15837            (p_transaction_step_id => p_transaction_step_id
15838            ,p_name                => 'p_date_end')
15839       ,p_end_life_reason_id  =>
15840          hr_transaction_api.get_number_value
15841            (p_transaction_step_id => p_transaction_step_id
15842            ,p_name                => 'p_end_life_reason_id')
15843     );
15844     end if;
15845   ELSE
15846      -- Error message goes here as the contact_relationshipid is null. 9999
15847      null;
15848   END IF;
15849   --
15850   IF p_validate = true THEN
15851          hr_utility.set_location('p_validate = true'||l_proc, 35);
15852      ROLLBACK TO end_cont_relationship;
15853   END IF;
15854   hr_utility.set_location('Exiting:'||l_proc, 40);
15855   --
15856  EXCEPTION
15857   WHEN hr_utility.hr_error THEN
15858   hr_utility.set_location('Exception:hr_utility.hr_error'||l_proc,555);
15859     -- -----------------------------------------------------------------
15860     -- An application error has been raised by the API so we must set
15861     -- the error.
15862     -- -----------------------------------------------------------------
15863     ROLLBACK TO end_cont_relationship;
15864     RAISE;
15865     --
15866  END process_end_api;
15867  --
15868  -- ----------------------------------------------------------------------------
15869  -- |-------------------------< is_contact_added>------------------------|
15870  -- ----------------------------------------------------------------------------
15871  -- Purpose: This procedure will be called from contacts subprocess, which will  -- determine if the control sholud go to the contacts page again or to the
15872  -- conatcs decision page.
15873  -- Case1 : If no contacts were added in this session Then Goto Decision page
15874  --         ( may be from contacts - back button )
15875  -- Case2 : If there are some contacts added,Then Goto Contacts page to show
15876  --         last contact added
15877  --         (coming from back button)
15878  PROCEDURE is_contact_added
15879  (itemtype in     varchar2
15880   ,itemkey  in     varchar2
15881   ,actid    in     number
15882   ,funcmode in     varchar2
15883   ,resultout   out nocopy varchar2)
15884  is
15885    l_contact_set            wf_activity_attr_values.number_value%type;
15886    l_proc   varchar2(72)  := g_package||'is_contact_added';
15887  begin
15888  --
15889   hr_utility.set_location('Entering:'||l_proc, 5);
15890   l_contact_set := wf_engine.GetItemAttrNumber(itemtype => itemtype,
15891                                           itemkey  => itemkey,
15892                                           aname    => 'HR_CONTACT_SET');
15893 
15894      if    l_contact_set > 0  then
15895         hr_utility.set_location('l_contact_set > 0:'||l_proc, 10);
15896         -- Goto Contacts page
15897         resultout := 'COMPLETE:'|| 'Y';
15898      else
15899         -- Goto Decision page
15900         hr_utility.set_location('l_contact_set <= 0:'||l_proc, 15);
15901         resultout := 'COMPLETE:'|| 'N';
15902      end if;
15903   hr_utility.set_location('Exiting:'||l_proc, 20);
15904  EXCEPTION
15905   WHEN OTHERS THEN
15906     hr_utility.set_location('Exception:OTHERS'||l_proc,555);
15907     WF_CORE.CONTEXT(g_package
15908                    ,'is_contact_added'
15909                    ,itemtype
15910                    ,itemkey
15911                    ,to_char(actid)
15912                    ,funcmode);
15913     RAISE;
15914  end is_contact_added;
15915  --
15916 -- -------------------------------------------------------------------------
15917 --   Delete_transaction_steps is used by contacts. This will delete the
15918 --   Transaction steps from the pages from which the user went  back to the
15919 --   current contact page using the contact set.
15920 -- -------------------------------------------------------------------------
15921 PROCEDURE delete_transaction_steps(
15922   p_item_type IN     varchar2,
15923   p_item_key  IN     varchar2,
15924   p_actid     IN     varchar2,
15925   p_login_person_id  IN varchar2) IS
15926 
15927   l_trans_step_ids      hr_util_web.g_varchar2_tab_type;
15928   l_trans_obj_vers_num  hr_util_web.g_varchar2_tab_type;
15929   l_trans_step_rows     NUMBER;
15930   l_contact_set         varchar2(5) := null;
15931   l_wf_contact_set      NUMBER := null;
15932   l_proc   varchar2(72)  := g_package||'delete_transaction_steps';
15933 
15934 BEGIN
15935 
15936   hr_utility.set_location('Entering:'||l_proc, 5);
15937   hr_transaction_api.get_transaction_step_info (
15938     p_Item_Type             => p_item_type,
15939     p_Item_Key              => p_item_key,
15940     p_activity_id           => to_number(p_actid),
15941     p_transaction_step_id   => l_trans_step_ids,
15942     p_object_version_number => l_trans_obj_vers_num,
15943     p_rows                  => l_trans_step_rows
15944   );
15945 
15946 
15947  -- Get the contact set from java and compare with the contact set id in each step.
15948  -- if the step doesnot match, ignore the step and go to next step.
15949 
15950 
15951 --
15952 --  This is a marker for the contact person to be used to identify the
15953 --  transactiion steps to be retrieved for the contact person in context.
15954 --  The HR_LAST_CONTACT_SET is in from the work flow attribute
15955   BEGIN
15956       l_wf_contact_set := wf_engine.GetItemAttrNumber(itemtype => p_item_type,
15957                                                       itemkey  => p_item_key,
15958                                                       aname    => 'HR_CONTACT_SET');
15959 
15960       exception when others then
15961            hr_utility.set_location('Exception:others'||l_proc,555);
15962            l_wf_contact_set := 1000;
15963            -- can't let anyone have so many dependants anyway!
15964 
15965   END;
15966 
15967   hr_utility.set_location('before starting For Loop:'||l_proc, 10);
15968   FOR i IN 0..(l_trans_step_rows - 1) LOOP
15969 
15970       begin
15971         l_contact_set := hr_transaction_api.get_varchar2_value
15972                         (p_transaction_step_id => l_trans_step_ids(i)
15973                         ,p_name                => 'P_CONTACT_SET');
15974       exception
15975         when others then
15976          hr_utility.set_location('Exception:Others'||l_proc,555);
15977          l_contact_set := 1;
15978       end;
15979 
15980       if l_contact_set is null then
15981          l_contact_set := 1;
15982       end if;
15983 
15984       if  l_contact_set >= l_wf_contact_set then
15985           hr_transaction_ss.delete_transaction_step
15986           (p_transaction_step_id => l_trans_step_ids(i)
15987           ,p_object_version_number => l_trans_obj_vers_num(i)
15988           ,p_login_person_id => p_login_person_id);
15989       end if;
15990 
15991   END LOOP;
15992 
15993   --hr_utility.set_message(801, 'HR_51750_WEB_TRANSAC_STARTED');
15994   --hr_utility.raise_error;
15995 hr_utility.set_location('Exiting:'||l_proc, 15);
15996 EXCEPTION
15997   WHEN OTHERS THEN
15998       hr_utility.set_location('Exception:Others'||l_proc,555);
15999       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
16000       hr_utility.raise_error;
16001     --raise;
16002 END delete_transaction_steps;
16003 --
16004 -- my delete
16005 -- -------------------------------------------------------------------------
16006 --  Delete_transaction_steps overloaded is used by contacts in registration
16007 --  flow.  This will delete the Transaction steps from the pages from which
16008 --  the user went back to the current contact page.
16009 --  It uses the contact set and p_mode to determine which contacts to delete
16010 -- -------------------------------------------------------------------------
16011 PROCEDURE delete_transaction_steps(
16012   p_item_type IN     varchar2,
16013   p_item_key  IN     varchar2,
16014   p_actid     IN     varchar2,
16015   p_login_person_id  IN varchar2,
16016   p_mode IN varchar2) IS
16017 
16018   l_trans_step_ids      hr_util_web.g_varchar2_tab_type;
16019   l_trans_obj_vers_num  hr_util_web.g_varchar2_tab_type;
16020   l_trans_step_rows     NUMBER;
16021   l_contact_set         varchar2(5) := null;
16022   l_wf_contact_set      NUMBER := null;
16023   l_proc   varchar2(72)  := g_package||'delete_transaction_steps';
16024 
16025 BEGIN
16026 
16027   hr_utility.set_location('Entering:'||l_proc, 5);
16028   hr_transaction_api.get_transaction_step_info (
16029     p_Item_Type             => p_item_type,
16030     p_Item_Key              => p_item_key,
16031     p_activity_id           => to_number(p_actid),
16032     p_transaction_step_id   => l_trans_step_ids,
16033     p_object_version_number => l_trans_obj_vers_num,
16034     p_rows                  => l_trans_step_rows
16035   );
16036 
16037 
16038  -- Get the contact set from java and compare with the contact set id in each step.
16039  -- if the step doesnot match, ignore the step and go to next step.
16040 
16041 
16042 --
16043 --  This is a marker for the contact person to be used to identify the
16044 --  transactiion steps to be retrieved for the contact person in context.
16045 --  The HR_LAST_CONTACT_SET is in from the work flow attribute
16046   BEGIN
16047       l_wf_contact_set := wf_engine.GetItemAttrNumber(itemtype => p_item_type,
16048                                                       itemkey  => p_item_key,
16049                                                       aname    => 'HR_CONTACT_SET');
16050 
16051       exception when others then
16052       hr_utility.set_location('Exception:Others'||l_proc,555);
16053            l_wf_contact_set := 1000;
16054            -- can't let anyone have so many dependants anyway!
16055 
16056   END;
16057 
16058   hr_utility.set_location('Before Entering For Loop:'||l_proc,10 );
16059   FOR i IN 0..(l_trans_step_rows - 1) LOOP
16060 
16061       begin
16062         l_contact_set := hr_transaction_api.get_varchar2_value
16063                         (p_transaction_step_id => l_trans_step_ids(i)
16064                         ,p_name                => 'P_CONTACT_SET');
16065       exception
16066         when others then
16067         hr_utility.set_location('Exception:Others'||l_proc,555);
16068          l_contact_set := 1;
16069       end;
16070 
16071       if l_contact_set is null then
16072          l_contact_set := 1;
16073       end if;
16074 
16075      -- When the procedure is called from 'Do not add Contacts'
16076      -- button in 'Add contacts yes no' page
16077       if p_mode = 'ALL' then
16078             hr_transaction_ss.delete_transaction_step
16079             (p_transaction_step_id => l_trans_step_ids(i)
16080             ,p_object_version_number => l_trans_obj_vers_num(i)
16081             ,p_login_person_id => p_login_person_id);
16082 
16083      -- When the procedure is called from 'add another Contact'
16084      -- button in contacts page
16085       elsif p_mode = 'THIS' then
16086         if  l_contact_set = l_wf_contact_set then
16087             hr_transaction_ss.delete_transaction_step
16088             (p_transaction_step_id => l_trans_step_ids(i)
16089             ,p_object_version_number => l_trans_obj_vers_num(i)
16090             ,p_login_person_id => p_login_person_id);
16091         end if;
16092 
16093      -- When the procedure is called from 'Next' button
16094      -- in contacts page
16095       elsif p_mode = 'THIS AND ABOVE' then
16096         if  l_contact_set >= l_wf_contact_set then
16097             hr_transaction_ss.delete_transaction_step
16098             (p_transaction_step_id => l_trans_step_ids(i)
16099             ,p_object_version_number => l_trans_obj_vers_num(i)
16100             ,p_login_person_id => p_login_person_id);
16101         end if;
16102       end if;
16103 
16104   END LOOP;
16105   hr_utility.set_location('End of For Loop:'||l_proc,15 );
16106 
16107   --hr_utility.set_message(801, 'HR_51750_WEB_TRANSAC_STARTED');
16108   --hr_utility.raise_error;
16109   hr_utility.set_location('Exiting:'||l_proc, 20);
16110 
16111 EXCEPTION
16112   WHEN OTHERS THEN
16113       hr_utility.set_location('Exception:Others'||l_proc,555);
16114       fnd_message.set_name('PER', SQLERRM ||' '||to_char(SQLCODE));
16115       hr_utility.raise_error;
16116     --raise;
16117 END delete_transaction_steps;
16118 --
16119 
16120 -- mydelete
16121 --
16122 procedure update_object_version
16123   (p_transaction_step_id in     number
16124   ,p_login_person_id in number) is
16125 
16126 /*
16127   cursor csr_new_object_number(p_asg_id in number) is
16128   select object_version_number
16129     from per_all_assignments_f
16130    where assignment_id = p_asg_id
16131      and assignment_type = 'E'
16132    order by object_version_number desc;
16133 */
16134 
16135   l_old_object_number number;
16136   l_assignment_id number;
16137   l_new_object_number number;
16138   l_proc   varchar2(72)  := g_package||'update_object_version';
16139 
16140 begin
16141 hr_utility.set_location('Entering:'||l_proc, 5);
16142 /*
16143   l_assignment_id :=
16144       hr_transaction_api.get_number_value
16145       (p_transaction_step_id =>  p_transaction_step_id
16146       ,p_name                => 'P_ASSIGNMENT_ID');
16147 
16148     open csr_new_object_number(l_assignment_id);
16149     fetch csr_new_object_number into l_new_object_number;
16150     close csr_new_object_number;
16151 
16152   l_old_object_number :=
16153     hr_transaction_api.get_number_value
16154     (p_transaction_step_id =>  p_transaction_step_id
16155     ,p_name                => 'P_OBJECT_VERSION_NUMBER');
16156 
16157   if l_old_object_number <> l_new_object_number then
16158     hr_transaction_api.set_number_value
16159     (p_transaction_step_id =>  p_transaction_step_id
16160     ,p_person_id           => p_login_person_id
16161     ,p_name                => 'P_OBJECT_VERSION_NUMBER'
16162     ,p_value               => l_new_object_number);
16163   end if;
16164 */
16165 hr_utility.set_location('Exiting:'||l_proc, 15);
16166 null;
16167 
16168 end update_object_version;
16169 --
16170 procedure call_contact_api
16171   (p_validate                     in        boolean     default false
16172   ,p_start_date                   in        date
16173   ,p_business_group_id            in        number
16174   ,p_person_id                    in        number
16175   ,p_contact_person_id            in        number      default null
16176   ,p_contact_type                 in        varchar2
16177   ,p_ctr_comments                 in        varchar2    default null
16178   ,p_primary_contact_flag         in        varchar2    default 'N'
16179   ,p_date_start                   in        date        default null
16180   ,p_start_life_reason_id         in        number      default null
16181   ,p_date_end                     in        date        default null
16182   ,p_end_life_reason_id           in        number      default null
16183   ,p_rltd_per_rsds_w_dsgntr_flag  in        varchar2    default 'N'
16184   ,p_personal_flag                in        varchar2    default 'N'
16185   ,p_sequence_number              in        number      default null
16186   ,p_cont_attribute_category      in        varchar2    default null
16187   ,p_cont_attribute1              in        varchar2    default null
16188   ,p_cont_attribute2              in        varchar2    default null
16189   ,p_cont_attribute3              in        varchar2    default null
16190   ,p_cont_attribute4              in        varchar2    default null
16191   ,p_cont_attribute5              in        varchar2    default null
16192   ,p_cont_attribute6              in        varchar2    default null
16193   ,p_cont_attribute7              in        varchar2    default null
16194   ,p_cont_attribute8              in        varchar2    default null
16195   ,p_cont_attribute9              in        varchar2    default null
16196   ,p_cont_attribute10             in        varchar2    default null
16197   ,p_cont_attribute11             in        varchar2    default null
16198   ,p_cont_attribute12             in        varchar2    default null
16199   ,p_cont_attribute13             in        varchar2    default null
16200   ,p_cont_attribute14             in        varchar2    default null
16201   ,p_cont_attribute15             in        varchar2    default null
16202   ,p_cont_attribute16             in        varchar2    default null
16203   ,p_cont_attribute17             in        varchar2    default null
16204   ,p_cont_attribute18             in        varchar2    default null
16205   ,p_cont_attribute19             in        varchar2    default null
16206   ,p_cont_attribute20             in        varchar2    default null
16207   ,p_cont_information_category      in        varchar2    default null
16208   ,p_cont_information1              in        varchar2    default null
16209   ,p_cont_information2              in        varchar2    default null
16210   ,p_cont_information3              in        varchar2    default null
16211   ,p_cont_information4              in        varchar2    default null
16212   ,p_cont_information5              in        varchar2    default null
16213   ,p_cont_information6              in        varchar2    default null
16214   ,p_cont_information7              in        varchar2    default null
16215   ,p_cont_information8              in        varchar2    default null
16216   ,p_cont_information9              in        varchar2    default null
16217   ,p_cont_information10             in        varchar2    default null
16218   ,p_cont_information11             in        varchar2    default null
16219   ,p_cont_information12             in        varchar2    default null
16220   ,p_cont_information13             in        varchar2    default null
16221   ,p_cont_information14             in        varchar2    default null
16222   ,p_cont_information15             in        varchar2    default null
16223   ,p_cont_information16             in        varchar2    default null
16224   ,p_cont_information17             in        varchar2    default null
16225   ,p_cont_information18             in        varchar2    default null
16226   ,p_cont_information19             in        varchar2    default null
16227   ,p_cont_information20             in        varchar2    default null
16228   ,p_third_party_pay_flag         in        varchar2    default 'N'
16229   ,p_bondholder_flag              in        varchar2    default 'N'
16230   ,p_dependent_flag               in        varchar2    default 'N'
16231   ,p_beneficiary_flag             in        varchar2    default 'N'
16232   ,p_last_name                    in        varchar2    default null
16233   ,p_sex                          in        varchar2    default null
16234   ,p_person_type_id               in        number      default null
16235   ,p_per_comments                 in        varchar2    default null
16236   ,p_date_of_birth                in        date        default null
16237   ,p_email_address                in        varchar2    default null
16238   ,p_first_name                   in        varchar2    default null
16239   ,p_known_as                     in        varchar2    default null
16240   ,p_marital_status               in        varchar2    default null
16241   ,p_middle_names                 in        varchar2    default null
16242   ,p_nationality                  in        varchar2    default null
16243   ,p_national_identifier          in        varchar2    default null
16244   ,p_previous_last_name           in        varchar2    default null
16245   ,p_registered_disabled_flag     in        varchar2    default null
16246   ,p_title                        in        varchar2    default null
16247   ,p_work_telephone               in        varchar2    default null
16248   ,p_attribute_category           in        varchar2    default null
16249   ,p_attribute1                   in        varchar2    default null
16250   ,p_attribute2                   in        varchar2    default null
16251   ,p_attribute3                   in        varchar2    default null
16252   ,p_attribute4                   in        varchar2    default null
16253   ,p_attribute5                   in        varchar2    default null
16254   ,p_attribute6                   in        varchar2    default null
16255   ,p_attribute7                   in        varchar2    default null
16256   ,p_attribute8                   in        varchar2    default null
16257   ,p_attribute9                   in        varchar2    default null
16258   ,p_attribute10                  in        varchar2    default null
16259   ,p_attribute11                  in        varchar2    default null
16260   ,p_attribute12                  in        varchar2    default null
16261   ,p_attribute13                  in        varchar2    default null
16262   ,p_attribute14                  in        varchar2    default null
16263   ,p_attribute15                  in        varchar2    default null
16264   ,p_attribute16                  in        varchar2    default null
16265   ,p_attribute17                  in        varchar2    default null
16266   ,p_attribute18                  in        varchar2    default null
16267   ,p_attribute19                  in        varchar2    default null
16268   ,p_attribute20                  in        varchar2    default null
16269   ,p_attribute21                  in        varchar2    default null
16270   ,p_attribute22                  in        varchar2    default null
16271   ,p_attribute23                  in        varchar2    default null
16272   ,p_attribute24                  in        varchar2    default null
16273   ,p_attribute25                  in        varchar2    default null
16274   ,p_attribute26                  in        varchar2    default null
16275   ,p_attribute27                  in        varchar2    default null
16276   ,p_attribute28                  in        varchar2    default null
16277   ,p_attribute29                  in        varchar2    default null
16278   ,p_attribute30                  in        varchar2    default null
16279   ,p_per_information_category     in        varchar2    default null
16280   ,p_per_information1             in        varchar2    default null
16281   ,p_per_information2             in        varchar2    default null
16282   ,p_per_information3             in        varchar2    default null
16283   ,p_per_information4             in        varchar2    default null
16284   ,p_per_information5             in        varchar2    default null
16285   ,p_per_information6             in        varchar2    default null
16286   ,p_per_information7             in        varchar2    default null
16287   ,p_per_information8             in        varchar2    default null
16288   ,p_per_information9             in        varchar2    default null
16289   ,p_per_information10            in        varchar2    default null
16290   ,p_per_information11            in        varchar2    default null
16291   ,p_per_information12            in        varchar2    default null
16292   ,p_per_information13            in        varchar2    default null
16293   ,p_per_information14            in        varchar2    default null
16294   ,p_per_information15            in        varchar2    default null
16295   ,p_per_information16            in        varchar2    default null
16296   ,p_per_information17            in        varchar2    default null
16297   ,p_per_information18            in        varchar2    default null
16298   ,p_per_information19            in        varchar2    default null
16299   ,p_per_information20            in        varchar2    default null
16300   ,p_per_information21            in        varchar2    default null
16301   ,p_per_information22            in        varchar2    default null
16302   ,p_per_information23            in        varchar2    default null
16303   ,p_per_information24            in        varchar2    default null
16304   ,p_per_information25            in        varchar2    default null
16305   ,p_per_information26            in        varchar2    default null
16306   ,p_per_information27            in        varchar2    default null
16307   ,p_per_information28            in        varchar2    default null
16308   ,p_per_information29            in        varchar2    default null
16309   ,p_per_information30            in        varchar2    default null
16310   ,p_correspondence_language      in        varchar2    default null
16311   ,p_honors                       in        varchar2    default null
16312   ,p_pre_name_adjunct             in        varchar2    default null
16313   ,p_suffix                       in        varchar2    default null
16314   ,p_create_mirror_flag           in        varchar2    default 'N'
16315   ,p_mirror_type                  in        varchar2    default null
16316   ,p_mirror_cont_attribute_cat    in        varchar2    default null
16317   ,p_mirror_cont_attribute1       in        varchar2    default null
16318   ,p_mirror_cont_attribute2       in        varchar2    default null
16319   ,p_mirror_cont_attribute3       in        varchar2    default null
16320   ,p_mirror_cont_attribute4       in        varchar2    default null
16321   ,p_mirror_cont_attribute5       in        varchar2    default null
16322   ,p_mirror_cont_attribute6       in        varchar2    default null
16323   ,p_mirror_cont_attribute7       in        varchar2    default null
16324   ,p_mirror_cont_attribute8       in        varchar2    default null
16325   ,p_mirror_cont_attribute9       in        varchar2    default null
16326   ,p_mirror_cont_attribute10      in        varchar2    default null
16327   ,p_mirror_cont_attribute11      in        varchar2    default null
16328   ,p_mirror_cont_attribute12      in        varchar2    default null
16329   ,p_mirror_cont_attribute13      in        varchar2    default null
16330   ,p_mirror_cont_attribute14      in        varchar2    default null
16331   ,p_mirror_cont_attribute15      in        varchar2    default null
16332   ,p_mirror_cont_attribute16      in        varchar2    default null
16333   ,p_mirror_cont_attribute17      in        varchar2    default null
16334   ,p_mirror_cont_attribute18      in        varchar2    default null
16335   ,p_mirror_cont_attribute19      in        varchar2    default null
16336   ,p_mirror_cont_attribute20      in        varchar2    default null
16337   ,p_mirror_cont_information_cat    in        varchar2    default null
16338   ,p_mirror_cont_information1       in        varchar2    default null
16339   ,p_mirror_cont_information2       in        varchar2    default null
16340   ,p_mirror_cont_information3       in        varchar2    default null
16341   ,p_mirror_cont_information4       in        varchar2    default null
16342   ,p_mirror_cont_information5       in        varchar2    default null
16343   ,p_mirror_cont_information6       in        varchar2    default null
16344   ,p_mirror_cont_information7       in        varchar2    default null
16345   ,p_mirror_cont_information8       in        varchar2    default null
16346   ,p_mirror_cont_information9       in        varchar2    default null
16347   ,p_mirror_cont_information10      in        varchar2    default null
16348   ,p_mirror_cont_information11      in        varchar2    default null
16349   ,p_mirror_cont_information12      in        varchar2    default null
16350   ,p_mirror_cont_information13      in        varchar2    default null
16351   ,p_mirror_cont_information14      in        varchar2    default null
16352   ,p_mirror_cont_information15      in        varchar2    default null
16353   ,p_mirror_cont_information16      in        varchar2    default null
16354   ,p_mirror_cont_information17      in        varchar2    default null
16355   ,p_mirror_cont_information18      in        varchar2    default null
16356   ,p_mirror_cont_information19      in        varchar2    default null
16357   ,p_mirror_cont_information20      in        varchar2    default null
16358 --
16359   ,p_contact_relationship_id      out nocopy number
16360   ,p_ctr_object_version_number    out nocopy number
16361   ,p_per_person_id                out nocopy number
16362   ,p_per_object_version_number    out nocopy number
16363   ,p_per_effective_start_date     out nocopy date
16364   ,p_per_effective_end_date       out nocopy date
16365   ,p_full_name                    out nocopy varchar2
16366   ,p_per_comment_id               out nocopy number
16367   ,p_name_combination_warning     out nocopy boolean
16368   ,p_orig_hire_warning            out nocopy boolean
16369 --
16370   ,p_contact_operation               in        varchar2
16371   ,p_emrg_cont_flag                  in        varchar2   default 'N'
16372   )
16373  is
16374  l_proc   varchar2(72)  := g_package||'call_contact_api';
16375 
16376 -- 9564383 starts
16377   z_date_start   date;
16378   l_exists varchar2(1) := 'N';
16379   cursor csr_chk_primary_cnt is
16380   select 'Y'
16381   from   per_contact_relationships
16382   where  person_id = p_person_id
16383   and    primary_contact_flag = 'Y'
16384   and    (nvl(date_end,hr_general.end_of_time)
16385             > nvl(p_date_start,hr_general.start_of_time)
16386   and    nvl(date_start,hr_general.start_of_time)
16387             < nvl(p_date_end,hr_general.end_of_time));
16388  -- 9564383 ends
16389 
16390  begin
16391 
16392  /*
16393   if p_primary_contact_flag is 'Y', then use it only first emergency relationship and not for
16394   other personal relationship, if not u will get
16395   This employee already has a primary contact. Cause: You are trying to enter more than one
16396   primary contact for an employee. Action: Uncheck the Primary Contact check box and save your contact
16397   information.*/
16398 
16399  hr_utility.set_location('Entering:'||l_proc, 5);
16400  hr_contact_rel_api.create_contact(
16401     p_validate                 		=>  p_validate -- l_validate_mode
16402    ,p_start_date               		=>  p_start_date --p_start_date
16403    ,p_business_group_id        		=>  p_business_group_id
16404    ,p_person_id                		=>  p_person_id
16405    ,p_contact_person_id        		=>  p_contact_person_id
16406    ,p_contact_type             		=>  p_contact_type
16407    ,p_ctr_comments             		=>  p_ctr_comments
16408    ,p_primary_contact_flag     		=>  'N'
16409    ,p_date_start               		=>  p_date_start
16410    ,p_start_life_reason_id     		=>  p_start_life_reason_id
16411    ,p_date_end                 		=>  p_date_end
16412    ,p_end_life_reason_id       		=>  p_end_life_reason_id
16413    ,p_rltd_per_rsds_w_dsgntr_flag     	=>  p_rltd_per_rsds_w_dsgntr_flag
16414    ,p_personal_flag                   	=>  p_personal_flag
16415    ,p_sequence_number                 	=>  p_sequence_number
16416    ,p_cont_attribute_category     	=>  p_cont_attribute_category
16417    ,p_cont_attribute1                 	=>  p_cont_attribute1
16418    ,p_cont_attribute2                 	=>  p_cont_attribute2
16419    ,p_cont_attribute3                 	=>  p_cont_attribute3
16420    ,p_cont_attribute4                 	=>  p_cont_attribute4
16421    ,p_cont_attribute5     		=>  p_cont_attribute5
16422    ,p_cont_attribute6     		=>  p_cont_attribute6
16423    ,p_cont_attribute7     		=>  p_cont_attribute7
16424    ,p_cont_attribute8     		=>  p_cont_attribute8
16425    ,p_cont_attribute9     		=>  p_cont_attribute9
16426    ,p_cont_attribute10     		=>  p_cont_attribute10
16427    ,p_cont_attribute11     		=>  p_cont_attribute11
16428    ,p_cont_attribute12     		=>  p_cont_attribute12
16429    ,p_cont_attribute13     		=>  p_cont_attribute13
16430    ,p_cont_attribute14     		=>  p_cont_attribute14
16431    ,p_cont_attribute15     		=>  p_cont_attribute15
16432    ,p_cont_attribute16     		=>  p_cont_attribute16
16433    ,p_cont_attribute17     		=>  p_cont_attribute17
16434    ,p_cont_attribute18     		=>  p_cont_attribute18
16435    ,p_cont_attribute19     		=>  p_cont_attribute19
16436    ,p_cont_attribute20    		=>  p_cont_attribute20
16437    ,p_cont_information_category         =>  p_cont_information_category
16438    ,p_cont_information1                 =>  p_cont_information1
16439    ,p_cont_information2                 =>  p_cont_information2
16440    ,p_cont_information3                 =>  p_cont_information3
16441    ,p_cont_information4                 =>  p_cont_information4
16442    ,p_cont_information5                 =>  p_cont_information5
16443    ,p_cont_information6                 =>  p_cont_information6
16444    ,p_cont_information7                 =>  p_cont_information7
16445    ,p_cont_information8                 =>  p_cont_information8
16446    ,p_cont_information9                 =>  p_cont_information9
16447    ,p_cont_information10                =>  p_cont_information10
16448    ,p_cont_information11                =>  p_cont_information11
16449    ,p_cont_information12                =>  p_cont_information12
16450    ,p_cont_information13                =>  p_cont_information13
16451    ,p_cont_information14                =>  p_cont_information14
16452    ,p_cont_information15                =>  p_cont_information15
16453    ,p_cont_information16                =>  p_cont_information16
16454    ,p_cont_information17                =>  p_cont_information17
16455    ,p_cont_information18                =>  p_cont_information18
16456    ,p_cont_information19                =>  p_cont_information19
16457    ,p_cont_information20                =>  p_cont_information20
16458    ,p_third_party_pay_flag     		=>  p_third_party_pay_flag
16459    ,p_bondholder_flag     		=>  p_bondholder_flag
16460    ,p_dependent_flag     		=>  p_dependent_flag
16461    ,p_beneficiary_flag     		=>  p_beneficiary_flag
16462    ,p_last_name     			=>  p_last_name
16463    ,p_sex     				=>  p_sex
16464    ,p_person_type_id     		=>  p_person_type_id
16465    ,p_per_comments     			=>  p_per_comments
16466    ,p_date_of_birth     		=>  p_date_of_birth
16467    ,p_email_address     		=>  p_email_address
16468    ,p_first_name     			=>  p_first_name
16469    ,p_known_as     			=>  p_known_as
16470    ,p_marital_status     		=>  p_marital_status
16471    ,p_middle_names     			=>  p_middle_names
16472    ,p_nationality     			=>  p_nationality
16473    ,p_national_identifier     		=>  p_national_identifier
16474    ,p_previous_last_name     		=>  p_previous_last_name
16475    ,p_registered_disabled_flag     	=>  p_registered_disabled_flag
16476    ,p_title     			=>  p_title
16477    ,p_work_telephone     		=>  p_work_telephone
16478    ,p_attribute_category     		=>  p_attribute_category
16479    ,p_attribute1     			=>  p_attribute1
16480    ,p_attribute2     			=>  p_attribute2
16481    ,p_attribute3     			=>  p_attribute3
16482    ,p_attribute4     			=>  p_attribute4
16483    ,p_attribute5     			=>  p_attribute5
16484    ,p_attribute6     			=>  p_attribute6
16485    ,p_attribute7     			=>  p_attribute7
16486    ,p_attribute8     			=>  p_attribute8
16487    ,p_attribute9     			=>  p_attribute9
16488    ,p_attribute10     			=>  p_attribute10
16489    ,p_attribute11     			=>  p_attribute11
16490    ,p_attribute12     			=>  p_attribute12
16491    ,p_attribute13     			=>  p_attribute13
16492    ,p_attribute14     			=>  p_attribute14
16493    ,p_attribute15     			=>  p_attribute15
16494    ,p_attribute16     			=>  p_attribute16
16495    ,p_attribute17     			=>  p_attribute17
16496    ,p_attribute18     			=>  p_attribute18
16497    ,p_attribute19     			=>  p_attribute19
16498    ,p_attribute20     			=>  p_attribute20
16499    ,p_attribute21     			=>  p_attribute21
16500    ,p_attribute22     			=>  p_attribute22
16501    ,p_attribute23     			=>  p_attribute23
16502    ,p_attribute24     			=>  p_attribute24
16503    ,p_attribute25     			=>  p_attribute25
16504    ,p_attribute26     			=>  p_attribute26
16505    ,p_attribute27     			=>  p_attribute27
16506    ,p_attribute28     			=>  p_attribute28
16507    ,p_attribute29     			=>  p_attribute29
16508    ,p_attribute30     			=>  p_attribute30
16509    ,p_per_information_category     	=>  p_per_information_category
16510    ,p_per_information1      =>  p_per_information1
16511    ,p_per_information2      =>  p_per_information2
16512    ,p_per_information3      =>  p_per_information3
16513    ,p_per_information4      =>  p_per_information4
16514    ,p_per_information5      =>  p_per_information5
16515    ,p_per_information6      =>  p_per_information6
16516    ,p_per_information7      =>  p_per_information7
16517    ,p_per_information8      =>  p_per_information8
16518    ,p_per_information9      =>  p_per_information9
16519    ,p_per_information10     =>  p_per_information10
16520    ,p_per_information11     =>  p_per_information11
16521    ,p_per_information12     =>  p_per_information12
16522    ,p_per_information13     =>  p_per_information13
16523    ,p_per_information14     =>  p_per_information14
16524    ,p_per_information15     =>  p_per_information15
16525    ,p_per_information16     =>  p_per_information16
16526    ,p_per_information17     =>  p_per_information17
16527    ,p_per_information18     =>  p_per_information18
16528    ,p_per_information19     =>  p_per_information19
16529    ,p_per_information20     =>  p_per_information20
16530    ,p_per_information21     =>  p_per_information21
16531    ,p_per_information22     =>  p_per_information22
16532    ,p_per_information23     =>  p_per_information23
16533    ,p_per_information24     =>  p_per_information24
16534    ,p_per_information25     =>  p_per_information25
16535    ,p_per_information26     =>  p_per_information26
16536    ,p_per_information27     =>  p_per_information27
16537    ,p_per_information28     =>  p_per_information28
16538    ,p_per_information29     =>  p_per_information29
16539    ,p_per_information30     =>  p_per_information30
16540    ,p_correspondence_language   =>  p_correspondence_language
16541    ,p_honors     		=>  p_honors
16542    ,p_pre_name_adjunct     	=>  p_pre_name_adjunct
16543    ,p_suffix     		=>  p_suffix
16544    ,p_create_mirror_flag     	=>  p_create_mirror_flag
16545    ,p_mirror_type     		=>  p_mirror_type
16546    ,p_mirror_cont_attribute_cat   =>  p_mirror_cont_attribute_cat
16547    ,p_mirror_cont_attribute1      =>  p_mirror_cont_attribute1
16548    ,p_mirror_cont_attribute2      =>  p_mirror_cont_attribute2
16549    ,p_mirror_cont_attribute3      =>  p_mirror_cont_attribute3
16550    ,p_mirror_cont_attribute4      =>  p_mirror_cont_attribute4
16551    ,p_mirror_cont_attribute5      =>  p_mirror_cont_attribute5
16552    ,p_mirror_cont_attribute6      =>  p_mirror_cont_attribute6
16553    ,p_mirror_cont_attribute7      =>  p_mirror_cont_attribute7
16554    ,p_mirror_cont_attribute8      =>  p_mirror_cont_attribute8
16555    ,p_mirror_cont_attribute9      =>  p_mirror_cont_attribute9
16556    ,p_mirror_cont_attribute10     =>  p_mirror_cont_attribute10
16557    ,p_mirror_cont_attribute11     =>  p_mirror_cont_attribute11
16558    ,p_mirror_cont_attribute12     =>  p_mirror_cont_attribute12
16559    ,p_mirror_cont_attribute13     =>  p_mirror_cont_attribute13
16560    ,p_mirror_cont_attribute14     =>  p_mirror_cont_attribute14
16561    ,p_mirror_cont_attribute15     =>  p_mirror_cont_attribute15
16562    ,p_mirror_cont_attribute16     =>  p_mirror_cont_attribute16
16563    ,p_mirror_cont_attribute17     =>  p_mirror_cont_attribute17
16564    ,p_mirror_cont_attribute18     =>  p_mirror_cont_attribute18
16565    ,p_mirror_cont_attribute19     =>  p_mirror_cont_attribute19
16566    ,p_mirror_cont_attribute20     =>  p_mirror_cont_attribute20
16567    ,P_MIRROR_CONT_INFORMATION_CAT => P_MIRROR_CONT_INFORMATION_CAT
16568    ,P_MIRROR_CONT_INFORMATION1    => P_MIRROR_CONT_INFORMATION1
16569    ,P_MIRROR_CONT_INFORMATION2    => P_MIRROR_CONT_INFORMATION2
16570    ,P_MIRROR_CONT_INFORMATION3    => P_MIRROR_CONT_INFORMATION3
16571    ,P_MIRROR_CONT_INFORMATION4    => P_MIRROR_CONT_INFORMATION4
16572    ,P_MIRROR_CONT_INFORMATION5    => P_MIRROR_CONT_INFORMATION5
16573    ,P_MIRROR_CONT_INFORMATION6    => P_MIRROR_CONT_INFORMATION6
16574    ,P_MIRROR_CONT_INFORMATION7    => P_MIRROR_CONT_INFORMATION7
16575    ,P_MIRROR_CONT_INFORMATION8    => P_MIRROR_CONT_INFORMATION8
16576    ,P_MIRROR_CONT_INFORMATION9    => P_MIRROR_CONT_INFORMATION9
16577    ,P_MIRROR_CONT_INFORMATION10    => P_MIRROR_CONT_INFORMATION10
16578    ,P_MIRROR_CONT_INFORMATION11    => P_MIRROR_CONT_INFORMATION11
16579    ,P_MIRROR_CONT_INFORMATION12    => P_MIRROR_CONT_INFORMATION12
16580    ,P_MIRROR_CONT_INFORMATION13    => P_MIRROR_CONT_INFORMATION13
16581    ,P_MIRROR_CONT_INFORMATION14    => P_MIRROR_CONT_INFORMATION14
16582    ,P_MIRROR_CONT_INFORMATION15    => P_MIRROR_CONT_INFORMATION15
16583    ,P_MIRROR_CONT_INFORMATION16    => P_MIRROR_CONT_INFORMATION16
16584    ,P_MIRROR_CONT_INFORMATION17    => P_MIRROR_CONT_INFORMATION17
16585    ,P_MIRROR_CONT_INFORMATION18    => P_MIRROR_CONT_INFORMATION18
16586    ,P_MIRROR_CONT_INFORMATION19    => P_MIRROR_CONT_INFORMATION19
16587    ,P_MIRROR_CONT_INFORMATION20    => P_MIRROR_CONT_INFORMATION20
16588    ,p_contact_relationship_id     => p_contact_relationship_id
16589    ,p_ctr_object_version_number   => p_ctr_object_version_number
16590    ,p_per_person_id               => p_per_person_id
16591    ,p_per_object_version_number   => p_per_object_version_number
16592    ,p_per_effective_start_date    => p_per_effective_start_date
16593    ,p_per_effective_end_date      => p_per_effective_end_date
16594    ,p_full_name                   => p_full_name
16595    ,p_per_comment_id              => p_per_comment_id
16596    ,p_name_combination_warning    => p_name_combination_warning
16597    ,p_orig_hire_warning           => p_orig_hire_warning
16598    );
16599    --
16600   if (p_contact_operation in ('EMER_CR_NEW_CONT','EMER_CR_NEW_REL')) OR (p_emrg_cont_flag = 'Y') then
16601   hr_utility.set_location('EMER_CR_NEW_CONT or EMER_CR_NEW_REL:'||l_proc, 10);
16602 
16603          z_date_start := p_date_start;
16604          if p_primary_contact_flag = 'Y' then                --9564383
16605            open csr_chk_primary_cnt;
16606            fetch csr_chk_primary_cnt into l_exists;
16607            if csr_chk_primary_cnt%FOUND then
16608               z_date_start := sysdate;
16609           end if;
16610           close csr_chk_primary_cnt;
16611         end if;
16612 
16613   hr_contact_rel_api.create_contact(
16614     p_validate                 		=>  p_validate -- l_validate_mode
16615    ,p_start_date               		=>  p_start_date --p_start_date
16616    ,p_business_group_id        		=>  p_business_group_id
16617    ,p_person_id                		=>  p_person_id
16618    ,p_contact_person_id        		=>  p_contact_person_id
16619    ,p_contact_type             		=>  'EMRG'
16620    ,p_ctr_comments             		=>  p_ctr_comments
16621    ,p_primary_contact_flag     		=>  p_primary_contact_flag
16622    ,p_date_start               		=>  z_date_start
16623    ,p_start_life_reason_id     		=>  p_start_life_reason_id
16624    ,p_date_end                 		=>  p_date_end
16625    ,p_end_life_reason_id       		=>  p_end_life_reason_id
16626    ,p_rltd_per_rsds_w_dsgntr_flag     	=>  p_rltd_per_rsds_w_dsgntr_flag
16627    ,p_personal_flag                   	=>  p_personal_flag
16628    ,p_sequence_number                 	=>  p_sequence_number
16629    ,p_cont_attribute_category     	=>  p_cont_attribute_category
16630    ,p_cont_attribute1                 	=>  p_cont_attribute1
16631    ,p_cont_attribute2                 	=>  p_cont_attribute2
16632    ,p_cont_attribute3                 	=>  p_cont_attribute3
16633    ,p_cont_attribute4                 	=>  p_cont_attribute4
16634    ,p_cont_attribute5     		=>  p_cont_attribute5
16635    ,p_cont_attribute6     		=>  p_cont_attribute6
16636    ,p_cont_attribute7     		=>  p_cont_attribute7
16637    ,p_cont_attribute8     		=>  p_cont_attribute8
16638    ,p_cont_attribute9     		=>  p_cont_attribute9
16639    ,p_cont_attribute10     		=>  p_cont_attribute10
16640    ,p_cont_attribute11     		=>  p_cont_attribute11
16641    ,p_cont_attribute12     		=>  p_cont_attribute12
16642    ,p_cont_attribute13     		=>  p_cont_attribute13
16643    ,p_cont_attribute14     		=>  p_cont_attribute14
16644    ,p_cont_attribute15     		=>  p_cont_attribute15
16645    ,p_cont_attribute16     		=>  p_cont_attribute16
16646    ,p_cont_attribute17     		=>  p_cont_attribute17
16647    ,p_cont_attribute18     		=>  p_cont_attribute18
16648    ,p_cont_attribute19     		=>  p_cont_attribute19
16649    ,p_cont_attribute20    		=>  p_cont_attribute20
16650    ,p_cont_information_category         =>  p_cont_information_category
16651    ,p_cont_information1                 =>  p_cont_information1
16652    ,p_cont_information2                 =>  p_cont_information2
16653    ,p_cont_information3                 =>  p_cont_information3
16654    ,p_cont_information4                 =>  p_cont_information4
16655    ,p_cont_information5                 =>  p_cont_information5
16656    ,p_cont_information6                 =>  p_cont_information6
16657    ,p_cont_information7                 =>  p_cont_information7
16658    ,p_cont_information8                 =>  p_cont_information8
16659    ,p_cont_information9                 =>  p_cont_information9
16660    ,p_cont_information10                =>  p_cont_information10
16661    ,p_cont_information11                =>  p_cont_information11
16662    ,p_cont_information12                =>  p_cont_information12
16663    ,p_cont_information13                =>  p_cont_information13
16664    ,p_cont_information14                =>  p_cont_information14
16665    ,p_cont_information15                =>  p_cont_information15
16666    ,p_cont_information16                =>  p_cont_information16
16667    ,p_cont_information17                =>  p_cont_information17
16668    ,p_cont_information18                =>  p_cont_information18
16669    ,p_cont_information19                =>  p_cont_information19
16670    ,p_cont_information20                =>  p_cont_information20
16671    ,p_third_party_pay_flag     		=>  p_third_party_pay_flag
16672    ,p_bondholder_flag     		=>  p_bondholder_flag
16673    ,p_dependent_flag     		=>  p_dependent_flag
16674    ,p_beneficiary_flag     		=>  p_beneficiary_flag
16675    ,p_last_name     			=>  p_last_name
16676    ,p_sex     				=>  p_sex
16677    ,p_person_type_id     		=>  p_person_type_id
16678    ,p_per_comments     			=>  p_per_comments
16679    ,p_date_of_birth     		=>  p_date_of_birth
16680    ,p_email_address     		=>  p_email_address
16681    ,p_first_name     			=>  p_first_name
16682    ,p_known_as     			=>  p_known_as
16683    ,p_marital_status     		=>  p_marital_status
16684    ,p_middle_names     			=>  p_middle_names
16685    ,p_nationality     			=>  p_nationality
16686    ,p_national_identifier     		=>  p_national_identifier
16687    ,p_previous_last_name     		=>  p_previous_last_name
16688    ,p_registered_disabled_flag     	=>  p_registered_disabled_flag
16689    ,p_title     			=>  p_title
16690    ,p_work_telephone     		=>  p_work_telephone
16691    ,p_attribute_category     		=>  p_attribute_category
16692    ,p_attribute1     			=>  p_attribute1
16693    ,p_attribute2     			=>  p_attribute2
16694    ,p_attribute3     			=>  p_attribute3
16695    ,p_attribute4     			=>  p_attribute4
16696    ,p_attribute5     			=>  p_attribute5
16697    ,p_attribute6     			=>  p_attribute6
16698    ,p_attribute7     			=>  p_attribute7
16699    ,p_attribute8     			=>  p_attribute8
16700    ,p_attribute9     			=>  p_attribute9
16701    ,p_attribute10     			=>  p_attribute10
16702    ,p_attribute11     			=>  p_attribute11
16703    ,p_attribute12     			=>  p_attribute12
16704    ,p_attribute13     			=>  p_attribute13
16705    ,p_attribute14     			=>  p_attribute14
16706    ,p_attribute15     			=>  p_attribute15
16707    ,p_attribute16     			=>  p_attribute16
16708    ,p_attribute17     			=>  p_attribute17
16709    ,p_attribute18     			=>  p_attribute18
16710    ,p_attribute19     			=>  p_attribute19
16711    ,p_attribute20     			=>  p_attribute20
16712    ,p_attribute21     			=>  p_attribute21
16713    ,p_attribute22     			=>  p_attribute22
16714    ,p_attribute23     			=>  p_attribute23
16715    ,p_attribute24     			=>  p_attribute24
16716    ,p_attribute25     			=>  p_attribute25
16717    ,p_attribute26     			=>  p_attribute26
16718    ,p_attribute27     			=>  p_attribute27
16719    ,p_attribute28     			=>  p_attribute28
16720    ,p_attribute29     			=>  p_attribute29
16721    ,p_attribute30     			=>  p_attribute30
16722    ,p_per_information_category     	=>  p_per_information_category
16723    ,p_per_information1      =>  p_per_information1
16724    ,p_per_information2      =>  p_per_information2
16725    ,p_per_information3      =>  p_per_information3
16726    ,p_per_information4      =>  p_per_information4
16727    ,p_per_information5      =>  p_per_information5
16728    ,p_per_information6      =>  p_per_information6
16729    ,p_per_information7      =>  p_per_information7
16730    ,p_per_information8      =>  p_per_information8
16731    ,p_per_information9      =>  p_per_information9
16732    ,p_per_information10     =>  p_per_information10
16733    ,p_per_information11     =>  p_per_information11
16734    ,p_per_information12     =>  p_per_information12
16735    ,p_per_information13     =>  p_per_information13
16736    ,p_per_information14     =>  p_per_information14
16737    ,p_per_information15     =>  p_per_information15
16738    ,p_per_information16     =>  p_per_information16
16739    ,p_per_information17     =>  p_per_information17
16740    ,p_per_information18     =>  p_per_information18
16741    ,p_per_information19     =>  p_per_information19
16742    ,p_per_information20     =>  p_per_information20
16743    ,p_per_information21     =>  p_per_information21
16744    ,p_per_information22     =>  p_per_information22
16745    ,p_per_information23     =>  p_per_information23
16746    ,p_per_information24     =>  p_per_information24
16747    ,p_per_information25     =>  p_per_information25
16748    ,p_per_information26     =>  p_per_information26
16749    ,p_per_information27     =>  p_per_information27
16750    ,p_per_information28     =>  p_per_information28
16751    ,p_per_information29     =>  p_per_information29
16752    ,p_per_information30     =>  p_per_information30
16753    ,p_correspondence_language   =>  p_correspondence_language
16754    ,p_honors     		=>  p_honors
16755    ,p_pre_name_adjunct     	=>  p_pre_name_adjunct
16756    ,p_suffix     		=>  p_suffix
16757    ,p_create_mirror_flag     	=>  p_create_mirror_flag
16758    ,p_mirror_type     		=>  p_mirror_type
16759    ,p_mirror_cont_attribute_cat   =>  p_mirror_cont_attribute_cat
16760    ,p_mirror_cont_attribute1      =>  p_mirror_cont_attribute1
16761    ,p_mirror_cont_attribute2      =>  p_mirror_cont_attribute2
16762    ,p_mirror_cont_attribute3      =>  p_mirror_cont_attribute3
16763    ,p_mirror_cont_attribute4      =>  p_mirror_cont_attribute4
16764    ,p_mirror_cont_attribute5      =>  p_mirror_cont_attribute5
16765    ,p_mirror_cont_attribute6      =>  p_mirror_cont_attribute6
16766    ,p_mirror_cont_attribute7      =>  p_mirror_cont_attribute7
16767    ,p_mirror_cont_attribute8      =>  p_mirror_cont_attribute8
16768    ,p_mirror_cont_attribute9      =>  p_mirror_cont_attribute9
16769    ,p_mirror_cont_attribute10     =>  p_mirror_cont_attribute10
16770    ,p_mirror_cont_attribute11     =>  p_mirror_cont_attribute11
16771    ,p_mirror_cont_attribute12     =>  p_mirror_cont_attribute12
16772    ,p_mirror_cont_attribute13     =>  p_mirror_cont_attribute13
16773    ,p_mirror_cont_attribute14     =>  p_mirror_cont_attribute14
16774    ,p_mirror_cont_attribute15     =>  p_mirror_cont_attribute15
16775    ,p_mirror_cont_attribute16     =>  p_mirror_cont_attribute16
16776    ,p_mirror_cont_attribute17     =>  p_mirror_cont_attribute17
16777    ,p_mirror_cont_attribute18     =>  p_mirror_cont_attribute18
16778    ,p_mirror_cont_attribute19     =>  p_mirror_cont_attribute19
16779    ,p_mirror_cont_attribute20     =>  p_mirror_cont_attribute20
16780    ,P_MIRROR_CONT_INFORMATION_CAT => P_MIRROR_CONT_INFORMATION_CAT
16781    ,P_MIRROR_CONT_INFORMATION1    => P_MIRROR_CONT_INFORMATION1
16782    ,P_MIRROR_CONT_INFORMATION2    => P_MIRROR_CONT_INFORMATION2
16783    ,P_MIRROR_CONT_INFORMATION3    => P_MIRROR_CONT_INFORMATION3
16784    ,P_MIRROR_CONT_INFORMATION4    => P_MIRROR_CONT_INFORMATION4
16785    ,P_MIRROR_CONT_INFORMATION5    => P_MIRROR_CONT_INFORMATION5
16786    ,P_MIRROR_CONT_INFORMATION6    => P_MIRROR_CONT_INFORMATION6
16787    ,P_MIRROR_CONT_INFORMATION7    => P_MIRROR_CONT_INFORMATION7
16788    ,P_MIRROR_CONT_INFORMATION8    => P_MIRROR_CONT_INFORMATION8
16789    ,P_MIRROR_CONT_INFORMATION9    => P_MIRROR_CONT_INFORMATION9
16790    ,P_MIRROR_CONT_INFORMATION10    => P_MIRROR_CONT_INFORMATION10
16791    ,P_MIRROR_CONT_INFORMATION11    => P_MIRROR_CONT_INFORMATION11
16792    ,P_MIRROR_CONT_INFORMATION12    => P_MIRROR_CONT_INFORMATION12
16793    ,P_MIRROR_CONT_INFORMATION13    => P_MIRROR_CONT_INFORMATION13
16794    ,P_MIRROR_CONT_INFORMATION14    => P_MIRROR_CONT_INFORMATION14
16795    ,P_MIRROR_CONT_INFORMATION15    => P_MIRROR_CONT_INFORMATION15
16796    ,P_MIRROR_CONT_INFORMATION16    => P_MIRROR_CONT_INFORMATION16
16797    ,P_MIRROR_CONT_INFORMATION17    => P_MIRROR_CONT_INFORMATION17
16798    ,P_MIRROR_CONT_INFORMATION18    => P_MIRROR_CONT_INFORMATION18
16799    ,P_MIRROR_CONT_INFORMATION19    => P_MIRROR_CONT_INFORMATION19
16800    ,P_MIRROR_CONT_INFORMATION20    => P_MIRROR_CONT_INFORMATION20
16801    ,p_contact_relationship_id     => p_contact_relationship_id
16802    ,p_ctr_object_version_number   => p_ctr_object_version_number
16803    ,p_per_person_id               => p_per_person_id
16804    ,p_per_object_version_number   => p_per_object_version_number
16805    ,p_per_effective_start_date    => p_per_effective_start_date
16806    ,p_per_effective_end_date      => p_per_effective_end_date
16807    ,p_full_name                   => p_full_name
16808    ,p_per_comment_id              => p_per_comment_id
16809    ,p_name_combination_warning    => p_name_combination_warning
16810    ,p_orig_hire_warning           => p_orig_hire_warning
16811    );
16812   end if;
16813   hr_utility.set_location('Exiting:'||l_proc, 20);
16814  end call_contact_api;
16815 --
16816 
16817 procedure get_emrg_rel_id (
16818    p_contact_relationship_id          in number
16819   ,p_contact_person_id                in number
16820   ,p_emrg_rel_id                      out nocopy varchar2
16821   ,p_no_of_non_emrg_rel               out nocopy varchar2
16822   ,p_other_rel_type                   out nocopy varchar2
16823   ,p_emrg_rel_type                    out nocopy varchar2)
16824 is
16825    l_person_id                                     number;
16826    cursor no_of_non_emrg_rel(p_contact_relationship_id  number
16827                             ,p_contact_person_id        number )
16828    is
16829    select count(pcr.contact_relationship_id)
16830    from PER_CONTACT_RELATIONSHIPS pcr
16831    where person_id = (select person_id
16832                       from PER_CONTACT_RELATIONSHIPS
16833                       where contact_person_id = p_contact_person_id
16834                       and contact_relationship_id = P_contact_relationship_id
16835                       and trunc(sysdate) >= decode(date_start,null,trunc(sysdate),trunc(date_start))
16836                       and trunc(sysdate) <  decode(date_end,null,trunc(sysdate)+1,trunc(date_end)))
16837    and exists  (select 1
16838                 from per_contact_relationships con
16839                 where con.contact_type =  'EMRG'
16840                 and con.contact_person_id = p_contact_person_id
16841                 and con.person_id = pcr.person_id
16842                 and trunc(sysdate) >= decode(con.date_start,null,trunc(sysdate),trunc(con.date_start))
16843                 and trunc(sysdate) <  decode(con.date_end,null,trunc(sysdate)+1,trunc(con.date_end)))
16844    and pcr.contact_person_id = p_contact_person_id
16845    and pcr.contact_type <> 'EMRG'
16846    and pcr.personal_flag = 'Y'
16847    and trunc(sysdate) >= decode(pcr.date_start,null,trunc(sysdate),trunc(pcr.date_start))
16848    and trunc(sysdate) <  decode(pcr.date_end,null,trunc(sysdate)+1,trunc(pcr.date_end));
16849 
16850    cursor emrg_rel_id(p_contact_relationship_id     number
16851                      ,p_contact_person_id           number )
16852    is
16853    select contact_relationship_id,
16854          HR_GENERAL.DECODE_LOOKUP('CONTACT', contact_type) relationship
16855    from PER_CONTACT_RELATIONSHIPS
16856    where person_id = (select person_id
16857                       from PER_CONTACT_RELATIONSHIPS
16858                       where contact_person_id = p_contact_person_id
16859                       and contact_relationship_id = P_contact_relationship_id
16860                       and trunc(sysdate) >= decode(date_start,null,trunc(sysdate),trunc(date_start))
16861                       and trunc(sysdate) <  decode(date_end,null,trunc(sysdate)+1,trunc(date_end)))
16862    and contact_person_id = p_contact_person_id
16863    and contact_type = 'EMRG'
16864    and trunc(sysdate) >= decode(date_start,null,trunc(sysdate),trunc(date_start))
16865    and trunc(sysdate) <  decode(date_end,null,trunc(sysdate)+1,trunc(date_end));
16866 
16867    cursor other_rel_type(p_contact_relationship_id     number
16868                      ,p_contact_person_id           number )
16869    is
16870    select HR_GENERAL.DECODE_LOOKUP('CONTACT', pcr.contact_type) relationship
16871    from PER_CONTACT_RELATIONSHIPS pcr
16872    where pcr.contact_person_id = p_contact_person_id
16873    and pcr.contact_relationship_id = p_contact_relationship_id
16874    and trunc(sysdate) >= decode(pcr.date_start,null,trunc(sysdate),trunc(pcr.date_start))
16875    and trunc(sysdate) <  decode(pcr.date_end,null,trunc(sysdate)+1,trunc(pcr.date_end));
16876 
16877    l_emrg_rel_id          varchar2(20);
16878    l_no_of_non_emrg_rel   varchar2(20);
16879    l_other_rel_type       varchar2(200);
16880    l_emrg_rel_type       varchar2(200);
16881    l_proc   varchar2(72)  := g_package||'get_emrg_rel_id';
16882 
16883 begin
16884 
16885    hr_utility.set_location('Entering:'||l_proc, 5);
16886    hr_utility.set_location('Before Fetching no_of_non_emrg_rel:'||l_proc, 10);
16887    open no_of_non_emrg_rel(p_contact_relationship_id,p_contact_person_id);
16888    fetch no_of_non_emrg_rel
16889    into l_no_of_non_emrg_rel;
16890    IF no_of_non_emrg_rel%NOTFOUND THEN
16891    l_no_of_non_emrg_rel := '0';
16892    end if;
16893    close no_of_non_emrg_rel;
16894 
16895    open emrg_rel_id(p_contact_relationship_id,p_contact_person_id);
16896    fetch emrg_rel_id
16897    into l_emrg_rel_id, l_emrg_rel_type;
16898    IF emrg_rel_id%NOTFOUND THEN
16899    l_emrg_rel_id := '-1';
16900    l_emrg_rel_type := '';
16901    end if;
16902 
16903    close emrg_rel_id;
16904 
16905 
16906    open other_rel_type(p_contact_relationship_id,p_contact_person_id);
16907    fetch other_rel_type into l_other_rel_type;
16908    IF other_rel_type%NOTFOUND THEN
16909      l_other_rel_type := '';
16910    end if;
16911 
16912    close other_rel_type;
16913 
16914    p_emrg_rel_id := l_emrg_rel_id;
16915    p_no_of_non_emrg_rel := l_no_of_non_emrg_rel;
16916    p_other_rel_type := l_other_rel_type;
16917    p_emrg_rel_type :=  l_emrg_rel_type;
16918    hr_utility.set_location('Exiting:'||l_proc, 25);
16919 end get_emrg_rel_id;
16920 
16921 --
16922 procedure validate_rel_start_date (
16923    p_person_id                        in number
16924   ,p_item_key                         in varchar2
16925   ,p_save_mode                        in varchar2
16926   ,p_date_start                       in out nocopy date
16927   ,p_date_of_birth                    in date)
16928 is
16929  /*
16930 --  bug # 2168275
16931    requirement : If relation_ship_start_date < (DOB of Employee) or (DOB of Contact), then
16932                  raise error message PER_50386_CON_SDT_LES_EMP_BDT.
16933 
16934     1. Get emplyee record start date
16935 
16936         if employee id is available, then
16937             get  Employee_DOB from per_people_f
16938         else
16939             get Employee_DOB from transaction_step
16940 
16941     1. if l_main_per_date_of_birth is not null and l_main_per_date_of_birth > p_date_start then
16942         raise error;
16943         set errormessage .....
16944     elsif p_date_of_birth is not null and p_date_of_birth > p_date_start then
16945         raise error;
16946         set errormessage .....
16947 
16948     2. Compare the DOBs with  p_date_start
16949         If  Employee_DOB > p_date_start then
16950             raise error.
16951         Else
16952             If  p_date_of_birth > p_date_start then
16953             raise error.
16954 
16955 --  end bug # 2168275
16956 */
16957 
16958   --bug # 2168275,2123868
16959  l_validate_g_per_step_id            number;
16960  l_main_per_eff_start_date           date;
16961  l_main_per_date_of_birth            date;
16962  l_proc   varchar2(72)  := g_package||'validate_rel_start_date';
16963 begin
16964 
16965     hr_utility.set_location('Entering:'||l_proc, 5);
16966     if p_person_id is not null then
16967         hr_utility.set_location('if p_person_id is not null then:'||l_proc, 10);
16968         select  min(p.date_of_birth) , min(p.effective_start_date)
16969         into    l_main_per_date_of_birth , l_main_per_eff_start_date
16970         from    per_people_f p
16971         where   p.person_id = p_person_id;
16972     else
16973         begin
16974             hr_utility.set_location('if p_person_id is not null then:'||l_proc, 15);
16975             select nvl(max(hats1.transaction_step_id),0)
16976             into   l_validate_g_per_step_id
16977             from   hr_api_transaction_steps hats1
16978             where  hats1.item_type = 'HRSSA'
16979             and    hats1.item_key  = p_item_key
16980             and    hats1.api_name  in( 'HR_PROCESS_PERSON_SS.PROCESS_API', 'BEN_PROCESS_COBRA_PERSON_SS.PROCESS_API');
16981 
16982             l_main_per_date_of_birth := hr_transaction_api.get_date_value
16983                                 (p_transaction_step_id => l_validate_g_per_step_id
16984                                 ,p_name => 'P_DATE_OF_BIRTH') ;
16985 
16986             l_main_per_eff_start_date := hr_transaction_api.get_date_value
16987                                 (p_transaction_step_id => l_validate_g_per_step_id
16988                                 ,p_name => 'P_EFFECTIVE_DATE');
16989 
16990         exception
16991             when others then
16992             hr_utility.set_location('Exception:Others'||l_proc,555);
16993             null;
16994         end;
16995 
16996     end if; --l_person_id is/not null
16997 
16998     -- raise error if relationship start date is earlier tahn date of birth
16999 -- fix for bug # 2221040
17000     if  nvl(p_save_mode, 'NVL') <> 'SAVE_FOR_LATER'
17001       then
17002        if l_main_per_date_of_birth is not null and l_main_per_date_of_birth > p_date_start then
17003           hr_utility.set_message(800, 'PER_50386_CON_SDT_LES_EMP_BDT');
17004           hr_utility.raise_error;
17005        elsif p_date_of_birth is not null and p_date_of_birth > p_date_start then
17006           hr_utility.set_message(800, 'PER_50386_CON_SDT_LES_EMP_BDT');
17007           hr_utility.raise_error;
17008        end if;
17009     end if;
17010 -- l_main_per_eff_start_date will be used in Create_Contact_tt , so we need to return it.
17011 p_date_start := l_main_per_eff_start_date;
17012 hr_utility.set_location('Exiting:'||l_proc, 15);
17013 end validate_rel_start_date;
17014 
17015 --
17016 
17017 Procedure validate_primary_cont_flag(
17018    p_contact_relationship_id          in number
17019   ,p_primary_contact_flag             in varchar2
17020   ,p_date_start                       in date
17021   ,p_contact_person_id                in number
17022   ,p_object_version_number             in out nocopy    number)
17023 
17024 is
17025 
17026 l_emerg_cont_rel_id            number;
17027 
17028 l_emrg_rel_id                  varchar2(50);
17029 l_no_of_non_emrg_rel           varchar2(50);
17030 l_other_rel_type               varchar2(50);
17031 l_emrg_rel_type                varchar2(50);
17032 l_proc   varchar2(72)  := g_package||'validate_primary_cont_flag';
17033 
17034 CURSOR gc_get_emerg_contact_data
17035          (p_contact_relationship_id      in number
17036          ,p_eff_date                     in date default trunc(sysdate)
17037           )
17038   IS
17039   SELECT
17040   primary_contact_flag,
17041   pcr.object_version_number ovn
17042   FROM
17043       per_contact_relationships pcr
17044      ,per_all_people_f pap
17045      ,hr_comments        hc
17046   WHERE  pcr.contact_relationship_id = p_contact_relationship_id
17047     AND  pcr.contact_person_id = pap.person_id
17048     AND  p_eff_date BETWEEN pap.effective_start_date and pap.effective_end_date
17049     AND  hc.comment_id (+) = pap.comment_id;
17050 
17051 l_emerg_contact_data               gc_get_emerg_contact_data%rowtype;
17052 
17053 begin
17054 
17055 
17056    hr_utility.set_location('Entering:'||l_proc, 5);
17057    get_emrg_rel_id ( P_contact_relationship_id => p_contact_relationship_id
17058                     ,p_contact_person_id       => p_contact_person_id
17059                     ,p_emrg_rel_id             => l_emrg_rel_id
17060                     ,p_no_of_non_emrg_rel      => l_no_of_non_emrg_rel
17061                     ,p_other_rel_type          => l_other_rel_type
17062                     ,p_emrg_rel_type           => l_emrg_rel_type);
17063    l_emerg_cont_rel_id := to_number(l_emrg_rel_id);
17064 
17065    hr_utility.set_location('Before fetching gc_get_emerg_contact_data:'||l_proc,10 );
17066    OPEN gc_get_emerg_contact_data(p_contact_relationship_id => l_emerg_cont_rel_id);
17067 
17068    FETCH gc_get_emerg_contact_data into l_emerg_contact_data;
17069    IF gc_get_emerg_contact_data%NOTFOUND THEN
17070      CLOSE gc_get_emerg_contact_data;
17071      raise g_data_error;
17072    ELSE
17073      CLOSE gc_get_emerg_contact_data;
17074    END IF;
17075 -- Bug 3504216 : passing date_start as sysdate.
17076       hr_contact_rel_api.update_contact_relationship(
17077          p_validate                => false
17078         ,P_EFFECTIVE_DATE          => sysdate
17079         ,p_object_version_number   => l_emerg_contact_data.ovn
17080         ,P_CONTACT_RELATIONSHIP_ID => l_emerg_cont_rel_id
17081         ,p_date_start              => sysdate
17082         ,P_PRIMARY_CONTACT_FLAG     => p_primary_contact_flag
17083      );
17084 
17085    if p_contact_relationship_id = l_emerg_cont_rel_id then
17086       p_object_version_number := l_emerg_contact_data.ovn;
17087    end if;
17088 
17089 hr_utility.set_location('Exiting:'||l_proc, 15);
17090 end validate_primary_cont_flag;
17091 
17092 --
17093 
17094 END HR_PROCESS_CONTACT_SS;