1 package body GHR_CPDF_CHECK1 as
2 /* $Header: ghcpdf01.pkb 120.3.12000000.4 2007/03/05 04:56:48 vmididho noship $ */
3
4 /* Name:
5 Bargaining Unit
6 */
7
8
9 procedure chk_bargaining_unit
10 (p_to_pay_plan in varchar2
11 ,p_agency_sub_element in varchar2 --non SF52
12 ,p_bargaining_unit_status_code in varchar2
13 ) is
14 begin
15
16 -- 060.02.1
17 if p_to_pay_plan = 'ES'
18 and
19 p_bargaining_unit_status_code <> '8888'
20 and
21 p_bargaining_unit_status_code is not null
22 then
23 hr_utility.set_message(8301, 'GHR_37001_ALL_PROCEDURE_FAIL');
24 hr_utility.raise_error;
25 end if;
26
27 /* Commented as per December 2000 cpdf changes -- vravikan
28 -- 060.04.1
29 if p_agency_sub_element in ('AF07','ARAS','DD12','LT00','NV15','TRAC' )
30 and
31 p_bargaining_unit_status_code <> '8888'
32 and
33 p_bargaining_unit_status_code is not null
34 then
35 hr_utility.set_message(8301, 'GHR_37002_ALL_PROCEDURE_FAIL');
36 hr_utility.raise_error;
37 end if;
38 */
39 end chk_bargaining_unit ;
40
41 /* Name:
42 Federal Employees Group Life Insurance
43 */
44
45 procedure chk_fegli
46 (p_to_basic_pay in varchar2
47 ,p_to_pay_plan in varchar2
48 ,p_fegli_code in varchar2
49 ,p_effective_date in date
50 ) is
51 begin
52
53 --170.04.1
54 -- Update Date By Effective Date Comment
55 -- ? 05/06/99 vravikan 04/25/99 Fegli changes
56 if p_effective_date >= fnd_date.canonical_to_date('19'||'99/04/25') then
57 if p_to_basic_pay = '0'
58 and
59 p_to_pay_plan <> 'VC'
60 and
61 p_fegli_code <> 'A0'
62 and
63 p_fegli_code is not null
64 then
65 hr_utility.set_message(8301, 'GHR_37038_ALL_PROCEDURE_FAIL');
66 hr_utility.raise_error;
67 end if;
68 else
69 if p_to_basic_pay = '0'
70 and
71 p_to_pay_plan <> 'VC'
72 and
73 p_fegli_code <> 'A'
74 and
75 p_fegli_code is not null
76 then
77 hr_utility.set_message(8301, 'GHR_37003_ALL_PROCEDURE_FAIL');
78 hr_utility.raise_error;
79 end if;
80 end if;
81 end chk_fegli;
82
83 /* Name:
84 FSLA Category
85 */
86
87 procedure chk_fsla_category
88 (p_duty_station_lookup_code in varchar2
89 ,p_to_pay_plan in varchar2
90 ,p_agency_subelement in varchar2
91 ,p_flsa_category in varchar2
92 ,p_to_grade_or_level in varchar2
93 ,p_effective_date in date --Bug# 5619873
94 )is
95 begin
96 --Venkat 03/27/2000 -- Bug # 1246822 -- replacing or with and
97
98 -- 180.02.1
99 --upd49 08-Jan-07 Raju Bug#5619873 From 01-Sep-2006 Terminate the edit
100 if p_effective_date < fnd_date.canonical_to_date('2006/09/01') then
101 if (substr(upper(p_duty_station_lookup_code),1,2) between 'AA' and 'ZZ')
102 and (substr(p_duty_station_lookup_code,1,2)<>'US'
103 and -- Bug # 1246822
104 substr(p_duty_station_lookup_code,2,1)<>'Q' )
105 and p_flsa_category <> 'E'
106 and p_flsa_category is not null
107 then
108 hr_utility.set_message(8301, 'GHR_37004_ALL_PROCEDURE_FAIL');
109 hr_utility.raise_error;
110 end if;
111 end if;
112 -- 180.04.1
113 --upd49 08-Jan-07 Raju Bug#5619873 From 01-Sep-2006 Terminate the edit
114 if p_effective_date < fnd_date.canonical_to_date('2006/09/01') then
115 if (p_to_pay_plan = 'WG' or p_to_pay_plan = 'WL')
116 and
117 p_agency_subelement not in ('AFNG','AFZG','ARNG')
118 and
119 ((substr(p_duty_station_lookup_code,1,2) between '00' and '99')
120 or
121 substr(p_duty_station_lookup_code,1,2)='US'
122 or
123 substr(p_duty_station_lookup_code,2,1)='Q')
124 and
125 p_flsa_category <> 'N'
126 and
127 p_flsa_category is not null
128 then
129 hr_utility.set_message(8301, 'GHR_37005_ALL_PROCEDURE_FAIL');
130 hr_utility.raise_error;
131 end if;
132 end if;
133 -- 180.07.1
134 --upd49 08-Jan-07 Raju Bug#5619873 From 01-Sep-2006 Terminate the edit
135 if p_effective_date < fnd_date.canonical_to_date('2006/09/01') then
136 if p_to_pay_plan = 'GS'
137 and
138 p_agency_subelement not in ('AFNG','AFZG','ARNG')
139 and
140 p_to_grade_or_level between '01' and '04'
141 and
142 (substr(p_duty_station_lookup_code,1,2) between '00' and '99'
143 or
144 substr(p_duty_station_lookup_code,1,2)='US'
145 or
146 substr(p_duty_station_lookup_code,2,1)='Q')
147 and
148 p_flsa_category <>'N'
149 and
150 p_flsa_category is not null
151 then
152 hr_utility.set_message(8301, 'GHR_37006_ALL_PROCEDURE_FAIL');
153 hr_utility.raise_error;
154 end if;
155 end if;
156 -- 180.13.1
157 if p_to_pay_plan in ('AL','CA','ES','EX','SL','ST')
158 and
159 p_flsa_category <> 'E'
160 and
161 p_flsa_category is not null
162 then
163 hr_utility.set_message(8301, 'GHR_37007_ALL_PROCEDURE_FAIL');
164 hr_utility.raise_error;
165 end if;
166
167 end chk_fsla_category;
168
169
170 /* Name:
171 Functional Classification
172 */
173
174 procedure chk_functional_classification
175 (p_to_occ_code in varchar2
176 ,p_functional_class in varchar2
177 ,p_effective_date in date --Bug# 5619873
178 ) is
179 begin
180
181 -- 200.04.1
182 --upd49 08-Jan-07 Raju Bug#5619873 From 01-Oct-2006 change 0470-0493 to 0470-0487
183 -- remove occu code 1540
184 if p_effective_date < fnd_date.canonical_to_date('2006/10/01') then
185
186 if (p_to_occ_code in
187 ('0020','0101','0110','0140','0150','0170','0180','0184'
188 ,'0185','0190','0193','0401','0403','0457','0460','0601'
189 ,'0602','0610','0644','0660','0662','0665','0668','0680'
190 ,'0690','0696','0701','0801','0803','0804','0810','0819'
191 ,'0896','1220','1221','1350','1360','1370','1372','1373'
192 ,'1529','1530','1540','1550')
193 or p_to_occ_code between '0405' and '0415'
194 or p_to_occ_code between '0430' and '0454'
195 or p_to_occ_code between '0470' and '0493'
196 or p_to_occ_code between '0630' and '0635'
197 or p_to_occ_code between '0637' and '0639'
198 or p_to_occ_code between '0806' and '0808'
199 or p_to_occ_code between '0830' and '0855'
200 or p_to_occ_code between '0858' and '0871'
201 or p_to_occ_code between '0880' and '0894'
202 or p_to_occ_code between '1223' and '1226'
203 or p_to_occ_code between '1301' and '1310'
204 or p_to_occ_code between '1313' and '1315'
205 or p_to_occ_code between '1320' and '1340'
206 or p_to_occ_code between '1380' and '1386'
207 or p_to_occ_code between '1510' and '1520')
208 and to_number(p_functional_class) <= 10
209 and p_functional_class is not null
210 then
211 hr_utility.set_message(8301, 'GHR_37008_ALL_PROCEDURE_FAIL');
212 hr_utility.raise_error;
213 end if;
214 else
215 if (p_to_occ_code in
216 ('0020','0101','0110','0140','0150','0170','0180','0184'
217 ,'0185','0190','0193','0401','0403','0457','0460','0601'
218 ,'0602','0610','0644','0660','0662','0665','0668','0680'
219 ,'0690','0696','0701','0801','0803','0804','0810','0819'
220 ,'0896','1220','1221','1350','1360','1370','1372','1373'
221 ,'1529','1530','1550')
222 or p_to_occ_code between '0405' and '0415'
223 or p_to_occ_code between '0430' and '0454'
224 or p_to_occ_code between '0470' and '0487'
225 or p_to_occ_code between '0630' and '0635'
226 or p_to_occ_code between '0637' and '0639'
227 or p_to_occ_code between '0806' and '0808'
228 or p_to_occ_code between '0830' and '0855'
229 or p_to_occ_code between '0858' and '0871'
230 or p_to_occ_code between '0880' and '0894'
231 or p_to_occ_code between '1223' and '1226'
232 or p_to_occ_code between '1301' and '1310'
233 or p_to_occ_code between '1313' and '1315'
234 or p_to_occ_code between '1320' and '1340'
235 or p_to_occ_code between '1380' and '1386'
236 or p_to_occ_code between '1510' and '1520')
237 and to_number(p_functional_class) <= 10
238 and p_functional_class is not null
239 then
240 hr_utility.set_message(8301, 'GHR_37008_ALL_PROCEDURE_FAIL');
241 hr_utility.raise_error;
242 end if;
243 end if;
244
245 -- 200.07.1
246 --upd49 08-Jan-07 Raju Bug#5619873 From 01-Oct-2006 change 0470-0493 to 0470-0487
247 -- remove occu code 1540
248 if p_effective_date < fnd_date.canonical_to_date('2006/10/01') then
249 if (p_to_occ_code not in
250 ('0020','0101','0110','0140','0150','0170','0180','0184'
251 ,'0185','0190','0193','0401','0403','0457','0460','0601'
252 ,'0602','0610','0644','0660','0662','0665','0668','0680'
253 ,'0690','0696','0701','0801','0803','0804','0810','0819'
254 ,'0896','1220','1221','1350','1360','1370','1372','1373'
255 ,'1529','1530','1540','1550')
256 and p_to_occ_code not between '0405' and '0415'
257 and p_to_occ_code not between '0430' and '0454'
258 and p_to_occ_code not between '0470' and '0493'
259 and p_to_occ_code not between '0630' and '0635'
260 and p_to_occ_code not between '0637' and '0639'
261 and p_to_occ_code not between '0806' and '0808'
262 and p_to_occ_code not between '0830' and '0855'
263 and p_to_occ_code not between '0858' and '0871'
264 and p_to_occ_code not between '0880' and '0894'
265 and p_to_occ_code not between '1223' and '1226'
266 and p_to_occ_code not between '1301' and '1310'
267 and p_to_occ_code not between '1313' and '1315'
268 and p_to_occ_code not between '1320' and '1340'
269 and p_to_occ_code not between '1380' and '1386'
270 and p_to_occ_code not between '1510' and '1520')
271 and p_functional_class <> '00'
272 and p_functional_class is not null
273 then
274 hr_utility.set_message(8301, 'GHR_37009_ALL_PROCEDURE_FAIL');
275 hr_utility.raise_error;
276 end if;
277 else
278 if (p_to_occ_code not in
279 ('0020','0101','0110','0140','0150','0170','0180','0184'
280 ,'0185','0190','0193','0401','0403','0457','0460','0601'
281 ,'0602','0610','0644','0660','0662','0665','0668','0680'
282 ,'0690','0696','0701','0801','0803','0804','0810','0819'
283 ,'0896','1220','1221','1350','1360','1370','1372','1373'
284 ,'1529','1530','1550')
285 and p_to_occ_code not between '0405' and '0415'
286 and p_to_occ_code not between '0430' and '0454'
287 and p_to_occ_code not between '0470' and '0487'
288 and p_to_occ_code not between '0630' and '0635'
289 and p_to_occ_code not between '0637' and '0639'
290 and p_to_occ_code not between '0806' and '0808'
291 and p_to_occ_code not between '0830' and '0855'
292 and p_to_occ_code not between '0858' and '0871'
293 and p_to_occ_code not between '0880' and '0894'
294 and p_to_occ_code not between '1223' and '1226'
295 and p_to_occ_code not between '1301' and '1310'
296 and p_to_occ_code not between '1313' and '1315'
297 and p_to_occ_code not between '1320' and '1340'
298 and p_to_occ_code not between '1380' and '1386'
299 and p_to_occ_code not between '1510' and '1520')
300 and p_functional_class <> '00'
301 and p_functional_class is not null
302 then
303 hr_utility.set_message(8301, 'GHR_37009_ALL_PROCEDURE_FAIL');
304 hr_utility.raise_error;
305 end if;
306 end if;
307
308 end chk_functional_classification;
309
310 /* Name:
311 HEALTH PLAN
312 */
313
314 procedure chk_health_plan
315 (p_health_plan in varchar2 --non SF52
316 ,p_tenure_group_code in varchar2
317 ,p_work_schedule_code in varchar2
318 ,p_to_pay_basis in varchar2
319 ,p_to_pay_status in varchar2 --non SF52
320 ,p_submission_date in date --non SF52
321 ,p_Cur_Appt_Auth_1 in varchar2
322 ,p_Cur_Appt_Auth_2 in varchar2
323 ) is
324
325 begin
326
327 /* not supported in the product due to unsolved submission date
328 -- 230.00.1 note: this procedure is from Part B Notes section.
329 if p_health_plan is null
330 and
331 to_char(p_submission_date,'MM') <> '03'
332 and
333 to_char(p_submission_date,'MM') <> '09'
334 then
335 hr_utility.set_message(8301, 'GHR_370_ALL_PROCEDURE_FAIL');
336 hr_utility.raise_error;
337 end if;
338 */
339
340 -- 230.02.01
341 if p_health_plan = 'ZZZ'
342 and
343 p_tenure_group_code <> '0'
344 and
345 p_tenure_group_code <> '3'
346 and
347 p_tenure_group_code is not null
348 and
349 p_work_schedule_code not in ('G','I','J','Q')
350 and
351 p_work_schedule_code is not null
352 and
353 p_to_pay_basis not in ('PW','FB','WC')
354 and
355 p_to_pay_basis is not null
356 and
357 p_Cur_Appt_Auth_1 not in ('YAM','YBM','YGM','Y1M','Y2M','Y3M','Y4M')
358 and
359 p_Cur_Appt_Auth_1 is not null
360 and
361 p_Cur_Appt_Auth_2 not in ('YAM','YBM','YGM','Y1M','Y2M','Y3M','Y4M')
362 and
363 p_Cur_Appt_Auth_2 is not null
364 -- and
365 -- p_to_pay_status <> 'N'
366
367 then
368 hr_utility.set_message(8301, 'GHR_37031_ALL_PROCEDURE_FAIL');
369 hr_utility.raise_error;
370 end if;
371
372 end chk_health_plan;
373
374
375
376 /* Name:
377 -- Retained Grade
378 */
379
380 procedure chk_retain_grade
381 (p_retain_pay_plan in varchar2 --non SF52
382 ,p_retain_grade in varchar2 --non SF52
383 ,p_pay_rate_determinant_code in varchar2
384 ,p_effective_date in date
385 ) is
386
387 begin
388
389 -- 610.02.1
390 if p_retain_pay_plan = 'WL'
391 and
392 p_retain_grade not between '01' and '15'
393 then
394 hr_utility.set_message(8301, 'GHR_37029_ALL_PROCEDURE_FAIL');
395 hr_utility.raise_error;
396 end if;
397
398 -- 610.04.1
399 if p_retain_pay_plan = 'WS'
400 and
401 p_retain_grade not between '01' and '19'
402 then
403 hr_utility.set_message(8301, 'GHR_37010_ALL_PROCEDURE_FAIL');
404 hr_utility.raise_error;
405 end if;
406
407 /* Commented as per December 2000 cpdf changes -- vravikan
408 -- 610.07.1
409 if p_retain_pay_plan = 'GM'
410 and
411 p_retain_grade not between '14' and '15'
412 then
416 */
413 hr_utility.set_message(8301, 'GHR_37011_ALL_PROCEDURE_FAIL');
414 hr_utility.raise_error;
415 end if;
417
418 -- 610.10.1
419 if p_retain_pay_plan = 'GS'
420 and
421 p_retain_grade not between '01' and '15'
422 then
423 hr_utility.set_message(8301, 'GHR_37012_ALL_PROCEDURE_FAIL');
424 hr_utility.raise_error;
425 end if;
426
427 -- 610.13.1
428 if p_retain_pay_plan = 'WG'
429 and
430 p_retain_grade not between '01' and '15'
431 then
432 hr_utility.set_message(8301, 'GHR_37013_ALL_PROCEDURE_FAIL');
433 hr_utility.raise_error;
434 end if;
435
436
437 -- 610.16.1
438 -- UPD 43(Bug 4567571) Raju 09-Nov-2005 Delete PRD M effective date from 01-May-2005
439 if p_effective_date < fnd_date.canonical_to_date('2005/05/01') then
440 if p_retain_grade is not null and
441 p_pay_rate_determinant_code not in ('A','B','E','F','M','U','V')
442 then
443 hr_utility.set_message(8301, 'GHR_37014_ALL_PROCEDURE_FAIL');
444 hr_utility.set_message_token('PRD_LIST','A, B, E, F, M, U, or V');
445 hr_utility.raise_error;
446 end if;
447 elsif p_effective_date >= fnd_date.canonical_to_date('2005/05/01') then
448 if p_retain_grade is not null and
449 p_pay_rate_determinant_code not in ('A','B','E','F','U','V')
450 then
451 hr_utility.set_message(8301, 'GHR_37014_ALL_PROCEDURE_FAIL');
452 hr_utility.set_message_token('PRD_LIST','A, B, E, F, U, or V');
453 hr_utility.raise_error;
454 end if;
455 end if;
456
457 -- 610.19.1
458 if p_pay_rate_determinant_code in ('A','B','E','F','U','V')
459 and
460 p_retain_grade is null
461 then
462 hr_utility.set_message(8301, 'GHR_37015_ALL_PROCEDURE_FAIL');
463 hr_utility.raise_error;
464 end if;
465
466 /* Commented as per December 2000 cpdf changes -- vravikan
467 -- 610.25.1
468 if p_retain_pay_plan = 'GH'
469 and
470 p_retain_grade <>'14'
471 and
472 p_retain_grade <>'15'
473 and
474 p_retain_grade is not null
475 then
476 hr_utility.set_message(8301, 'GHR_37016_ALL_PROCEDURE_FAIL');
477 hr_utility.raise_error;
478 end if;
479 */
480
481 -- 610.30.1
482 if p_retain_pay_plan = 'GG'
483 and
484 p_retain_grade not between '01' and '15'
485 and
486 p_retain_grade is not null
487 then
488 hr_utility.set_message(8301, 'GHR_37017_ALL_PROCEDURE_FAIL');
489 hr_utility.raise_error;
490 end if;
491
492 end chk_retain_grade;
493
494 /* Name:
495 -- Retained Pay Plan
496 */
497
498 procedure chk_retain_pay_plan
499 (p_retain_grade in varchar2 --non SF52
500 ,p_retain_pay_plan in varchar2 --non SF52
501 ,p_retain_step in varchar2 --non SF52
502 ,p_to_pay_plan in varchar2
503 ,p_pay_rate_determinant_code in varchar2
504 ,p_effective_date in date
505
506 ) is
507 begin
508 -- 620.02.1
509 -- If Pay rate determinant is A, B, E, F, U, or V,
510 -- Then retained pay plan may not be GH or GM
511 -- 12/8/00 vravikan 01-Oct-2000 New Edit
512 if p_effective_date >= fnd_date.canonical_to_date('2000/10/01') then
513 if p_pay_rate_determinant_code is not null and
514 p_pay_rate_determinant_code in ('A','B','E','F','U','V') and
515 p_retain_pay_plan in ('GH','GM') then
516 hr_utility.set_message(8301, 'GHR_37663_ALL_PROCEDURE_FAIL');
517 hr_utility.raise_error;
518 end if;
519 end if;
520
521
522 -- 620.04.1
523 if p_retain_grade is not null
524 and
525 (p_retain_pay_plan is null
526 or
527 p_retain_step is null )
528 then
529 hr_utility.set_message(8301, 'GHR_37018_ALL_PROCEDURE_FAIL');
530 hr_utility.raise_error;
531 end if;
532
533 /* Commented as per December 2000 cpdf changes -- vravikan
534 -- 620.10.1
535 if p_to_pay_plan = 'GS'
536 and
537 p_retain_pay_plan = 'GM'
538 then
539 hr_utility.set_message(8301, 'GHR_37019_ALL_PROCEDURE_FAIL');
540 hr_utility.raise_error;
541 end if;
542 */
543
544 /* Commented as per December 2000 cpdf changes -- vravikan
545 -- 620.13.1
546 if p_to_pay_plan = 'GM'
547 and
548 p_retain_pay_plan = 'GS'
549 then
550 hr_utility.set_message(8301, 'GHR_37020_ALL_PROCEDURE_FAIL');
551 hr_utility.raise_error;
552 end if;
553
554 */
555 end chk_retain_pay_plan;
556
557 /* Name:
558 -- Retained Step
559 */
560
561 procedure chk_retain_step
562 (p_pay_rate_determinant_code in varchar2
563 ,p_first_action_noa_la_code1 in varchar2
564 ,p_first_action_noa_la_code2 in varchar2
565 ,p_Cur_Appt_Auth_1 in varchar2 --non SF52 item
566 ,p_Cur_Appt_Auth_2 in varchar2 --non SF52 item
567 ,p_retain_pay_plan in varchar2 --non SF52
571 ) is
568 ,p_retain_grade in varchar2 --non SF52
569 ,p_retain_step in varchar2 --non SF52
570 ,p_effective_date in date
572 begin
573
574 -- 630.02.1
575 -- UPD 43(Bug 4567571) Raju 09-Nov-2005 Delete PRD M effective date from 01-May-2005
576 if p_effective_date < to_date('2005/05/01','yyyy/mm/dd') then
577 if p_pay_rate_determinant_code in ('A','B','E','F','M') and
578 p_Cur_Appt_Auth_1 <> 'UAM' and
579 p_Cur_Appt_Auth_2 <> 'UAM' and
580 (p_retain_pay_plan = 'GS' or
581 p_retain_pay_plan ='GG') and
582 p_retain_grade between '01' and '15' and
583 p_retain_step not between '01' and '10' and
584 p_retain_step is not null
585 then
586 hr_utility.set_message(8301, 'GHR_37021_ALL_PROCEDURE_FAIL');
587 hr_utility.set_message_token('PRD_LIST','A, B, E, F, or M');
588 hr_utility.raise_error;
589 end if;
590 elsif p_effective_date >= to_date('2005/05/01','yyyy/mm/dd') then
591 if p_pay_rate_determinant_code in ('A','B','E','F') and
592 p_Cur_Appt_Auth_1 <> 'UAM' and
593 p_Cur_Appt_Auth_2 <> 'UAM' and
594 (p_retain_pay_plan = 'GS' or
595 p_retain_pay_plan ='GG') and
596 p_retain_grade between '01' and '15' and
597 p_retain_step not between '01' and '10' and
598 p_retain_step is not null
599 then
600 hr_utility.set_message(8301, 'GHR_37021_ALL_PROCEDURE_FAIL');
601 hr_utility.set_message_token('PRD_LIST','A, B, E, or F');
602 hr_utility.raise_error;
603 end if;
604 end if;
605
606
607 -- 630.04.1
608 /* Commented as per December 2000 cpdf changes -- vravikan
609 -- 17-Aug-00 vravikan 01-jan-2000 Delete 99 from step codes
610 if p_effective_date >= to_date('2000/01/01','yyyy/mm/dd') then
611 if p_pay_rate_determinant_code in ('A','B','E','F','M')
612 and
613 p_retain_pay_plan = 'GM'
614 and
615 p_retain_step <> '00'
616 and
617 p_retain_step is not null
618 then
619 hr_utility.set_message(8301, 'GHR_37413_ALL_PROCEDURE_FAIL');
620 hr_utility.raise_error;
621 end if;
622 else
623 if p_pay_rate_determinant_code in ('A','B','E','F','M')
624 and
625 p_retain_pay_plan = 'GM'
626 and
627 p_retain_step <> '00'
628 and
629 p_retain_step <> '99'
630 and
631 p_retain_step is not null
632 then
633 hr_utility.set_message(8301, 'GHR_37022_ALL_PROCEDURE_FAIL');
634 hr_utility.raise_error;
635 end if;
636 end if;
637 */
638
639 -- 630.07.1
640 if (p_pay_rate_determinant_code ='U'
641 or
642 p_pay_rate_determinant_code = 'V')
643 and
644 p_retain_pay_plan <> 'WT'
645 and
646 p_retain_step <> '00'
647 and
648 p_retain_step is not null
649 then
650 hr_utility.set_message(8301, 'GHR_37023_ALL_PROCEDURE_FAIL');
651 hr_utility.raise_error;
652 end if;
653
654 end chk_retain_step;
655
656
657 /* Name:
658 -- Retirement Plan
659 */
660
661 procedure chk_retirement_plan
662 (p_retirement_plan_code in varchar2
663 ,p_fers_coverage in varchar2 --non SF52
664 ) is
665 begin
666
667 -- 640.11.1
668 if p_retirement_plan_code in ('K','L','M','N')
669 and
670 p_fers_coverage <> 'A'
671 and
672 p_fers_coverage <> 'E'
673 and
674 p_fers_coverage is not null
675 then
676 hr_utility.set_message(8301, 'GHR_37024_ALL_PROCEDURE_FAIL');
677 hr_utility.raise_error;
678 end if;
679
680 -- 640.14.1
681 if (p_fers_coverage = 'A'
682 or
683 p_fers_coverage = 'E')
684 and
685 p_retirement_plan_code not in ('K','L','M','N','P')
686 and
687 p_retirement_plan_code is not null
688 then
689 hr_utility.set_message(8301, 'GHR_37025_ALL_PROCEDURE_FAIL');
690 hr_utility.raise_error;
691 end if;
692 end chk_retirement_plan;
693
694
695 /* Name:
696 -- special_pay_table_id
697 */
698
699 procedure chk_special_pay_table_id
700 (p_pay_rate_determinant_code in varchar2
701 ,p_to_pay_plan in varchar2
702 ,p_special_pay_table_id in varchar2 --non SF52
703 -- FWFA Changes Bug#4444609
704 ,p_effective_date in date
705 -- FWFA Changes
706 ) is
707 begin
708
709
710 -- Update Date By Effective Date Comment
711 -- ? 01/28/99 vravikan 01/10/98 Commented - Bug 808117
712 /*
713 -- 695.05.1
714 if p_pay_rate_determinant_code not in ('5','6','E','F','M')
715 and
716 p_special_pay_table_id is not null
717 then
718 hr_utility.set_message(8301, 'GHR_37026_ALL_PROCEDURE_FAIL');
719 hr_utility.raise_error;
720 end if;
721 */
722
723 -- 695.10.1
727 -- FWFA Changes Bug#4444609
724 -- Modified as a part of FWFA Changes. Restricted the edit to actions processed
725 -- before 01-MAY-2005. For actions processed on or after 01-MAY-2005, this edit
726 -- will be skipped.
728 -- UPD 43(Bug 4567571) Raju 09-Nov-2005 Delete PRD M effective date from 01-May-2005
729
730 IF p_effective_date < to_date('2005/05/01','yyyy/mm/dd') THEN
731 if p_to_pay_plan in ('GM','GS')
732 and
733 p_pay_rate_determinant_code in ('5','6','E','F','M')
734 and
735 p_special_pay_table_id is null
736 then
737 hr_utility.set_message(8301, 'GHR_37027_ALL_PROCEDURE_FAIL');
738 hr_utility.set_message_token('PRD_LIST','5, 6, E, F, or M');
739 hr_utility.raise_error;
740 end if;
741 ELSIF p_effective_date >= to_date('2005/05/01','yyyy/mm/dd') THEN
742 if p_to_pay_plan in ('GM','GS') and
743 p_pay_rate_determinant_code in ('5','6','E','F') and
744 p_special_pay_table_id is null
745 then
746 hr_utility.set_message(8301, 'GHR_37027_ALL_PROCEDURE_FAIL');
747 hr_utility.set_message_token('PRD_LIST','5, 6, E, or F');
748 hr_utility.raise_error;
749 end if;
750 END IF;
751
752 -- FWFA Changes
753 end chk_special_pay_table_id ;
754
755
756
757 /* Name:
758 -- U.S. Citizenship
759 */
760
761 procedure chk_us_citizenship
762 (p_citizenship in varchar2
763 ,p_duty_station_lookup_code in varchar2
764 ) is
765 begin
766 null;
767
768 /* COMMENTED on 16-OCT-2002 as per NOV'02 FP Requirements -- VNARASIM
769 -- 740.02.1
770 -- No changes made as edit is end dated : amrchakr
771 if p_citizenship <> '1'
772 and
773 substr(p_duty_station_lookup_code,1,2) <> 'US'
774 and
775 substr(p_duty_station_lookup_code,2,1) <> 'Q'
776 and
777 substr(p_duty_station_lookup_code,1,1) not in ('1','2','3','4','5','6','7','8','9','0')
778 and
779 substr(p_duty_station_lookup_code,2,1) not in ('1','2','3','4','5','6','7','8','9','0')
780 and
781 p_duty_station_lookup_code is not null
782 then
783 hr_utility.set_message(8301, 'GHR_37028_ALL_PROCEDURE_FAIL');
784 hr_utility.raise_error;
785 end if;*/
786
787 end chk_us_citizenship;
788 --
789 --
790 procedure chk_century_info (
791 p_date_of_birth in date
792 ,p_effective_date in date
793 ,p_Service_Computation_Date in date
794 ,p_year_degree_attained in varchar2
795 ,p_rating_of_record_period in varchar2
796 ,p_rating_of_record_per_starts in varchar2
797 ) is
798 begin
799 --
800 -- Procedure added to check the century info.
801 --
802 -- 110.00.1
803 if to_number(to_char(p_date_of_birth, 'YYYY')) NOT BETWEEN 1900 and 2099 then
804 hr_utility.set_message(8301, 'GHR_37887_ALL_PROCEDURE_FAIL');
805 hr_utility.raise_error;
806 end if;
807
808 -- 140.00.2
809 if to_number(to_char(p_effective_date, 'YYYY')) NOT BETWEEN 1900 and 2099 then
810 hr_utility.set_message(8301, 'GHR_37888_ALL_PROCEDURE_FAIL');
811 hr_utility.raise_error;
812 end if;
813
814 -- 660.00.1
815
816 -- renamed from 660.00.1 to 600.00.3
817 -- renamed back to 660.00.1 from 660.00.3 on 12-oct-98 for update 8
818
819 -- Update Date By Effective Date Comment
820 -- ? 05/06/99 vravikan 660.00.1 has changed - if condition is
821 -- removed as both branchings refer to
822 -- same message
823 if to_number(to_char(p_service_computation_date, 'YYYY'))
824 NOT BETWEEN 1900 and 2099 then
825 hr_utility.set_message(8301, 'GHR_37889_ALL_PROCEDURE_FAIL');
826 hr_utility.raise_error;
827 end if;
828
829 -- 780.00.3
830 if to_number(p_year_degree_attained) NOT BETWEEN 1900 and 2099 then
831 hr_utility.set_message(8301, 'GHR_37890_ALL_PROCEDURE_FAIL');
832 hr_utility.raise_error;
833 end if;
834
835 -- 472.00.3
836 if to_number(to_char(fnd_date.canonical_to_date(p_rating_of_record_period), 'yyyy'))
837 NOT BETWEEN 1900 and 2099 then
838 hr_utility.set_message(8301, 'GHR_37891_ALL_PROCEDURE_FAIL');
839 hr_utility.raise_error;
840 end if;
841 --Bug# 4753117 28-Feb-07 Veeramani adding edit for the Appraisal start date
842 if to_number(to_char(fnd_date.canonical_to_date(p_rating_of_record_per_starts), 'yyyy'))
843 NOT BETWEEN 1900 and 2099 then
844 hr_utility.set_message(8301, 'GHR_37891_ALL_PROCEDURE_FAIL');
845 hr_utility.raise_error;
846 end if;
847
848
849
850 end chk_century_info;
851
852 end GHR_CPDF_CHECK1;