[Home] [Help]
PACKAGE BODY: APPS.BEN_CTP_SHD
Source
1 Package Body ben_ctp_shd as
2 /* $Header: bectprhi.pkb 120.0 2005/05/28 01:26:14 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_ctp_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 = 'BEN_PTIP_FK1') Then
37 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
38 fnd_message.set_token('PROCEDURE', l_proc);
39 fnd_message.set_token('STEP','5');
40 fnd_message.raise_error;
41 ElsIf (p_constraint_name = 'BEN_PTIP_PK') Then
42 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
43 fnd_message.set_token('PROCEDURE', l_proc);
44 fnd_message.set_token('STEP','10');
45 fnd_message.raise_error;
46 Else
47 fnd_message.set_name('PAY', 'HR_7877_API_INVALID_CONSTRAINT');
48 fnd_message.set_token('PROCEDURE', l_proc);
49 fnd_message.set_token('CONSTRAINT_NAME', p_constraint_name);
50 fnd_message.raise_error;
51 End If;
52 --
53 hr_utility.set_location(' Leaving:'||l_proc, 10);
54 End constraint_error;
55 --
56 -- ----------------------------------------------------------------------------
57 -- |-----------------------------< api_updating >-----------------------------|
58 -- ----------------------------------------------------------------------------
59 Function api_updating
60 (p_effective_date in date,
61 p_ptip_id in number,
62 p_object_version_number in number
63 ) Return Boolean Is
64 --
65 --
66 -- Cursor selects the 'current' row from the HR Schema
67 --
68 Cursor C_Sel1 is
69 select
70 ptip_id,
71 effective_start_date,
72 effective_end_date,
73 business_group_id,
74 pgm_id,
75 cmbn_ptip_id,
76 cmbn_ptip_opt_id,
77 acrs_ptip_cvg_id,
78 pl_typ_id,
79 coord_cvg_for_all_pls_flag,
80 dpnt_dsgn_cd,
81 dpnt_cvg_strt_dt_rl,
82 dpnt_cvg_end_dt_rl,
83 postelcn_edit_rl,
84 rt_end_dt_rl,
85 rt_strt_dt_rl,
86 enrt_cvg_end_dt_rl,
87 enrt_cvg_strt_dt_rl,
88 rqd_perd_enrt_nenrt_rl,
89 auto_enrt_mthd_rl,
90 enrt_mthd_cd,
91 enrt_cd,
92 enrt_rl,
93 dflt_enrt_cd,
94 dflt_enrt_det_rl,
95 drvbl_fctr_apls_rts_flag,
96 drvbl_fctr_prtn_elig_flag,
97 elig_apls_flag,
98 prtn_elig_ovrid_alwd_flag,
99 trk_inelig_per_flag,
100 dpnt_cvg_strt_dt_cd,
101 rt_end_dt_cd,
102 rt_strt_dt_cd,
103 enrt_cvg_end_dt_cd,
104 enrt_cvg_strt_dt_cd,
105 dpnt_cvg_end_dt_cd,
106 crs_this_pl_typ_only_flag,
107 ptip_stat_cd,
108 mx_cvg_alwd_amt,
109 mx_enrd_alwd_ovrid_num,
110 mn_enrd_rqd_ovrid_num,
111 no_mx_pl_typ_ovrid_flag,
112 ordr_num,
113 prvds_cr_flag,
114 rqd_perd_enrt_nenrt_val,
115 rqd_perd_enrt_nenrt_tm_uom,
116 wvbl_flag,
117 dpnt_adrs_rqd_flag,
118 dpnt_cvg_no_ctfn_rqd_flag,
119 dpnt_dob_rqd_flag,
120 dpnt_legv_id_rqd_flag,
121 susp_if_dpnt_ssn_nt_prv_cd,
122 susp_if_dpnt_dob_nt_prv_cd,
123 susp_if_dpnt_adr_nt_prv_cd,
124 susp_if_ctfn_not_dpnt_flag,
125 dpnt_ctfn_determine_cd,
126 drvd_fctr_dpnt_cvg_flag,
127 no_mn_pl_typ_overid_flag,
128 sbj_to_sps_lf_ins_mx_flag,
129 sbj_to_dpnt_lf_ins_mx_flag,
130 use_to_sum_ee_lf_ins_flag,
131 per_cvrd_cd,
132 short_name,
133 short_code,
134 legislation_code,
135 legislation_subgroup,
136 vrfy_fmly_mmbr_cd,
137 vrfy_fmly_mmbr_rl,
138 ivr_ident,
139 url_ref_name,
140 rqd_enrt_perd_tco_cd,
141 ctp_attribute_category,
142 ctp_attribute1,
143 ctp_attribute2,
144 ctp_attribute3,
145 ctp_attribute4,
146 ctp_attribute5,
147 ctp_attribute6,
148 ctp_attribute7,
149 ctp_attribute8,
150 ctp_attribute9,
151 ctp_attribute10,
152 ctp_attribute11,
153 ctp_attribute12,
154 ctp_attribute13,
155 ctp_attribute14,
156 ctp_attribute15,
157 ctp_attribute16,
158 ctp_attribute17,
159 ctp_attribute18,
160 ctp_attribute19,
161 ctp_attribute20,
162 ctp_attribute21,
163 ctp_attribute22,
164 ctp_attribute23,
165 ctp_attribute24,
166 ctp_attribute25,
167 ctp_attribute26,
168 ctp_attribute27,
169 ctp_attribute28,
170 ctp_attribute29,
171 ctp_attribute30,
172 object_version_number
173 from ben_ptip_f
174 where ptip_id = p_ptip_id
175 and p_effective_date
176 between effective_start_date and effective_end_date;
177 --
178 l_proc varchar2(72) := g_package||'api_updating';
179 l_fct_ret boolean;
180 --
181 Begin
182 hr_utility.set_location('Entering:'||l_proc, 5);
183 --
184 If (p_effective_date is null or
185 p_ptip_id is null or
186 p_object_version_number is null) Then
187 --
188 -- One of the primary key arguments is null therefore we must
189 -- set the returning function value to false
190 --
191 l_fct_ret := false;
192 Else
193 If (p_ptip_id = g_old_rec.ptip_id and
194 p_object_version_number = g_old_rec.object_version_number) Then
195 hr_utility.set_location(l_proc, 10);
196 --
197 -- The g_old_rec is current therefore we must
198 -- set the returning function to true
199 --
200 l_fct_ret := true;
201 Else
202 --
203 -- Select the current row
204 --
205 Open C_Sel1;
206 Fetch C_Sel1 Into g_old_rec;
207 If C_Sel1%notfound Then
208 Close C_Sel1;
209 --
210 -- The primary key is invalid therefore we must error
211 --
212 fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
213 fnd_message.raise_error;
214 End If;
215 Close C_Sel1;
216 If (p_object_version_number <> g_old_rec.object_version_number) Then
217 fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
218 fnd_message.raise_error;
219 End If;
220 hr_utility.set_location(l_proc, 15);
221 l_fct_ret := true;
222 End If;
223 End If;
224 hr_utility.set_location(' Leaving:'||l_proc, 20);
225 Return (l_fct_ret);
226 --
227 End api_updating;
228 --
229 -- ----------------------------------------------------------------------------
230 -- |--------------------------< find_dt_del_modes >---------------------------|
231 -- ----------------------------------------------------------------------------
232 Procedure find_dt_del_modes
233 (p_effective_date in date,
234 p_base_key_value in number,
235 p_zap out nocopy boolean,
236 p_delete out nocopy boolean,
237 p_future_change out nocopy boolean,
238 p_delete_next_change out nocopy boolean) is
239 --
240 l_proc varchar2(72) := g_package||'find_dt_del_modes';
241 --
242 l_parent_key_value1 number;
243 l_parent_key_value2 number;
244 l_parent_key_value3 number;
245 l_parent_key_value4 number;
246 l_parent_key_value5 number;
247 --
248 Cursor C_Sel1 Is
249 select t.pgm_id,
250 t.pl_typ_id,
251 t.cmbn_ptip_id,
252 t.cmbn_ptip_opt_id,
253 t.acrs_ptip_cvg_id
254 from ben_ptip_f t
255 where t.ptip_id = p_base_key_value
256 and p_effective_date
257 between t.effective_start_date and t.effective_end_date;
258 --
259 Begin
260 hr_utility.set_location('Entering:'||l_proc, 5);
261 Open C_Sel1;
262 Fetch C_Sel1 Into l_parent_key_value1,
263 l_parent_key_value2,
264 l_parent_key_value3,
265 l_parent_key_value4,
266 l_parent_key_value5;
267 If C_Sel1%notfound then
268 Close C_Sel1;
269 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
270 fnd_message.set_token('PROCEDURE', l_proc);
271 fnd_message.set_token('STEP','10');
272 fnd_message.raise_error;
273 End If;
274 Close C_Sel1;
275 --
276 -- Call the corresponding datetrack api
277 --
278 dt_api.find_dt_del_modes
279 (p_effective_date => p_effective_date,
280 p_base_table_name => 'ben_ptip_f',
281 p_base_key_column => 'ptip_id',
282 p_base_key_value => p_base_key_value,
283 p_parent_table_name1 => 'ben_pgm_f',
284 p_parent_key_column1 => 'pgm_id',
285 p_parent_key_value1 => l_parent_key_value1,
286 p_parent_table_name2 => 'ben_pl_typ_f',
287 p_parent_key_column2 => 'pl_typ_id',
288 p_parent_key_value2 => l_parent_key_value2,
289 p_parent_table_name3 => 'ben_cmbn_ptip_f',
290 p_parent_key_column3 => 'cmbn_ptip_id',
291 p_parent_key_value3 => l_parent_key_value3,
292 p_parent_table_name4 => 'ben_cmbn_ptip_opt_f',
293 p_parent_key_column4 => 'cmbn_ptip_opt_id',
294 p_parent_key_value4 => l_parent_key_value4,
295 p_parent_table_name5 => 'ben_acrs_ptip_cvg_f',
296 p_parent_key_column5 => 'acrs_ptip_cvg_id',
297 p_parent_key_value5 => l_parent_key_value5,
298 p_zap => p_zap,
299 p_delete => p_delete,
300 p_future_change => p_future_change,
301 p_delete_next_change => p_delete_next_change);
302 --
303 hr_utility.set_location(' Leaving:'||l_proc, 10);
304 End find_dt_del_modes;
305 --
306 -- ----------------------------------------------------------------------------
307 -- |--------------------------< find_dt_upd_modes >---------------------------|
308 -- ----------------------------------------------------------------------------
309 Procedure find_dt_upd_modes
310 (p_effective_date in date,
311 p_base_key_value in number,
312 p_correction out nocopy boolean,
313 p_update out nocopy boolean,
314 p_update_override out nocopy boolean,
315 p_update_change_insert out nocopy boolean) is
316 --
317 l_proc varchar2(72) := g_package||'find_dt_upd_modes';
318 --
319 Begin
320 hr_utility.set_location('Entering:'||l_proc, 5);
321 --
322 -- Call the corresponding datetrack api
323 --
324 dt_api.find_dt_upd_modes
325 (p_effective_date => p_effective_date,
326 p_base_table_name => 'ben_ptip_f',
327 p_base_key_column => 'ptip_id',
328 p_base_key_value => p_base_key_value,
329 p_correction => p_correction,
330 p_update => p_update,
331 p_update_override => p_update_override,
332 p_update_change_insert => p_update_change_insert);
333 --
334 hr_utility.set_location(' Leaving:'||l_proc, 10);
335 End find_dt_upd_modes;
336 --
337 -- ----------------------------------------------------------------------------
338 -- |------------------------< upd_effective_end_date >------------------------|
339 -- ----------------------------------------------------------------------------
340 Procedure upd_effective_end_date
341 (p_effective_date in date,
342 p_base_key_value in number,
343 p_new_effective_end_date in date,
344 p_validation_start_date in date,
345 p_validation_end_date in date,
346 p_object_version_number out nocopy number) is
347 --
348 l_proc varchar2(72) := g_package||'upd_effective_end_date';
349 l_object_version_number number;
350 --
351 Begin
352 hr_utility.set_location('Entering:'||l_proc, 5);
353 --
354 -- Because we are updating a row we must get the next object
355 -- version number.
356 --
357 l_object_version_number :=
358 dt_api.get_object_version_number
359 (p_base_table_name => 'ben_ptip_f',
360 p_base_key_column => 'ptip_id',
361 p_base_key_value => p_base_key_value);
362 --
363 hr_utility.set_location(l_proc, 10);
364 g_api_dml := true; -- Set the api dml status
365 --
366 -- Update the specified datetrack row setting the effective
367 -- end date to the specified new effective end date.
368 --
369 update ben_ptip_f t
370 set t.effective_end_date = p_new_effective_end_date,
371 t.object_version_number = l_object_version_number
372 where t.ptip_id = p_base_key_value
373 and p_effective_date
374 between t.effective_start_date and t.effective_end_date;
375 --
376 g_api_dml := false; -- Unset the api dml status
377 p_object_version_number := l_object_version_number;
378 hr_utility.set_location(' Leaving:'||l_proc, 15);
379 --
380 Exception
381 When Others Then
382 g_api_dml := false; -- Unset the api dml status
383 Raise;
387 -- |---------------------------------< lck >----------------------------------|
384 End upd_effective_end_date;
385 --
386 -- ----------------------------------------------------------------------------
388 -- ----------------------------------------------------------------------------
389 Procedure lck
390 (p_effective_date in date,
391 p_datetrack_mode in varchar2,
392 p_ptip_id in number,
393 p_object_version_number in number,
394 p_validation_start_date out nocopy date,
395 p_validation_end_date out nocopy date) is
396 --
397 l_proc varchar2(72) := g_package||'lck';
398 l_validation_start_date date;
399 l_validation_end_date date;
400 l_object_invalid exception;
401 l_argument varchar2(30);
402 --
403 -- Cursor C_Sel1 selects the current locked row as of session date
404 -- ensuring that the object version numbers match.
405 --
406 Cursor C_Sel1 is
407 select
408 ptip_id,
409 effective_start_date,
410 effective_end_date,
411 coord_cvg_for_all_pls_flag,
412 dpnt_dsgn_cd,
413 dpnt_cvg_no_ctfn_rqd_flag,
414 dpnt_cvg_strt_dt_cd,
415 rt_end_dt_cd,
416 rt_strt_dt_cd,
417 enrt_cvg_end_dt_cd,
418 enrt_cvg_strt_dt_cd,
419 dpnt_cvg_strt_dt_rl,
420 dpnt_cvg_end_dt_cd,
421 dpnt_cvg_end_dt_rl,
422 dpnt_adrs_rqd_flag,
423 dpnt_legv_id_rqd_flag,
424 susp_if_dpnt_ssn_nt_prv_cd,
425 susp_if_dpnt_dob_nt_prv_cd,
426 susp_if_dpnt_adr_nt_prv_cd,
427 susp_if_ctfn_not_dpnt_flag,
428 dpnt_ctfn_determine_cd,
429 postelcn_edit_rl,
430 rt_end_dt_rl,
431 rt_strt_dt_rl,
432 enrt_cvg_end_dt_rl,
433 enrt_cvg_strt_dt_rl,
434 rqd_perd_enrt_nenrt_rl,
435 auto_enrt_mthd_rl,
436 enrt_mthd_cd,
437 enrt_cd,
438 enrt_rl,
439 dflt_enrt_cd,
440 dflt_enrt_det_rl,
441 drvbl_fctr_apls_rts_flag,
442 drvbl_fctr_prtn_elig_flag,
443 elig_apls_flag,
444 prtn_elig_ovrid_alwd_flag,
445 trk_inelig_per_flag,
446 dpnt_dob_rqd_flag,
447 crs_this_pl_typ_only_flag,
448 ptip_stat_cd,
449 mx_cvg_alwd_amt,
450 mx_enrd_alwd_ovrid_num,
451 mn_enrd_rqd_ovrid_num,
452 no_mx_pl_typ_ovrid_flag,
453 ordr_num,
454 prvds_cr_flag,
455 rqd_perd_enrt_nenrt_val,
456 rqd_perd_enrt_nenrt_tm_uom,
457 wvbl_flag,
458 drvd_fctr_dpnt_cvg_flag,
459 no_mn_pl_typ_overid_flag,
460 sbj_to_sps_lf_ins_mx_flag,
461 sbj_to_dpnt_lf_ins_mx_flag,
462 use_to_sum_ee_lf_ins_flag,
463 per_cvrd_cd,
464 short_name,
465 short_code,
466 legislation_code,
467 legislation_subgroup,
468 vrfy_fmly_mmbr_cd,
469 vrfy_fmly_mmbr_rl,
470 ivr_ident,
471 url_ref_name,
472 rqd_enrt_perd_tco_cd,
473 pgm_id,
474 pl_typ_id,
475 cmbn_ptip_id,
476 cmbn_ptip_opt_id,
477 acrs_ptip_cvg_id,
478 business_group_id,
479 ctp_attribute_category,
480 ctp_attribute1,
481 ctp_attribute2,
482 ctp_attribute3,
483 ctp_attribute4,
484 ctp_attribute5,
485 ctp_attribute6,
486 ctp_attribute7,
487 ctp_attribute8,
488 ctp_attribute9,
489 ctp_attribute10,
490 ctp_attribute11,
491 ctp_attribute12,
492 ctp_attribute13,
493 ctp_attribute14,
494 ctp_attribute15,
495 ctp_attribute16,
496 ctp_attribute17,
497 ctp_attribute18,
498 ctp_attribute19,
499 ctp_attribute20,
500 ctp_attribute21,
501 ctp_attribute22,
502 ctp_attribute23,
503 ctp_attribute24,
504 ctp_attribute25,
505 ctp_attribute26,
506 ctp_attribute27,
507 ctp_attribute28,
508 ctp_attribute29,
509 ctp_attribute30,
510 object_version_number
511 from ben_ptip_f
512 where ptip_id = p_ptip_id
513 and p_effective_date
514 between effective_start_date and effective_end_date
515 for update nowait;
516 --
517 --
518 --
519 Begin
520 hr_utility.set_location('Entering:'||l_proc, 5);
521 --
522 -- Ensure that all the mandatory arguments are not null
523 --
524 hr_api.mandatory_arg_error(p_api_name => l_proc,
525 p_argument => 'effective_date',
526 p_argument_value => p_effective_date);
527 --
528 hr_api.mandatory_arg_error(p_api_name => l_proc,
529 p_argument => 'datetrack_mode',
530 p_argument_value => p_datetrack_mode);
531 --
532 hr_api.mandatory_arg_error(p_api_name => l_proc,
533 p_argument => 'ptip_id',
534 p_argument_value => p_ptip_id);
535 --
536 hr_api.mandatory_arg_error(p_api_name => l_proc,
537 p_argument => 'object_version_number',
538 p_argument_value => p_object_version_number);
539 --
540 -- Check to ensure the datetrack mode is not INSERT.
544 -- We must select and lock the current row.
541 --
542 If (p_datetrack_mode <> 'INSERT') then
543 --
545 --
546 Open C_Sel1;
547 Fetch C_Sel1 Into g_old_rec;
548 If C_Sel1%notfound then
549 Close C_Sel1;
550 --
551 -- The primary key is invalid therefore we must error
552 --
553 fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
554 fnd_message.raise_error;
555 End If;
556 Close C_Sel1;
557 If (p_object_version_number <> g_old_rec.object_version_number) Then
558 fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
559 fnd_message.raise_error;
560 End If;
561 hr_utility.set_location(l_proc, 15);
562 --
563 --
564 -- Validate the datetrack mode mode getting the validation start
565 -- and end dates for the specified datetrack operation.
566 --
567 dt_api.validate_dt_mode
568 (p_effective_date => p_effective_date,
569 p_datetrack_mode => p_datetrack_mode,
570 p_base_table_name => 'ben_ptip_f',
571 p_base_key_column => 'ptip_id',
572 p_base_key_value => p_ptip_id,
573 p_parent_table_name1 => 'ben_pgm_f',
574 p_parent_key_column1 => 'pgm_id',
575 p_parent_key_value1 => g_old_rec.pgm_id,
576 p_parent_table_name2 => 'ben_pl_typ_f',
577 p_parent_key_column2 => 'pl_typ_id',
578 p_parent_key_value2 => g_old_rec.pl_typ_id,
579 p_parent_table_name3 => 'ben_cmbn_ptip_f',
580 p_parent_key_column3 => 'cmbn_ptip_id',
581 p_parent_key_value3 => g_old_rec.cmbn_ptip_id,
582 p_parent_table_name4 => 'ben_cmbn_ptip_opt_f',
583 p_parent_key_column4 => 'cmbn_ptip_opt_id',
584 p_parent_key_value4 => g_old_rec.cmbn_ptip_opt_id,
585 p_parent_table_name5 => 'ben_acrs_ptip_cvg_f',
586 p_parent_key_column5 => 'acrs_ptip_cvg_id',
587 p_parent_key_value5 => g_old_rec.acrs_ptip_cvg_id,
588 -- p_child_table_name1 => 'ben_wv_prtn_rsn_ptip_f',
589 -- p_child_key_column1 => 'wv_prtn_rsn_ptip_id',
590 -- p_child_table_name2 => 'ben_ler_chg_dpnt_cvg_f',
591 -- p_child_key_column2 => 'ler_chg_dpnt_cvg_id',
592 -- p_child_table_name3 => 'ben_acty_base_rt_f',
593 -- p_child_key_column3 => 'acty_base_rt_id',
594 -- p_child_table_name4 => 'ben_apld_dpnt_cvg_elig_prfl_f',
595 -- p_child_key_column4 => 'apld_dpnt_cvg_elig_prfl_id',
596 -- p_child_table_name5 => 'ben_ptip_dpnt_cvg_ctfn_f',
597 -- p_child_key_column5 => 'ptip_dpnt_cvg_ctfn_id',
598 -- p_enforce_foreign_locking => true, Bug 3198808
599 p_enforce_foreign_locking => false,
600 p_validation_start_date => l_validation_start_date,
601 p_validation_end_date => l_validation_end_date);
602 Else
603 --
604 -- We are doing a datetrack 'INSERT' which is illegal within this
605 -- procedure therefore we must error (note: to lck on insert the
606 -- private procedure ins_lck should be called).
607 --
608 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
609 fnd_message.set_token('PROCEDURE', l_proc);
610 fnd_message.set_token('STEP','20');
611 fnd_message.raise_error;
612 End If;
613 --
614 -- Set the validation start and end date OUT arguments
615 --
616 p_validation_start_date := l_validation_start_date;
617 p_validation_end_date := l_validation_end_date;
618 --
619 hr_utility.set_location(' Leaving:'||l_proc, 30);
620 --
621 -- We need to trap the ORA LOCK exception
622 --
623 Exception
624 When HR_Api.Object_Locked then
625 --
626 -- The object is locked therefore we need to supply a meaningful
627 -- error message.
628 --
629 fnd_message.set_name('PAY', 'HR_7165_OBJECT_LOCKED');
630 fnd_message.set_token('TABLE_NAME', 'ben_ptip_f');
631 fnd_message.raise_error;
632 When l_object_invalid then
633 --
634 -- The object doesn't exist or is invalid
635 --
636 fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
637 fnd_message.set_token('TABLE_NAME', 'ben_ptip_f');
638 fnd_message.raise_error;
639 End lck;
640 --
641 -- ----------------------------------------------------------------------------
642 -- |-----------------------------< convert_args >-----------------------------|
643 -- ----------------------------------------------------------------------------
644 Function convert_args
645 (
646 p_ptip_id in number,
647 p_effective_start_date in date,
648 p_effective_end_date in date,
649 p_coord_cvg_for_all_pls_flag in varchar2,
650 p_dpnt_dsgn_cd in varchar2,
651 p_dpnt_cvg_no_ctfn_rqd_flag in varchar2,
652 p_dpnt_cvg_strt_dt_cd in varchar2,
653 p_rt_end_dt_cd in varchar2,
654 p_rt_strt_dt_cd in varchar2,
655 p_enrt_cvg_end_dt_cd in varchar2,
656 p_enrt_cvg_strt_dt_cd in varchar2,
657 p_dpnt_cvg_strt_dt_rl in number,
658 p_dpnt_cvg_end_dt_cd in varchar2,
659 p_dpnt_cvg_end_dt_rl in number,
660 p_dpnt_adrs_rqd_flag in varchar2,
664 p_susp_if_dpnt_adr_nt_prv_cd in varchar2,
661 p_dpnt_legv_id_rqd_flag in varchar2,
662 p_susp_if_dpnt_ssn_nt_prv_cd in varchar2,
663 p_susp_if_dpnt_dob_nt_prv_cd in varchar2,
665 p_susp_if_ctfn_not_dpnt_flag in varchar2,
666 p_dpnt_ctfn_determine_cd in varchar2,
667 p_postelcn_edit_rl in number,
668 p_rt_end_dt_rl in number,
669 p_rt_strt_dt_rl in number,
670 p_enrt_cvg_end_dt_rl in number,
671 p_enrt_cvg_strt_dt_rl in number,
672 p_rqd_perd_enrt_nenrt_rl in number,
673 p_auto_enrt_mthd_rl in number,
674 p_enrt_mthd_cd in varchar2,
675 p_enrt_cd in varchar2,
676 p_enrt_rl in number,
677 p_dflt_enrt_cd in varchar2,
678 p_dflt_enrt_det_rl in number,
679 p_drvbl_fctr_apls_rts_flag in varchar2,
680 p_drvbl_fctr_prtn_elig_flag in varchar2,
681 p_elig_apls_flag in varchar2,
682 p_prtn_elig_ovrid_alwd_flag in varchar2,
683 p_trk_inelig_per_flag in varchar2,
684 p_dpnt_dob_rqd_flag in varchar2,
685 p_crs_this_pl_typ_only_flag in varchar2,
686 p_ptip_stat_cd in varchar2,
687 p_mx_cvg_alwd_amt in number,
688 p_mx_enrd_alwd_ovrid_num in number,
689 p_mn_enrd_rqd_ovrid_num in number,
690 p_no_mx_pl_typ_ovrid_flag in varchar2,
691 p_ordr_num in number,
692 p_prvds_cr_flag in varchar2,
693 p_rqd_perd_enrt_nenrt_val in number,
694 p_rqd_perd_enrt_nenrt_tm_uom in varchar2,
695 p_wvbl_flag in varchar2,
696 p_drvd_fctr_dpnt_cvg_flag in varchar2,
697 p_no_mn_pl_typ_overid_flag in varchar2,
698 p_sbj_to_sps_lf_ins_mx_flag in varchar2,
699 p_sbj_to_dpnt_lf_ins_mx_flag in varchar2,
700 p_use_to_sum_ee_lf_ins_flag in varchar2,
701 p_per_cvrd_cd in varchar2,
702 p_short_name in varchar2,
703 p_short_code in varchar2,
704 p_legislation_code in varchar2,
705 p_legislation_subgroup in varchar2,
706 p_vrfy_fmly_mmbr_cd in varchar2,
707 p_vrfy_fmly_mmbr_rl in number,
708 p_ivr_ident in varchar2,
709 p_url_ref_name in varchar2,
710 p_rqd_enrt_perd_tco_cd in varchar2,
711 p_pgm_id in number,
712 p_pl_typ_id in number,
713 p_cmbn_ptip_id in number,
714 p_cmbn_ptip_opt_id in number,
715 p_acrs_ptip_cvg_id in number,
716 p_business_group_id in number,
717 p_ctp_attribute_category in varchar2,
718 p_ctp_attribute1 in varchar2,
719 p_ctp_attribute2 in varchar2,
720 p_ctp_attribute3 in varchar2,
721 p_ctp_attribute4 in varchar2,
722 p_ctp_attribute5 in varchar2,
723 p_ctp_attribute6 in varchar2,
724 p_ctp_attribute7 in varchar2,
725 p_ctp_attribute8 in varchar2,
726 p_ctp_attribute9 in varchar2,
727 p_ctp_attribute10 in varchar2,
728 p_ctp_attribute11 in varchar2,
729 p_ctp_attribute12 in varchar2,
730 p_ctp_attribute13 in varchar2,
731 p_ctp_attribute14 in varchar2,
732 p_ctp_attribute15 in varchar2,
733 p_ctp_attribute16 in varchar2,
734 p_ctp_attribute17 in varchar2,
735 p_ctp_attribute18 in varchar2,
736 p_ctp_attribute19 in varchar2,
737 p_ctp_attribute20 in varchar2,
738 p_ctp_attribute21 in varchar2,
739 p_ctp_attribute22 in varchar2,
740 p_ctp_attribute23 in varchar2,
741 p_ctp_attribute24 in varchar2,
742 p_ctp_attribute25 in varchar2,
743 p_ctp_attribute26 in varchar2,
744 p_ctp_attribute27 in varchar2,
745 p_ctp_attribute28 in varchar2,
746 p_ctp_attribute29 in varchar2,
747 p_ctp_attribute30 in varchar2,
748 p_object_version_number in number
749 )
750 Return g_rec_type is
751 --
752 l_rec g_rec_type;
753 l_proc varchar2(72) := g_package||'convert_args';
754 --
755 Begin
756 --
757 hr_utility.set_location('Entering:'||l_proc, 5);
758 --
759 -- Convert arguments into local l_rec structure.
760 --
761 l_rec.ptip_id := p_ptip_id;
762 l_rec.effective_start_date := p_effective_start_date;
763 l_rec.effective_end_date := p_effective_end_date;
764 l_rec.business_group_id := p_business_group_id;
768 l_rec.acrs_ptip_cvg_id := p_acrs_ptip_cvg_id;
765 l_rec.pgm_id := p_pgm_id;
766 l_rec.cmbn_ptip_id := p_cmbn_ptip_id;
767 l_rec.cmbn_ptip_opt_id := p_cmbn_ptip_opt_id;
769 l_rec.pl_typ_id := p_pl_typ_id;
770 l_rec.coord_cvg_for_all_pls_flag := p_coord_cvg_for_all_pls_flag;
771 l_rec.dpnt_dsgn_cd := p_dpnt_dsgn_cd;
772 l_rec.dpnt_cvg_strt_dt_rl := p_dpnt_cvg_strt_dt_rl;
773 l_rec.dpnt_cvg_end_dt_rl := p_dpnt_cvg_end_dt_rl;
774 l_rec.postelcn_edit_rl := p_postelcn_edit_rl;
775 l_rec.rt_end_dt_rl := p_rt_end_dt_rl;
776 l_rec.rt_strt_dt_rl := p_rt_strt_dt_rl;
777 l_rec.enrt_cvg_end_dt_rl := p_enrt_cvg_end_dt_rl;
778 l_rec.enrt_cvg_strt_dt_rl := p_enrt_cvg_strt_dt_rl;
779 l_rec.rqd_perd_enrt_nenrt_rl := p_rqd_perd_enrt_nenrt_rl;
780 l_rec.auto_enrt_mthd_rl := p_auto_enrt_mthd_rl;
781 l_rec.enrt_mthd_cd := p_enrt_mthd_cd;
782 l_rec.enrt_cd := p_enrt_cd;
783 l_rec.enrt_rl := p_enrt_rl;
784 l_rec.dflt_enrt_cd := p_dflt_enrt_cd;
785 l_rec.dflt_enrt_det_rl := p_dflt_enrt_det_rl;
786 l_rec.drvbl_fctr_apls_rts_flag := p_drvbl_fctr_apls_rts_flag;
787 l_rec.drvbl_fctr_prtn_elig_flag := p_drvbl_fctr_prtn_elig_flag;
788 l_rec.elig_apls_flag := p_elig_apls_flag;
789 l_rec.prtn_elig_ovrid_alwd_flag := p_prtn_elig_ovrid_alwd_flag;
790 l_rec.trk_inelig_per_flag := p_trk_inelig_per_flag;
791 l_rec.dpnt_cvg_strt_dt_cd := p_dpnt_cvg_strt_dt_cd;
792 l_rec.rt_end_dt_cd := p_rt_end_dt_cd;
793 l_rec.rt_strt_dt_cd := p_rt_strt_dt_cd;
794 l_rec.enrt_cvg_end_dt_cd := p_enrt_cvg_end_dt_cd;
795 l_rec.enrt_cvg_strt_dt_cd := p_enrt_cvg_strt_dt_cd;
796 l_rec.dpnt_cvg_end_dt_cd := p_dpnt_cvg_end_dt_cd;
797 l_rec.crs_this_pl_typ_only_flag := p_crs_this_pl_typ_only_flag;
798 l_rec.ptip_stat_cd := p_ptip_stat_cd;
799 l_rec.mx_cvg_alwd_amt := p_mx_cvg_alwd_amt;
800 l_rec.mx_enrd_alwd_ovrid_num := p_mx_enrd_alwd_ovrid_num;
801 l_rec.mn_enrd_rqd_ovrid_num := p_mn_enrd_rqd_ovrid_num;
802 l_rec.no_mx_pl_typ_ovrid_flag := p_no_mx_pl_typ_ovrid_flag;
803 l_rec.ordr_num := p_ordr_num;
804 l_rec.prvds_cr_flag := p_prvds_cr_flag;
805 l_rec.rqd_perd_enrt_nenrt_val := p_rqd_perd_enrt_nenrt_val;
806 l_rec.rqd_perd_enrt_nenrt_tm_uom := p_rqd_perd_enrt_nenrt_tm_uom;
807 l_rec.wvbl_flag := p_wvbl_flag;
808 l_rec.dpnt_adrs_rqd_flag := p_dpnt_adrs_rqd_flag;
809 l_rec.dpnt_cvg_no_ctfn_rqd_flag := p_dpnt_cvg_no_ctfn_rqd_flag;
810 l_rec.dpnt_dob_rqd_flag := p_dpnt_dob_rqd_flag;
811 l_rec.dpnt_legv_id_rqd_flag := p_dpnt_legv_id_rqd_flag;
812 l_rec.susp_if_dpnt_ssn_nt_prv_cd := p_susp_if_dpnt_ssn_nt_prv_cd;
813 l_rec.susp_if_dpnt_dob_nt_prv_cd := p_susp_if_dpnt_dob_nt_prv_cd;
814 l_rec.susp_if_dpnt_adr_nt_prv_cd := p_susp_if_dpnt_adr_nt_prv_cd;
815 l_rec.susp_if_ctfn_not_dpnt_flag := p_susp_if_ctfn_not_dpnt_flag;
816 l_rec.dpnt_ctfn_determine_cd := p_dpnt_ctfn_determine_cd;
817 l_rec.drvd_fctr_dpnt_cvg_flag := p_drvd_fctr_dpnt_cvg_flag;
818 l_rec.no_mn_pl_typ_overid_flag := p_no_mn_pl_typ_overid_flag;
819 l_rec.sbj_to_sps_lf_ins_mx_flag := p_sbj_to_sps_lf_ins_mx_flag;
820 l_rec.sbj_to_dpnt_lf_ins_mx_flag := p_sbj_to_dpnt_lf_ins_mx_flag;
821 l_rec.use_to_sum_ee_lf_ins_flag := p_use_to_sum_ee_lf_ins_flag;
822 l_rec.per_cvrd_cd := p_per_cvrd_cd;
823 l_rec.short_name := p_short_name;
824 l_rec.short_code := p_short_code;
825 l_rec.legislation_code := p_legislation_code;
826 l_rec.legislation_subgroup := p_legislation_subgroup;
827 l_rec.vrfy_fmly_mmbr_cd := p_vrfy_fmly_mmbr_cd;
828 l_rec.vrfy_fmly_mmbr_rl := p_vrfy_fmly_mmbr_rl;
829 l_rec.ivr_ident := p_ivr_ident;
830 l_rec.url_ref_name := p_url_ref_name;
831 l_rec.rqd_enrt_perd_tco_cd := p_rqd_enrt_perd_tco_cd;
832 l_rec.ctp_attribute_category := p_ctp_attribute_category;
833 l_rec.ctp_attribute1 := p_ctp_attribute1;
834 l_rec.ctp_attribute2 := p_ctp_attribute2;
835 l_rec.ctp_attribute3 := p_ctp_attribute3;
836 l_rec.ctp_attribute4 := p_ctp_attribute4;
837 l_rec.ctp_attribute5 := p_ctp_attribute5;
838 l_rec.ctp_attribute6 := p_ctp_attribute6;
839 l_rec.ctp_attribute7 := p_ctp_attribute7;
840 l_rec.ctp_attribute8 := p_ctp_attribute8;
841 l_rec.ctp_attribute9 := p_ctp_attribute9;
842 l_rec.ctp_attribute10 := p_ctp_attribute10;
843 l_rec.ctp_attribute11 := p_ctp_attribute11;
844 l_rec.ctp_attribute12 := p_ctp_attribute12;
845 l_rec.ctp_attribute13 := p_ctp_attribute13;
846 l_rec.ctp_attribute14 := p_ctp_attribute14;
847 l_rec.ctp_attribute15 := p_ctp_attribute15;
848 l_rec.ctp_attribute16 := p_ctp_attribute16;
852 l_rec.ctp_attribute20 := p_ctp_attribute20;
849 l_rec.ctp_attribute17 := p_ctp_attribute17;
850 l_rec.ctp_attribute18 := p_ctp_attribute18;
851 l_rec.ctp_attribute19 := p_ctp_attribute19;
853 l_rec.ctp_attribute21 := p_ctp_attribute21;
854 l_rec.ctp_attribute22 := p_ctp_attribute22;
855 l_rec.ctp_attribute23 := p_ctp_attribute23;
856 l_rec.ctp_attribute24 := p_ctp_attribute24;
857 l_rec.ctp_attribute25 := p_ctp_attribute25;
858 l_rec.ctp_attribute26 := p_ctp_attribute26;
859 l_rec.ctp_attribute27 := p_ctp_attribute27;
860 l_rec.ctp_attribute28 := p_ctp_attribute28;
861 l_rec.ctp_attribute29 := p_ctp_attribute29;
862 l_rec.ctp_attribute30 := p_ctp_attribute30;
863 l_rec.object_version_number := p_object_version_number;
864 --
865 -- Return the plsql record structure.
866 --
867 hr_utility.set_location(' Leaving:'||l_proc, 10);
868 Return(l_rec);
869 --
870 End convert_args;
871 --
872 end ben_ctp_shd;