[Home] [Help]
PACKAGE BODY: APPS.BEN_LEN_INS
Source
1 Package Body ben_len_ins as
2 /* $Header: belenrhi.pkb 120.2.12020000.2 2012/07/03 12:12:43 amnaraya ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_len_ins.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_insert_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml insert logic for datetrack. The
17 -- functions of this procedure are as follows:
18 -- 1) Get the object_version_number.
19 -- 2) To set the effective start and end dates to the corresponding
20 -- validation start and end dates. Also, the object version number
21 -- record attribute is set.
22 -- 3) To set and unset the g_api_dml status as required (as we are about to
23 -- perform dml).
24 -- 4) To insert the row into the schema with the derived effective start
25 -- and end dates and the object version number.
26 -- 5) To trap any constraint violations that may have occurred.
27 -- 6) To raise any other errors.
28 --
29 -- Prerequisites:
30 -- This is an internal private procedure which must be called from the
31 -- insert_dml and pre_update (logic permitting) procedure and must have
32 -- all mandatory arguments set.
33 --
34 -- In Parameters:
35 -- A Pl/Sql record structre.
36 --
37 -- Post Success:
38 -- The specified row will be inserted into the schema.
39 --
40 -- Post Failure:
41 -- On the insert dml failure it is important to note that we always reset the
42 -- g_api_dml status to false.
43 -- If a check or unique integrity constraint violation is raised the
44 -- constraint_error procedure will be called.
45 -- If any other error is reported, the error will be raised after the
46 -- g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 -- This is an internal datetrack maintenance procedure which should
50 -- not be modified in anyway.
51 --
52 -- Access Status:
53 -- Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_insert_dml
58 (p_rec in out nocopy ben_len_shd.g_rec_type,
59 p_effective_date in date,
60 p_datetrack_mode in varchar2,
61 p_validation_start_date in date,
62 p_validation_end_date in date) is
63 --
64 -- Cursor to select 'old' created AOL who column values
65 --
66 Cursor C_Sel1 Is
67 select t.created_by,
68 t.creation_date
69 from ben_lee_rsn_f t
70 where t.lee_rsn_id = p_rec.lee_rsn_id
71 and t.effective_start_date =
72 ben_len_shd.g_old_rec.effective_start_date
73 and t.effective_end_date = (p_validation_start_date - 1);
74 --
75 l_proc varchar2(72) := g_package||'dt_insert_dml';
76 l_created_by ben_lee_rsn_f.created_by%TYPE;
77 l_creation_date ben_lee_rsn_f.creation_date%TYPE;
78 l_last_update_date ben_lee_rsn_f.last_update_date%TYPE;
79 l_last_updated_by ben_lee_rsn_f.last_updated_by%TYPE;
80 l_last_update_login ben_lee_rsn_f.last_update_login%TYPE;
81 --
82 Begin
83 hr_utility.set_location('Entering:'||l_proc, 5);
84 --
85 -- Get the object version number for the insert
86 --
87 p_rec.object_version_number :=
88 dt_api.get_object_version_number
89 (p_base_table_name => 'ben_lee_rsn_f',
90 p_base_key_column => 'lee_rsn_id',
91 p_base_key_value => p_rec.lee_rsn_id);
92 --
93 -- Set the effective start and end dates to the corresponding
94 -- validation start and end dates
95 --
96 p_rec.effective_start_date := p_validation_start_date;
97 p_rec.effective_end_date := p_validation_end_date;
98 --
99 -- If the datetrack_mode is not INSERT then we must populate the WHO
100 -- columns with the 'old' creation values and 'new' updated values.
101 --
102 If (p_datetrack_mode <> 'INSERT') then
103 hr_utility.set_location(l_proc, 10);
104 --
105 -- Select the 'old' created values
106 --
107 Open C_Sel1;
108 Fetch C_Sel1 Into l_created_by, l_creation_date;
109 If C_Sel1%notfound Then
110 --
111 -- The previous 'old' created row has not been found. We need
112 -- to error as an internal datetrack problem exists.
113 --
114 Close C_Sel1;
115 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
116 hr_utility.set_message_token('PROCEDURE', l_proc);
117 hr_utility.set_message_token('STEP','10');
118 hr_utility.raise_error;
119 End If;
120 Close C_Sel1;
121 --
122 -- Set the AOL updated WHO values
123 --
124 l_last_update_date := sysdate;
125 l_last_updated_by := fnd_global.user_id;
126 l_last_update_login := fnd_global.login_id;
127 End If;
128 --
129 ben_len_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_lee_rsn_f
132 --
133 insert into ben_lee_rsn_f
134 ( lee_rsn_id,
135 effective_start_date,
136 effective_end_date,
137 business_group_id,
138 popl_enrt_typ_cycl_id,
139 ler_id,
140 cls_enrt_dt_to_use_cd,
141 dys_aftr_end_to_dflt_num,
142 enrt_cvg_end_dt_cd,
143 enrt_cvg_strt_dt_cd,
144 enrt_perd_strt_dt_cd,
145 enrt_perd_strt_dt_rl,
146 enrt_perd_end_dt_cd,
147 enrt_perd_end_dt_rl,
148 addl_procg_dys_num,
149 dys_no_enrl_not_elig_num,
150 dys_no_enrl_cant_enrl_num,
151 rt_end_dt_cd,
152 rt_end_dt_rl,
153 rt_strt_dt_cd,
154 rt_strt_dt_rl,
155 enrt_cvg_end_dt_rl,
156 enrt_cvg_strt_dt_rl,
157 len_attribute_category,
158 len_attribute1,
159 len_attribute2,
160 len_attribute3,
161 len_attribute4,
162 len_attribute5,
163 len_attribute6,
164 len_attribute7,
165 len_attribute8,
166 len_attribute9,
167 len_attribute10,
168 len_attribute11,
169 len_attribute12,
170 len_attribute13,
171 len_attribute14,
172 len_attribute15,
173 len_attribute16,
174 len_attribute17,
175 len_attribute18,
176 len_attribute19,
177 len_attribute20,
178 len_attribute21,
179 len_attribute22,
180 len_attribute23,
181 len_attribute24,
182 len_attribute25,
183 len_attribute26,
184 len_attribute27,
185 len_attribute28,
186 len_attribute29,
187 len_attribute30,
188 object_version_number,
189 enrt_perd_det_ovrlp_bckdt_cd,
190 created_by,
191 creation_date,
192 last_update_date,
193 last_updated_by,
194 last_update_login,
195 reinstate_cd,
196 reinstate_ovrdn_cd,
197 reopen_le_on_reprocess,
198 ENRT_PERD_STRT_DAYS ,
199 ENRT_PERD_END_DAYS,
200 defer_deenrol_flag
201 )
202 Values
203 ( p_rec.lee_rsn_id,
204 p_rec.effective_start_date,
205 p_rec.effective_end_date,
206 p_rec.business_group_id,
207 p_rec.popl_enrt_typ_cycl_id,
208 p_rec.ler_id,
209 p_rec.cls_enrt_dt_to_use_cd,
210 p_rec.dys_aftr_end_to_dflt_num,
211 p_rec.enrt_cvg_end_dt_cd,
212 p_rec.enrt_cvg_strt_dt_cd,
213 p_rec.enrt_perd_strt_dt_cd,
214 p_rec.enrt_perd_strt_dt_rl,
215 p_rec.enrt_perd_end_dt_cd,
216 p_rec.enrt_perd_end_dt_rl,
217 p_rec.addl_procg_dys_num,
218 p_rec.dys_no_enrl_not_elig_num,
219 p_rec.dys_no_enrl_cant_enrl_num,
220 p_rec.rt_end_dt_cd,
221 p_rec.rt_end_dt_rl,
222 p_rec.rt_strt_dt_cd,
223 p_rec.rt_strt_dt_rl,
224 p_rec.enrt_cvg_end_dt_rl,
225 p_rec.enrt_cvg_strt_dt_rl,
226 p_rec.len_attribute_category,
227 p_rec.len_attribute1,
228 p_rec.len_attribute2,
229 p_rec.len_attribute3,
230 p_rec.len_attribute4,
231 p_rec.len_attribute5,
232 p_rec.len_attribute6,
233 p_rec.len_attribute7,
234 p_rec.len_attribute8,
235 p_rec.len_attribute9,
236 p_rec.len_attribute10,
237 p_rec.len_attribute11,
238 p_rec.len_attribute12,
239 p_rec.len_attribute13,
240 p_rec.len_attribute14,
241 p_rec.len_attribute15,
242 p_rec.len_attribute16,
243 p_rec.len_attribute17,
244 p_rec.len_attribute18,
245 p_rec.len_attribute19,
246 p_rec.len_attribute20,
247 p_rec.len_attribute21,
248 p_rec.len_attribute22,
249 p_rec.len_attribute23,
250 p_rec.len_attribute24,
251 p_rec.len_attribute25,
252 p_rec.len_attribute26,
253 p_rec.len_attribute27,
254 p_rec.len_attribute28,
255 p_rec.len_attribute29,
256 p_rec.len_attribute30,
257 p_rec.object_version_number,
258 p_rec.enrt_perd_det_ovrlp_bckdt_cd,
259 l_created_by,
260 l_creation_date,
261 l_last_update_date,
262 l_last_updated_by,
263 l_last_update_login,
264 p_rec.reinstate_cd,
265 p_rec.reinstate_ovrdn_cd ,
266 p_rec.reopen_le_on_reprocess,
267 p_rec.ENRT_PERD_STRT_DAYS ,
268 p_rec.ENRT_PERD_END_DAYS ,
269 p_rec.defer_deenrol_flag
270 );
271 --
272 ben_len_shd.g_api_dml := false; -- Unset the api dml status
273 hr_utility.set_location(' Leaving:'||l_proc, 15);
274 --
275 Exception
276 When hr_api.check_integrity_violated Then
277 -- A check constraint has been violated
278 ben_len_shd.g_api_dml := false; -- Unset the api dml status
279 ben_len_shd.constraint_error
280 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
281 When hr_api.unique_integrity_violated Then
282 -- Unique integrity has been violated
283 ben_len_shd.g_api_dml := false; -- Unset the api dml status
284 ben_len_shd.constraint_error
285 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
286 When Others Then
287 ben_len_shd.g_api_dml := false; -- Unset the api dml status
288 Raise;
289 End dt_insert_dml;
290 --
291 -- ----------------------------------------------------------------------------
292 -- |------------------------------< insert_dml >------------------------------|
293 -- ----------------------------------------------------------------------------
294 Procedure insert_dml
295 (p_rec in out nocopy ben_len_shd.g_rec_type,
296 p_effective_date in date,
297 p_datetrack_mode in varchar2,
298 p_validation_start_date in date,
299 p_validation_end_date in date) is
300 --
301 l_proc varchar2(72) := g_package||'insert_dml';
302 --
303 Begin
304 hr_utility.set_location('Entering:'||l_proc, 5);
305 --
306 dt_insert_dml(p_rec => p_rec,
307 p_effective_date => p_effective_date,
308 p_datetrack_mode => p_datetrack_mode,
309 p_validation_start_date => p_validation_start_date,
310 p_validation_end_date => p_validation_end_date);
311 --
312 hr_utility.set_location(' Leaving:'||l_proc, 10);
313 End insert_dml;
314 --
315 -- ----------------------------------------------------------------------------
316 -- |------------------------------< pre_insert >------------------------------|
317 -- ----------------------------------------------------------------------------
318 -- {Start Of Comments}
319 --
320 -- Description:
321 -- This private procedure contains any processing which is required before
322 -- the insert dml. Presently, if the entity has a corresponding primary
323 -- key which is maintained by an associating sequence, the primary key for
324 -- the entity will be populated with the next sequence value in
325 -- preparation for the insert dml.
326 -- Also, if comments are defined for this entity, the comments insert
327 -- logic will also be called, generating a comment_id if required.
328 --
329 -- Prerequisites:
330 -- This is an internal procedure which is called from the ins procedure.
331 --
332 -- In Parameters:
333 -- A Pl/Sql record structre.
334 --
335 -- Post Success:
336 -- Processing continues.
337 --
338 -- Post Failure:
339 -- If an error has occurred, an error message and exception will be raised
340 -- but not handled.
341 --
342 -- Developer Implementation Notes:
343 -- Any pre-processing required before the insert dml is issued should be
344 -- coded within this procedure. As stated above, a good example is the
345 -- generation of a primary key number via a corresponding sequence.
346 -- It is important to note that any 3rd party maintenance should be reviewed
347 -- before placing in this procedure.
348 --
349 -- Access Status:
350 -- Internal Row Handler Use Only.
351 --
352 -- {End Of Comments}
353 -- ----------------------------------------------------------------------------
354 Procedure pre_insert
355 (p_rec in out nocopy ben_len_shd.g_rec_type,
356 p_effective_date in date,
357 p_datetrack_mode in varchar2,
358 p_validation_start_date in date,
359 p_validation_end_date in date) is
360 --
361 l_proc varchar2(72) := g_package||'pre_insert';
362 --
363 Cursor C_Sel1 is select ben_lee_rsn_f_s.nextval from sys.dual;
364 --
365 Begin
366 hr_utility.set_location('Entering:'||l_proc, 5);
367 --
368 --
369 Open C_Sel1;
370 Fetch C_Sel1 Into p_rec.lee_rsn_id;
371 Close C_Sel1;
372 --
373 hr_utility.set_location(' Leaving:'||l_proc, 10);
374 End pre_insert;
375 --
376 -- ----------------------------------------------------------------------------
377 -- |-----------------------------< post_insert >------------------------------|
378 -- ----------------------------------------------------------------------------
379 -- {Start Of Comments}
380 --
381 -- Description:
382 -- This private procedure contains any processing which is required after the
383 -- insert dml.
384 --
385 -- Prerequisites:
386 -- This is an internal procedure which is called from the ins procedure.
387 --
388 -- In Parameters:
389 -- A Pl/Sql record structre.
390 --
391 -- Post Success:
392 -- Processing continues.
393 --
394 -- Post Failure:
395 -- If an error has occurred, an error message and exception will be raised
396 -- but not handled.
397 --
398 -- Developer Implementation Notes:
399 -- Any post-processing required after the insert dml is issued should be
400 -- coded within this procedure. It is important to note that any 3rd party
401 -- maintenance should be reviewed before placing in this procedure.
402 --
403 -- Access Status:
404 -- Internal Row Handler Use Only.
405 --
406 -- {End Of Comments}
407 -- ----------------------------------------------------------------------------
408 Procedure post_insert
409 (p_rec in ben_len_shd.g_rec_type,
410 p_effective_date in date,
411 p_datetrack_mode in varchar2,
412 p_validation_start_date in date,
413 p_validation_end_date in date) is
414 --
415 l_proc varchar2(72) := g_package||'post_insert';
416 --
417 Begin
418 hr_utility.set_location('Entering:'||l_proc, 5);
419 --
420 --
421 -- Start of API User Hook for post_insert.
422 --
423 begin
424 --
425 ben_len_rki.after_insert
426 (
427 p_lee_rsn_id =>p_rec.lee_rsn_id
428 ,p_effective_start_date =>p_rec.effective_start_date
429 ,p_effective_end_date =>p_rec.effective_end_date
430 ,p_business_group_id =>p_rec.business_group_id
431 ,p_popl_enrt_typ_cycl_id =>p_rec.popl_enrt_typ_cycl_id
432 ,p_ler_id =>p_rec.ler_id
433 ,p_cls_enrt_dt_to_use_cd =>p_rec.cls_enrt_dt_to_use_cd
434 ,p_dys_aftr_end_to_dflt_num =>p_rec.dys_aftr_end_to_dflt_num
435 ,p_enrt_cvg_end_dt_cd =>p_rec.enrt_cvg_end_dt_cd
436 ,p_enrt_cvg_strt_dt_cd =>p_rec.enrt_cvg_strt_dt_cd
437 ,p_enrt_perd_strt_dt_cd =>p_rec.enrt_perd_strt_dt_cd
438 ,p_enrt_perd_strt_dt_rl =>p_rec.enrt_perd_strt_dt_rl
439 ,p_enrt_perd_end_dt_cd =>p_rec.enrt_perd_end_dt_cd
440 ,p_enrt_perd_end_dt_rl =>p_rec.enrt_perd_end_dt_rl
441 ,p_addl_procg_dys_num =>p_rec.addl_procg_dys_num
442 ,p_dys_no_enrl_not_elig_num =>p_rec.dys_no_enrl_not_elig_num
443 ,p_dys_no_enrl_cant_enrl_num =>p_rec.dys_no_enrl_cant_enrl_num
444 ,p_rt_end_dt_cd =>p_rec.rt_end_dt_cd
445 ,p_rt_end_dt_rl =>p_rec.rt_end_dt_rl
446 ,p_rt_strt_dt_cd =>p_rec.rt_strt_dt_cd
447 ,p_rt_strt_dt_rl =>p_rec.rt_strt_dt_rl
448 ,p_enrt_cvg_end_dt_rl =>p_rec.enrt_cvg_end_dt_rl
449 ,p_enrt_cvg_strt_dt_rl =>p_rec.enrt_cvg_strt_dt_rl
450 ,p_len_attribute_category =>p_rec.len_attribute_category
451 ,p_len_attribute1 =>p_rec.len_attribute1
452 ,p_len_attribute2 =>p_rec.len_attribute2
453 ,p_len_attribute3 =>p_rec.len_attribute3
454 ,p_len_attribute4 =>p_rec.len_attribute4
455 ,p_len_attribute5 =>p_rec.len_attribute5
456 ,p_len_attribute6 =>p_rec.len_attribute6
457 ,p_len_attribute7 =>p_rec.len_attribute7
458 ,p_len_attribute8 =>p_rec.len_attribute8
459 ,p_len_attribute9 =>p_rec.len_attribute9
460 ,p_len_attribute10 =>p_rec.len_attribute10
461 ,p_len_attribute11 =>p_rec.len_attribute11
462 ,p_len_attribute12 =>p_rec.len_attribute12
463 ,p_len_attribute13 =>p_rec.len_attribute13
464 ,p_len_attribute14 =>p_rec.len_attribute14
465 ,p_len_attribute15 =>p_rec.len_attribute15
466 ,p_len_attribute16 =>p_rec.len_attribute16
467 ,p_len_attribute17 =>p_rec.len_attribute17
468 ,p_len_attribute18 =>p_rec.len_attribute18
469 ,p_len_attribute19 =>p_rec.len_attribute19
470 ,p_len_attribute20 =>p_rec.len_attribute20
471 ,p_len_attribute21 =>p_rec.len_attribute21
472 ,p_len_attribute22 =>p_rec.len_attribute22
473 ,p_len_attribute23 =>p_rec.len_attribute23
474 ,p_len_attribute24 =>p_rec.len_attribute24
475 ,p_len_attribute25 =>p_rec.len_attribute25
476 ,p_len_attribute26 =>p_rec.len_attribute26
477 ,p_len_attribute27 =>p_rec.len_attribute27
478 ,p_len_attribute28 =>p_rec.len_attribute28
479 ,p_len_attribute29 =>p_rec.len_attribute29
480 ,p_len_attribute30 =>p_rec.len_attribute30
481 ,p_object_version_number =>p_rec.object_version_number
482 ,p_enrt_perd_det_ovrlp_bckdt_cd =>p_rec.enrt_perd_det_ovrlp_bckdt_cd
483 ,p_effective_date =>p_effective_date
484 ,p_validation_start_date =>p_validation_start_date
485 ,p_validation_end_date =>p_validation_end_date
486 ,p_reinstate_cd => p_rec.reinstate_cd
487 ,p_reinstate_ovrdn_cd => p_rec.reinstate_ovrdn_cd
488 ,p_reopen_le_on_reprocess => p_rec.reopen_le_on_reprocess
489 ,p_ENRT_PERD_STRT_DAYS => p_rec.ENRT_PERD_STRT_DAYS
490 ,p_ENRT_PERD_END_DAYS => p_rec.ENRT_PERD_END_DAYS
491 ,p_defer_deenrol_flag => p_rec.defer_deenrol_flag
492 );
493 --
494 exception
495 --
496 when hr_api.cannot_find_prog_unit then
497 --
498 hr_api.cannot_find_prog_unit_error
499 (p_module_name => 'ben_lee_rsn_f'
500 ,p_hook_type => 'AI');
501 --
502 end;
503 --
504 -- End of API User Hook for post_insert.
505 --
506 --
507 hr_utility.set_location(' Leaving:'||l_proc, 10);
508 End post_insert;
509 --
510 -- ----------------------------------------------------------------------------
511 -- |-------------------------------< ins_lck >--------------------------------|
512 -- ----------------------------------------------------------------------------
513 -- {Start Of Comments}
514 --
515 -- Description:
516 -- The ins_lck process has one main function to perform. When inserting
517 -- a datetracked row, we must validate the DT mode.
518 -- be manipulated.
519 --
520 -- Prerequisites:
521 -- This procedure can only be called for the datetrack mode of INSERT.
522 --
523 -- In Parameters:
524 --
525 -- Post Success:
526 -- On successful completion of the ins_lck process the parental
527 -- datetracked rows will be locked providing the p_enforce_foreign_locking
528 -- argument value is TRUE.
529 -- If the p_enforce_foreign_locking argument value is FALSE then the
530 -- parential rows are not locked.
531 --
532 -- Post Failure:
533 -- The Lck process can fail for:
534 -- 1) When attempting to lock the row the row could already be locked by
535 -- another user. This will raise the HR_Api.Object_Locked exception.
536 -- 2) When attempting to the lock the parent which doesn't exist.
537 -- For the entity to be locked the parent must exist!
538 --
539 -- Developer Implementation Notes:
540 -- None.
541 --
542 -- Access Status:
543 -- Internal Row Handler Use Only.
544 --
545 -- {End Of Comments}
546 -- ----------------------------------------------------------------------------
547 Procedure ins_lck
548 (p_effective_date in date,
549 p_datetrack_mode in varchar2,
550 p_rec in ben_len_shd.g_rec_type,
551 p_validation_start_date out nocopy date,
552 p_validation_end_date out nocopy date) is
553 --
554 l_proc varchar2(72) := g_package||'ins_lck';
555 l_validation_start_date date;
556 l_validation_end_date date;
557 --
558 Begin
559 hr_utility.set_location('Entering:'||l_proc, 5);
560 --
561 -- Validate the datetrack mode mode getting the validation start
562 -- and end dates for the specified datetrack operation.
563 --
564 dt_api.validate_dt_mode
565 (p_effective_date => p_effective_date,
566 p_datetrack_mode => p_datetrack_mode,
567 p_base_table_name => 'ben_lee_rsn_f',
568 p_base_key_column => 'lee_rsn_id',
569 p_base_key_value => p_rec.lee_rsn_id,
570 p_parent_table_name1 => 'ben_popl_enrt_typ_cycl_f',
571 p_parent_key_column1 => 'popl_enrt_typ_cycl_id',
572 p_parent_key_value1 => p_rec.popl_enrt_typ_cycl_id,
573 p_enforce_foreign_locking => true,
574 p_validation_start_date => l_validation_start_date,
575 p_validation_end_date => l_validation_end_date);
576 --
577 -- Set the validation start and end date OUT arguments
578 --
579 p_validation_start_date := l_validation_start_date;
580 p_validation_end_date := l_validation_end_date;
581 --
582 hr_utility.set_location(' Leaving:'||l_proc, 10);
583 --
584 End ins_lck;
585 --
586 -- ----------------------------------------------------------------------------
587 -- |---------------------------------< ins >----------------------------------|
588 -- ----------------------------------------------------------------------------
589 Procedure ins
590 (
591 p_rec in out nocopy ben_len_shd.g_rec_type,
592 p_effective_date in date
593 ) is
594 --
595 l_proc varchar2(72) := g_package||'ins';
596 l_datetrack_mode varchar2(30) := 'INSERT';
597 l_validation_start_date date;
598 l_validation_end_date date;
599 --
600 Begin
601 hr_utility.set_location('Entering:'||l_proc, 5);
602 --
603 -- Call the lock operation
604 --
605 ins_lck
606 (p_effective_date => p_effective_date,
607 p_datetrack_mode => l_datetrack_mode,
608 p_rec => p_rec,
609 p_validation_start_date => l_validation_start_date,
610 p_validation_end_date => l_validation_end_date);
611 --
612 -- Call the supporting insert validate operations
613 --
614 ben_len_bus.insert_validate
615 (p_rec => p_rec,
616 p_effective_date => p_effective_date,
617 p_datetrack_mode => l_datetrack_mode,
618 p_validation_start_date => l_validation_start_date,
619 p_validation_end_date => l_validation_end_date);
620 --
621 -- Call the supporting pre-insert operation
622 --
623 pre_insert
624 (p_rec => p_rec,
625 p_effective_date => p_effective_date,
626 p_datetrack_mode => l_datetrack_mode,
627 p_validation_start_date => l_validation_start_date,
628 p_validation_end_date => l_validation_end_date);
629 --
630 -- Insert the row
631 --
632 insert_dml
633 (p_rec => p_rec,
634 p_effective_date => p_effective_date,
635 p_datetrack_mode => l_datetrack_mode,
636 p_validation_start_date => l_validation_start_date,
637 p_validation_end_date => l_validation_end_date);
638 --
639 -- Call the supporting post-insert operation
640 --
641 post_insert
642 (p_rec => p_rec,
643 p_effective_date => p_effective_date,
644 p_datetrack_mode => l_datetrack_mode,
645 p_validation_start_date => l_validation_start_date,
646 p_validation_end_date => l_validation_end_date);
647 end ins;
648 --
649 -- ----------------------------------------------------------------------------
650 -- |---------------------------------< ins >----------------------------------|
651 -- ----------------------------------------------------------------------------
652 Procedure ins
653 (
654 p_lee_rsn_id out nocopy number,
655 p_effective_start_date out nocopy date,
656 p_effective_end_date out nocopy date,
657 p_business_group_id in number,
658 p_popl_enrt_typ_cycl_id in number default null,
659 p_ler_id in number default null,
660 p_cls_enrt_dt_to_use_cd in varchar2 default null,
661 p_dys_aftr_end_to_dflt_num in number default null,
662 p_enrt_cvg_end_dt_cd in varchar2 default null,
663 p_enrt_cvg_strt_dt_cd in varchar2 default null,
664 p_enrt_perd_strt_dt_cd in varchar2 default null,
665 p_enrt_perd_strt_dt_rl in number default null,
666 p_enrt_perd_end_dt_cd in varchar2 default null,
667 p_enrt_perd_end_dt_rl in number default null,
668 p_addl_procg_dys_num in number default null,
669 p_dys_no_enrl_not_elig_num in number default null,
670 p_dys_no_enrl_cant_enrl_num in number default null,
671 p_rt_end_dt_cd in varchar2 default null,
672 p_rt_end_dt_rl in number default null,
673 p_rt_strt_dt_cd in varchar2 default null,
674 p_rt_strt_dt_rl in number default null,
675 p_enrt_cvg_end_dt_rl in number default null,
676 p_enrt_cvg_strt_dt_rl in number default null,
677 p_len_attribute_category in varchar2 default null,
678 p_len_attribute1 in varchar2 default null,
679 p_len_attribute2 in varchar2 default null,
680 p_len_attribute3 in varchar2 default null,
681 p_len_attribute4 in varchar2 default null,
682 p_len_attribute5 in varchar2 default null,
683 p_len_attribute6 in varchar2 default null,
684 p_len_attribute7 in varchar2 default null,
685 p_len_attribute8 in varchar2 default null,
686 p_len_attribute9 in varchar2 default null,
687 p_len_attribute10 in varchar2 default null,
688 p_len_attribute11 in varchar2 default null,
689 p_len_attribute12 in varchar2 default null,
690 p_len_attribute13 in varchar2 default null,
691 p_len_attribute14 in varchar2 default null,
692 p_len_attribute15 in varchar2 default null,
693 p_len_attribute16 in varchar2 default null,
694 p_len_attribute17 in varchar2 default null,
695 p_len_attribute18 in varchar2 default null,
696 p_len_attribute19 in varchar2 default null,
697 p_len_attribute20 in varchar2 default null,
698 p_len_attribute21 in varchar2 default null,
699 p_len_attribute22 in varchar2 default null,
700 p_len_attribute23 in varchar2 default null,
701 p_len_attribute24 in varchar2 default null,
702 p_len_attribute25 in varchar2 default null,
703 p_len_attribute26 in varchar2 default null,
704 p_len_attribute27 in varchar2 default null,
705 p_len_attribute28 in varchar2 default null,
706 p_len_attribute29 in varchar2 default null,
707 p_len_attribute30 in varchar2 default null,
708 p_object_version_number out nocopy number,
709 p_enrt_perd_det_ovrlp_bckdt_cd in varchar2 default null,
710 p_effective_date in date,
711 p_reinstate_cd in varchar2 default null,
712 p_reinstate_ovrdn_cd in varchar2 default null ,
713 p_reopen_le_on_reprocess in varchar2 default null ,
714 p_ENRT_PERD_STRT_DAYS in number default null ,
715 p_ENRT_PERD_END_DAYS in number default null ,
716 p_defer_deenrol_flag in varchar2 default 'N'
717 ) is
718 --
719 l_rec ben_len_shd.g_rec_type;
720 l_proc varchar2(72) := g_package||'ins';
721 --
722 Begin
723 hr_utility.set_location('Entering:'||l_proc, 5);
724 --
725 -- Call conversion function to turn arguments into the
726 -- p_rec structure.
727 --
728 l_rec :=
729 ben_len_shd.convert_args
730 (
731 null,
732 null,
733 null,
734 p_business_group_id,
735 p_popl_enrt_typ_cycl_id,
736 p_ler_id,
737 p_cls_enrt_dt_to_use_cd,
738 p_dys_aftr_end_to_dflt_num,
739 p_enrt_cvg_end_dt_cd,
740 p_enrt_cvg_strt_dt_cd,
741 p_enrt_perd_strt_dt_cd,
742 p_enrt_perd_strt_dt_rl,
743 p_enrt_perd_end_dt_cd,
744 p_enrt_perd_end_dt_rl,
745 p_addl_procg_dys_num,
746 p_dys_no_enrl_not_elig_num,
747 p_dys_no_enrl_cant_enrl_num,
748 p_rt_end_dt_cd,
749 p_rt_end_dt_rl,
750 p_rt_strt_dt_cd,
751 p_rt_strt_dt_rl,
752 p_enrt_cvg_end_dt_rl,
753 p_enrt_cvg_strt_dt_rl,
754 p_len_attribute_category,
755 p_len_attribute1,
756 p_len_attribute2,
757 p_len_attribute3,
758 p_len_attribute4,
759 p_len_attribute5,
760 p_len_attribute6,
761 p_len_attribute7,
762 p_len_attribute8,
763 p_len_attribute9,
764 p_len_attribute10,
765 p_len_attribute11,
766 p_len_attribute12,
767 p_len_attribute13,
768 p_len_attribute14,
769 p_len_attribute15,
770 p_len_attribute16,
771 p_len_attribute17,
772 p_len_attribute18,
773 p_len_attribute19,
774 p_len_attribute20,
775 p_len_attribute21,
776 p_len_attribute22,
777 p_len_attribute23,
778 p_len_attribute24,
779 p_len_attribute25,
780 p_len_attribute26,
781 p_len_attribute27,
782 p_len_attribute28,
783 p_len_attribute29,
784 p_len_attribute30,
785 null ,
786 p_enrt_perd_det_ovrlp_bckdt_cd,
787 p_reinstate_cd,
788 p_reinstate_ovrdn_cd ,
789 p_reopen_le_on_reprocess ,
790 p_ENRT_PERD_STRT_DAYS ,
791 p_ENRT_PERD_END_DAYS ,
792 p_defer_deenrol_flag
793 );
794 --
795 -- Having converted the arguments into the ben_len_rec
796 -- plsql record structure we call the corresponding record
797 -- business process.
798 --
799 ins(l_rec, p_effective_date);
800 --
801 -- Set the OUT arguments.
802 --
803 p_lee_rsn_id := l_rec.lee_rsn_id;
804 p_effective_start_date := l_rec.effective_start_date;
805 p_effective_end_date := l_rec.effective_end_date;
806 p_object_version_number := l_rec.object_version_number;
807 --
808 --
809 hr_utility.set_location(' Leaving:'||l_proc, 10);
810 End ins;
811 --
812 end ben_len_ins;