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