[Home] [Help]
PACKAGE BODY: APPS.PQP_AAD_BUS
Source
1 Package Body pqp_aad_bus as
2 /* $Header: pqaadrhi.pkb 115.5 2003/02/17 22:13:35 tmehra ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqp_aad_bus.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------< chk_analyzed_data_id >------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- Description
15 -- This procedure is used to check that the primary key for the table
16 -- is created properly. It should be null on insert and
17 -- should not be able to be updated.
18 --
19 -- Pre Conditions
20 -- None.
21 --
22 -- In Parameters
23 -- analyzed_data_id PK of record being inserted or updated.
24 -- object_version_number Object version number of record being
25 -- inserted or updated.
26 --
27 -- Post Success
28 -- Processing continues
29 --
30 -- Post Failure
31 -- Errors handled by the procedure
32 --
33 -- Access Status
34 -- Internal table handler use only.
35 --
36 Procedure chk_analyzed_data_id(p_analyzed_data_id in number,
37 p_object_version_number in number) is
38 --
39 l_proc varchar2(72) := g_package||'chk_analyzed_data_id';
40 l_api_updating boolean;
41 --
42 Begin
43 --
44 hr_utility.set_location('Entering:'||l_proc, 5);
45 --
46 l_api_updating := pqp_aad_shd.api_updating
47 (p_analyzed_data_id => p_analyzed_data_id,
48 p_object_version_number => p_object_version_number);
49 --
50 if (l_api_updating
51 and nvl(p_analyzed_data_id,hr_api.g_number)
52 <> pqp_aad_shd.g_old_rec.analyzed_data_id) then
53 --
54 -- raise error as PK has changed
55 --
56 pqp_aad_shd.constraint_error('PQP_ANALYZED_ALIEN_DATA_PK');
57 --
58 elsif not l_api_updating then
59 --
60 -- check if PK is null
61 --
62 if p_analyzed_data_id is not null then
63 --
64 -- raise error as PK is not null
65 --
66 pqp_aad_shd.constraint_error('PQP_ANALYZED_ALIEN_DATA_PK');
67 --
68 end if;
69 --
70 end if;
71 --
72 hr_utility.set_location('Leaving:'||l_proc, 10);
73 --
74 End chk_analyzed_data_id;
75 --
76 -- ----------------------------------------------------------------------------
77 -- |------< chk_withldg_allow_elig_flag >------|
78 -- ----------------------------------------------------------------------------
79 --
80 -- Description
81 -- This procedure is used to check that the lookup value is valid.
82 --
83 -- Pre Conditions
84 -- None.
85 --
86 -- In Parameters
87 -- analyzed_data_id PK of record being inserted or updated.
88 -- withldg_allow_eligible_flag Value of lookup code.
89 -- effective_date effective date
90 -- object_version_number Object version number of record being
91 -- inserted or updated.
92 --
93 -- Post Success
94 -- Processing continues
95 --
96 -- Post Failure
97 -- Error handled by procedure
98 --
99 -- Access Status
100 -- Internal table handler use only.
101 --
102 Procedure chk_withldg_allow_elig_flag(p_analyzed_data_id in number,
103 p_withldg_allow_eligible_flag in varchar2,
104 p_effective_date in date,
105 p_object_version_number in number) is
106 --
107 l_proc varchar2(72) := g_package||'chk_withldg_allow_elig_flag';
108 l_api_updating boolean;
109 --
110 Begin
111 --
112 hr_utility.set_location('Entering:'||l_proc, 5);
113 --
114 l_api_updating := pqp_aad_shd.api_updating
115 (p_analyzed_data_id => p_analyzed_data_id,
116 p_object_version_number => p_object_version_number);
117 --
118 if (l_api_updating
119 and p_withldg_allow_eligible_flag
120 <> nvl(pqp_aad_shd.g_old_rec.withldg_allow_eligible_flag,hr_api.g_varchar2)
121 or not l_api_updating)
122 and p_withldg_allow_eligible_flag is not null then
123 --
124 -- check if value of lookup falls within lookup type.
125 --
126 if hr_api.not_exists_in_hr_lookups
127 (p_lookup_type => 'PQH_YES_NO',
128 p_lookup_code => p_withldg_allow_eligible_flag,
129 p_effective_date => p_effective_date) then
130 --
131 -- raise error as does not exist as lookup
132 --
133 hr_utility.set_message(801,'HR_52966_INVALID_LOOKUP' );
134 hr_utility.set_message_token('COLUMN','withldg_allow_eligible_flag' );
135 hr_utility.set_message_token('LOOKUP_TYPE', 'PQH_YES_NO' );
136 hr_utility.raise_error;
137 --
138 end if;
139 --
140 end if;
141 --
142 hr_utility.set_location('Leaving:'||l_proc,10);
143 --
144 end chk_withldg_allow_elig_flag;
145 --
146 -- ----------------------------------------------------------------------------
147 -- |------< chk_current_residency_status >------| Added by Ashu Gupta 01-AUG-00
148 -- ----------------------------------------------------------------------------
149 --
150 -- Description
151 -- This procedure is used to check that the lookup value is valid.
152 --
153 -- Pre Conditions
154 -- None.
155 --
156 -- In Parameters
157 -- analyzed_data_id PK of record being inserted or updated.
158 -- wthldg_allow_eligible_flag Value of lookup code.
159 -- effective_date effective date
160 -- object_version_number Object version number of record being
161 -- inserted or updated.
162 --
163 -- Post Success
164 -- Processing continues
165 --
166 -- Post Failure
167 -- Error handled by procedure
168 --
169 -- Access Status
170 -- Internal table handler use only.
171 --
172 PROCEDURE chk_current_residency_status(p_analyzed_data_id IN NUMBER ,
173 p_current_residency_status IN VARCHAR2 ,
174 p_effective_date IN DATE ,
175 p_object_version_number IN NUMBER )
176 IS
177 --
178 l_proc VARCHAR2(72) := g_package||'chk_current_residency_status';
179 l_api_updating BOOLEAN;
180 --
181 BEGIN
182 --
183 hr_utility.set_location('Entering:'||l_proc, 5);
184 --
185 l_api_updating := pqp_aad_shd.api_updating
186 (p_analyzed_data_id => p_analyzed_data_id ,
187 p_object_version_number => p_object_version_number);
188 --
189 IF (l_api_updating AND
190 p_current_residency_status
191 <> nvl(pqp_aad_shd.g_old_rec.current_residency_status, hr_api.g_varchar2)
192 OR NOT l_api_updating)
193 AND p_current_residency_status IS NOT NULL THEN
194 --
195 -- check if value of lookup falls within lookup type.
196 --
197 IF hr_api.not_exists_in_hr_lookups
198 (p_lookup_type => 'PER_US_RES_STATUS' ,
199 p_lookup_code => p_current_residency_status ,
200 p_effective_date => p_effective_date ) THEN
201 --
202 -- raise error as does not exist as lookup
203 --
204 hr_utility.set_message(801,'HR_52966_INVALID_LOOKUP' );
205 hr_utility.set_message_token('COLUMN','current_residency_status' );
206 hr_utility.set_message_token('LOOKUP_TYPE', 'PER_US_RES_STATUS' );
207 hr_utility.raise_error;
208 --
209 END IF;
210 --
211 END IF;
212 --
213 hr_utility.set_location('Leaving:'||l_proc,10);
214 --
215 END chk_current_residency_status;
216 --
217 -- ----------------------------------------------------------------------------
218 -- |------< chk_tax_residence_country_code >------|
219 -- ----------------------------------------------------------------------------
220 --
221 -- Description
222 -- This procedure is used to check that the lookup value is valid.
223 --
224 -- Pre Conditions
225 -- None.
226 --
227 -- In Parameters
228 -- p_analyzed_data_id PK of record being inserted or updated.
229 -- wthldg_allow_eligible_flag Value of lookup code.
230 -- effective_date effective date
231 -- object_version_number Object version number of record being
232 -- inserted or updated.
233 --
234 -- Post Success
235 -- Processing continues
236 --
237 -- Post Failure
238 -- Error handled by procedure
239 --
240 -- Access Status
241 -- Internal table handler use only.
242 --
243 PROCEDURE chk_tax_residence_country_code(p_analyzed_data_id IN NUMBER,
244 p_tax_residence_country_code IN VARCHAR2 ,
245 p_effective_date IN DATE ,
246 p_object_version_number IN NUMBER)
247 IS
248 --
249 l_proc VARCHAR2(72) := g_package||'chk_tax_residence_country_code';
250 l_api_updating BOOLEAN;
251 --
252 BEGIN
253 --
254 hr_utility.set_location('Entering:'||l_proc, 5);
255 --
256 l_api_updating := pqp_aad_shd.api_updating
257 (p_analyzed_data_id => p_analyzed_data_id ,
258 p_object_version_number => p_object_version_number);
259 --
260 IF (l_api_updating AND
261 p_tax_residence_country_code
262 <> nvl(pqp_aad_shd.g_old_rec.tax_residence_country_code, hr_api.g_varchar2)
263 OR NOT l_api_updating)
264 AND p_tax_residence_country_code IS NOT NULL THEN
265 --
266 -- check if value of lookup falls within lookup type.
267 --
268 IF hr_api.not_exists_in_hr_lookups
269 (p_lookup_type => 'PER_US_COUNTRY_CODE' ,
270 p_lookup_code => p_tax_residence_country_code ,
271 p_effective_date => p_effective_date ) THEN
272 --
273 -- raise error as does not exist as lookup
274 --
275 hr_utility.set_message(801,'HR_52966_INVALID_LOOKUP' );
276 hr_utility.set_message_token('COLUMN','tax_residence_country_code');
277 hr_utility.set_message_token('LOOKUP_TYPE', 'PER_US_COUNTRY_CODE' );
278 hr_utility.raise_error;
279 --
280 END IF;
281 --
282 END IF;
283 --
284 hr_utility.set_location('Leaving:'||l_proc,10);
285 --
286 END chk_tax_residence_country_code;
287 --
288 -- ----------------------------------------------------------------------------
289 -- |------< chk_record_source >------|
290 -- ----------------------------------------------------------------------------
291 --
292 -- Description
293 -- This procedure is used to check that the lookup value is valid.
294 --
295 -- Pre Conditions
296 -- None.
297 --
298 -- In Parameters
299 -- analyzed_data_id PK of record being inserted or updated.
300 -- wthldg_allow_eligible_flag Value of lookup code.
301 -- effective_date effective date
302 -- object_version_number Object version number of record being
303 -- inserted or updated.
304 --
305 -- Post Success
306 -- Processing continues
307 --
308 -- Post Failure
309 -- Error handled by procedure
310 --
311 -- Access Status
312 -- Internal table handler use only.
313 --
314 PROCEDURE chk_record_source(p_analyzed_data_id IN NUMBER ,
315 p_record_source IN VARCHAR2 ,
316 p_effective_date IN DATE ,
317 p_object_version_number IN NUMBER ) IS
318 --
319 l_proc VARCHAR2(72) := g_package||'chk_record_source';
320 l_api_updating BOOLEAN;
321 --
322 BEGIN
323 --
324 hr_utility.set_location('Entering:'||l_proc, 5);
325 --
326 l_api_updating := pqp_aad_shd.api_updating
327 (p_analyzed_data_id => p_analyzed_data_id ,
328 p_object_version_number => p_object_version_number);
329 --
330 IF (l_api_updating AND
331 p_record_source
332 <> nvl(pqp_aad_shd.g_old_rec.record_source, hr_api.g_varchar2)
333 OR NOT l_api_updating)
334 AND p_record_source IS NOT NULL THEN
335 --
336 -- check if value of lookup falls within lookup type.
337 --
338 IF hr_api.not_exists_in_hr_lookups
339 (p_lookup_type => 'PQP_US_RECORD_SOURCE' ,
340 p_lookup_code => p_record_source ,
341 p_effective_date => p_effective_date ) THEN
342 --
343 -- raise error as does not exist as lookup
344 --
345 hr_utility.set_message(801,'HR_52966_INVALID_LOOKUP' );
346 hr_utility.set_message_token('COLUMN','record_source');
347 hr_utility.set_message_token('LOOKUP_TYPE', 'PQP_US_RECORD_SOURCE');
348 hr_utility.raise_error;
349 --
350 END IF;
351 --
352 END IF;
353 --
354 hr_utility.set_location('Leaving:'||l_proc,10);
355 --
356 END chk_record_source;
357 --
358 -- ----------------------------------------------------------------------------
359 -- |------< chk_visa_type >------|
360 -- ----------------------------------------------------------------------------
361 --
362 -- Description
363 -- This procedure is used to check that the lookup value is valid.
364 --
365 -- Pre Conditions
366 -- None.
367 --
368 -- In Parameters
369 -- analyzed_data_id PK of record being inserted or updated.
370 -- wthldg_allow_eligible_flag Value of lookup code.
371 -- effective_date effective date
372 -- object_version_number Object version number of record being
373 -- inserted or updated.
374 --
375 -- Post Success
376 -- Processing continues
377 --
378 -- Post Failure
379 -- Error handled by procedure
380 --
381 -- Access Status
382 -- Internal table handler use only.
383 --
384 PROCEDURE chk_visa_type(p_analyzed_data_id IN NUMBER ,
385 p_visa_type IN VARCHAR2 ,
386 p_effective_date IN DATE ,
387 p_object_version_number IN NUMBER ) IS
388 --
389 l_proc VARCHAR2(72) := g_package||'chk_visa_type';
390 l_api_updating BOOLEAN;
391 --
392 BEGIN
393 --
394 hr_utility.set_location('Entering:'||l_proc, 5);
395 --
396 l_api_updating := pqp_aad_shd.api_updating
397 (p_analyzed_data_id => p_analyzed_data_id ,
398 p_object_version_number => p_object_version_number);
399 --
400 IF (l_api_updating AND
401 p_visa_type
402 <> nvl(pqp_aad_shd.g_old_rec.visa_type, hr_api.g_varchar2)
403 OR NOT l_api_updating)
404 AND p_visa_type IS NOT NULL THEN
405 --
406 -- check if value of lookup falls within lookup type.
407 --
408 IF hr_api.not_exists_in_hr_lookups
409 (p_lookup_type => 'PER_US_VISA_TYPES' ,
410 p_lookup_code => p_visa_type ,
411 p_effective_date => p_effective_date ) THEN
412 --
413 -- raise error as does not exist as lookup
414 --
418 hr_utility.raise_error;
415 hr_utility.set_message(801,'HR_52966_INVALID_LOOKUP' );
416 hr_utility.set_message_token('COLUMN','visa_type');
417 hr_utility.set_message_token('LOOKUP_TYPE', 'PER_US_VISA_TYPES');
419 --
420 END IF;
421 --
422 END IF;
423 --
424 hr_utility.set_location('Leaving:'||l_proc,10);
425 --
426 END chk_visa_type;
427 --
428 -- ----------------------------------------------------------------------------
429 -- |------< chk_j_sub_type >------|
430 -- ----------------------------------------------------------------------------
431 --
432 -- Description
433 -- This procedure is used to check that the lookup value is valid.
434 --
435 -- Pre Conditions
436 -- None.
437 --
438 -- In Parameters
439 -- analyzed_data_id PK of record being inserted or updated.
440 -- wthldg_allow_eligible_flag Value of lookup code.
441 -- effective_date effective date
442 -- object_version_number Object version number of record being
443 -- inserted or updated.
444 --
445 -- Post Success
446 -- Processing continues
447 --
448 -- Post Failure
449 -- Error handled by procedure
450 --
451 -- Access Status
452 -- Internal table handler use only.
453 --
454 PROCEDURE chk_j_sub_type(p_analyzed_data_id IN NUMBER ,
455 p_j_sub_type IN VARCHAR2 ,
456 p_effective_date IN DATE ,
457 p_object_version_number IN NUMBER ) IS
458 --
459 l_proc VARCHAR2(72) := g_package||'chk_j_sub_type';
460 l_api_updating BOOLEAN;
461 --
462 BEGIN
463 --
464 hr_utility.set_location('Entering:'||l_proc, 5);
465 --
466 l_api_updating := pqp_aad_shd.api_updating
467 (p_analyzed_data_id => p_analyzed_data_id ,
468 p_object_version_number => p_object_version_number);
469 --
470 IF (l_api_updating AND
471 p_j_sub_type
472 <> nvl(pqp_aad_shd.g_old_rec.j_sub_type,hr_api.g_varchar2)
473 OR NOT l_api_updating)
474 AND p_j_sub_type IS NOT NULL THEN
475 --
476 -- check if value of lookup falls within lookup type.
477 --
478 IF hr_api.not_exists_in_hr_lookups
479 (p_lookup_type => 'PER_US_VISA_CATEGORIES' ,
480 p_lookup_code => p_j_sub_type ,
481 p_effective_date => p_effective_date ) THEN
482 --
483 -- raise error as does not exist as lookup
484 --
485 hr_utility.set_message(801,'HR_52966_INVALID_LOOKUP' );
486 hr_utility.set_message_token('COLUMN','j_sub_type' );
487 hr_utility.set_message_token('LOOKUP_TYPE',
488 'PER_US_VISA_CATEGORIES');
489 hr_utility.raise_error;
490 --
491 END IF;
492 --
493 END IF;
494 --
495 hr_utility.set_location('Leaving:'||l_proc,10);
496 --
497 END chk_j_sub_type;
498 --
499 -- ----------------------------------------------------------------------------
500 -- |------< chk_primary_activity >------|
501 -- ----------------------------------------------------------------------------
502 --
503 -- Description
504 -- This procedure is used to check that the lookup value is valid.
505 --
506 -- Pre Conditions
507 -- None.
508 --
509 -- In Parameters
510 -- analyzed_data_id PK of record being inserted or updated.
511 -- wthldg_allow_eligible_flag Value of lookup code.
512 -- effective_date effective date
513 -- object_version_number Object version number of record being
514 -- inserted or updated.
515 --
516 -- Post Success
517 -- Processing continues
518 --
519 -- Post Failure
520 -- Error handled by procedure
521 --
522 -- Access Status
523 -- Internal table handler use only.
524 --
525 PROCEDURE chk_primary_activity(p_analyzed_data_id IN NUMBER ,
526 p_primary_activity IN VARCHAR2 ,
527 p_effective_date IN DATE ,
528 p_object_version_number IN NUMBER ) IS
529 --
530 l_proc VARCHAR2(72) := g_package||'chk_primary_activity';
531 l_api_updating BOOLEAN;
532 --
533 BEGIN
534 --
535 hr_utility.set_location('Entering:'||l_proc, 5);
536 --
537 l_api_updating := pqp_aad_shd.api_updating
538 (p_analyzed_data_id => p_analyzed_data_id ,
539 p_object_version_number => p_object_version_number);
540 --
541 IF (l_api_updating AND
542 p_primary_activity
543 <> nvl(pqp_aad_shd.g_old_rec.primary_activity, hr_api.g_varchar2)
544 OR NOT l_api_updating)
545 AND p_primary_activity IS NOT NULL THEN
546 --
547 -- check if value of lookup falls within lookup type.
548 --
549 IF hr_api.not_exists_in_hr_lookups
550 (p_lookup_type => 'PQP_US_PRIMARY_ACTIVITY' ,
554 -- raise error as does not exist as lookup
551 p_lookup_code => p_primary_activity ,
552 p_effective_date => p_effective_date ) THEN
553 --
555 --
556 hr_utility.set_message(801,'HR_52966_INVALID_LOOKUP' );
557 hr_utility.set_message_token('COLUMN','primary_activity' );
558 hr_utility.set_message_token('LOOKUP_TYPE',
559 'PQP_US_PRIMARY_ACTIVITY');
560 hr_utility.raise_error;
561 --
562 END IF;
563 --
564 END IF;
565 --
566 hr_utility.set_location('Leaving:'||l_proc,10);
567 --
568 END chk_primary_activity;
569 --
570 -- ----------------------------------------------------------------------------
571 -- |------< chk_non_us_country_code >------|
572 -- ----------------------------------------------------------------------------
573 --
574 -- Description
575 -- This procedure is used to check that the lookup value is valid.
576 --
577 -- Pre Conditions
578 -- None.
579 --
580 -- In Parameters
581 -- analyzed_data_id PK of record being inserted or updated.
582 -- wthldg_allow_eligible_flag Value of lookup code.
583 -- effective_date effective date
584 -- object_version_number Object version number of record being
585 -- inserted or updated.
586 --
587 -- Post Success
588 -- Processing continues
589 --
590 -- Post Failure
591 -- Error handled by procedure
592 --
593 -- Access Status
594 -- Internal table handler use only.
595 --
596 PROCEDURE chk_non_us_country_code(p_analyzed_data_id IN NUMBER ,
597 p_non_us_country_code IN VARCHAR2 ,
598 p_effective_date IN DATE ,
599 p_object_version_number IN NUMBER ) IS
600 --
601 l_proc VARCHAR2(72) := g_package||'chk_non_us_country_code';
602 l_api_updating BOOLEAN;
603 --
604 BEGIN
605 --
606 hr_utility.set_location('Entering:'||l_proc, 5);
607 --
608 l_api_updating := pqp_aad_shd.api_updating
609 (p_analyzed_data_id => p_analyzed_data_id ,
610 p_object_version_number => p_object_version_number);
611 --
612 IF (l_api_updating AND
613 p_non_us_country_code
614 <> nvl(pqp_aad_shd.g_old_rec.non_us_country_code, hr_api.g_varchar2)
615 OR NOT l_api_updating)
616 AND p_non_us_country_code IS NOT NULL THEN
617 --
618 -- check if value of lookup falls within lookup type.
619 --
620 IF hr_api.not_exists_in_hr_lookups
621 (p_lookup_type => 'FND_TERRITORIES_VL' ,
622 p_lookup_code => p_non_us_country_code ,
623 p_effective_date => p_effective_date ) THEN
624 --
625 -- raise error as does not exist as lookup
626 --
627 hr_utility.set_message(801,'HR_52966_INVALID_LOOKUP' );
628 hr_utility.set_message_token('COLUMN','non_us_country_code' );
629 hr_utility.set_message_token('LOOKUP_TYPE', '');
630 hr_utility.raise_error;
631 --
632 END IF;
633 --
634 END IF;
635 --
636 hr_utility.set_location('Leaving:'||l_proc,10);
637 --
638 END chk_non_us_country_code;
639 --
640 -- ----------------------------------------------------------------------------
641 -- |------< chk_citizenship_country_code >------|
642 -- ----------------------------------------------------------------------------
643 --
644 -- Description
645 -- This procedure is used to check that the lookup value is valid.
646 --
647 -- Pre Conditions
648 -- None.
649 --
650 -- In Parameters
651 -- analyzed_data_id PK of record being inserted or updated.
652 -- wthldg_allow_eligible_flag Value of lookup code.
653 -- effective_date effective date
654 -- object_version_number Object version number of record being
655 -- inserted or updated.
656 --
657 -- Post Success
658 -- Processing continues
659 --
660 -- Post Failure
661 -- Error handled by procedure
662 --
663 -- Access Status
664 -- Internal table handler use only.
665 --
666 PROCEDURE chk_citizenship_country_code(p_analyzed_data_id IN NUMBER ,
667 p_citizenship_country_code IN VARCHAR2 ,
668 p_effective_date IN DATE ,
669 p_object_version_number IN NUMBER ) IS
670 --
671 l_proc VARCHAR2(72) := g_package||'chk_citizenship_country_code';
672 l_api_updating BOOLEAN;
673 --
674 BEGIN
675 --
676 hr_utility.set_location('Entering:'||l_proc, 5);
677 --
678 l_api_updating := pqp_aad_shd.api_updating
679 (p_analyzed_data_id => p_analyzed_data_id ,
680 p_object_version_number => p_object_version_number);
681 --
682 IF (l_api_updating AND
683 p_citizenship_country_code
687 --
684 <> nvl(pqp_aad_shd.g_old_rec.citizenship_country_code, hr_api.g_varchar2)
685 OR NOT l_api_updating)
686 AND p_citizenship_country_code IS NOT NULL THEN
688 -- check if value of lookup falls within lookup type.
689 --
690 IF hr_api.not_exists_in_hr_lookups
691 (p_lookup_type => 'FND_TERRITORIES_VL' ,
692 p_lookup_code => p_citizenship_country_code ,
693 p_effective_date => p_effective_date ) THEN
694 --
695 -- raise error as does not exist as lookup
696 --
697 hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
698 hr_utility.raise_error;
699 --
700 END IF;
701 --
702 END IF;
703 --
704 hr_utility.set_location('Leaving:'||l_proc,10);
705 --
706 END chk_citizenship_country_code;
707 --
708 -- ----------------------------------------------------------------------------
709 -- |---------------------------< insert_validate >----------------------------|
710 -- ----------------------------------------------------------------------------
711 Procedure insert_validate(p_rec in pqp_aad_shd.g_rec_type
712 ,p_effective_date in date) is
713 --
714 l_proc varchar2(72) := g_package||'insert_validate';
715 --
716 Begin
717 hr_utility.set_location('Entering:'||l_proc, 5);
718 --
719 -- Call all supporting business operations
720 --
721 chk_analyzed_data_id
722 (p_analyzed_data_id => p_rec.analyzed_data_id,
723 p_object_version_number => p_rec.object_version_number);
724 --
725 chk_withldg_allow_elig_flag
726 (p_analyzed_data_id => p_rec.analyzed_data_id,
727 p_withldg_allow_eligible_flag => p_rec.withldg_allow_eligible_flag,
728 p_effective_date => p_effective_date,
729 p_object_version_number => p_rec.object_version_number);
730 --
731 chk_current_residency_status
732 (p_analyzed_data_id => p_rec.analyzed_data_id ,
733 p_current_residency_status => p_rec.current_residency_status,
734 p_effective_date => p_effective_date ,
735 p_object_version_number => p_rec.object_version_number );
736 --
737 chk_tax_residence_country_code
738 (p_analyzed_data_id => p_rec.analyzed_data_id ,
739 p_tax_residence_country_code => p_rec.tax_residence_country_code,
740 p_effective_date => p_effective_date ,
741 p_object_version_number => p_rec.object_version_number );
742 --
743 -- chk_record_source
744 -- (p_analyzed_data_id => p_rec.analyzed_data_id ,
745 -- p_record_source => p_rec.record_source ,
746 -- p_effective_date => p_effective_date ,
747 -- p_object_version_number => p_rec.object_version_number );
748 --
749 chk_visa_type
750 (p_analyzed_data_id => p_rec.analyzed_data_id ,
751 p_visa_type => p_rec.visa_type ,
752 p_effective_date => p_effective_date ,
753 p_object_version_number => p_rec.object_version_number );
754 --
755 IF (p_rec.visa_type = 'J-1' OR
756 p_rec.visa_type = 'J-2' ) THEN
757 chk_j_sub_type
758 (p_analyzed_data_id => p_rec.analyzed_data_id ,
759 p_j_sub_type => p_rec.j_sub_type ,
760 p_effective_date => p_effective_date ,
761 p_object_version_number => p_rec.object_version_number );
762 END IF;
763 --
764 chk_primary_activity
765 (p_analyzed_data_id => p_rec.analyzed_data_id ,
766 p_primary_activity => p_rec.primary_activity ,
767 p_effective_date => p_effective_date ,
768 p_object_version_number => p_rec.object_version_number );
769 --
770 -- chk_non_us_country_code
771 -- (p_analyzed_data_id => p_rec.analyzed_data_id ,
772 -- p_non_us_country_code => p_rec.non_us_country_code ,
773 -- p_effective_date => p_effective_date ,
774 -- p_object_version_number => p_rec.object_version_number ) ;
775 --
776 -- chk_citizenship_country_code
777 -- (p_analyzed_data_id => p_rec.analyzed_data_id ,
778 -- p_citizenship_country_code => p_rec.citizenship_country_code ,
779 -- p_effective_date => p_effective_date ,
780 -- p_object_version_number => p_rec.object_version_number ) ;
781 --
782 --
783 --
784 hr_utility.set_location(' Leaving:'||l_proc, 10);
785 End insert_validate;
786 --
787 -- ----------------------------------------------------------------------------
788 -- |---------------------------< update_validate >----------------------------|
789 -- ----------------------------------------------------------------------------
790 Procedure update_validate(p_rec in pqp_aad_shd.g_rec_type
791 ,p_effective_date in date) is
792 --
793 l_proc varchar2(72) := g_package||'update_validate';
794 --
795 Begin
796 hr_utility.set_location('Entering:'||l_proc, 5);
797 --
798 -- Call all supporting business operations
799 --
800 chk_analyzed_data_id
801 (p_analyzed_data_id => p_rec.analyzed_data_id,
802 p_object_version_number => p_rec.object_version_number);
803 --
804 chk_withldg_allow_elig_flag
805 (p_analyzed_data_id => p_rec.analyzed_data_id,
806 p_withldg_allow_eligible_flag => p_rec.withldg_allow_eligible_flag,
807 p_effective_date => p_effective_date,
808 p_object_version_number => p_rec.object_version_number);
809 --
810 chk_current_residency_status
811 (p_analyzed_data_id => p_rec.analyzed_data_id,
812 p_current_residency_status => p_rec.current_residency_status,
813 p_effective_date => p_effective_date ,
814 p_object_version_number => p_rec.object_version_number );
815 --
816 chk_tax_residence_country_code
817 (p_analyzed_data_id => p_rec.analyzed_data_id,
818 p_tax_residence_country_code => p_rec.tax_residence_country_code,
819 p_effective_date => p_effective_date ,
820 p_object_version_number => p_rec.object_version_number );
821 --
822 -- chk_record_source
823 -- (p_analyzed_data_id => p_rec.analyzed_data_id,
824 -- p_record_source => p_rec.record_source ,
825 -- p_effective_date => p_effective_date ,
826 -- p_object_version_number => p_rec.object_version_number );
827 --
828 chk_visa_type
829 (p_analyzed_data_id => p_rec.analyzed_data_id,
830 p_visa_type => p_rec.visa_type ,
831 p_effective_date => p_effective_date ,
832 p_object_version_number => p_rec.object_version_number );
833 --
834 chk_j_sub_type
835 (p_analyzed_data_id => p_rec.analyzed_data_id,
836 p_j_sub_type => p_rec.j_sub_type ,
837 p_effective_date => p_effective_date ,
838 p_object_version_number => p_rec.object_version_number );
839 --
840 chk_primary_activity
841 (p_analyzed_data_id => p_rec.analyzed_data_id,
842 p_primary_activity => p_rec.primary_activity ,
843 p_effective_date => p_effective_date ,
844 p_object_version_number => p_rec.object_version_number );
845 --
846 -- chk_non_us_country_code
847 -- (p_analyzed_data_id => p_rec.analyzed_data_id,
848 -- p_non_us_country_code => p_rec.non_us_country_code ,
849 -- p_effective_date => p_effective_date ,
850 -- p_object_version_number => p_rec.object_version_number ) ;
851 --
852 -- chk_citizenship_country_code
853 -- (p_analyzed_data_id => p_rec.analyzed_data_id,
854 -- p_citizenship_country_code => p_rec.citizenship_country_code ,
855 -- p_effective_date => p_effective_date ,
856 -- p_object_version_number => p_rec.object_version_number ) ;
857 --
858 --
859 --
860 hr_utility.set_location(' Leaving:'||l_proc, 10);
861 End update_validate;
862 --
863 -- ----------------------------------------------------------------------------
864 -- |---------------------------< delete_validate >----------------------------|
865 -- ----------------------------------------------------------------------------
866 Procedure delete_validate(p_rec in pqp_aad_shd.g_rec_type
867 ,p_effective_date in date) is
868 --
869 l_proc varchar2(72) := g_package||'delete_validate';
870 --
871 Begin
872 hr_utility.set_location('Entering:'||l_proc, 5);
873 --
874 -- Call all supporting business operations
875 --
876 hr_utility.set_location(' Leaving:'||l_proc, 10);
877 End delete_validate;
878 --
879 end pqp_aad_bus;