[Home] [Help]
PACKAGE BODY: APPS.PER_ADD_INS
Source
1 Package Body per_add_ins as
2 /* $Header: peaddrhi.pkb 120.1.12010000.3 2008/08/06 08:53:04 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_add_ins.'; -- Global package name
9 --
10 -- The following global variables are only to be used by
11 -- the set_base_key_value and pre_insert procedures.
12 --
13 g_address_id_i number default null;
14 --
15 -- ----------------------------------------------------------------------------
16 -- |------------------------< set_base_key_value >----------------------------|
17 -- ----------------------------------------------------------------------------
18 procedure set_base_key_value
19 (p_address_id in number) is
20 --
21 l_proc varchar2(72) := g_package||'set_base_key_value';
22 --
23 Begin
24 hr_utility.set_location('Entering:'||l_proc, 10);
25 --
26 per_add_ins.g_address_id_i := p_address_id;
27 --
28 hr_utility.set_location(' Leaving:'||l_proc, 20);
29 End set_base_key_value;
30 --
31
32 --
33 -- ----------------------------------------------------------------------------
34 -- |------------------------------< insert_dml >------------------------------|
35 -- ----------------------------------------------------------------------------
36 -- {Start Of Comments}
37 --
38 -- Description:
39 -- This procedure controls the actual dml insert logic. The functions of this
40 -- procedure are as follows:
41 -- 1) Initialise the object_version_number to 1 if the object_version_number
42 -- is defined as an attribute for this entity.
43 -- 2) To set and unset the g_api_dml status as required (as we are about to
44 -- perform dml).
45 -- 3) To insert the row into the schema.
46 -- 4) To trap any constraint violations that may have occurred.
47 -- 5) To raise any other errors.
48 --
49 -- Pre Conditions:
50 -- This is an internal private procedure which must be called from the ins
51 -- procedure and must have all mandatory arguments set (except the
52 -- object_version_number which is initialised within this procedure).
53 --
54 -- In Arguments:
55 -- A Pl/Sql record structre.
56 --
57 -- Post Success:
58 -- The specified row will be inserted into the schema.
59 --
60 -- Post Failure:
61 -- On the insert dml failure it is important to note that we always reset the
62 -- g_api_dml status to false.
63 -- If a check, unique or parent integrity constraint violation is raised the
64 -- constraint_error procedure will be called.
65 -- If any other error is reported, the error will be raised after the
66 -- g_api_dml status is reset.
67 --
68 -- Developer Implementation Notes:
69 -- None.
70 --
71 -- Access Status:
72 -- Internal Table Handler Use Only.
73 --
74 -- {End Of Comments}
75 -- ----------------------------------------------------------------------------
76 Procedure insert_dml(p_rec in out nocopy per_add_shd.g_rec_type) is
77 --
78 l_proc varchar2(72) := g_package||'insert_dml';
79 --
80 Begin
81 hr_utility.set_location('Entering:'||l_proc, 5);
82 p_rec.object_version_number := 1; -- Initialise the object version
83 --
84 per_add_shd.g_api_dml := true; -- Set the api dml status
85 --
86 -- Insert the row into: per_addresses
87 --
88 insert into per_addresses
89 ( address_id,
90 business_group_id,
91 person_id,
92 date_from,
93 primary_flag,
94 derived_locale,
95 style,
96 address_line1,
97 address_line2,
98 address_line3,
99 address_type,
100 comments,
101 country,
102 date_to,
103 postal_code,
104 region_1,
105 region_2,
106 region_3,
107 telephone_number_1,
108 telephone_number_2,
109 telephone_number_3,
110 town_or_city,
111 request_id,
112 program_application_id,
113 program_id,
114 program_update_date,
115 addr_attribute_category,
116 addr_attribute1,
117 addr_attribute2,
118 addr_attribute3,
119 addr_attribute4,
120 addr_attribute5,
121 addr_attribute6,
122 addr_attribute7,
123 addr_attribute8,
124 addr_attribute9,
125 addr_attribute10,
126 addr_attribute11,
127 addr_attribute12,
128 addr_attribute13,
129 addr_attribute14,
130 addr_attribute15,
131 addr_attribute16,
132 addr_attribute17,
133 addr_attribute18,
134 addr_attribute19,
135 addr_attribute20,
136 add_information13,
137 add_information14,
138 add_information15,
139 add_information16,
140 add_information17,
141 add_information18,
142 add_information19,
143 add_information20,
144 party_id, -- HR/TCA merge
145 geometry,
146 object_version_number
147 )
148 Values
149 ( p_rec.address_id,
150 p_rec.business_group_id,
151 p_rec.person_id,
152 p_rec.date_from,
153 p_rec.primary_flag,
154 p_rec.derived_locale,
155 p_rec.style,
156 p_rec.address_line1,
157 p_rec.address_line2,
158 p_rec.address_line3,
159 p_rec.address_type,
160 p_rec.comments,
161 p_rec.country,
162 p_rec.date_to,
163 p_rec.postal_code,
164 p_rec.region_1,
165 p_rec.region_2,
166 p_rec.region_3,
167 p_rec.telephone_number_1,
168 p_rec.telephone_number_2,
169 p_rec.telephone_number_3,
170 p_rec.town_or_city,
171 p_rec.request_id,
172 p_rec.program_application_id,
173 p_rec.program_id,
174 p_rec.program_update_date,
175 p_rec.addr_attribute_category,
176 p_rec.addr_attribute1,
177 p_rec.addr_attribute2,
178 p_rec.addr_attribute3,
179 p_rec.addr_attribute4,
180 p_rec.addr_attribute5,
181 p_rec.addr_attribute6,
182 p_rec.addr_attribute7,
183 p_rec.addr_attribute8,
184 p_rec.addr_attribute9,
185 p_rec.addr_attribute10,
186 p_rec.addr_attribute11,
187 p_rec.addr_attribute12,
188 p_rec.addr_attribute13,
189 p_rec.addr_attribute14,
190 p_rec.addr_attribute15,
191 p_rec.addr_attribute16,
192 p_rec.addr_attribute17,
193 p_rec.addr_attribute18,
194 p_rec.addr_attribute19,
195 p_rec.addr_attribute20,
196 p_rec.add_information13,
197 p_rec.add_information14,
198 p_rec.add_information15,
199 p_rec.add_information16,
200 p_rec.add_information17,
201 p_rec.add_information18,
202 p_rec.add_information19,
203 p_rec.add_information20,
204 p_rec.party_id, -- HR/TCA merge
205 p_rec.geometry,
206 p_rec.object_version_number
207 );
208 --
209 per_add_shd.g_api_dml := false; -- Unset the api dml status
210 --
211 hr_utility.set_location(' Leaving:'||l_proc, 10);
212 Exception
213 When hr_api.check_integrity_violated Then
214 -- A check constraint has been violated
215 per_add_shd.g_api_dml := false; -- Unset the api dml status
216 per_add_shd.constraint_error
217 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
218 When hr_api.parent_integrity_violated Then
219 -- Parent integrity has been violated
220 per_add_shd.g_api_dml := false; -- Unset the api dml status
221 per_add_shd.constraint_error
222 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
223 When hr_api.unique_integrity_violated Then
224 -- Unique integrity has been violated
225 per_add_shd.g_api_dml := false; -- Unset the api dml status
226 per_add_shd.constraint_error
227 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
228 When Others Then
229 per_add_shd.g_api_dml := false; -- Unset the api dml status
230 Raise;
231 End insert_dml;
232 --
233 -- ----------------------------------------------------------------------------
234 -- |------------------------------< pre_insert >------------------------------|
235 -- ----------------------------------------------------------------------------
236 -- {Start Of Comments}
237 --
238 -- Description:
239 -- This private procedure contains any processing which is required before
240 -- the insert dml. Presently, if the entity has a corresponding primary
241 -- key which is maintained by an associating sequence, the primary key for
242 -- the entity will be populated with the next sequence value in
243 -- preparation for the insert dml.
244 --
245 -- Pre Conditions:
246 -- This is an internal procedure which is called from the ins procedure.
247 --
248 -- In Arguments:
249 -- A Pl/Sql record structre.
250 --
251 -- Post Success:
252 -- Processing continues.
253 --
254 -- Post Failure:
255 -- If an error has occurred, an error message and exception will be raised
256 -- but not handled.
257 --
258 -- Developer Implementation Notes:
259 -- Any pre-processing required before the insert dml is issued should be
260 -- coded within this procedure. As stated above, a good example is the
261 -- generation of a primary key number via a corresponding sequence.
262 -- It is important to note that any 3rd party maintenance should be reviewed
263 -- before placing in this procedure.
264 --
265 -- Access Status:
266 -- Internal Table Handler Use Only.
267 --
268 -- {End Of Comments}
269 -- ----------------------------------------------------------------------------
270 Procedure pre_insert(p_rec in out nocopy per_add_shd.g_rec_type) is
271 --
272 l_proc varchar2(72) := g_package||'pre_insert';
273 l_exists varchar2(1);
274 --
275 Cursor C_Sel1 is select per_addresses_s.nextval from sys.dual;
276 --
277 Cursor C_Sel2 is
278 select null
279 from per_addresses
280 where address_id = per_add_ins.g_address_id_i;
281 --
282 l_date date;
283 l_last_update date;
284 --
285 l_number_table dbms_describe.number_table;
286 l_varchar_table dbms_describe.varchar2_table;
287 l_package_exists boolean;
288 l_package_name varchar2(2000);
289 --
290 Begin
291 hr_utility.set_location('Entering:'||l_proc, 10);
292 --
293 if per_add_ins.g_address_id_i is not null then
294 --
295 -- Verify registered primary key values not already in use
296 --
297 Open C_Sel2;
298 Fetch C_Sel2 into l_exists;
299 If C_Sel2%found then
300 Close C_Sel2;
301 --
302 -- The primary key values are already in use.
303 --
304 fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
305 fnd_message.set_token('TABLE_NAME','per_addresses');
306 fnd_message.raise_error;
307 end if;
308 Close C_Sel2;
309 --
310 -- Use registered key values and clear globals
311 --
312 p_rec.address_id :=
313 per_add_ins.g_address_id_i;
314 per_add_ins.g_address_id_i := null;
315 else
316 --
317 -- Select the next sequence number
318 --
319 Open C_Sel1;
320 Fetch C_Sel1 Into p_rec.address_id;
321 Close C_Sel1;
322 end if;
323 --
324 hr_utility.set_location(' Leaving:'||l_proc, 10);
325 --
326 -- Enhancement added for Location Searching
327 --
328 hr_utility.set_location(' Entering:'||l_proc, 11);
329 if( (fnd_profile.value('IRC_INSTALLED_FLAG') in ('Y','D')) and
330 (fnd_profile.value('IRC_GEOCODE_HOST')is not null)
331 ) then
332 p_rec.geometry := Irc_location_utility.address2geometry
333 (address_line1 => p_rec.address_line1
334 ,address_line2 => p_rec.address_line2
335 ,address_line3 => p_rec.address_line3
336 ,address_line4 => p_rec.town_or_city
337 ,address_line5 => p_rec.region_1
338 ,address_line6 => p_rec.region_2
339 ,address_line7 => p_rec.region_3
340 ,address_line8 => p_rec.postal_code
341 ,country => p_rec.country
342 );
343 end if;
344 hr_utility.set_location(' Leaving:'||l_proc, 12);
345 -- Set taxation address defaults
346
347 begin -- Block begin .Bug# 2416832
348 --
349 hr_utility.set_location('Entering:'||l_proc, 15);
350 If p_rec.style = 'US' and
351 p_rec.primary_flag = 'Y'and
352 p_rec.add_information17 IS NULL and
353 p_rec.add_information18 IS NULL and
354 p_rec.add_information19 IS NULL and
355 p_rec.add_information20 IS NULL
356 Then
357 hr_utility.set_location('Entering:'||l_proc, 17);
358 --
359 -- Bug 3363711 Starts Here
360 --
361 l_date := TO_DATE('01/01/'||(TO_CHAR(p_rec.date_from,'YYYY')),
362 'DD/MM/YYYY');
363 --
364 -- Bug 3363711 Ends Here
365 --
366 Select max(date_from) into l_last_update
367 From per_addresses_v
368 Where person_id = p_rec.person_id and
369 primary_flag = 'Y' and
370 date_from <= p_rec.date_from;
371 If l_date <= l_last_update
372 Then
373 Select
374 nvl(add_information17,''),
375 nvl(add_information18,''),
376 nvl(add_information19,''),
377 nvl(add_information20,'')
378 into
379 p_rec.add_information17,
380 p_rec.add_information18,
381 p_rec.add_information19,
382 p_rec.add_information20
383 From per_addresses_v
384 Where
385 person_id = p_rec.person_id and
386 primary_flag = 'Y' and
387 date_from =
388 (Select max(date_from)
389 From per_addresses_v
390 Where date_from between l_date and p_rec.date_from and
391 person_id = p_rec.person_id and
392 primary_flag = 'Y');
393 Else
394 Select town_or_city,
395 region_1,
396 region_2,
397 postal_code
398 Into p_rec.add_information18,
399 p_rec.add_information19,
400 p_rec.add_information17,
401 p_rec.add_information20
402 From per_addresses_v
403 Where person_id = p_rec.person_id and
404 primary_flag = 'Y' and
405 l_date between date_from and
406 nvl(date_to, TO_DATE('31/12/4712', 'DD/MM/YYYY')) and
407 region_2 = 'IN';
408 End if;
409 --
410 hr_utility.set_location(' Leaving:'||l_proc, 17);
411 End if;
412 --
413 EXCEPTION
414 WHEN NO_DATA_FOUND THEN
415 p_rec.add_information17 := '';
416 p_rec.add_information18 := '';
417 p_rec.add_information19 := '';
418 p_rec.add_information20 := '';
419 --
420 end; -- Block end. Bug# 2416832
421 --
422 per_add_shd.derive_locale(p_rec);
423 --
424 hr_utility.set_location(' Leaving:'||l_proc, 15);
425 End pre_insert;
426 --
427 -- ----------------------------------------------------------------------------
428 -- |-----------------------------< post_insert >------------------------------|
429 -- ----------------------------------------------------------------------------
430 -- {Start Of Comments}
431 --
432 -- Description:
433 -- This private procedure contains any processing which is required after the
434 -- insert dml.
435 --
436 -- Pre Conditions:
437 -- This is an internal procedure which is called from the ins procedure.
438 --
439 -- In Arguments:
440 -- A Pl/Sql record structre.
441 --
442 -- Post Success:
443 -- Processing continues.
444 --
445 -- Post Failure:
446 -- If an error has occurred, an error message and exception will be raised
447 -- but not handled.
448 --
449 -- Developer Implementation Notes:
450 -- Any post-processing required after the insert dml is issued should be
451 -- coded within this procedure. It is important to note that any 3rd party
452 -- maintenance should be reviewed before placing in this procedure.
453 --
454 -- Access Status:
455 -- Internal Table Handler Use Only.
456 --
457 -- {End Of Comments}
458 -- ----------------------------------------------------------------------------
459 Procedure post_insert(p_rec in per_add_shd.g_rec_type
460 ,p_effective_date in date
461 ,p_validate_county in boolean
462 ) is
463
464 --
465 l_proc varchar2(72) := g_package||'post_insert';
466 --
467 --
468 -- Fix for WWBUG 1408379
469 --
470 l_old ben_add_ler.g_add_ler_rec;
471 l_new ben_add_ler.g_add_ler_rec;
472 --
473 -- End of Fix for WWBUG 1408379
474 --
475 Begin
476 hr_utility.set_location('Entering:'||l_proc, 5);
477 --
478 -- Start of API User Hook for post_insert.
479 begin
480 per_add_rki.after_insert
481 (p_address_id => p_rec.address_id
482 ,p_business_group_id => p_rec.business_group_id
483 ,p_person_id => p_rec.person_id
484 ,p_date_from => p_rec.date_from
485 ,p_primary_flag => p_rec.primary_flag
486 ,p_style => p_rec.style
487 ,p_address_line1 => p_rec.address_line1
488 ,p_address_line2 => p_rec.address_line2
489 ,p_address_line3 => p_rec.address_line3
490 ,p_address_type => p_rec.address_type
491 ,p_comments => p_rec.comments
492 ,p_country => p_rec.country
493 ,p_date_to => p_rec.date_to
494 ,p_postal_code => p_rec.postal_code
495 ,p_region_1 => p_rec.region_1
496 ,p_region_2 => p_rec.region_2
497 ,p_region_3 => p_rec.region_3
498 ,p_telephone_number_1 => p_rec.telephone_number_1
499 ,p_telephone_number_2 => p_rec.telephone_number_2
500 ,p_telephone_number_3 => p_rec.telephone_number_3
501 ,p_town_or_city => p_rec.town_or_city
502 ,p_request_id => p_rec.request_id
503 ,p_program_application_id => p_rec.program_application_id
504 ,p_program_id => p_rec.program_id
505 ,p_program_update_date => p_rec.program_update_date
506 ,p_addr_attribute_category => p_rec.addr_attribute_category
507 ,p_addr_attribute1 => p_rec.addr_attribute1
508 ,p_addr_attribute2 => p_rec.addr_attribute2
509 ,p_addr_attribute3 => p_rec.addr_attribute3
510 ,p_addr_attribute4 => p_rec.addr_attribute4
511 ,p_addr_attribute5 => p_rec.addr_attribute5
512 ,p_addr_attribute6 => p_rec.addr_attribute6
513 ,p_addr_attribute7 => p_rec.addr_attribute7
514 ,p_addr_attribute8 => p_rec.addr_attribute8
515 ,p_addr_attribute9 => p_rec.addr_attribute9
516 ,p_addr_attribute10 => p_rec.addr_attribute10
517 ,p_addr_attribute11 => p_rec.addr_attribute11
518 ,p_addr_attribute12 => p_rec.addr_attribute12
519 ,p_addr_attribute13 => p_rec.addr_attribute13
520 ,p_addr_attribute14 => p_rec.addr_attribute14
521 ,p_addr_attribute15 => p_rec.addr_attribute15
522 ,p_addr_attribute16 => p_rec.addr_attribute16
523 ,p_addr_attribute17 => p_rec.addr_attribute17
524 ,p_addr_attribute18 => p_rec.addr_attribute18
525 ,p_addr_attribute19 => p_rec.addr_attribute19
526 ,p_addr_attribute20 => p_rec.addr_attribute20
527 ,p_add_information13 => p_rec.add_information13
528 ,p_add_information14 => p_rec.add_information14
529 ,p_add_information15 => p_rec.add_information15
530 ,p_add_information16 => p_rec.add_information16
531 ,p_add_information17 => p_rec.add_information17
532 ,p_add_information18 => p_rec.add_information18
533 ,p_add_information19 => p_rec.add_information19
534 ,p_add_information20 => p_rec.add_information20
535 ,p_object_version_number => p_rec.object_version_number
536 ,p_effective_date => p_effective_date
537 ,p_validate_county => p_validate_county
538 ,p_party_id => p_rec.party_id -- HR/TCA merge
539 );
540 exception
541 when hr_api.cannot_find_prog_unit then
542 hr_api.cannot_find_prog_unit_error
543 (p_module_name => 'PER_ADDRESSES'
544 ,p_hook_type => 'AI'
545 );
546 end;
547 --
548 -- Fix for WWBUG 1408379
549 --
550 l_new.person_id := p_rec.person_id;
551 l_new.business_group_id := p_rec.business_group_id;
552 l_new.date_from := p_rec.date_from;
553 l_new.date_to := p_rec.date_to;
554 l_new.primary_flag := p_rec.primary_flag;
555 l_new.postal_code := p_rec.postal_code;
556 l_new.region_2 := p_rec.region_2;
557 l_new.address_type := p_rec.address_type;
558 l_new.address_id := p_rec.address_id;
559 --
560 ben_add_ler.ler_chk(p_old => l_old,
561 p_new => l_new,
562 p_effective_date => l_new.date_from);
563 --
564 -- End of Fix for WWBUG 1408379
565 --
566 -- End of API User Hook for post_insert.
567 --
568 hr_utility.set_location(' Leaving:'||l_proc, 10);
569 End post_insert;
570 --
571 -- ----------------------------------------------------------------------------
572 -- |---------------------------------< ins >----------------------------------|
573 -- ----------------------------------------------------------------------------
574 Procedure ins
575 (p_rec in out nocopy per_add_shd.g_rec_type
576 ,p_validate in boolean default false
577 ,p_effective_date in date
578 ,p_validate_county in boolean default true
579 ) is
580 --
581 l_proc varchar2(72) := g_package||'ins';
582 --
583 Begin
584 hr_utility.set_location('Entering:'||l_proc, 5);
585 --
586 -- Determine if the business process is to be validated.
587 --
588 If p_validate then
589 --
590 -- Issue the savepoint.
591 --
592 SAVEPOINT ins_per_add;
593 End If;
594 --
595 -- Call the supporting insert validate operations
596 --
597 per_add_bus.insert_validate(p_rec
598 ,p_effective_date
599 ,p_validate_county
600 );
601 -- Call to raise any errors on multi-message list
602 hr_multi_message.end_validation_set;
603 --
604 -- Call the supporting pre-insert operation
605 --
606 pre_insert(p_rec);
607 --
608 -- Insert the row
609 --
610 insert_dml(p_rec);
611 --
612 -- Call the supporting post-insert operation
613 --
614 post_insert(p_rec
615 ,p_effective_date
616 ,p_validate_county
617 );
618 --
619 -- Call to raise any errors on multi-message list
620 hr_multi_message.end_validation_set;
621 --
622 -- If we are validating then raise the Validate_Enabled exception
623 --
624 If p_validate then
625 Raise HR_Api.Validate_Enabled;
626 End If;
627 --
628 hr_utility.set_location(' Leaving:'||l_proc, 10);
629 Exception
630 When HR_Api.Validate_Enabled Then
631 --
632 -- As the Validate_Enabled exception has been raised
633 -- we must rollback to the savepoint
634 --
635 ROLLBACK TO ins_per_add;
636 end ins;
637 --
638 -- ----------------------------------------------------------------------------
639 -- |---------------------------------< ins >----------------------------------|
640 -- ----------------------------------------------------------------------------
641 Procedure ins
642 (p_address_id out nocopy number
643 ,p_business_group_id in number default null -- HR/TCA
644 ,p_person_id in number default null -- HR/TCA
645 ,p_date_from in date
646 ,p_primary_flag in varchar2
647 ,p_style in varchar2
648 ,p_address_line1 in varchar2 default null
649 ,p_address_line2 in varchar2 default null
650 ,p_address_line3 in varchar2 default null
651 ,p_address_type in varchar2 default null
652 ,p_comments in long default null
653 ,p_country in varchar2 default null
654 ,p_date_to in date default null
655 ,p_postal_code in varchar2 default null
656 ,p_region_1 in varchar2 default null
657 ,p_region_2 in varchar2 default null
658 ,p_region_3 in varchar2 default null
659 ,p_telephone_number_1 in varchar2 default null
660 ,p_telephone_number_2 in varchar2 default null
661 ,p_telephone_number_3 in varchar2 default null
662 ,p_town_or_city in varchar2 default null
663 ,p_request_id in number default null
664 ,p_program_application_id in number default null
665 ,p_program_id in number default null
666 ,p_program_update_date in date default null
667 ,p_addr_attribute_category in varchar2 default null
668 ,p_addr_attribute1 in varchar2 default null
669 ,p_addr_attribute2 in varchar2 default null
670 ,p_addr_attribute3 in varchar2 default null
671 ,p_addr_attribute4 in varchar2 default null
672 ,p_addr_attribute5 in varchar2 default null
673 ,p_addr_attribute6 in varchar2 default null
674 ,p_addr_attribute7 in varchar2 default null
675 ,p_addr_attribute8 in varchar2 default null
676 ,p_addr_attribute9 in varchar2 default null
677 ,p_addr_attribute10 in varchar2 default null
678 ,p_addr_attribute11 in varchar2 default null
679 ,p_addr_attribute12 in varchar2 default null
680 ,p_addr_attribute13 in varchar2 default null
681 ,p_addr_attribute14 in varchar2 default null
682 ,p_addr_attribute15 in varchar2 default null
683 ,p_addr_attribute16 in varchar2 default null
684 ,p_addr_attribute17 in varchar2 default null
685 ,p_addr_attribute18 in varchar2 default null
686 ,p_addr_attribute19 in varchar2 default null
687 ,p_addr_attribute20 in varchar2 default null
688 ,p_add_information13 in varchar2 default null
689 ,p_add_information14 in varchar2 default null
690 ,p_add_information15 in varchar2 default null
691 ,p_add_information16 in varchar2 default null
692 ,p_add_information17 in varchar2 default null
693 ,p_add_information18 in varchar2 default null
694 ,p_add_information19 in varchar2 default null
695 ,p_add_information20 in varchar2 default null
696 ,p_object_version_number out nocopy number
697 ,p_party_id in number default null
698 ,p_validate in boolean default false
699 ,p_effective_date in date
700 ,p_validate_county in boolean default true
701 ) is
702 --
703 l_rec per_add_shd.g_rec_type;
704 l_proc varchar2(72) := g_package||'ins';
705 --
706 Begin
707 hr_utility.set_location('Entering:'||l_proc, 5);
708 --
709 -- Call conversion function to turn arguments into the
710 -- p_rec structure.
711 --
712 l_rec :=
713 per_add_shd.convert_args
714 (
715 null,
716 p_business_group_id,
717 p_person_id,
718 p_date_from,
719 p_primary_flag,
720 p_style,
721 p_address_line1,
722 p_address_line2,
723 p_address_line3,
724 p_address_type,
725 p_comments,
726 p_country,
727 p_date_to,
728 p_postal_code,
729 p_region_1,
730 p_region_2,
731 p_region_3,
732 p_telephone_number_1,
733 p_telephone_number_2,
734 p_telephone_number_3,
735 p_town_or_city,
736 p_request_id,
737 p_program_application_id,
738 p_program_id,
739 p_program_update_date,
740 p_addr_attribute_category,
741 p_addr_attribute1,
742 p_addr_attribute2,
743 p_addr_attribute3,
744 p_addr_attribute4,
745 p_addr_attribute5,
746 p_addr_attribute6,
747 p_addr_attribute7,
748 p_addr_attribute8,
749 p_addr_attribute9,
750 p_addr_attribute10,
751 p_addr_attribute11,
752 p_addr_attribute12,
753 p_addr_attribute13,
754 p_addr_attribute14,
755 p_addr_attribute15,
756 p_addr_attribute16,
757 p_addr_attribute17,
758 p_addr_attribute18,
759 p_addr_attribute19,
760 p_addr_attribute20,
761 p_add_information13,
762 p_add_information14,
763 p_add_information15,
764 p_add_information16,
765 p_add_information17,
766 p_add_information18,
767 p_add_information19,
768 p_add_information20,
769 null,
770 p_party_id -- HR/TCA merge
771 );
772 --
773 -- Having converted the arguments into the per_add_rec
774 -- plsql record structure we call the corresponding record business process.
775 --
776 ins(l_rec
777 ,p_validate
778 ,p_effective_date
779 ,p_validate_county
780 );
781 --
782 -- As the primary key argument(s)
783 -- are specified as an OUT's we must set these values.
784 --
785 p_address_id := l_rec.address_id;
786 p_object_version_number := l_rec.object_version_number;
787 --
788 hr_utility.set_location(' Leaving:'||l_proc, 10);
789 End ins;
790 --
791 end per_add_ins;