[Home] [Help]
PACKAGE BODY: APPS.BEN_LCT_INS
Source
1 Package Body ben_lct_ins as
2 /* $Header: belctrhi.pkb 115.5 2002/12/31 23:59:34 mmudigon ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_lct_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_lct_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_ler_chg_ptip_enrt_f t
70 where t.ler_chg_ptip_enrt_id = p_rec.ler_chg_ptip_enrt_id
71 and t.effective_start_date =
72 ben_lct_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_ler_chg_ptip_enrt_f.created_by%TYPE;
77 l_creation_date ben_ler_chg_ptip_enrt_f.creation_date%TYPE;
78 l_last_update_date ben_ler_chg_ptip_enrt_f.last_update_date%TYPE;
79 l_last_updated_by ben_ler_chg_ptip_enrt_f.last_updated_by%TYPE;
80 l_last_update_login ben_ler_chg_ptip_enrt_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_ler_chg_ptip_enrt_f',
90 p_base_key_column => 'ler_chg_ptip_enrt_id',
91 p_base_key_value => p_rec.ler_chg_ptip_enrt_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 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
116 fnd_message.set_token('PROCEDURE', l_proc);
117 fnd_message.set_token('STEP','10');
118 fnd_message.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_lct_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_ler_chg_ptip_enrt_f
132 --
133 insert into ben_ler_chg_ptip_enrt_f
134 ( ler_chg_ptip_enrt_id,
135 effective_start_date,
136 effective_end_date,
137 crnt_enrt_prclds_chg_flag,
138 stl_elig_cant_chg_flag,
139 dflt_flag,
140 dflt_enrt_cd,
141 dflt_enrt_rl,
142 enrt_cd,
143 enrt_mthd_cd,
144 enrt_rl,
145 tco_chg_enrt_cd,
146 ptip_id,
147 ler_id,
148 business_group_id,
149 lct_attribute_category,
150 lct_attribute1,
151 lct_attribute2,
152 lct_attribute3,
153 lct_attribute4,
154 lct_attribute5,
155 lct_attribute6,
156 lct_attribute7,
157 lct_attribute8,
158 lct_attribute9,
159 lct_attribute10,
160 lct_attribute11,
161 lct_attribute12,
162 lct_attribute13,
163 lct_attribute14,
164 lct_attribute15,
165 lct_attribute16,
166 lct_attribute17,
167 lct_attribute18,
168 lct_attribute19,
169 lct_attribute20,
170 lct_attribute21,
171 lct_attribute22,
172 lct_attribute23,
173 lct_attribute24,
174 lct_attribute25,
175 lct_attribute26,
176 lct_attribute27,
177 lct_attribute28,
178 lct_attribute29,
179 lct_attribute30,
180 object_version_number
181 , created_by,
182 creation_date,
183 last_update_date,
184 last_updated_by,
185 last_update_login
186 )
187 Values
188 ( p_rec.ler_chg_ptip_enrt_id,
189 p_rec.effective_start_date,
190 p_rec.effective_end_date,
191 p_rec.crnt_enrt_prclds_chg_flag,
192 p_rec.stl_elig_cant_chg_flag,
193 p_rec.dflt_flag,
194 p_rec.dflt_enrt_cd,
195 p_rec.dflt_enrt_rl,
196 p_rec.enrt_cd,
197 p_rec.enrt_mthd_cd,
198 p_rec.enrt_rl,
199 p_rec.tco_chg_enrt_cd,
200 p_rec.ptip_id,
201 p_rec.ler_id,
202 p_rec.business_group_id,
203 p_rec.lct_attribute_category,
204 p_rec.lct_attribute1,
205 p_rec.lct_attribute2,
206 p_rec.lct_attribute3,
207 p_rec.lct_attribute4,
208 p_rec.lct_attribute5,
209 p_rec.lct_attribute6,
210 p_rec.lct_attribute7,
211 p_rec.lct_attribute8,
212 p_rec.lct_attribute9,
213 p_rec.lct_attribute10,
214 p_rec.lct_attribute11,
215 p_rec.lct_attribute12,
216 p_rec.lct_attribute13,
217 p_rec.lct_attribute14,
218 p_rec.lct_attribute15,
219 p_rec.lct_attribute16,
220 p_rec.lct_attribute17,
221 p_rec.lct_attribute18,
222 p_rec.lct_attribute19,
223 p_rec.lct_attribute20,
224 p_rec.lct_attribute21,
225 p_rec.lct_attribute22,
226 p_rec.lct_attribute23,
227 p_rec.lct_attribute24,
228 p_rec.lct_attribute25,
229 p_rec.lct_attribute26,
230 p_rec.lct_attribute27,
231 p_rec.lct_attribute28,
232 p_rec.lct_attribute29,
233 p_rec.lct_attribute30,
234 p_rec.object_version_number
235 , l_created_by,
236 l_creation_date,
237 l_last_update_date,
238 l_last_updated_by,
239 l_last_update_login
240 );
241 --
242 ben_lct_shd.g_api_dml := false; -- Unset the api dml status
243 hr_utility.set_location(' Leaving:'||l_proc, 15);
244 --
245 Exception
246 When hr_api.check_integrity_violated Then
247 -- A check constraint has been violated
248 ben_lct_shd.g_api_dml := false; -- Unset the api dml status
249 ben_lct_shd.constraint_error
250 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
251 When hr_api.unique_integrity_violated Then
252 -- Unique integrity has been violated
253 ben_lct_shd.g_api_dml := false; -- Unset the api dml status
254 ben_lct_shd.constraint_error
255 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
256 When Others Then
257 ben_lct_shd.g_api_dml := false; -- Unset the api dml status
258 Raise;
259 End dt_insert_dml;
260 --
261 -- ----------------------------------------------------------------------------
262 -- |------------------------------< insert_dml >------------------------------|
263 -- ----------------------------------------------------------------------------
264 Procedure insert_dml
265 (p_rec in out nocopy ben_lct_shd.g_rec_type,
266 p_effective_date in date,
267 p_datetrack_mode in varchar2,
268 p_validation_start_date in date,
269 p_validation_end_date in date) is
270 --
271 l_proc varchar2(72) := g_package||'insert_dml';
272 --
273 Begin
274 hr_utility.set_location('Entering:'||l_proc, 5);
275 --
276 dt_insert_dml(p_rec => p_rec,
277 p_effective_date => p_effective_date,
278 p_datetrack_mode => p_datetrack_mode,
279 p_validation_start_date => p_validation_start_date,
280 p_validation_end_date => p_validation_end_date);
281 --
282 hr_utility.set_location(' Leaving:'||l_proc, 10);
283 End insert_dml;
284 --
285 -- ----------------------------------------------------------------------------
286 -- |------------------------------< pre_insert >------------------------------|
287 -- ----------------------------------------------------------------------------
288 -- {Start Of Comments}
289 --
290 -- Description:
291 -- This private procedure contains any processing which is required before
292 -- the insert dml. Presently, if the entity has a corresponding primary
293 -- key which is maintained by an associating sequence, the primary key for
294 -- the entity will be populated with the next sequence value in
295 -- preparation for the insert dml.
296 -- Also, if comments are defined for this entity, the comments insert
297 -- logic will also be called, generating a comment_id if required.
298 --
299 -- Prerequisites:
300 -- This is an internal procedure which is called from the ins procedure.
301 --
302 -- In Parameters:
303 -- A Pl/Sql record structre.
304 --
305 -- Post Success:
306 -- Processing continues.
307 --
308 -- Post Failure:
309 -- If an error has occurred, an error message and exception will be raised
310 -- but not handled.
311 --
312 -- Developer Implementation Notes:
313 -- Any pre-processing required before the insert dml is issued should be
314 -- coded within this procedure. As stated above, a good example is the
315 -- generation of a primary key number via a corresponding sequence.
316 -- It is important to note that any 3rd party maintenance should be reviewed
317 -- before placing in this procedure.
318 --
319 -- Access Status:
320 -- Internal Row Handler Use Only.
321 --
322 -- {End Of Comments}
323 -- ----------------------------------------------------------------------------
324 Procedure pre_insert
325 (p_rec in out nocopy ben_lct_shd.g_rec_type,
326 p_effective_date in date,
327 p_datetrack_mode in varchar2,
328 p_validation_start_date in date,
329 p_validation_end_date in date) is
330 --
331 l_proc varchar2(72) := g_package||'pre_insert';
332 --
333 --
334 cursor c1 is select ben_ler_chg_ptip_enrt_f_s.nextval
335 from sys.dual;
336 --
337 Begin
338 hr_utility.set_location('Entering:'||l_proc, 5);
339 --
340 --
341 open c1;
342 fetch c1 into p_rec.ler_chg_ptip_enrt_id;
343 close c1;
344 --
345 --
346 hr_utility.set_location(' Leaving:'||l_proc, 10);
347 End pre_insert;
348 --
349 -- ----------------------------------------------------------------------------
350 -- |-----------------------------< post_insert >------------------------------|
351 -- ----------------------------------------------------------------------------
352 -- {Start Of Comments}
353 --
354 -- Description:
355 -- This private procedure contains any processing which is required after the
356 -- insert dml.
357 --
358 -- Prerequisites:
359 -- This is an internal procedure which is called from the ins procedure.
360 --
361 -- In Parameters:
362 -- A Pl/Sql record structre.
363 --
364 -- Post Success:
365 -- Processing continues.
366 --
367 -- Post Failure:
368 -- If an error has occurred, an error message and exception will be raised
369 -- but not handled.
370 --
371 -- Developer Implementation Notes:
372 -- Any post-processing required after the insert dml is issued should be
373 -- coded within this procedure. It is important to note that any 3rd party
374 -- maintenance should be reviewed before placing in this procedure.
375 --
376 -- Access Status:
377 -- Internal Row Handler Use Only.
378 --
379 -- {End Of Comments}
380 -- ----------------------------------------------------------------------------
381 Procedure post_insert
382 (p_rec in ben_lct_shd.g_rec_type,
383 p_effective_date in date,
384 p_datetrack_mode in varchar2,
385 p_validation_start_date in date,
386 p_validation_end_date in date) is
387 --
388 l_proc varchar2(72) := g_package||'post_insert';
389 --
390 Begin
391 hr_utility.set_location('Entering:'||l_proc, 5);
392 --
393 --
394 -- Start of API User Hook for post_insert.
395 --
396 begin
397 --
398 ben_lct_rki.after_insert
399 (
400 p_ler_chg_ptip_enrt_id =>p_rec.ler_chg_ptip_enrt_id
401 ,p_effective_start_date =>p_rec.effective_start_date
402 ,p_effective_end_date =>p_rec.effective_end_date
403 ,p_crnt_enrt_prclds_chg_flag =>p_rec.crnt_enrt_prclds_chg_flag
404 ,p_stl_elig_cant_chg_flag =>p_rec.stl_elig_cant_chg_flag
405 ,p_dflt_flag =>p_rec.dflt_flag
406 ,p_dflt_enrt_cd =>p_rec.dflt_enrt_cd
407 ,p_dflt_enrt_rl =>p_rec.dflt_enrt_rl
408 ,p_enrt_cd =>p_rec.enrt_cd
409 ,p_enrt_mthd_cd =>p_rec.enrt_mthd_cd
410 ,p_enrt_rl =>p_rec.enrt_rl
411 ,p_tco_chg_enrt_cd =>p_rec.tco_chg_enrt_cd
412 ,p_ptip_id =>p_rec.ptip_id
413 ,p_ler_id =>p_rec.ler_id
414 ,p_business_group_id =>p_rec.business_group_id
415 ,p_lct_attribute_category =>p_rec.lct_attribute_category
416 ,p_lct_attribute1 =>p_rec.lct_attribute1
417 ,p_lct_attribute2 =>p_rec.lct_attribute2
418 ,p_lct_attribute3 =>p_rec.lct_attribute3
419 ,p_lct_attribute4 =>p_rec.lct_attribute4
420 ,p_lct_attribute5 =>p_rec.lct_attribute5
421 ,p_lct_attribute6 =>p_rec.lct_attribute6
422 ,p_lct_attribute7 =>p_rec.lct_attribute7
423 ,p_lct_attribute8 =>p_rec.lct_attribute8
424 ,p_lct_attribute9 =>p_rec.lct_attribute9
425 ,p_lct_attribute10 =>p_rec.lct_attribute10
426 ,p_lct_attribute11 =>p_rec.lct_attribute11
427 ,p_lct_attribute12 =>p_rec.lct_attribute12
428 ,p_lct_attribute13 =>p_rec.lct_attribute13
429 ,p_lct_attribute14 =>p_rec.lct_attribute14
430 ,p_lct_attribute15 =>p_rec.lct_attribute15
431 ,p_lct_attribute16 =>p_rec.lct_attribute16
432 ,p_lct_attribute17 =>p_rec.lct_attribute17
433 ,p_lct_attribute18 =>p_rec.lct_attribute18
434 ,p_lct_attribute19 =>p_rec.lct_attribute19
435 ,p_lct_attribute20 =>p_rec.lct_attribute20
436 ,p_lct_attribute21 =>p_rec.lct_attribute21
437 ,p_lct_attribute22 =>p_rec.lct_attribute22
438 ,p_lct_attribute23 =>p_rec.lct_attribute23
439 ,p_lct_attribute24 =>p_rec.lct_attribute24
440 ,p_lct_attribute25 =>p_rec.lct_attribute25
441 ,p_lct_attribute26 =>p_rec.lct_attribute26
442 ,p_lct_attribute27 =>p_rec.lct_attribute27
443 ,p_lct_attribute28 =>p_rec.lct_attribute28
444 ,p_lct_attribute29 =>p_rec.lct_attribute29
445 ,p_lct_attribute30 =>p_rec.lct_attribute30
446 ,p_object_version_number =>p_rec.object_version_number
447 ,p_effective_date =>p_effective_date
448 ,p_validation_start_date =>p_validation_start_date
449 ,p_validation_end_date =>p_validation_end_date
450 );
451 --
452 exception
453 --
454 when hr_api.cannot_find_prog_unit then
455 --
456 hr_api.cannot_find_prog_unit_error
457 (p_module_name => 'ben_ler_chg_ptip_enrt_f'
458 ,p_hook_type => 'AI');
459 --
460 end;
461 --
462 -- End of API User Hook for post_insert.
463 --
464 --
465 hr_utility.set_location(' Leaving:'||l_proc, 10);
466 End post_insert;
467 --
468 -- ----------------------------------------------------------------------------
469 -- |-------------------------------< ins_lck >--------------------------------|
470 -- ----------------------------------------------------------------------------
471 -- {Start Of Comments}
472 --
473 -- Description:
474 -- The ins_lck process has one main function to perform. When inserting
475 -- a datetracked row, we must validate the DT mode.
476 -- be manipulated.
477 --
478 -- Prerequisites:
479 -- This procedure can only be called for the datetrack mode of INSERT.
480 --
481 -- In Parameters:
482 --
483 -- Post Success:
484 -- On successful completion of the ins_lck process the parental
485 -- datetracked rows will be locked providing the p_enforce_foreign_locking
486 -- argument value is TRUE.
487 -- If the p_enforce_foreign_locking argument value is FALSE then the
488 -- parential rows are not locked.
489 --
490 -- Post Failure:
491 -- The Lck process can fail for:
492 -- 1) When attempting to lock the row the row could already be locked by
493 -- another user. This will raise the HR_Api.Object_Locked exception.
494 -- 2) When attempting to the lock the parent which doesn't exist.
495 -- For the entity to be locked the parent must exist!
496 --
497 -- Developer Implementation Notes:
498 -- None.
499 --
500 -- Access Status:
501 -- Internal Row Handler Use Only.
502 --
503 -- {End Of Comments}
504 -- ----------------------------------------------------------------------------
505 Procedure ins_lck
506 (p_effective_date in date,
507 p_datetrack_mode in varchar2,
508 p_rec in ben_lct_shd.g_rec_type,
509 p_validation_start_date out nocopy date,
510 p_validation_end_date out nocopy date) is
511 --
512 l_proc varchar2(72) := g_package||'ins_lck';
513 l_validation_start_date date;
514 l_validation_end_date date;
515 --
516 Begin
517 hr_utility.set_location('Entering:'||l_proc, 5);
518 --
519 -- Validate the datetrack mode mode getting the validation start
520 -- and end dates for the specified datetrack operation.
521 --
522 dt_api.validate_dt_mode
523 (p_effective_date => p_effective_date,
524 p_datetrack_mode => p_datetrack_mode,
525 p_base_table_name => 'ben_ler_chg_ptip_enrt_f',
526 p_base_key_column => 'ler_chg_ptip_enrt_id',
527 p_base_key_value => p_rec.ler_chg_ptip_enrt_id,
528 p_parent_table_name1 => 'ben_ptip_f',
529 p_parent_key_column1 => 'ptip_id',
530 p_parent_key_value1 => p_rec.ptip_id,
531 p_parent_table_name2 => 'ben_ler_f',
532 p_parent_key_column2 => 'ler_id',
533 p_parent_key_value2 => p_rec.ler_id,
534 p_enforce_foreign_locking => true,
535 p_validation_start_date => l_validation_start_date,
536 p_validation_end_date => l_validation_end_date);
537 --
538 -- Set the validation start and end date OUT arguments
539 --
540 p_validation_start_date := l_validation_start_date;
541 p_validation_end_date := l_validation_end_date;
542 --
543 hr_utility.set_location(' Leaving:'||l_proc, 10);
544 --
545 End ins_lck;
546 --
547 -- ----------------------------------------------------------------------------
548 -- |---------------------------------< ins >----------------------------------|
549 -- ----------------------------------------------------------------------------
550 Procedure ins
551 (
552 p_rec in out nocopy ben_lct_shd.g_rec_type,
553 p_effective_date in date
554 ) is
555 --
556 l_proc varchar2(72) := g_package||'ins';
557 l_datetrack_mode varchar2(30) := 'INSERT';
558 l_validation_start_date date;
559 l_validation_end_date date;
560 --
561 Begin
562 hr_utility.set_location('Entering:'||l_proc, 5);
563 --
564 -- Call the lock operation
565 --
566 ins_lck
567 (p_effective_date => p_effective_date,
568 p_datetrack_mode => l_datetrack_mode,
569 p_rec => p_rec,
570 p_validation_start_date => l_validation_start_date,
571 p_validation_end_date => l_validation_end_date);
572 --
573 -- Call the supporting insert validate operations
574 --
575 ben_lct_bus.insert_validate
576 (p_rec => p_rec,
577 p_effective_date => p_effective_date,
578 p_datetrack_mode => l_datetrack_mode,
579 p_validation_start_date => l_validation_start_date,
580 p_validation_end_date => l_validation_end_date);
581 --
582 -- Call the supporting pre-insert operation
583 --
584 pre_insert
585 (p_rec => p_rec,
586 p_effective_date => p_effective_date,
587 p_datetrack_mode => l_datetrack_mode,
588 p_validation_start_date => l_validation_start_date,
589 p_validation_end_date => l_validation_end_date);
590 --
591 -- Insert the row
592 --
593 insert_dml
594 (p_rec => p_rec,
595 p_effective_date => p_effective_date,
596 p_datetrack_mode => l_datetrack_mode,
597 p_validation_start_date => l_validation_start_date,
598 p_validation_end_date => l_validation_end_date);
599 --
600 -- Call the supporting post-insert operation
601 --
602 post_insert
603 (p_rec => p_rec,
604 p_effective_date => p_effective_date,
605 p_datetrack_mode => l_datetrack_mode,
606 p_validation_start_date => l_validation_start_date,
607 p_validation_end_date => l_validation_end_date);
608 end ins;
609 --
610 -- ----------------------------------------------------------------------------
611 -- |---------------------------------< ins >----------------------------------|
612 -- ----------------------------------------------------------------------------
613 Procedure ins
614 (
615 p_ler_chg_ptip_enrt_id out nocopy number,
616 p_effective_start_date out nocopy date,
617 p_effective_end_date out nocopy date,
618 p_crnt_enrt_prclds_chg_flag in varchar2,
619 p_stl_elig_cant_chg_flag in varchar2,
620 p_dflt_flag in varchar2,
621 p_dflt_enrt_cd in varchar2 default null,
622 p_dflt_enrt_rl in varchar2 default null,
623 p_enrt_cd in varchar2 default null,
624 p_enrt_mthd_cd in varchar2 default null,
625 p_enrt_rl in varchar2 default null,
626 p_tco_chg_enrt_cd in varchar2 default null,
627 p_ptip_id in number,
628 p_ler_id in number,
629 p_business_group_id in number default null,
630 p_lct_attribute_category in varchar2 default null,
631 p_lct_attribute1 in varchar2 default null,
632 p_lct_attribute2 in varchar2 default null,
633 p_lct_attribute3 in varchar2 default null,
634 p_lct_attribute4 in varchar2 default null,
635 p_lct_attribute5 in varchar2 default null,
636 p_lct_attribute6 in varchar2 default null,
637 p_lct_attribute7 in varchar2 default null,
638 p_lct_attribute8 in varchar2 default null,
639 p_lct_attribute9 in varchar2 default null,
640 p_lct_attribute10 in varchar2 default null,
641 p_lct_attribute11 in varchar2 default null,
642 p_lct_attribute12 in varchar2 default null,
643 p_lct_attribute13 in varchar2 default null,
644 p_lct_attribute14 in varchar2 default null,
645 p_lct_attribute15 in varchar2 default null,
646 p_lct_attribute16 in varchar2 default null,
647 p_lct_attribute17 in varchar2 default null,
648 p_lct_attribute18 in varchar2 default null,
649 p_lct_attribute19 in varchar2 default null,
650 p_lct_attribute20 in varchar2 default null,
651 p_lct_attribute21 in varchar2 default null,
652 p_lct_attribute22 in varchar2 default null,
653 p_lct_attribute23 in varchar2 default null,
654 p_lct_attribute24 in varchar2 default null,
655 p_lct_attribute25 in varchar2 default null,
656 p_lct_attribute26 in varchar2 default null,
657 p_lct_attribute27 in varchar2 default null,
658 p_lct_attribute28 in varchar2 default null,
659 p_lct_attribute29 in varchar2 default null,
660 p_lct_attribute30 in varchar2 default null,
661 p_object_version_number out nocopy number,
662 p_effective_date in date
663 ) is
664 --
665 l_rec ben_lct_shd.g_rec_type;
666 l_proc varchar2(72) := g_package||'ins';
667 --
668 Begin
669 hr_utility.set_location('Entering:'||l_proc, 5);
670 --
671 -- Call conversion function to turn arguments into the
672 -- p_rec structure.
673 --
674 l_rec :=
675 ben_lct_shd.convert_args
676 (
677 null,
678 null,
679 null,
680 p_crnt_enrt_prclds_chg_flag,
681 p_stl_elig_cant_chg_flag,
682 p_dflt_flag,
683 p_dflt_enrt_cd,
684 p_dflt_enrt_rl,
685 p_enrt_cd,
686 p_enrt_mthd_cd,
687 p_enrt_rl,
688 p_tco_chg_enrt_cd,
689 p_ptip_id,
690 p_ler_id,
691 p_business_group_id,
692 p_lct_attribute_category,
693 p_lct_attribute1,
694 p_lct_attribute2,
695 p_lct_attribute3,
696 p_lct_attribute4,
697 p_lct_attribute5,
698 p_lct_attribute6,
699 p_lct_attribute7,
700 p_lct_attribute8,
701 p_lct_attribute9,
702 p_lct_attribute10,
703 p_lct_attribute11,
704 p_lct_attribute12,
705 p_lct_attribute13,
706 p_lct_attribute14,
707 p_lct_attribute15,
708 p_lct_attribute16,
709 p_lct_attribute17,
710 p_lct_attribute18,
711 p_lct_attribute19,
712 p_lct_attribute20,
713 p_lct_attribute21,
714 p_lct_attribute22,
715 p_lct_attribute23,
716 p_lct_attribute24,
717 p_lct_attribute25,
718 p_lct_attribute26,
719 p_lct_attribute27,
720 p_lct_attribute28,
721 p_lct_attribute29,
722 p_lct_attribute30,
723 null
724 );
725 --
726 -- Having converted the arguments into the ben_lct_rec
727 -- plsql record structure we call the corresponding record
728 -- business process.
729 --
730 ins(l_rec, p_effective_date);
731 --
732 -- Set the OUT arguments.
733 --
734 p_ler_chg_ptip_enrt_id := l_rec.ler_chg_ptip_enrt_id;
735 p_effective_start_date := l_rec.effective_start_date;
736 p_effective_end_date := l_rec.effective_end_date;
737 p_object_version_number := l_rec.object_version_number;
738 --
739 --
740 hr_utility.set_location(' Leaving:'||l_proc, 10);
741 End ins;
742 --
743 end ben_lct_ins;