[Home] [Help]
PACKAGE BODY: APPS.PER_PER_SHD
Source
1 Package Body per_per_shd as
2 /* $Header: peperrhi.pkb 120.14.12010000.3 2008/10/01 06:47:05 pvelugul ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_per_shd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------< return_api_dml_status >-------------------------|
12 -- ----------------------------------------------------------------------------
13 Function return_api_dml_status Return Boolean Is
14 --
15 l_proc varchar2(72) := g_package||'return_api_dml_status';
16 --
17 Begin
18 hr_utility.set_location('Entering:'||l_proc, 5);
19 --
20 Return (nvl(g_api_dml, false));
21 --
22 hr_utility.set_location(' Leaving:'||l_proc, 10);
23 End return_api_dml_status;
24 --
25 -- ----------------------------------------------------------------------------
26 -- |---------------------------< constraint_error >---------------------------|
27 -- ----------------------------------------------------------------------------
28 Procedure constraint_error
29 (p_constraint_name in all_constraints.constraint_name%TYPE) Is
30 --
31 l_proc varchar2(72) := g_package||'constraint_error';
32 --
33 Begin
34 hr_utility.set_location('Entering:'||l_proc, 5);
35 --
36 If (p_constraint_name = 'PER_PEOPLE_F_FK1') Then
37 -- Error: The Business Group is not defined.
38 hr_utility.set_message(801, 'HR_6673_PO_EMP_NO_BG');
39 hr_utility.raise_error;
40 ElsIf (p_constraint_name = 'PER_PEOPLE_F_FK2') Then
41 -- Error: Invalid person type
42 hr_utility.set_message(801, 'HR_7513_PER_TYPE_INVALID');
43 hr_utility.raise_error;
44 ElsIf (p_constraint_name = 'PER_PEOPLE_F_PK') Then
45 -- Error: The primary key specified is invalid
46 hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
47 hr_utility.raise_error;
48 ElsIf (p_constraint_name = 'PER_PER_EXPENSE_CHECK_SEND_CHK') Then
49 hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50 hr_utility.set_message_token('PROCEDURE', l_proc);
51 hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52 hr_utility.raise_error;
53 ElsIf (p_constraint_name = 'PER_PER_REGISTERED_DISABLE_CHK') Then
54 hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55 hr_utility.set_message_token('PROCEDURE', l_proc);
56 hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57 hr_utility.raise_error;
58 ElsIf (p_constraint_name = 'PER_PER_SEX_CHK') Then
59 hr_utility.set_message(801, 'HR_7511_PER_SEX_INVALID');
60 hr_utility.raise_error;
61 ElsIf (p_constraint_name = 'PER_PER_ON_MILITARY_SRV_CHK') Then
62 hr_utility.set_message(800, 'PER_52115_PER_INV_ON_MIL_SERV');
63 hr_utility.raise_error;
64 ElsIf (p_constraint_name = 'PER_PER_RESUME_EXISTS_CHK') Then
65 hr_utility.set_message(800, 'PER_52116_PER_INV_RES_EXIST');
66 hr_utility.raise_error;
67 ElsIf (p_constraint_name = 'PER_PER_SECOND_PASSPORT_CHK') Then
68 hr_utility.set_message(800, 'PER_52117_PER_INV_SEC_PAS_EXT');
69 hr_utility.raise_error;
70 Elsif (p_constraint_name = 'PER_BEN_NO_CVG_F_CHK') Then
71 hr_utility.set_message(800,'PER_52387_BEN_NO_CVG_F');
72 hr_utility.raise_error;
73 Elsif (p_constraint_name = 'PER_DPDNT_VLNTRY_SVCE_CHK') Then
74 hr_utility.set_message(800,'PER_52389_DPDNT_VLNTRY_SVCE_F');
75 hr_utility.raise_error;
76 Else
77 hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
78 hr_utility.set_message_token('PROCEDURE', l_proc);
79 hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
80 hr_utility.raise_error;
81 End If;
82 --
83 hr_utility.set_location(' Leaving:'||l_proc, 10);
84 End constraint_error;
85 --
86 -- ----------------------------------------------------------------------------
87 -- |-----------------------------< api_updating >-----------------------------|
88 -- ----------------------------------------------------------------------------
89 Function api_updating
90 (p_effective_date in date,
91 p_person_id in number,
92 p_object_version_number in number
93 ) Return Boolean Is
94 --
95 --
96 -- Cursor selects the 'current' row from the HR Schema
97 --
98 Cursor C_Sel1 is
99 select
100 person_id,
101 effective_start_date,
102 effective_end_date,
103 business_group_id,
104 person_type_id,
105 last_name,
106 start_date,
107 applicant_number,
108 comment_id,
109 null,
110 current_applicant_flag,
111 current_emp_or_apl_flag,
112 current_employee_flag,
113 date_employee_data_verified,
114 date_of_birth,
115 email_address,
116 employee_number,
117 expense_check_send_to_address,
118 first_name,
119 full_name,
120 known_as,
121 marital_status,
122 middle_names,
123 nationality,
124 national_identifier,
125 previous_last_name,
126 registered_disabled_flag,
127 sex,
128 title,
129 vendor_id,
130 work_telephone,
131 request_id,
132 program_application_id,
133 program_id,
134 program_update_date,
135 attribute_category,
136 attribute1,
137 attribute2,
138 attribute3,
139 attribute4,
140 attribute5,
141 attribute6,
142 attribute7,
143 attribute8,
144 attribute9,
145 attribute10,
146 attribute11,
147 attribute12,
148 attribute13,
149 attribute14,
150 attribute15,
151 attribute16,
152 attribute17,
153 attribute18,
154 attribute19,
155 attribute20,
156 attribute21,
157 attribute22,
158 attribute23,
159 attribute24,
160 attribute25,
161 attribute26,
162 attribute27,
163 attribute28,
164 attribute29,
165 attribute30,
166 per_information_category,
167 per_information1,
168 per_information2,
169 per_information3,
170 per_information4,
171 per_information5,
172 per_information6,
173 per_information7,
174 per_information8,
175 per_information9,
176 per_information10,
177 per_information11,
178 per_information12,
179 per_information13,
180 per_information14,
181 per_information15,
182 per_information16,
183 per_information17,
184 per_information18,
185 per_information19,
186 per_information20,
187 object_version_number,
188 suffix,
189 DATE_OF_DEATH ,
190 BACKGROUND_CHECK_STATUS ,
191 BACKGROUND_DATE_CHECK ,
192 BLOOD_TYPE ,
193 CORRESPONDENCE_LANGUAGE ,
194 FAST_PATH_EMPLOYEE ,
195 FTE_CAPACITY ,
196 HOLD_APPLICANT_DATE_UNTIL ,
197 HONORS ,
198 INTERNAL_LOCATION ,
199 LAST_MEDICAL_TEST_BY ,
200 LAST_MEDICAL_TEST_DATE ,
201 MAILSTOP ,
202 OFFICE_NUMBER ,
203 ON_MILITARY_SERVICE ,
204 ORDER_NAME ,
205 PRE_NAME_ADJUNCT ,
206 PROJECTED_START_DATE ,
207 REHIRE_AUTHORIZOR ,
208 REHIRE_RECOMMENDATION ,
209 RESUME_EXISTS ,
210 RESUME_LAST_UPDATED ,
211 SECOND_PASSPORT_EXISTS ,
212 STUDENT_STATUS ,
213 WORK_SCHEDULE ,
214 PER_INFORMATION21 ,
215 PER_INFORMATION22 ,
216 PER_INFORMATION23 ,
217 PER_INFORMATION24 ,
218 PER_INFORMATION25 ,
219 PER_INFORMATION26 ,
220 PER_INFORMATION27 ,
221 PER_INFORMATION28 ,
222 PER_INFORMATION29 ,
223 PER_INFORMATION30 ,
224 REHIRE_REASON ,
225 BENEFIT_GROUP_ID ,
226 RECEIPT_OF_DEATH_CERT_DATE ,
227 COORD_BEN_MED_PLN_NO ,
228 COORD_BEN_NO_CVG_FLAG ,
229 COORD_BEN_MED_EXT_ER,
230 COORD_BEN_MED_PL_NAME,
231 COORD_BEN_MED_INSR_CRR_NAME,
232 COORD_BEN_MED_INSR_CRR_IDENT,
233 COORD_BEN_MED_CVG_STRT_DT,
234 COORD_BEN_MED_CVG_END_DT,
235 USES_TOBACCO_FLAG ,
236 DPDNT_ADOPTION_DATE ,
237 DPDNT_VLNTRY_SVCE_FLAG ,
238 ORIGINAL_DATE_OF_HIRE ,
239 town_of_birth ,
240 region_of_birth ,
241 country_of_birth ,
242 global_person_id,
243 party_id,
244 npw_number,
245 current_npw_flag,
246 global_name,
247 local_name
248 from per_all_people_f
249 where person_id = p_person_id
250 and p_effective_date
251 between effective_start_date and effective_end_date;
252 --
253 l_proc varchar2(72) := g_package||'api_updating';
254 l_fct_ret boolean;
255 --
256 Begin
257 hr_utility.set_location('Entering:'||l_proc, 5);
258 --
259 If (p_effective_date is null or
260 p_person_id is null or
261 p_object_version_number is null) Then
262 --
263 -- One of the primary key arguments is null therefore we must
264 -- set the returning function value to false
265 --
266 l_fct_ret := false;
267 Else
268 If (p_person_id = g_old_rec.person_id and
269 p_object_version_number = g_old_rec.object_version_number) Then
270 hr_utility.set_location(l_proc, 10);
271 --
272 -- The g_old_rec is current therefore we must
273 -- set the returning function to true
274 --
275 l_fct_ret := true;
276 Else
277 --
278 -- Clear out the global variable which holds the previous system
279 -- person type
280 --
281 per_per_bus.g_previous_sys_per_type := null;
282 --
283 -- Select the current row
284 --
285 Open C_Sel1;
286 Fetch C_Sel1 Into g_old_rec;
287 If C_Sel1%notfound Then
288 Close C_Sel1;
289 --
290 -- The primary key is invalid therefore we must error
291 --
292 hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
293 hr_utility.raise_error;
294 End If;
295 Close C_Sel1;
296 If (p_object_version_number <> g_old_rec.object_version_number) Then
297 hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
298 hr_utility.raise_error;
299 End If;
300 hr_utility.set_location(l_proc, 15);
301 l_fct_ret := true;
302 End If;
303 End If;
304 hr_utility.set_location(' Leaving:'||l_proc, 20);
305 Return (l_fct_ret);
306 --
307 End api_updating;
308 --
309 -- ----------------------------------------------------------------------------
310 -- |--------------------------< find_dt_del_modes >---------------------------|
311 -- ----------------------------------------------------------------------------
312 Procedure find_dt_del_modes
313 (p_effective_date in date,
314 p_base_key_value in number,
315 p_zap out nocopy boolean,
316 p_delete out nocopy boolean,
317 p_future_change out nocopy boolean,
318 p_delete_next_change out nocopy boolean) is
319 --
320 l_proc varchar2(72) := g_package||'find_dt_del_modes';
321 --
322 --
323 --
324 --
325 Begin
326 hr_utility.set_location('Entering:'||l_proc, 5);
327 --
328 --
329 -- Call the corresponding datetrack api
330 --
331 dt_api.find_dt_del_modes
332 (p_effective_date => p_effective_date,
333 p_base_table_name => 'per_all_people_f',
334 p_base_key_column => 'person_id',
335 p_base_key_value => p_base_key_value,
336 p_zap => p_zap,
337 p_delete => p_delete,
338 p_future_change => p_future_change,
339 p_delete_next_change => p_delete_next_change);
340 --
341 hr_utility.set_location(' Leaving:'||l_proc, 10);
342 End find_dt_del_modes;
343 --
344 -- ----------------------------------------------------------------------------
345 -- |--------------------------< find_dt_upd_modes >---------------------------|
346 -- ----------------------------------------------------------------------------
347 Procedure find_dt_upd_modes
348 (p_effective_date in date,
349 p_base_key_value in number,
350 p_correction out nocopy boolean,
351 p_update out nocopy boolean,
352 p_update_override out nocopy boolean,
353 p_update_change_insert out nocopy boolean) is
354 --
355 l_proc varchar2(72) := g_package||'find_dt_upd_modes';
356 --
357 Begin
358 hr_utility.set_location('Entering:'||l_proc, 5);
359 --
360 -- Call the corresponding datetrack api
361 --
362 dt_api.find_dt_upd_modes
363 (p_effective_date => p_effective_date,
364 p_base_table_name => 'per_all_people_f',
365 p_base_key_column => 'person_id',
366 p_base_key_value => p_base_key_value,
367 p_correction => p_correction,
368 p_update => p_update,
369 p_update_override => p_update_override,
370 p_update_change_insert => p_update_change_insert);
371 --
372 hr_utility.set_location(' Leaving:'||l_proc, 10);
373 End find_dt_upd_modes;
374 --
375 -- ----------------------------------------------------------------------------
376 -- |------------------------< upd_effective_end_date >------------------------|
377 -- ----------------------------------------------------------------------------
378 Procedure upd_effective_end_date
379 (p_effective_date in date,
380 p_base_key_value in number,
381 p_new_effective_end_date in date,
382 p_validation_start_date in date,
383 p_validation_end_date in date,
384 p_object_version_number out nocopy number) is
385 --
386 l_proc varchar2(72) := g_package||'upd_effective_end_date';
387 l_object_version_number number;
391 --
388 --
389 Begin
390 hr_utility.set_location('Entering:'||l_proc, 5);
392 -- Because we are updating a row we must get the next object
393 -- version number.
394 --
395 l_object_version_number :=
396 dt_api.get_object_version_number
397 (p_base_table_name => 'per_all_people_f',
398 p_base_key_column => 'person_id',
399 p_base_key_value => p_base_key_value);
400 --
401 hr_utility.set_location(l_proc, 10);
402 g_api_dml := true; -- Set the api dml status
403 --
404 -- Update the specified datetrack row setting the effective
405 -- end date to the specified new effective end date.
406 --
407 update per_all_people_f t
408 set t.effective_end_date = p_new_effective_end_date,
409 t.object_version_number = l_object_version_number
410 where t.person_id = p_base_key_value
411 and p_effective_date
412 between t.effective_start_date and t.effective_end_date;
413 --
414 g_api_dml := false; -- Unset the api dml status
415 p_object_version_number := l_object_version_number;
416 hr_utility.set_location(' Leaving:'||l_proc, 15);
417 --
418 Exception
419 When Others Then
420 g_api_dml := false; -- Unset the api dml status
421 Raise;
422 End upd_effective_end_date;
423 --
424 -- ----------------------------------------------------------------------------
425 -- |---------------------------------< lck >----------------------------------|
426 -- ----------------------------------------------------------------------------
427 Procedure lck
428 (p_effective_date in date,
429 p_datetrack_mode in varchar2,
430 p_person_id in number,
431 p_object_version_number in number,
432 p_validation_start_date out nocopy date,
433 p_validation_end_date out nocopy date) is
434 --
435 l_proc varchar2(72) := g_package||'lck';
436 l_validation_start_date date;
437 l_validation_end_date date;
438 l_object_invalid exception;
439 l_argument varchar2(30);
440 --
441 -- Cursor C_Sel1 selects the current locked row as of session date
442 -- ensuring that the object version numbers match.
443 --
444 Cursor C_Sel1 is
445 select
446 person_id,
447 effective_start_date,
448 effective_end_date,
449 business_group_id,
450 person_type_id,
451 last_name,
452 start_date,
453 applicant_number,
454 comment_id,
455 null,
456 current_applicant_flag,
457 current_emp_or_apl_flag,
458 current_employee_flag,
459 date_employee_data_verified,
460 date_of_birth,
461 email_address,
462 employee_number,
463 expense_check_send_to_address,
464 first_name,
465 full_name,
466 known_as,
467 marital_status,
468 middle_names,
469 nationality,
470 national_identifier,
471 previous_last_name,
472 registered_disabled_flag,
473 sex,
474 title,
475 vendor_id,
476 work_telephone,
477 request_id,
478 program_application_id,
479 program_id,
480 program_update_date,
481 attribute_category,
482 attribute1,
483 attribute2,
484 attribute3,
485 attribute4,
486 attribute5,
487 attribute6,
488 attribute7,
489 attribute8,
490 attribute9,
491 attribute10,
492 attribute11,
493 attribute12,
494 attribute13,
495 attribute14,
496 attribute15,
497 attribute16,
498 attribute17,
499 attribute18,
500 attribute19,
501 attribute20,
502 attribute21,
503 attribute22,
504 attribute23,
505 attribute24,
506 attribute25,
507 attribute26,
508 attribute27,
509 attribute28,
510 attribute29,
511 attribute30,
512 per_information_category,
513 per_information1,
514 per_information2,
515 per_information3,
516 per_information4,
517 per_information5,
518 per_information6,
519 per_information7,
520 per_information8,
521 per_information9,
522 per_information10,
523 per_information11,
524 per_information12,
525 per_information13,
526 per_information14,
527 per_information15,
528 per_information16,
529 per_information17,
530 per_information18,
531 per_information19,
532 per_information20,
533 object_version_number,
534 suffix,
535 DATE_OF_DEATH ,
536 BACKGROUND_CHECK_STATUS ,
537 BACKGROUND_DATE_CHECK ,
538 BLOOD_TYPE ,
539 CORRESPONDENCE_LANGUAGE ,
540 FAST_PATH_EMPLOYEE ,
541 FTE_CAPACITY ,
542 HOLD_APPLICANT_DATE_UNTIL ,
543 HONORS ,
544 INTERNAL_LOCATION ,
545 LAST_MEDICAL_TEST_BY ,
546 LAST_MEDICAL_TEST_DATE ,
547 MAILSTOP ,
548 OFFICE_NUMBER ,
549 ON_MILITARY_SERVICE ,
550 ORDER_NAME ,
551 PRE_NAME_ADJUNCT ,
552 PROJECTED_START_DATE ,
556 RESUME_LAST_UPDATED ,
553 REHIRE_AUTHORIZOR ,
554 REHIRE_RECOMMENDATION ,
555 RESUME_EXISTS ,
557 SECOND_PASSPORT_EXISTS ,
558 STUDENT_STATUS ,
559 WORK_SCHEDULE ,
560 PER_INFORMATION21 ,
561 PER_INFORMATION22 ,
562 PER_INFORMATION23 ,
563 PER_INFORMATION24 ,
564 PER_INFORMATION25 ,
565 PER_INFORMATION26 ,
566 PER_INFORMATION27 ,
567 PER_INFORMATION28 ,
568 PER_INFORMATION29 ,
569 PER_INFORMATION30 ,
570 REHIRE_REASON ,
571 BENEFIT_GROUP_ID ,
572 RECEIPT_OF_DEATH_CERT_DATE ,
573 COORD_BEN_MED_PLN_NO ,
574 COORD_BEN_NO_CVG_FLAG ,
575 COORD_BEN_MED_EXT_ER,
576 COORD_BEN_MED_PL_NAME,
577 COORD_BEN_MED_INSR_CRR_NAME,
578 COORD_BEN_MED_INSR_CRR_IDENT,
579 COORD_BEN_MED_CVG_STRT_DT,
580 COORD_BEN_MED_CVG_END_DT,
581 USES_TOBACCO_FLAG ,
582 DPDNT_ADOPTION_DATE ,
583 DPDNT_VLNTRY_SVCE_FLAG ,
584 ORIGINAL_DATE_OF_HIRE ,
585 town_of_birth ,
586 region_of_birth ,
587 country_of_birth ,
588 global_person_id ,
589 party_id,
590 npw_number,
591 current_npw_flag,
592 global_name,
593 local_name
594 from per_people_f
595 where person_id = p_person_id
596 and p_effective_date
597 between effective_start_date and effective_end_date
598 for update nowait;
599 --
600 -- Cursor C_Sel3 select comment text
601 --
602 Cursor C_Sel3 is
603 select hc.comment_text
604 from hr_comments hc
605 where hc.comment_id = per_per_shd.g_old_rec.comment_id;
606 --
607 Begin
608 hr_utility.set_location('Entering:'||l_proc, 5);
609 --
610 -- Ensure that all the mandatory arguments are not null
611 --
612 hr_api.mandatory_arg_error(p_api_name => l_proc,
613 p_argument => 'effective_date',
614 p_argument_value => p_effective_date);
615 --
616 hr_api.mandatory_arg_error(p_api_name => l_proc,
617 p_argument => 'datetrack_mode',
618 p_argument_value => p_datetrack_mode);
619 --
620 hr_api.mandatory_arg_error(p_api_name => l_proc,
621 p_argument => 'person_id',
622 p_argument_value => p_person_id);
623 --
624 hr_api.mandatory_arg_error(p_api_name => l_proc,
625 p_argument => 'object_version_number',
626 p_argument_value => p_object_version_number);
627 --
628 -- Check to ensure the datetrack mode is not INSERT.
629 --
630 If (p_datetrack_mode <> 'INSERT') then
631 --
632 -- We must select and lock the current row.
633 --
634 Open C_Sel1;
635 Fetch C_Sel1 Into g_old_rec;
636 If C_Sel1%notfound then
637 Close C_Sel1;
638 --
639 -- The primary key is invalid therefore we must error
640 --
641 hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
642 hr_utility.raise_error;
643 End If;
644 Close C_Sel1;
645 If (p_object_version_number <> g_old_rec.object_version_number) Then
646 hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
647 hr_utility.raise_error;
648 End If;
649 hr_utility.set_location(l_proc, 15);
650 --
651 -- Providing we are doing an update and a comment_id exists then
652 -- we select the comment text.
653 --
654 If ((g_old_rec.comment_id is not null) and
655 (p_datetrack_mode = 'UPDATE' or
656 p_datetrack_mode = 'CORRECTION' or
657 p_datetrack_mode = 'UPDATE_OVERRIDE' or
658 p_datetrack_mode = 'UPDATE_CHANGE_INSERT')) then
659 Open C_Sel3;
660 Fetch C_Sel3 Into per_per_shd.g_old_rec.comments;
661 If C_Sel3%notfound then
662 --
663 -- The comments for the specified comment_id does not exist.
664 -- We must error due to data integrity problems.
665 --
666 Close C_Sel3;
667 hr_utility.set_message(801, 'HR_7202_COMMENT_TEXT_NOT_EXIST');
668 hr_utility.raise_error;
669 End If;
670 Close C_Sel3;
671 End If;
672 --
673 -- Validate the datetrack mode mode getting the validation start
674 -- and end dates for the specified datetrack operation.
675 --
676 dt_api.validate_dt_mode
677 (p_effective_date => p_effective_date,
678 p_datetrack_mode => p_datetrack_mode,
679 p_base_table_name => 'per_people_f',
680 p_base_key_column => 'person_id',
681 p_base_key_value => p_person_id,
682 p_child_table_name1 => 'per_contracts_f',
683 p_child_key_column1 => 'contract_id',
687 Else
684 p_enforce_foreign_locking => true,
685 p_validation_start_date => l_validation_start_date,
686 p_validation_end_date => l_validation_end_date);
688 --
689 -- We are doing a datetrack 'INSERT' which is illegal within this
690 -- procedure therefore we must error (note: to lck on insert the
691 -- private procedure ins_lck should be called).
692 --
693 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
694 hr_utility.set_message_token('PROCEDURE', l_proc);
695 hr_utility.set_message_token('STEP','20');
696 hr_utility.raise_error;
697 End If;
698 --
699 -- Set the validation start and end date OUT arguments
700 --
701 p_validation_start_date := l_validation_start_date;
702 p_validation_end_date := l_validation_end_date;
703 --
704 hr_utility.set_location(' Leaving:'||l_proc, 30);
705 --
706 -- We need to trap the ORA LOCK exception
707 --
708 Exception
709 When HR_Api.Object_Locked then
710 --
711 -- The object is locked therefore we need to supply a meaningful
712 -- error message.
713 --
714 hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
715 hr_utility.set_message_token('TABLE_NAME', 'per_people_f');
716 hr_utility.raise_error;
717 When l_object_invalid then
718 --
719 -- The object doesn't exist or is invalid
720 --
721 hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
722 hr_utility.set_message_token('TABLE_NAME', 'per_people_f');
723 hr_utility.raise_error;
724 End lck;
725 --
726 -- ----------------------------------------------------------------------------
727 -- |-----------------------------< convert_args >-----------------------------|
728 -- ----------------------------------------------------------------------------
729 Function convert_args
730 (
731 p_person_id in number,
732 p_effective_start_date in date,
733 p_effective_end_date in date,
734 p_business_group_id in number,
735 p_person_type_id in number,
736 p_last_name in varchar2,
737 p_start_date in date,
738 p_applicant_number in varchar2,
739 p_comment_id in number,
740 p_comments in varchar2,
741 p_current_applicant_flag in varchar2,
742 p_current_emp_or_apl_flag in varchar2,
743 p_current_employee_flag in varchar2,
744 p_date_employee_data_verified in date,
745 p_date_of_birth in date,
746 p_email_address in varchar2,
747 p_employee_number in varchar2,
748 p_expense_check_send_to_addres in varchar2,
749 p_first_name in varchar2,
750 p_full_name in varchar2,
751 p_known_as in varchar2,
752 p_marital_status in varchar2,
753 p_middle_names in varchar2,
754 p_nationality in varchar2,
755 p_national_identifier in varchar2,
756 p_previous_last_name in varchar2,
757 p_registered_disabled_flag in varchar2,
758 p_sex in varchar2,
759 p_title in varchar2,
760 p_vendor_id in number,
761 p_work_telephone in varchar2,
762 p_request_id in number,
763 p_program_application_id in number,
764 p_program_id in number,
765 p_program_update_date in date,
766 p_attribute_category in varchar2,
767 p_attribute1 in varchar2,
768 p_attribute2 in varchar2,
769 p_attribute3 in varchar2,
770 p_attribute4 in varchar2,
771 p_attribute5 in varchar2,
772 p_attribute6 in varchar2,
773 p_attribute7 in varchar2,
774 p_attribute8 in varchar2,
775 p_attribute9 in varchar2,
776 p_attribute10 in varchar2,
777 p_attribute11 in varchar2,
778 p_attribute12 in varchar2,
779 p_attribute13 in varchar2,
780 p_attribute14 in varchar2,
781 p_attribute15 in varchar2,
782 p_attribute16 in varchar2,
783 p_attribute17 in varchar2,
784 p_attribute18 in varchar2,
785 p_attribute19 in varchar2,
786 p_attribute20 in varchar2,
787 p_attribute21 in varchar2,
788 p_attribute22 in varchar2,
789 p_attribute23 in varchar2,
790 p_attribute24 in varchar2,
791 p_attribute25 in varchar2,
792 p_attribute26 in varchar2,
793 p_attribute27 in varchar2,
794 p_attribute28 in varchar2,
795 p_attribute29 in varchar2,
796 p_attribute30 in varchar2,
797 p_per_information_category in varchar2,
801 p_per_information4 in varchar2,
798 p_per_information1 in varchar2,
799 p_per_information2 in varchar2,
800 p_per_information3 in varchar2,
802 p_per_information5 in varchar2,
803 p_per_information6 in varchar2,
804 p_per_information7 in varchar2,
805 p_per_information8 in varchar2,
806 p_per_information9 in varchar2,
807 p_per_information10 in varchar2,
808 p_per_information11 in varchar2,
809 p_per_information12 in varchar2,
810 p_per_information13 in varchar2,
811 p_per_information14 in varchar2,
812 p_per_information15 in varchar2,
813 p_per_information16 in varchar2,
814 p_per_information17 in varchar2,
815 p_per_information18 in varchar2,
816 p_per_information19 in varchar2,
817 p_per_information20 in varchar2,
818 p_object_version_number in number,
819 p_suffix in varchar2,
820 p_DATE_OF_DEATH in DATE,
821 p_BACKGROUND_CHECK_STATUS in varchar2,
822 p_BACKGROUND_DATE_CHECK in DATE,
823 p_BLOOD_TYPE in varchar2,
824 p_CORRESPONDENCE_LANGUAGE in varchar2,
825 p_FAST_PATH_EMPLOYEE in varchar2,
826 p_FTE_CAPACITY in NUMBER,
827 p_HOLD_APPLICANT_DATE_UNTIL in DATE,
828 p_HONORS in varchar2,
829 p_INTERNAL_LOCATION in varchar2,
830 p_LAST_MEDICAL_TEST_BY in varchar2,
831 p_LAST_MEDICAL_TEST_DATE in DATE,
832 p_MAILSTOP in varchar2,
833 p_OFFICE_NUMBER in varchar2,
834 p_ON_MILITARY_SERVICE in varchar2,
835 p_ORDER_NAME in varchar2,
836 p_PRE_NAME_ADJUNCT in varchar2,
837 p_PROJECTED_START_DATE in DATE,
838 p_REHIRE_AUTHORIZOR in varchar2,
839 p_REHIRE_RECOMMENDATION in varchar2,
840 p_RESUME_EXISTS in varchar2,
841 p_RESUME_LAST_UPDATED in DATE,
842 p_SECOND_PASSPORT_EXISTS in varchar2,
843 p_STUDENT_STATUS in varchar2,
844 p_WORK_SCHEDULE in varchar2,
845 p_PER_INFORMATION21 in varchar2,
846 p_PER_INFORMATION22 in varchar2,
847 p_PER_INFORMATION23 in varchar2,
848 p_PER_INFORMATION24 in varchar2,
849 p_PER_INFORMATION25 in varchar2,
850 p_PER_INFORMATION26 in varchar2,
851 p_PER_INFORMATION27 in varchar2,
852 p_PER_INFORMATION28 in varchar2,
853 p_PER_INFORMATION29 in varchar2,
854 p_PER_INFORMATION30 in varchar2,
855 p_REHIRE_REASON in varchar2,
856 p_BENEFIT_GROUP_ID in number,
857 p_RECEIPT_OF_DEATH_CERT_DATE in DATE,
858 p_COORD_BEN_MED_PLN_NO in varchar2,
859 p_COORD_BEN_NO_CVG_FLAG in varchar2,
860 p_coord_ben_med_ext_er in varchar2,
861 p_coord_ben_med_pl_name in varchar2,
862 p_coord_ben_med_insr_crr_name in varchar2,
863 p_coord_ben_med_insr_crr_ident in varchar2,
864 p_coord_ben_med_cvg_strt_dt in date,
865 p_coord_ben_med_cvg_end_dt in date,
866 p_USES_TOBACCO_FLAG in varchar2,
867 p_DPDNT_ADOPTION_DATE in DATE,
868 p_DPDNT_VLNTRY_SVCE_FLAG in varchar2,
869 p_ORIGINAL_DATE_OF_HIRE in DATE,
870 p_town_of_birth in varchar2,
871 p_region_of_birth in varchar2,
872 p_country_of_birth in varchar2,
873 p_global_person_id in varchar2,
874 p_party_id in number,
875 p_npw_number in varchar2,
876 p_current_npw_flag in varchar2,
877 p_global_name in varchar2,
878 p_local_name in varchar2
879 )
880 Return g_rec_type is
881 --
882 l_rec g_rec_type;
883 l_proc varchar2(72) := g_package||'convert_args';
884 --
885 Begin
886 --
887 hr_utility.set_location('Entering:'||l_proc, 5);
888 --
889 -- Convert arguments into local l_rec structure.
890 --
891 l_rec.person_id := p_person_id;
892 l_rec.effective_start_date := p_effective_start_date;
893 l_rec.effective_end_date := p_effective_end_date;
894 l_rec.business_group_id := p_business_group_id;
895 l_rec.person_type_id := p_person_type_id;
896 l_rec.last_name := p_last_name;
897 l_rec.start_date := p_start_date;
898 l_rec.applicant_number := p_applicant_number;
899 l_rec.comment_id := p_comment_id;
900 l_rec.comments := p_comments;
901 l_rec.current_applicant_flag := p_current_applicant_flag;
905 l_rec.date_of_birth := p_date_of_birth;
902 l_rec.current_emp_or_apl_flag := p_current_emp_or_apl_flag;
903 l_rec.current_employee_flag := p_current_employee_flag;
904 l_rec.date_employee_data_verified := p_date_employee_data_verified;
906 l_rec.email_address := p_email_address;
907 l_rec.employee_number := p_employee_number;
908 l_rec.expense_check_send_to_address := p_expense_check_send_to_addres;
909 l_rec.first_name := p_first_name;
910 l_rec.full_name := p_full_name;
911 l_rec.known_as := p_known_as;
912 l_rec.marital_status := p_marital_status;
913 l_rec.middle_names := p_middle_names;
914 l_rec.nationality := p_nationality;
915 l_rec.national_identifier := p_national_identifier;
916 l_rec.previous_last_name := p_previous_last_name;
917 l_rec.registered_disabled_flag := p_registered_disabled_flag;
918 l_rec.sex := p_sex;
919 l_rec.title := p_title;
920 l_rec.vendor_id := p_vendor_id;
921 l_rec.work_telephone := p_work_telephone;
922 l_rec.request_id := p_request_id;
923 l_rec.program_application_id := p_program_application_id;
924 l_rec.program_id := p_program_id;
925 l_rec.program_update_date := p_program_update_date;
926 l_rec.attribute_category := p_attribute_category;
927 l_rec.attribute1 := p_attribute1;
928 l_rec.attribute2 := p_attribute2;
929 l_rec.attribute3 := p_attribute3;
930 l_rec.attribute4 := p_attribute4;
931 l_rec.attribute5 := p_attribute5;
932 l_rec.attribute6 := p_attribute6;
933 l_rec.attribute7 := p_attribute7;
934 l_rec.attribute8 := p_attribute8;
935 l_rec.attribute9 := p_attribute9;
936 l_rec.attribute10 := p_attribute10;
937 l_rec.attribute11 := p_attribute11;
938 l_rec.attribute12 := p_attribute12;
939 l_rec.attribute13 := p_attribute13;
940 l_rec.attribute14 := p_attribute14;
941 l_rec.attribute15 := p_attribute15;
942 l_rec.attribute16 := p_attribute16;
943 l_rec.attribute17 := p_attribute17;
944 l_rec.attribute18 := p_attribute18;
945 l_rec.attribute19 := p_attribute19;
946 l_rec.attribute20 := p_attribute20;
947 l_rec.attribute21 := p_attribute21;
948 l_rec.attribute22 := p_attribute22;
949 l_rec.attribute23 := p_attribute23;
950 l_rec.attribute24 := p_attribute24;
951 l_rec.attribute25 := p_attribute25;
952 l_rec.attribute26 := p_attribute26;
953 l_rec.attribute27 := p_attribute27;
954 l_rec.attribute28 := p_attribute28;
955 l_rec.attribute29 := p_attribute29;
956 l_rec.attribute30 := p_attribute30;
957 l_rec.per_information_category := p_per_information_category;
958 l_rec.per_information1 := p_per_information1;
959 l_rec.per_information2 := p_per_information2;
960 l_rec.per_information3 := p_per_information3;
961 l_rec.per_information4 := p_per_information4;
962 l_rec.per_information5 := p_per_information5;
963 l_rec.per_information6 := p_per_information6;
964 l_rec.per_information7 := p_per_information7;
965 l_rec.per_information8 := p_per_information8;
966 l_rec.per_information9 := p_per_information9;
967 l_rec.per_information10 := p_per_information10;
968 l_rec.per_information11 := p_per_information11;
969 l_rec.per_information12 := p_per_information12;
970 l_rec.per_information13 := p_per_information13;
971 l_rec.per_information14 := p_per_information14;
972 l_rec.per_information15 := p_per_information15;
973 l_rec.per_information16 := p_per_information16;
974 l_rec.per_information17 := p_per_information17;
975 l_rec.per_information18 := p_per_information18;
976 l_rec.per_information19 := p_per_information19;
977 l_rec.per_information20 := p_per_information20;
978 l_rec.object_version_number := p_object_version_number;
979 l_rec.suffix := p_suffix;
980 l_rec.DATE_OF_DEATH := p_DATE_OF_DEATH;
981 l_rec.BACKGROUND_CHECK_STATUS := p_BACKGROUND_CHECK_STATUS;
982 l_rec.BACKGROUND_DATE_CHECK := p_BACKGROUND_DATE_CHECK;
983 l_rec.BLOOD_TYPE := p_BLOOD_TYPE;
984 l_rec.CORRESPONDENCE_LANGUAGE := p_CORRESPONDENCE_LANGUAGE;
985 l_rec.FAST_PATH_EMPLOYEE := p_FAST_PATH_EMPLOYEE;
986 l_rec.FTE_CAPACITY := p_FTE_CAPACITY;
987 l_rec.HOLD_APPLICANT_DATE_UNTIL := p_HOLD_APPLICANT_DATE_UNTIL;
988 l_rec.HONORS := p_HONORS;
989 l_rec.INTERNAL_LOCATION := p_INTERNAL_LOCATION;
990 l_rec.LAST_MEDICAL_TEST_BY := p_LAST_MEDICAL_TEST_BY;
991 l_rec.LAST_MEDICAL_TEST_DATE := p_LAST_MEDICAL_TEST_DATE;
992 l_rec.MAILSTOP := p_MAILSTOP;
993 l_rec.OFFICE_NUMBER := p_OFFICE_NUMBER;
994 l_rec.ON_MILITARY_SERVICE := p_ON_MILITARY_SERVICE;
995
996 l_rec.ORDER_NAME := p_ORDER_NAME;
997 l_rec.PRE_NAME_ADJUNCT := p_PRE_NAME_ADJUNCT;
998 l_rec.PROJECTED_START_DATE := p_PROJECTED_START_DATE;
999 l_rec.REHIRE_AUTHORIZOR := p_REHIRE_AUTHORIZOR;
1000 l_rec.REHIRE_RECOMMENDATION := p_REHIRE_RECOMMENDATION;
1001 l_rec.RESUME_EXISTS := p_RESUME_EXISTS;
1002 l_rec.RESUME_LAST_UPDATED := p_RESUME_LAST_UPDATED;
1003 l_rec.SECOND_PASSPORT_EXISTS := p_SECOND_PASSPORT_EXISTS;
1004 l_rec.STUDENT_STATUS := p_STUDENT_STATUS;
1005 l_rec.WORK_SCHEDULE := p_WORK_SCHEDULE;
1006 l_rec.PER_INFORMATION21 := p_PER_INFORMATION21;
1007 l_rec.PER_INFORMATION22 := p_PER_INFORMATION22;
1008 l_rec.PER_INFORMATION23 := p_PER_INFORMATION23;
1009 l_rec.PER_INFORMATION24 := p_PER_INFORMATION24;
1010 l_rec.PER_INFORMATION25 := p_PER_INFORMATION25;
1011 l_rec.PER_INFORMATION26 := p_PER_INFORMATION26;
1012 l_rec.PER_INFORMATION27 := p_PER_INFORMATION27;
1013 l_rec.PER_INFORMATION28 := p_PER_INFORMATION28;
1014 l_rec.PER_INFORMATION29 := p_PER_INFORMATION29;
1015 l_rec.PER_INFORMATION30 := p_PER_INFORMATION30;
1016 l_rec.REHIRE_REASON := p_REHIRE_REASON;
1017 l_rec.BENEFIT_GROUP_ID := p_BENEFIT_GROUP_ID;
1018 l_rec.RECEIPT_OF_DEATH_CERT_DATE := p_RECEIPT_OF_DEATH_CERT_DATE;
1019 l_rec.COORD_BEN_MED_PLN_NO := p_COORD_BEN_MED_PLN_NO;
1020 l_rec.COORD_BEN_NO_CVG_FLAG := p_COORD_BEN_NO_CVG_FLAG;
1021 l_rec.coord_ben_med_ext_er := p_coord_ben_med_ext_er;
1022 l_rec.coord_ben_med_pl_name := p_coord_ben_med_pl_name;
1023 l_rec.coord_ben_med_insr_crr_name := p_coord_ben_med_insr_crr_name;
1024 l_rec.coord_ben_med_insr_crr_ident := p_coord_ben_med_insr_crr_ident;
1025 l_rec.coord_ben_med_cvg_strt_dt := p_coord_ben_med_cvg_strt_dt;
1026 l_rec.coord_ben_med_cvg_end_dt := p_coord_ben_med_cvg_end_dt;
1027 l_rec.USES_TOBACCO_FLAG := p_USES_TOBACCO_FLAG;
1028 l_rec.DPDNT_ADOPTION_DATE := p_DPDNT_ADOPTION_DATE;
1029 l_rec.DPDNT_VLNTRY_SVCE_FLAG := p_DPDNT_VLNTRY_SVCE_FLAG;
1030 l_rec.ORIGINAL_DATE_OF_HIRE := p_ORIGINAL_DATE_OF_HIRE;
1031 l_rec.town_of_birth := p_town_of_birth;
1032 l_rec.region_of_birth := p_region_of_birth;
1033 l_rec.country_of_birth := p_country_of_birth;
1034 l_rec.global_person_id := p_global_person_id;
1035 l_rec.party_id := p_party_id;
1036 l_rec.npw_number := p_npw_number;
1037 l_rec.current_npw_flag := p_current_npw_flag;
1038 l_rec.global_name := p_global_name; -- #3889584
1039 l_rec.local_name := p_local_name;
1040 --
1041 -- Return the plsql record structure.
1042 --
1043 hr_utility.set_location(' Leaving:'||l_proc, 10);
1044 Return(l_rec);
1045 --
1046 End convert_args;
1047 --
1048 end per_per_shd;