[Home] [Help]
PACKAGE BODY: APPS.BEN_PGM_SHD
Source
1 Package Body ben_pgm_shd as
2 /* $Header: bepgmrhi.pkb 120.1 2005/12/09 05:02:29 nhunur noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pgm_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_PGM_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_PGM_F_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_pgm_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 pgm_id,
71 effective_start_date,
72 effective_end_date,
73 name,
74 dpnt_adrs_rqd_flag,
75 pgm_prvds_no_auto_enrt_flag,
76 dpnt_dob_rqd_flag,
77 pgm_prvds_no_dflt_enrt_flag,
78 dpnt_dsgn_lvl_cd,
79 dpnt_legv_id_rqd_flag,
80 pgm_stat_cd,
81 ivr_ident,
82 pgm_typ_cd,
83 elig_apls_flag,
84 uses_all_asmts_for_rts_flag,
85 url_ref_name,
86 pgm_desc,
87 prtn_elig_ovrid_alwd_flag,
88 pgm_use_all_asnts_elig_flag,
89 dpnt_dsgn_cd,
90 mx_dpnt_pct_prtt_lf_amt,
91 mx_sps_pct_prtt_lf_amt,
92 coord_cvg_for_all_pls_flg,
93 enrt_cvg_end_dt_cd,
94 enrt_cvg_end_dt_rl,
95 pgm_grp_cd,
96 acty_ref_perd_cd,
97 drvbl_fctr_dpnt_elig_flag,
98 pgm_uom,
99 enrt_info_rt_freq_cd,
100 drvbl_fctr_prtn_elig_flag,
101 drvbl_fctr_apls_rts_flag,
102 alws_unrstrctd_enrt_flag,
103 enrt_cd,
104 enrt_mthd_cd,
105 poe_lvl_cd,
106 enrt_rl,
107 auto_enrt_mthd_rl,
108 dpnt_dsgn_no_ctfn_rqd_flag,
109 rt_end_dt_cd,
110 rt_end_dt_rl,
111 rt_strt_dt_cd,
112 rt_strt_dt_rl,
113 enrt_cvg_strt_dt_cd,
114 enrt_cvg_strt_dt_rl,
115 dpnt_cvg_strt_dt_cd,
116 dpnt_cvg_strt_dt_rl,
117 dpnt_cvg_end_dt_rl,
118 dpnt_cvg_end_dt_cd,
119 trk_inelig_per_flag,
120 business_group_id,
121 per_cvrd_cd,
122 vrfy_fmly_mmbr_rl,
123 vrfy_fmly_mmbr_cd,
124 short_name, /*FHR*/
125 short_code, /*FHR*/
126 legislation_code, /*FHR*/
127 legislation_subgroup, /*FHR*/
128 Dflt_pgm_flag,
129 Use_prog_points_flag,
130 Dflt_step_cd,
131 Dflt_step_rl,
132 Update_salary_cd,
133 Use_multi_pay_rates_flag,
134 dflt_element_type_id,
135 Dflt_input_value_id,
136 Use_scores_cd,
137 Scores_calc_mthd_cd,
138 Scores_calc_rl,
139 gsp_allow_override_flag,
140 use_variable_rates_flag,
141 salary_calc_mthd_cd,
142 salary_calc_mthd_rl,
143 susp_if_dpnt_ssn_nt_prv_cd,
144 susp_if_dpnt_dob_nt_prv_cd,
145 susp_if_dpnt_adr_nt_prv_cd,
146 susp_if_ctfn_not_dpnt_flag,
147 dpnt_ctfn_determine_cd,
148 pgm_attribute_category,
149 pgm_attribute1,
150 pgm_attribute2,
151 pgm_attribute3,
152 pgm_attribute4,
153 pgm_attribute5,
154 pgm_attribute6,
155 pgm_attribute7,
156 pgm_attribute8,
157 pgm_attribute9,
158 pgm_attribute10,
159 pgm_attribute11,
160 pgm_attribute12,
161 pgm_attribute13,
162 pgm_attribute14,
163 pgm_attribute15,
164 pgm_attribute16,
165 pgm_attribute17,
166 pgm_attribute18,
167 pgm_attribute19,
168 pgm_attribute20,
169 pgm_attribute21,
170 pgm_attribute22,
171 pgm_attribute23,
172 pgm_attribute24,
173 pgm_attribute25,
174 pgm_attribute26,
175 pgm_attribute27,
176 pgm_attribute28,
177 pgm_attribute29,
178 pgm_attribute30,
179 object_version_number
180 from ben_pgm_f
181 where pgm_id = p_pgm_id
182 and p_effective_date
183 between effective_start_date and effective_end_date;
184 --
185 l_proc varchar2(72) := g_package||'api_updating';
186 l_fct_ret boolean;
187 --
188 Begin
189 hr_utility.set_location('Entering:'||l_proc, 5);
190 --
191 If (p_effective_date is null or
192 p_pgm_id is null or
193 p_object_version_number is null) Then
194 --
195 -- One of the primary key arguments is null therefore we must
196 -- set the returning function value to false
197 --
198 l_fct_ret := false;
199 Else
200 If (p_pgm_id = g_old_rec.pgm_id and
201 p_object_version_number = g_old_rec.object_version_number) Then
202 hr_utility.set_location(l_proc, 10);
203 --
204 -- The g_old_rec is current therefore we must
205 -- set the returning function to true
206 --
207 l_fct_ret := true;
208 Else
209 --
210 -- Select the current row
211 --
212 Open C_Sel1;
213 Fetch C_Sel1 Into g_old_rec;
214 If C_Sel1%notfound Then
215 Close C_Sel1;
216 --
217 -- The primary key is invalid therefore we must error
218 --
219 fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
220 fnd_message.raise_error;
221 End If;
222 Close C_Sel1;
223 If (p_object_version_number <> g_old_rec.object_version_number) Then
224 fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
225 fnd_message.raise_error;
226 End If;
227 hr_utility.set_location(l_proc, 15);
228 l_fct_ret := true;
229 End If;
230 End If;
231 hr_utility.set_location(' Leaving:'||l_proc, 20);
232 Return (l_fct_ret);
233 --
234 End api_updating;
235 --
236 -- ----------------------------------------------------------------------------
237 -- |--------------------------< find_dt_del_modes >---------------------------|
238 -- ----------------------------------------------------------------------------
239 Procedure find_dt_del_modes
240 (p_effective_date in date,
241 p_base_key_value in number,
242 p_zap out nocopy boolean,
243 p_delete out nocopy boolean,
244 p_future_change out nocopy boolean,
245 p_delete_next_change out nocopy boolean) is
246 --
247 l_proc varchar2(72) := g_package||'find_dt_del_modes';
248 --
249 l_parent_key_value1 number;
250 l_parent_key_value2 number;
251 l_parent_key_value3 number;
252 l_parent_key_value4 number;
253 l_parent_key_value5 number;
254 l_parent_key_value6 number;
255 --
256 Cursor C_Sel1 Is
257 select t.dpnt_cvg_strt_dt_rl,
258 t.dpnt_cvg_end_dt_rl,
259 t.enrt_cvg_end_dt_rl,
260 t.enrt_cvg_strt_dt_rl,
261 t.rt_end_dt_rl,
262 t.rt_strt_dt_rl
263 from ben_pgm_f t
264 where t.pgm_id = p_base_key_value
265 and p_effective_date
266 between t.effective_start_date and t.effective_end_date;
267 --
268 Begin
269 hr_utility.set_location('Entering:'||l_proc, 5);
270 Open C_Sel1;
271 Fetch C_Sel1 Into l_parent_key_value1,
272 l_parent_key_value2,
273 l_parent_key_value3,
274 l_parent_key_value4,
275 l_parent_key_value5,
276 l_parent_key_value6;
277 If C_Sel1%notfound then
278 Close C_Sel1;
279 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
280 fnd_message.set_token('PROCEDURE', l_proc);
281 fnd_message.set_token('STEP','10');
282 fnd_message.raise_error;
283 End If;
284 Close C_Sel1;
285 --
286 -- Call the corresponding datetrack api
287 --
288 dt_api.find_dt_del_modes
289 (p_effective_date => p_effective_date,
290 p_base_table_name => 'ben_pgm_f',
291 p_base_key_column => 'pgm_id',
292 p_base_key_value => p_base_key_value,
293 p_parent_table_name1 => 'ff_formulas_f',
294 p_parent_key_column1 => 'formula_id',
295 p_parent_key_value1 => l_parent_key_value1,
296 p_parent_table_name2 => 'ff_formulas_f',
297 p_parent_key_column2 => 'formula_id',
298 p_parent_key_value2 => l_parent_key_value2,
299 p_parent_table_name3 => 'ff_formulas_f',
300 p_parent_key_column3 => 'formula_id',
301 p_parent_key_value3 => l_parent_key_value3,
302 p_parent_table_name4 => 'ff_formulas_f',
303 p_parent_key_column4 => 'formula_id',
304 p_parent_key_value4 => l_parent_key_value4,
305 p_parent_table_name5 => 'ff_formulas_f',
306 p_parent_key_column5 => 'formula_id',
307 p_parent_key_value5 => l_parent_key_value5,
308 p_parent_table_name6 => 'ff_formulas_f',
309 p_parent_key_column6 => 'formula_id',
310 p_parent_key_value6 => l_parent_key_value6,
311 p_zap => p_zap,
312 p_delete => p_delete,
313 p_future_change => p_future_change,
314 p_delete_next_change => p_delete_next_change);
315 --
316 hr_utility.set_location(' Leaving:'||l_proc, 10);
317 End find_dt_del_modes;
318 --
319 -- ----------------------------------------------------------------------------
320 -- |--------------------------< find_dt_upd_modes >---------------------------|
321 -- ----------------------------------------------------------------------------
322 Procedure find_dt_upd_modes
323 (p_effective_date in date,
324 p_base_key_value in number,
325 p_correction out nocopy boolean,
326 p_update out nocopy boolean,
327 p_update_override out nocopy boolean,
328 p_update_change_insert out nocopy boolean) is
329 --
330 l_proc varchar2(72) := g_package||'find_dt_upd_modes';
331 --
332 Begin
333 hr_utility.set_location('Entering:'||l_proc, 5);
334 --
335 -- Call the corresponding datetrack api
336 --
337 dt_api.find_dt_upd_modes
338 (p_effective_date => p_effective_date,
339 p_base_table_name => 'ben_pgm_f',
340 p_base_key_column => 'pgm_id',
341 p_base_key_value => p_base_key_value,
342 p_correction => p_correction,
343 p_update => p_update,
344 p_update_override => p_update_override,
345 p_update_change_insert => p_update_change_insert);
346 --
347 hr_utility.set_location(' Leaving:'||l_proc, 10);
348 End find_dt_upd_modes;
349 --
350 -- ----------------------------------------------------------------------------
351 -- |------------------------< upd_effective_end_date >------------------------|
352 -- ----------------------------------------------------------------------------
353 Procedure upd_effective_end_date
354 (p_effective_date in date,
355 p_base_key_value in number,
356 p_new_effective_end_date in date,
357 p_validation_start_date in date,
358 p_validation_end_date in date,
359 p_object_version_number out nocopy number) is
360 --
361 l_proc varchar2(72) := g_package||'upd_effective_end_date';
362 l_object_version_number number;
363 --
364 Begin
365 hr_utility.set_location('Entering:'||l_proc, 5);
366 --
367 -- Because we are updating a row we must get the next object
368 -- version number.
369 --
370 l_object_version_number :=
371 dt_api.get_object_version_number
372 (p_base_table_name => 'ben_pgm_f',
373 p_base_key_column => 'pgm_id',
374 p_base_key_value => p_base_key_value);
375 --
376 hr_utility.set_location(l_proc, 10);
377 g_api_dml := true; -- Set the api dml status
378 --
379 -- Update the specified datetrack row setting the effective
380 -- end date to the specified new effective end date.
381 --
382 update ben_pgm_f t
383 set t.effective_end_date = p_new_effective_end_date,
384 t.object_version_number = l_object_version_number
385 where t.pgm_id = p_base_key_value
386 and p_effective_date
387 between t.effective_start_date and t.effective_end_date;
388 --
389 g_api_dml := false; -- Unset the api dml status
390 p_object_version_number := l_object_version_number;
391 hr_utility.set_location(' Leaving:'||l_proc, 15);
392 --
393 Exception
394 When Others Then
395 g_api_dml := false; -- Unset the api dml status
396 Raise;
397 End upd_effective_end_date;
398 --
399 -- ----------------------------------------------------------------------------
400 -- |---------------------------------< lck >----------------------------------|
401 -- ----------------------------------------------------------------------------
402 Procedure lck
403 (p_effective_date in date,
404 p_datetrack_mode in varchar2,
405 p_pgm_id in number,
406 p_object_version_number in number,
407 p_validation_start_date out nocopy date,
408 p_validation_end_date out nocopy date) is
409 --
410 l_proc varchar2(72) := g_package||'lck';
411 l_validation_start_date date;
412 l_validation_end_date date;
413 l_object_invalid exception;
414 l_argument varchar2(30);
415 --
416 -- Cursor C_Sel1 selects the current locked row as of session date
417 -- ensuring that the object version numbers match.
418 --
419 Cursor C_Sel1 is
420 select
421 pgm_id,
422 effective_start_date,
423 effective_end_date,
424 name,
425 dpnt_adrs_rqd_flag,
426 pgm_prvds_no_auto_enrt_flag,
427 dpnt_dob_rqd_flag,
428 pgm_prvds_no_dflt_enrt_flag,
429 dpnt_legv_id_rqd_flag,
430 dpnt_dsgn_lvl_cd,
431 pgm_stat_cd,
432 ivr_ident,
433 pgm_typ_cd,
434 elig_apls_flag,
435 uses_all_asmts_for_rts_flag,
436 url_ref_name,
437 pgm_desc,
438 prtn_elig_ovrid_alwd_flag,
439 pgm_use_all_asnts_elig_flag,
440 dpnt_dsgn_cd,
441 mx_dpnt_pct_prtt_lf_amt,
442 mx_sps_pct_prtt_lf_amt,
443 acty_ref_perd_cd,
444 coord_cvg_for_all_pls_flg,
445 enrt_cvg_end_dt_cd,
446 enrt_cvg_end_dt_rl,
447 dpnt_cvg_end_dt_cd,
448 dpnt_cvg_end_dt_rl,
449 dpnt_cvg_strt_dt_cd,
450 dpnt_cvg_strt_dt_rl,
451 dpnt_dsgn_no_ctfn_rqd_flag,
452 drvbl_fctr_dpnt_elig_flag,
453 drvbl_fctr_prtn_elig_flag,
454 enrt_cvg_strt_dt_cd,
458 rt_strt_dt_rl,
455 enrt_cvg_strt_dt_rl,
456 enrt_info_rt_freq_cd,
457 rt_strt_dt_cd,
459 rt_end_dt_cd,
460 rt_end_dt_rl,
461 pgm_grp_cd,
462 pgm_uom,
463 drvbl_fctr_apls_rts_flag,
464 alws_unrstrctd_enrt_flag,
465 enrt_cd,
466 enrt_mthd_cd,
467 poe_lvl_cd,
468 enrt_rl,
469 auto_enrt_mthd_rl,
470 trk_inelig_per_flag,
471 business_group_id,
472 per_cvrd_cd,
473 vrfy_fmly_mmbr_rl,
474 vrfy_fmly_mmbr_cd,
475 short_name, /*FHR*/
476 short_code, /*FHR*/
477 legislation_code, /*FHR*/
478 legislation_subgroup, /*FHR*/
479 Dflt_pgm_flag,
480 Use_prog_points_flag,
481 Dflt_step_cd,
482 Dflt_step_rl,
483 Update_salary_cd,
484 Use_multi_pay_rates_flag,
485 dflt_element_type_id,
486 Dflt_input_value_id,
487 Use_scores_cd,
488 Scores_calc_mthd_cd,
489 Scores_calc_rl,
490 gsp_allow_override_flag,
491 use_variable_rates_flag,
492 salary_calc_mthd_cd,
493 salary_calc_mthd_rl,
494 susp_if_dpnt_ssn_nt_prv_cd,
495 susp_if_dpnt_dob_nt_prv_cd,
496 susp_if_dpnt_adr_nt_prv_cd,
497 susp_if_ctfn_not_dpnt_flag,
498 dpnt_ctfn_determine_cd,
499 pgm_attribute_category,
500 pgm_attribute1,
501 pgm_attribute2,
502 pgm_attribute3,
503 pgm_attribute4,
504 pgm_attribute5,
505 pgm_attribute6,
506 pgm_attribute7,
507 pgm_attribute8,
508 pgm_attribute9,
509 pgm_attribute10,
510 pgm_attribute11,
511 pgm_attribute12,
512 pgm_attribute13,
513 pgm_attribute14,
514 pgm_attribute15,
515 pgm_attribute16,
516 pgm_attribute17,
517 pgm_attribute18,
518 pgm_attribute19,
519 pgm_attribute20,
520 pgm_attribute21,
521 pgm_attribute22,
522 pgm_attribute23,
523 pgm_attribute24,
524 pgm_attribute25,
525 pgm_attribute26,
526 pgm_attribute27,
527 pgm_attribute28,
528 pgm_attribute29,
529 pgm_attribute30,
530 object_version_number
531 from ben_pgm_f
532 where pgm_id = p_pgm_id
533 and p_effective_date
534 between effective_start_date and effective_end_date
535 for update nowait;
536 --
537 --
538 --
539 Begin
540 hr_utility.set_location('Entering:'||l_proc, 5);
541 --
542 -- Ensure that all the mandatory arguments are not null
543 --
544 hr_api.mandatory_arg_error(p_api_name => l_proc,
545 p_argument => 'effective_date',
546 p_argument_value => p_effective_date);
547 --
548 hr_api.mandatory_arg_error(p_api_name => l_proc,
549 p_argument => 'datetrack_mode',
550 p_argument_value => p_datetrack_mode);
551 --
552 hr_api.mandatory_arg_error(p_api_name => l_proc,
553 p_argument => 'pgm_id',
554 p_argument_value => p_pgm_id);
555 --
556 hr_api.mandatory_arg_error(p_api_name => l_proc,
557 p_argument => 'object_version_number',
558 p_argument_value => p_object_version_number);
559 --
560 -- Check to ensure the datetrack mode is not INSERT.
561 --
562 If (p_datetrack_mode <> 'INSERT') then
563 --
564 -- We must select and lock the current row.
565 --
566 Open C_Sel1;
567 Fetch C_Sel1 Into g_old_rec;
568 If C_Sel1%notfound then
569 Close C_Sel1;
570 --
571 -- The primary key is invalid therefore we must error
572 --
573 fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
574 fnd_message.raise_error;
575 End If;
576 Close C_Sel1;
577 If (p_object_version_number <> g_old_rec.object_version_number) Then
578 fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
579 fnd_message.raise_error;
580 End If;
581 hr_utility.set_location(l_proc, 15);
582 --
583 --
584 -- Validate the datetrack mode mode getting the validation start
585 -- and end dates for the specified datetrack operation.
586 --
587 dt_api.validate_dt_mode
588 (p_effective_date => p_effective_date,
589 p_datetrack_mode => p_datetrack_mode,
590 p_base_table_name => 'ben_pgm_f',
591 p_base_key_column => 'pgm_id',
592 p_base_key_value => p_pgm_id,
593 p_parent_table_name1 => 'ff_formulas_f',
594 p_parent_key_column1 => 'formula_id',
595 p_parent_key_value1 => g_old_rec.dpnt_cvg_strt_dt_rl,
596 p_parent_table_name2 => 'ff_formulas_f',
597 p_parent_key_column2 => 'formula_id',
598 p_parent_key_value2 => g_old_rec.dpnt_cvg_end_dt_rl,
599 p_parent_table_name3 => 'ff_formulas_f',
600 p_parent_key_column3 => 'formula_id',
601 p_parent_key_value3 => g_old_rec.enrt_cvg_end_dt_rl,
602 p_parent_table_name4 => 'ff_formulas_f',
603 p_parent_key_column4 => 'formula_id',
607 p_parent_key_value5 => g_old_rec.rt_strt_dt_rl,
604 p_parent_key_value4 => g_old_rec.enrt_cvg_strt_dt_rl,
605 p_parent_table_name5 => 'ff_formulas_f',
606 p_parent_key_column5 => 'formula_id',
608 p_parent_table_name6 => 'ff_formulas_f',
609 p_parent_key_column6 => 'formula_id',
610 p_parent_key_value6 => g_old_rec.rt_end_dt_rl,
611 p_child_table_name1 => 'ben_ptip_f',
612 p_child_key_column1 => 'ptip_id',
613 p_child_table_name2 => 'ben_popl_enrt_typ_cycl_f',
614 p_child_key_column2 => 'popl_enrt_typ_cycl_id',
615 p_child_table_name3 => 'ben_plip_f',
616 p_child_key_column3 => 'plip_id',
617 p_child_table_name4 => 'ben_prtn_elig_f',
618 p_child_key_column4 => 'prtn_elig_id',
619 p_child_table_name5 => 'ben_elig_to_prte_rsn_f',
620 p_child_key_column5 => 'elig_to_prte_rsn_id',
621 p_child_table_name6 => 'ben_ler_chg_dpnt_cvg_f',
622 p_child_key_column6 => 'ler_chg_dpnt_cvg_id',
623 p_child_table_name7 => 'ben_popl_org_f',
624 p_child_key_column7 => 'popl_org_id',
625 p_child_table_name8 => 'ben_elig_per_f',
626 p_child_key_column8 => 'elig_per_id',
627 p_child_table_name9 => 'ben_acty_base_rt_f',
628 p_child_key_column9 => 'acty_base_rt_id',
629 p_child_table_name10 => 'ben_pgm_dpnt_cvg_ctfn_f',
630 p_child_key_column10 => 'pgm_dpnt_cvg_ctfn_id',
631 -- p_child_table_name10 => 'ben_elig_cvrd_dpnt_f',
632 -- p_child_key_column10 => 'elig_cvrd_dpnt_id',
633 -- p_enforce_foreign_locking => true, Bug 3198808
634 p_enforce_foreign_locking => false,
635 p_validation_start_date => l_validation_start_date,
636 p_validation_end_date => l_validation_end_date);
637
638 -- call again because DT_API.VALIDATE_DT_MODE can only
639 -- accept a max of 10 parent or child tables
640 dt_api.validate_dt_mode
641 (p_effective_date => p_effective_date,
642 p_datetrack_mode => p_datetrack_mode,
643 p_base_table_name => 'ben_pgm_f',
644 p_base_key_column => 'pgm_id',
645 p_base_key_value => p_pgm_id,
646 p_child_table_name1 => 'ben_apld_dpnt_cvg_elig_prfl_f',
647 p_child_key_column1 => 'apld_dpnt_cvg_elig_prfl_id',
648 p_child_table_name2 => 'ben_popl_rptg_grp_f',
649 p_child_key_column2 => 'popl_rptg_grp_id',
650 p_child_table_name3 => 'ben_bnft_prvdr_pool_f',
651 p_child_key_column3 => 'bnft_prvdr_pool_id',
652 p_child_table_name4 => 'ben_drvbl_fctr_uom',
653 p_child_key_column4 => 'drvbl_fctr_uom_id',
654 p_child_table_name5 => 'ben_elig_cbr_quald_bnf_f',
655 p_child_key_column5 => 'elig_cbr_quald_bnf_id',
656 --p_child_table_name5 => 'ben_elig_per_elctbl_chc',
657 --p_child_key_column5 => 'elig_per_elctbl_chc_id',
658 --p_child_table_name6 => 'ben_popl_yr_perd',
659 --p_child_key_column6 => 'popl_yr_perd_id',
660 --p_child_table_name5 => 'ben_ler_chg_pgm_enrt_f',
661 --p_child_key_column5 => 'ler_chg_pgm_enrt_id',
662 -- p_enforce_foreign_locking => true, Bug 3198808
663 p_enforce_foreign_locking => false,
664 p_validation_start_date => l_validation_start_date,
665 p_validation_end_date => l_validation_end_date);
666
667 Else
668 --
669 -- We are doing a datetrack 'INSERT' which is illegal within this
670 -- procedure therefore we must error (note: to lck on insert the
671 -- private procedure ins_lck should be called).
672 --
673 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
674 fnd_message.set_token('PROCEDURE', l_proc);
675 fnd_message.set_token('STEP','20');
676 fnd_message.raise_error;
677 End If;
678 --
679 -- Set the validation start and end date OUT arguments
680 --
681 p_validation_start_date := l_validation_start_date;
682 p_validation_end_date := l_validation_end_date;
683 --
684 hr_utility.set_location(' Leaving:'||l_proc, 30);
685 --
686 -- We need to trap the ORA LOCK exception
687 --
688 Exception
689 When HR_Api.Object_Locked then
690 --
691 -- The object is locked therefore we need to supply a meaningful
692 -- error message.
693 --
694 fnd_message.set_name('PAY', 'HR_7165_OBJECT_LOCKED');
695 fnd_message.set_token('TABLE_NAME', 'ben_pgm_f');
696 fnd_message.raise_error;
697 When l_object_invalid then
698 --
699 -- The object doesn't exist or is invalid
700 --
701 fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
702 fnd_message.set_token('TABLE_NAME', 'ben_pgm_f');
703 fnd_message.raise_error;
704 End lck;
705 --
706 -- ----------------------------------------------------------------------------
707 -- |-----------------------------< convert_args >-----------------------------|
708 -- ----------------------------------------------------------------------------
709 Function convert_args
710 (
711 p_pgm_id in number,
712 p_effective_start_date in date,
713 p_effective_end_date in date,
714 p_name in varchar2,
715 p_dpnt_adrs_rqd_flag in varchar2,
716 p_pgm_prvds_no_auto_enrt_flag in varchar2,
717 p_dpnt_dob_rqd_flag in varchar2,
721 p_pgm_stat_cd in varchar2,
718 p_pgm_prvds_no_dflt_enrt_flag in varchar2,
719 p_dpnt_legv_id_rqd_flag in varchar2,
720 p_dpnt_dsgn_lvl_cd in varchar2,
722 p_ivr_ident in varchar2,
723 p_pgm_typ_cd in varchar2,
724 p_elig_apls_flag in varchar2,
725 p_uses_all_asmts_for_rts_flag in varchar2,
726 p_url_ref_name in varchar2,
727 p_pgm_desc in varchar2,
728 p_prtn_elig_ovrid_alwd_flag in varchar2,
729 p_pgm_use_all_asnts_elig_flag in varchar2,
730 p_dpnt_dsgn_cd in varchar2,
731 p_mx_dpnt_pct_prtt_lf_amt in number,
732 p_mx_sps_pct_prtt_lf_amt in number,
733 p_acty_ref_perd_cd in varchar2,
734 p_coord_cvg_for_all_pls_flg in varchar2,
735 p_enrt_cvg_end_dt_cd in varchar2,
736 p_enrt_cvg_end_dt_rl in number,
737 p_dpnt_cvg_end_dt_cd in varchar2,
738 p_dpnt_cvg_end_dt_rl in number,
739 p_dpnt_cvg_strt_dt_cd in varchar2,
740 p_dpnt_cvg_strt_dt_rl in number,
741 p_dpnt_dsgn_no_ctfn_rqd_flag in varchar2,
742 p_drvbl_fctr_dpnt_elig_flag in varchar2,
743 p_drvbl_fctr_prtn_elig_flag in varchar2,
744 p_enrt_cvg_strt_dt_cd in varchar2,
745 p_enrt_cvg_strt_dt_rl in number,
746 p_enrt_info_rt_freq_cd in varchar2,
747 p_rt_strt_dt_cd in varchar2,
748 p_rt_strt_dt_rl in number,
749 p_rt_end_dt_cd in varchar2,
750 p_rt_end_dt_rl in number,
751 p_pgm_grp_cd in varchar2,
752 p_pgm_uom in varchar2,
753 p_drvbl_fctr_apls_rts_flag in varchar2,
754 p_alws_unrstrctd_enrt_flag in varchar2,
755 p_enrt_cd in varchar2,
756 p_enrt_mthd_cd in varchar2,
757 p_poe_lvl_cd in varchar2,
758 p_enrt_rl in number,
759 p_auto_enrt_mthd_rl in number,
760 p_trk_inelig_per_flag in varchar2,
761 p_business_group_id in number,
762 p_per_cvrd_cd in varchar2,
763 P_vrfy_fmly_mmbr_rl in number,
764 P_vrfy_fmly_mmbr_cd in varchar2,
765 p_short_name in varchar2, --FHR
766 p_short_code in varchar2, --FHR
767 p_legislation_code in varchar2,
768 p_legislation_subgroup in varchar2,
769 p_Dflt_pgm_flag in Varchar2,
770 p_Use_prog_points_flag in Varchar2,
771 p_Dflt_step_cd in Varchar2,
772 p_Dflt_step_rl in number,
773 p_Update_salary_cd in Varchar2,
774 p_Use_multi_pay_rates_flag in Varchar2,
775 p_dflt_element_type_id in number,
776 p_Dflt_input_value_id in number,
777 p_Use_scores_cd in Varchar2,
778 p_Scores_calc_mthd_cd in Varchar2,
779 p_Scores_calc_rl in number,
780 p_gsp_allow_override_flag in varchar2,
781 p_use_variable_rates_flag in varchar2,
782 p_salary_calc_mthd_cd in varchar2,
783 p_salary_calc_mthd_rl in number,
784 p_susp_if_dpnt_ssn_nt_prv_cd in varchar2 ,
785 p_susp_if_dpnt_dob_nt_prv_cd in varchar2 ,
786 p_susp_if_dpnt_adr_nt_prv_cd in varchar2 ,
787 p_susp_if_ctfn_not_dpnt_flag in varchar2 ,
788 p_dpnt_ctfn_determine_cd in varchar2 ,
789 p_pgm_attribute_category in varchar2,
790 p_pgm_attribute1 in varchar2,
791 p_pgm_attribute2 in varchar2,
792 p_pgm_attribute3 in varchar2,
793 p_pgm_attribute4 in varchar2,
794 p_pgm_attribute5 in varchar2,
795 p_pgm_attribute6 in varchar2,
796 p_pgm_attribute7 in varchar2,
797 p_pgm_attribute8 in varchar2,
798 p_pgm_attribute9 in varchar2,
799 p_pgm_attribute10 in varchar2,
800 p_pgm_attribute11 in varchar2,
801 p_pgm_attribute12 in varchar2,
802 p_pgm_attribute13 in varchar2,
803 p_pgm_attribute14 in varchar2,
804 p_pgm_attribute15 in varchar2,
805 p_pgm_attribute16 in varchar2,
806 p_pgm_attribute17 in varchar2,
807 p_pgm_attribute18 in varchar2,
808 p_pgm_attribute19 in varchar2,
809 p_pgm_attribute20 in varchar2,
810 p_pgm_attribute21 in varchar2,
811 p_pgm_attribute22 in varchar2,
812 p_pgm_attribute23 in varchar2,
813 p_pgm_attribute24 in varchar2,
814 p_pgm_attribute25 in varchar2,
815 p_pgm_attribute26 in varchar2,
819 p_pgm_attribute30 in varchar2,
816 p_pgm_attribute27 in varchar2,
817 p_pgm_attribute28 in varchar2,
818 p_pgm_attribute29 in varchar2,
820 p_object_version_number in number
821 )
822 Return g_rec_type is
823 --
824 l_rec g_rec_type;
825 l_proc varchar2(72) := g_package||'convert_args';
826 --
827 Begin
828 --
829 hr_utility.set_location('Entering:'||l_proc, 5);
830 --
831 -- Convert arguments into local l_rec structure.
832 --
833 l_rec.pgm_id := p_pgm_id;
834 l_rec.effective_start_date := p_effective_start_date;
835 l_rec.effective_end_date := p_effective_end_date;
836 l_rec.name := p_name;
837 l_rec.dpnt_adrs_rqd_flag := p_dpnt_adrs_rqd_flag;
838 l_rec.pgm_prvds_no_auto_enrt_flag := p_pgm_prvds_no_auto_enrt_flag;
839 l_rec.dpnt_dob_rqd_flag := p_dpnt_dob_rqd_flag;
840 l_rec.pgm_prvds_no_dflt_enrt_flag := p_pgm_prvds_no_dflt_enrt_flag;
841 l_rec.dpnt_dsgn_lvl_cd := p_dpnt_dsgn_lvl_cd;
842 l_rec.dpnt_legv_id_rqd_flag := p_dpnt_legv_id_rqd_flag;
843 l_rec.pgm_stat_cd := p_pgm_stat_cd;
844 l_rec.ivr_ident := p_ivr_ident;
845 l_rec.pgm_typ_cd := p_pgm_typ_cd;
846 l_rec.elig_apls_flag := p_elig_apls_flag;
847 l_rec.uses_all_asmts_for_rts_flag := p_uses_all_asmts_for_rts_flag;
848 l_rec.url_ref_name := p_url_ref_name;
849 l_rec.pgm_desc := p_pgm_desc;
850 l_rec.prtn_elig_ovrid_alwd_flag := p_prtn_elig_ovrid_alwd_flag;
851 l_rec.pgm_use_all_asnts_elig_flag := p_pgm_use_all_asnts_elig_flag;
852 l_rec.dpnt_dsgn_cd := p_dpnt_dsgn_cd;
853 l_rec.mx_dpnt_pct_prtt_lf_amt := p_mx_dpnt_pct_prtt_lf_amt;
854 l_rec.mx_sps_pct_prtt_lf_amt := p_mx_sps_pct_prtt_lf_amt;
855 l_rec.coord_cvg_for_all_pls_flg := p_coord_cvg_for_all_pls_flg;
856 l_rec.enrt_cvg_end_dt_cd := p_enrt_cvg_end_dt_cd;
857 l_rec.enrt_cvg_end_dt_rl := p_enrt_cvg_end_dt_rl;
858 l_rec.pgm_grp_cd := p_pgm_grp_cd;
859 l_rec.acty_ref_perd_cd := p_acty_ref_perd_cd;
860 l_rec.drvbl_fctr_dpnt_elig_flag := p_drvbl_fctr_dpnt_elig_flag;
861 l_rec.pgm_uom := p_pgm_uom;
862 l_rec.enrt_info_rt_freq_cd := p_enrt_info_rt_freq_cd;
863 l_rec.drvbl_fctr_prtn_elig_flag := p_drvbl_fctr_prtn_elig_flag;
864 l_rec.drvbl_fctr_apls_rts_flag := p_drvbl_fctr_apls_rts_flag;
865 l_rec.alws_unrstrctd_enrt_flag := p_alws_unrstrctd_enrt_flag;
866 l_rec.enrt_cd := p_enrt_cd;
867 l_rec.enrt_mthd_cd := p_enrt_mthd_cd;
868 l_rec.poe_lvl_cd := p_poe_lvl_cd;
869 l_rec.enrt_rl := p_enrt_rl;
870 l_rec.auto_enrt_mthd_rl := p_auto_enrt_mthd_rl;
871 l_rec.dpnt_dsgn_no_ctfn_rqd_flag := p_dpnt_dsgn_no_ctfn_rqd_flag;
872 l_rec.rt_end_dt_cd := p_rt_end_dt_cd;
873 l_rec.rt_end_dt_rl := p_rt_end_dt_rl;
874 l_rec.rt_strt_dt_cd := p_rt_strt_dt_cd;
875 l_rec.rt_strt_dt_rl := p_rt_strt_dt_rl;
876 l_rec.enrt_cvg_strt_dt_cd := p_enrt_cvg_strt_dt_cd;
877 l_rec.enrt_cvg_strt_dt_rl := p_enrt_cvg_strt_dt_rl;
878 l_rec.dpnt_cvg_strt_dt_cd := p_dpnt_cvg_strt_dt_cd;
879 l_rec.dpnt_cvg_strt_dt_rl := p_dpnt_cvg_strt_dt_rl;
880 l_rec.dpnt_cvg_end_dt_rl := p_dpnt_cvg_end_dt_rl;
881 l_rec.dpnt_cvg_end_dt_cd := p_dpnt_cvg_end_dt_cd;
882 l_rec.trk_inelig_per_flag := p_trk_inelig_per_flag;
883 l_rec.business_group_id := p_business_group_id;
884 l_rec.per_cvrd_cd := p_per_cvrd_cd ;
885 l_rec.vrfy_fmly_mmbr_rl := P_vrfy_fmly_mmbr_rl ;
886 l_rec.vrfy_fmly_mmbr_cd := P_vrfy_fmly_mmbr_cd ;
887 l_rec.short_name := p_short_name; --FHR
888 l_rec.short_code := p_short_code; --FHR
889 l_rec.legislation_code := p_legislation_code;
890 l_rec.legislation_subgroup := p_legislation_subgroup;
891 l_rec.Dflt_pgm_flag := p_Dflt_pgm_flag ;
892 l_rec.Use_prog_points_flag := p_Use_prog_points_flag ;
893 l_rec.Dflt_step_cd := p_Dflt_step_cd ;
894 l_rec.Dflt_step_rl := p_Dflt_step_rl ;
895 l_rec.Update_salary_cd := p_Update_salary_cd ;
896 l_rec.Use_multi_pay_rates_flag := p_Use_multi_pay_rates_flag ;
897 l_rec.dflt_element_type_id := p_dflt_element_type_id ;
898 l_rec.Dflt_input_value_id := p_Dflt_input_value_id ;
899 l_rec.Use_scores_cd := p_Use_scores_cd ;
900 l_rec.Scores_calc_mthd_cd := p_Scores_calc_mthd_cd ;
901 l_rec.Scores_calc_rl := p_Scores_calc_rl ;
902 l_rec.gsp_allow_override_flag := p_gsp_allow_override_flag;
903 l_rec.use_variable_rates_flag := p_use_variable_rates_flag;
904 l_rec.salary_calc_mthd_cd := p_salary_calc_mthd_cd;
905 l_rec.salary_calc_mthd_rl := p_salary_calc_mthd_rl;
906 l_rec.susp_if_dpnt_ssn_nt_prv_cd := p_susp_if_dpnt_ssn_nt_prv_cd;
907 l_rec.susp_if_dpnt_dob_nt_prv_cd := p_susp_if_dpnt_dob_nt_prv_cd;
908 l_rec.susp_if_dpnt_adr_nt_prv_cd := p_susp_if_dpnt_adr_nt_prv_cd;
909 l_rec.susp_if_ctfn_not_dpnt_flag := p_susp_if_ctfn_not_dpnt_flag;
910 l_rec.dpnt_ctfn_determine_cd := p_dpnt_ctfn_determine_cd;
911 l_rec.pgm_attribute_category := p_pgm_attribute_category;
912 l_rec.pgm_attribute1 := p_pgm_attribute1;
913 l_rec.pgm_attribute2 := p_pgm_attribute2;
914 l_rec.pgm_attribute3 := p_pgm_attribute3;
915 l_rec.pgm_attribute4 := p_pgm_attribute4;
916 l_rec.pgm_attribute5 := p_pgm_attribute5;
917 l_rec.pgm_attribute6 := p_pgm_attribute6;
918 l_rec.pgm_attribute7 := p_pgm_attribute7;
919 l_rec.pgm_attribute8 := p_pgm_attribute8;
920 l_rec.pgm_attribute9 := p_pgm_attribute9;
921 l_rec.pgm_attribute10 := p_pgm_attribute10;
922 l_rec.pgm_attribute11 := p_pgm_attribute11;
923 l_rec.pgm_attribute12 := p_pgm_attribute12;
924 l_rec.pgm_attribute13 := p_pgm_attribute13;
925 l_rec.pgm_attribute14 := p_pgm_attribute14;
926 l_rec.pgm_attribute15 := p_pgm_attribute15;
927 l_rec.pgm_attribute16 := p_pgm_attribute16;
928 l_rec.pgm_attribute17 := p_pgm_attribute17;
929 l_rec.pgm_attribute18 := p_pgm_attribute18;
930 l_rec.pgm_attribute19 := p_pgm_attribute19;
931 l_rec.pgm_attribute20 := p_pgm_attribute20;
932 l_rec.pgm_attribute21 := p_pgm_attribute21;
933 l_rec.pgm_attribute22 := p_pgm_attribute22;
934 l_rec.pgm_attribute23 := p_pgm_attribute23;
935 l_rec.pgm_attribute24 := p_pgm_attribute24;
936 l_rec.pgm_attribute25 := p_pgm_attribute25;
937 l_rec.pgm_attribute26 := p_pgm_attribute26;
938 l_rec.pgm_attribute27 := p_pgm_attribute27;
939 l_rec.pgm_attribute28 := p_pgm_attribute28;
940 l_rec.pgm_attribute29 := p_pgm_attribute29;
941 l_rec.pgm_attribute30 := p_pgm_attribute30;
942 l_rec.object_version_number := p_object_version_number;
943 --
944 -- Return the plsql record structure.
945 --
946 hr_utility.set_location(' Leaving:'||l_proc, 10);
947 Return(l_rec);
948 --
949 End convert_args;
950 --
951 end ben_pgm_shd;