[Home] [Help]
PACKAGE BODY: APPS.BEN_CLP_INS
Source
1 Package Body ben_clp_ins as
2 /* $Header: beclprhi.pkb 120.0.12010000.2 2008/08/05 14:17:49 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_clp_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_clp_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_clpse_lf_evt_f t
70 where t.clpse_lf_evt_id = p_rec.clpse_lf_evt_id
71 and t.effective_start_date =
72 ben_clp_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_clpse_lf_evt_f.created_by%TYPE;
77 l_creation_date ben_clpse_lf_evt_f.creation_date%TYPE;
78 l_last_update_date ben_clpse_lf_evt_f.last_update_date%TYPE;
79 l_last_updated_by ben_clpse_lf_evt_f.last_updated_by%TYPE;
80 l_last_update_login ben_clpse_lf_evt_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_clpse_lf_evt_f',
90 p_base_key_column => 'clpse_lf_evt_id',
91 p_base_key_value => p_rec.clpse_lf_evt_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_clp_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_clpse_lf_evt_f
132 --
133 insert into ben_clpse_lf_evt_f
134 ( clpse_lf_evt_id,
135 effective_start_date,
136 effective_end_date,
137 business_group_id,
138 seq,
139 ler1_id,
140 bool1_cd,
141 ler2_id,
142 bool2_cd,
143 ler3_id,
144 bool3_cd,
145 ler4_id,
146 bool4_cd,
147 ler5_id,
148 bool5_cd,
149 ler6_id,
150 bool6_cd,
151 ler7_id,
152 bool7_cd,
153 ler8_id,
154 bool8_cd,
155 ler9_id,
156 bool9_cd,
157 ler10_id,
158 eval_cd,
159 eval_rl,
160 tlrnc_dys_num,
161 eval_ler_id,
162 eval_ler_det_cd,
163 eval_ler_det_rl,
164 clp_attribute_category,
165 clp_attribute1,
166 clp_attribute2,
167 clp_attribute3,
168 clp_attribute4,
169 clp_attribute5,
170 clp_attribute6,
171 clp_attribute7,
172 clp_attribute8,
173 clp_attribute9,
174 clp_attribute10,
175 clp_attribute11,
176 clp_attribute12,
177 clp_attribute13,
178 clp_attribute14,
179 clp_attribute15,
180 clp_attribute16,
181 clp_attribute17,
182 clp_attribute18,
183 clp_attribute19,
184 clp_attribute20,
185 clp_attribute21,
186 clp_attribute22,
187 clp_attribute23,
188 clp_attribute24,
189 clp_attribute25,
190 clp_attribute26,
191 clp_attribute27,
192 clp_attribute28,
193 clp_attribute29,
194 clp_attribute30,
195 object_version_number
196 , created_by,
197 creation_date,
198 last_update_date,
199 last_updated_by,
200 last_update_login
201 )
202 Values
203 ( p_rec.clpse_lf_evt_id,
204 p_rec.effective_start_date,
205 p_rec.effective_end_date,
206 p_rec.business_group_id,
207 p_rec.seq,
208 p_rec.ler1_id,
209 p_rec.bool1_cd,
210 p_rec.ler2_id,
211 p_rec.bool2_cd,
212 p_rec.ler3_id,
213 p_rec.bool3_cd,
214 p_rec.ler4_id,
215 p_rec.bool4_cd,
216 p_rec.ler5_id,
217 p_rec.bool5_cd,
218 p_rec.ler6_id,
219 p_rec.bool6_cd,
220 p_rec.ler7_id,
221 p_rec.bool7_cd,
222 p_rec.ler8_id,
223 p_rec.bool8_cd,
224 p_rec.ler9_id,
225 p_rec.bool9_cd,
226 p_rec.ler10_id,
227 p_rec.eval_cd,
228 p_rec.eval_rl,
229 p_rec.tlrnc_dys_num,
230 p_rec.eval_ler_id,
231 p_rec.eval_ler_det_cd,
232 p_rec.eval_ler_det_rl,
233 p_rec.clp_attribute_category,
234 p_rec.clp_attribute1,
235 p_rec.clp_attribute2,
236 p_rec.clp_attribute3,
237 p_rec.clp_attribute4,
238 p_rec.clp_attribute5,
239 p_rec.clp_attribute6,
240 p_rec.clp_attribute7,
241 p_rec.clp_attribute8,
242 p_rec.clp_attribute9,
243 p_rec.clp_attribute10,
244 p_rec.clp_attribute11,
245 p_rec.clp_attribute12,
246 p_rec.clp_attribute13,
247 p_rec.clp_attribute14,
248 p_rec.clp_attribute15,
249 p_rec.clp_attribute16,
250 p_rec.clp_attribute17,
251 p_rec.clp_attribute18,
252 p_rec.clp_attribute19,
253 p_rec.clp_attribute20,
254 p_rec.clp_attribute21,
255 p_rec.clp_attribute22,
256 p_rec.clp_attribute23,
257 p_rec.clp_attribute24,
258 p_rec.clp_attribute25,
259 p_rec.clp_attribute26,
260 p_rec.clp_attribute27,
261 p_rec.clp_attribute28,
262 p_rec.clp_attribute29,
263 p_rec.clp_attribute30,
264 p_rec.object_version_number
265 , l_created_by,
266 l_creation_date,
267 l_last_update_date,
268 l_last_updated_by,
269 l_last_update_login
270 );
271 --
272 ben_clp_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_clp_shd.g_api_dml := false; -- Unset the api dml status
279 ben_clp_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_clp_shd.g_api_dml := false; -- Unset the api dml status
284 ben_clp_shd.constraint_error
285 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
286 When Others Then
287 ben_clp_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_clp_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_clp_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 --
364 --
365 Begin
366 hr_utility.set_location('Entering:'||l_proc, 5);
367 --
368 --
369 select ben_clpse_lf_evt_f_s.nextval into p_rec.clpse_lf_evt_id from dual;
370 --
371 --
372 hr_utility.set_location(' Leaving:'||l_proc, 10);
373 End pre_insert;
374 --
375 -- ----------------------------------------------------------------------------
376 -- |-----------------------------< post_insert >------------------------------|
377 -- ----------------------------------------------------------------------------
378 -- {Start Of Comments}
379 --
380 -- Description:
381 -- This private procedure contains any processing which is required after the
382 -- insert dml.
383 --
384 -- Prerequisites:
385 -- This is an internal procedure which is called from the ins procedure.
386 --
387 -- In Parameters:
388 -- A Pl/Sql record structre.
389 --
390 -- Post Success:
391 -- Processing continues.
392 --
393 -- Post Failure:
394 -- If an error has occurred, an error message and exception will be raised
395 -- but not handled.
396 --
397 -- Developer Implementation Notes:
398 -- Any post-processing required after the insert dml is issued should be
399 -- coded within this procedure. It is important to note that any 3rd party
400 -- maintenance should be reviewed before placing in this procedure.
401 --
402 -- Access Status:
403 -- Internal Row Handler Use Only.
404 --
405 -- {End Of Comments}
406 -- ----------------------------------------------------------------------------
407 Procedure post_insert
408 (p_rec in ben_clp_shd.g_rec_type,
409 p_effective_date in date,
410 p_datetrack_mode in varchar2,
411 p_validation_start_date in date,
412 p_validation_end_date in date) is
413 --
414 l_proc varchar2(72) := g_package||'post_insert';
415 --
416 Begin
417 hr_utility.set_location('Entering:'||l_proc, 5);
418 --
419 -- Start of API User Hook for post_insert.
420 --
421 begin
422 --
423 ben_clp_rki.after_insert
424 (p_clpse_lf_evt_id => p_rec.clpse_lf_evt_id
425 ,p_effective_start_date => p_rec.effective_start_date
426 ,p_effective_end_date => p_rec.effective_end_date
427 ,p_business_group_id => p_rec.business_group_id
428 ,p_seq => p_rec.seq
429 ,p_ler1_id => p_rec.ler1_id
430 ,p_bool1_cd => p_rec.bool1_cd
431 ,p_ler2_id => p_rec.ler2_id
432 ,p_bool2_cd => p_rec.bool2_cd
433 ,p_ler3_id => p_rec.ler3_id
434 ,p_bool3_cd => p_rec.bool3_cd
435 ,p_ler4_id => p_rec.ler4_id
436 ,p_bool4_cd => p_rec.bool4_cd
440 ,p_bool6_cd => p_rec.bool6_cd
437 ,p_ler5_id => p_rec.ler5_id
438 ,p_bool5_cd => p_rec.bool5_cd
439 ,p_ler6_id => p_rec.ler6_id
441 ,p_ler7_id => p_rec.ler7_id
442 ,p_bool7_cd => p_rec.bool7_cd
443 ,p_ler8_id => p_rec.ler8_id
444 ,p_bool8_cd => p_rec.bool8_cd
445 ,p_ler9_id => p_rec.ler9_id
446 ,p_bool9_cd => p_rec.bool9_cd
447 ,p_ler10_id => p_rec.ler10_id
448 ,p_eval_cd => p_rec.eval_cd
449 ,p_eval_rl => p_rec.eval_rl
450 ,p_tlrnc_dys_num => p_rec.tlrnc_dys_num
451 ,p_eval_ler_id => p_rec.eval_ler_id
452 ,p_eval_ler_det_cd => p_rec.eval_ler_det_cd
453 ,p_eval_ler_det_rl => p_rec.eval_ler_det_rl
454 ,p_clp_attribute_category => p_rec.clp_attribute_category
455 ,p_clp_attribute1 => p_rec.clp_attribute1
456 ,p_clp_attribute2 => p_rec.clp_attribute2
457 ,p_clp_attribute3 => p_rec.clp_attribute3
458 ,p_clp_attribute4 => p_rec.clp_attribute4
459 ,p_clp_attribute5 => p_rec.clp_attribute5
460 ,p_clp_attribute6 => p_rec.clp_attribute6
461 ,p_clp_attribute7 => p_rec.clp_attribute7
462 ,p_clp_attribute8 => p_rec.clp_attribute8
463 ,p_clp_attribute9 => p_rec.clp_attribute9
464 ,p_clp_attribute10 => p_rec.clp_attribute10
465 ,p_clp_attribute11 => p_rec.clp_attribute11
466 ,p_clp_attribute12 => p_rec.clp_attribute12
467 ,p_clp_attribute13 => p_rec.clp_attribute13
468 ,p_clp_attribute14 => p_rec.clp_attribute14
469 ,p_clp_attribute15 => p_rec.clp_attribute15
470 ,p_clp_attribute16 => p_rec.clp_attribute16
471 ,p_clp_attribute17 => p_rec.clp_attribute17
472 ,p_clp_attribute18 => p_rec.clp_attribute18
473 ,p_clp_attribute19 => p_rec.clp_attribute19
474 ,p_clp_attribute20 => p_rec.clp_attribute20
475 ,p_clp_attribute21 => p_rec.clp_attribute21
476 ,p_clp_attribute22 => p_rec.clp_attribute22
477 ,p_clp_attribute23 => p_rec.clp_attribute23
478 ,p_clp_attribute24 => p_rec.clp_attribute24
479 ,p_clp_attribute25 => p_rec.clp_attribute25
480 ,p_clp_attribute26 => p_rec.clp_attribute26
481 ,p_clp_attribute27 => p_rec.clp_attribute27
482 ,p_clp_attribute28 => p_rec.clp_attribute28
483 ,p_clp_attribute29 => p_rec.clp_attribute29
484 ,p_clp_attribute30 => p_rec.clp_attribute30
485 ,p_object_version_number => p_rec.object_version_number
486 ,p_effective_date => p_effective_date
487 ,p_validation_start_date => p_validation_start_date
488 ,p_validation_end_date => p_validation_end_date);
489 --
490 exception
491 --
492 when hr_api.cannot_find_prog_unit then
493 --
494 hr_api.cannot_find_prog_unit_error
495 (p_module_name => 'ben_clpse_lf_evt_f'
496 ,p_hook_type => 'AI');
497 --
498 end;
499 --
500 -- End of API User Hook for post_insert.
501 --
502 hr_utility.set_location(' Leaving:'||l_proc, 10);
503 --
504 End post_insert;
505 --
506 -- ----------------------------------------------------------------------------
507 -- |-------------------------------< ins_lck >--------------------------------|
508 -- ----------------------------------------------------------------------------
509 -- {Start Of Comments}
510 --
511 -- Description:
512 -- The ins_lck process has one main function to perform. When inserting
513 -- a datetracked row, we must validate the DT mode.
514 -- be manipulated.
515 --
516 -- Prerequisites:
517 -- This procedure can only be called for the datetrack mode of INSERT.
518 --
519 -- In Parameters:
520 --
521 -- Post Success:
522 -- On successful completion of the ins_lck process the parental
523 -- datetracked rows will be locked providing the p_enforce_foreign_locking
524 -- argument value is TRUE.
525 -- If the p_enforce_foreign_locking argument value is FALSE then the
526 -- parential rows are not locked.
527 --
528 -- Post Failure:
529 -- The Lck process can fail for:
530 -- 1) When attempting to lock the row the row could already be locked by
531 -- another user. This will raise the HR_Api.Object_Locked exception.
532 -- 2) When attempting to the lock the parent which doesn't exist.
533 -- For the entity to be locked the parent must exist!
534 --
535 -- Developer Implementation Notes:
536 -- None.
537 --
538 -- Access Status:
539 -- Internal Row Handler Use Only.
540 --
541 -- {End Of Comments}
542 -- ----------------------------------------------------------------------------
543 Procedure ins_lck
544 (p_effective_date in date,
545 p_datetrack_mode in varchar2,
546 p_rec in ben_clp_shd.g_rec_type,
547 p_validation_start_date out nocopy date,
548 p_validation_end_date out nocopy date) is
549 --
553 l_validation_start_date1 date;
550 l_proc varchar2(72) := g_package||'ins_lck';
551 l_validation_start_date date;
552 l_validation_end_date date;
554 l_validation_end_date1 date;
555 --
556 Begin
557 hr_utility.set_location('Entering:'||l_proc, 5);
558 --
559 -- Validate the datetrack mode mode getting the validation start
560 -- and end dates for the specified datetrack operation.
561 --
562 dt_api.validate_dt_mode
563 (p_effective_date => p_effective_date,
564 p_datetrack_mode => p_datetrack_mode,
565 p_base_table_name => 'ben_clpse_lf_evt_f',
566 p_base_key_column => 'clpse_lf_evt_id',
567 p_base_key_value => p_rec.clpse_lf_evt_id,
568 p_parent_table_name1 => 'ben_ler_f',
569 p_parent_key_column1 => 'ler_id',
570 p_parent_key_value1 => p_rec.ler1_id,
571 p_parent_table_name2 => 'ben_ler_f',
572 p_parent_key_column2 => 'ler_id',
573 p_parent_key_value2 => p_rec.ler2_id,
574 p_parent_table_name3 => 'ben_ler_f',
575 p_parent_key_column3 => 'ler_id',
576 p_parent_key_value3 => p_rec.ler3_id,
577 p_parent_table_name4 => 'ben_ler_f',
578 p_parent_key_column4 => 'ler_id',
579 p_parent_key_value4 => p_rec.ler4_id,
580 p_parent_table_name5 => 'ben_ler_f',
581 p_parent_key_column5 => 'ler_id',
582 p_parent_key_value5 => p_rec.ler5_id,
583 p_parent_table_name6 => 'ben_ler_f',
584 p_parent_key_column6 => 'ler_id',
585 p_parent_key_value6 => p_rec.ler6_id,
586 p_parent_table_name7 => 'ben_ler_f',
587 p_parent_key_column7 => 'ler_id',
588 p_parent_key_value7 => p_rec.ler7_id,
589 p_parent_table_name8 => 'ben_ler_f',
590 p_parent_key_column8 => 'ler_id',
591 p_parent_key_value8 => p_rec.ler8_id,
592 p_parent_table_name9 => 'ben_ler_f',
593 p_parent_key_column9 => 'ler_id',
594 p_parent_key_value9 => p_rec.ler9_id,
595 p_parent_table_name10 => 'ben_ler_f',
596 p_parent_key_column10 => 'ler_id',
597 p_parent_key_value10 => p_rec.ler10_id,
598 p_enforce_foreign_locking => true,
599 p_validation_start_date => l_validation_start_date,
600 p_validation_end_date => l_validation_end_date);
601 --
602 dt_api.validate_dt_mode
603 (p_effective_date => p_effective_date,
604 p_datetrack_mode => p_datetrack_mode,
605 p_base_table_name => 'ben_clpse_lf_evt_f',
606 p_base_key_column => 'clpse_lf_evt_id',
607 p_base_key_value => p_rec.clpse_lf_evt_id,
608 p_parent_table_name1 => 'ben_ler_f',
609 p_parent_key_column1 => 'ler_id',
610 p_parent_key_value1 => p_rec.eval_ler_id,
611 p_enforce_foreign_locking => true,
612 p_validation_start_date => l_validation_start_date1,
613 p_validation_end_date => l_validation_end_date1);
614 --
615 -- Set the validation start and end date OUT arguments
616 --
617 if l_validation_start_date > l_validation_start_date1 then
618 --
619 p_validation_start_date := l_validation_start_date;
620 --
621 else
622 --
623 p_validation_start_date := l_validation_start_date1;
624 --
625 end if;
626 --
627 if l_validation_end_date > l_validation_end_date1 then
628 --
629 p_validation_end_date := l_validation_end_date;
630 --
631 else
632 --
633 p_validation_end_date := l_validation_end_date1;
634 --
635 end if;
636 --
637 hr_utility.set_location(' Leaving:'||l_proc, 10);
638 --
639 End ins_lck;
640 --
641 -- ----------------------------------------------------------------------------
642 -- |---------------------------------< ins >----------------------------------|
643 -- ----------------------------------------------------------------------------
644 Procedure ins
645 (
646 p_rec in out nocopy ben_clp_shd.g_rec_type,
647 p_effective_date in date
648 ) is
649 --
650 l_proc varchar2(72) := g_package||'ins';
651 l_datetrack_mode varchar2(30) := 'INSERT';
652 l_validation_start_date date;
653 l_validation_end_date date;
654 --
655 Begin
656 hr_utility.set_location('Entering:'||l_proc, 5);
657 --
658 -- Call the lock operation
659 --
660 ins_lck
661 (p_effective_date => p_effective_date,
662 p_datetrack_mode => l_datetrack_mode,
663 p_rec => p_rec,
664 p_validation_start_date => l_validation_start_date,
665 p_validation_end_date => l_validation_end_date);
666 --
667 -- Call the supporting insert validate operations
668 --
669 ben_clp_bus.insert_validate
670 (p_rec => p_rec,
671 p_effective_date => p_effective_date,
672 p_datetrack_mode => l_datetrack_mode,
673 p_validation_start_date => l_validation_start_date,
674 p_validation_end_date => l_validation_end_date);
675 --
676 -- Call the supporting pre-insert operation
677 --
678 pre_insert
679 (p_rec => p_rec,
680 p_effective_date => p_effective_date,
681 p_datetrack_mode => l_datetrack_mode,
682 p_validation_start_date => l_validation_start_date,
683 p_validation_end_date => l_validation_end_date);
684 --
685 -- Insert the row
686 --
687 insert_dml
691 p_validation_start_date => l_validation_start_date,
688 (p_rec => p_rec,
689 p_effective_date => p_effective_date,
690 p_datetrack_mode => l_datetrack_mode,
692 p_validation_end_date => l_validation_end_date);
693 --
694 -- Call the supporting post-insert operation
695 --
696 post_insert
697 (p_rec => p_rec,
698 p_effective_date => p_effective_date,
699 p_datetrack_mode => l_datetrack_mode,
700 p_validation_start_date => l_validation_start_date,
701 p_validation_end_date => l_validation_end_date);
702 end ins;
703 --
704 -- ----------------------------------------------------------------------------
705 -- |---------------------------------< ins >----------------------------------|
706 -- ----------------------------------------------------------------------------
707 Procedure ins
708 (
709 p_clpse_lf_evt_id out nocopy number,
710 p_effective_start_date out nocopy date,
711 p_effective_end_date out nocopy date,
712 p_business_group_id in number,
713 p_seq in number,
714 p_ler1_id in number default null,
715 p_bool1_cd in varchar2 default null,
716 p_ler2_id in number default null,
717 p_bool2_cd in varchar2 default null,
718 p_ler3_id in number default null,
719 p_bool3_cd in varchar2 default null,
720 p_ler4_id in number default null,
721 p_bool4_cd in varchar2 default null,
722 p_ler5_id in number default null,
723 p_bool5_cd in varchar2 default null,
724 p_ler6_id in number default null,
725 p_bool6_cd in varchar2 default null,
726 p_ler7_id in number default null,
727 p_bool7_cd in varchar2 default null,
728 p_ler8_id in number default null,
729 p_bool8_cd in varchar2 default null,
730 p_ler9_id in number default null,
731 p_bool9_cd in varchar2 default null,
732 p_ler10_id in number default null,
733 p_eval_cd in varchar2,
734 p_eval_rl in number default null,
735 p_tlrnc_dys_num in number default null,
736 p_eval_ler_id in number,
737 p_eval_ler_det_cd in varchar2,
738 p_eval_ler_det_rl in number default null,
739 p_clp_attribute_category in varchar2 default null,
740 p_clp_attribute1 in varchar2 default null,
741 p_clp_attribute2 in varchar2 default null,
742 p_clp_attribute3 in varchar2 default null,
743 p_clp_attribute4 in varchar2 default null,
744 p_clp_attribute5 in varchar2 default null,
745 p_clp_attribute6 in varchar2 default null,
746 p_clp_attribute7 in varchar2 default null,
747 p_clp_attribute8 in varchar2 default null,
748 p_clp_attribute9 in varchar2 default null,
749 p_clp_attribute10 in varchar2 default null,
750 p_clp_attribute11 in varchar2 default null,
751 p_clp_attribute12 in varchar2 default null,
752 p_clp_attribute13 in varchar2 default null,
753 p_clp_attribute14 in varchar2 default null,
754 p_clp_attribute15 in varchar2 default null,
755 p_clp_attribute16 in varchar2 default null,
756 p_clp_attribute17 in varchar2 default null,
757 p_clp_attribute18 in varchar2 default null,
758 p_clp_attribute19 in varchar2 default null,
759 p_clp_attribute20 in varchar2 default null,
760 p_clp_attribute21 in varchar2 default null,
761 p_clp_attribute22 in varchar2 default null,
762 p_clp_attribute23 in varchar2 default null,
763 p_clp_attribute24 in varchar2 default null,
764 p_clp_attribute25 in varchar2 default null,
765 p_clp_attribute26 in varchar2 default null,
766 p_clp_attribute27 in varchar2 default null,
767 p_clp_attribute28 in varchar2 default null,
768 p_clp_attribute29 in varchar2 default null,
769 p_clp_attribute30 in varchar2 default null,
770 p_object_version_number out nocopy number,
771 p_effective_date in date
772 ) is
773 --
774 l_rec ben_clp_shd.g_rec_type;
775 l_proc varchar2(72) := g_package||'ins';
776 --
777 Begin
778 hr_utility.set_location('Entering:'||l_proc, 5);
779 --
780 -- Call conversion function to turn arguments into the
781 -- p_rec structure.
782 --
783 l_rec :=
784 ben_clp_shd.convert_args
785 (
786 null,
787 null,
788 null,
789 p_business_group_id,
790 p_seq,
791 p_ler1_id,
792 p_bool1_cd,
793 p_ler2_id,
794 p_bool2_cd,
795 p_ler3_id,
796 p_bool3_cd,
797 p_ler4_id,
798 p_bool4_cd,
799 p_ler5_id,
800 p_bool5_cd,
801 p_ler6_id,
802 p_bool6_cd,
803 p_ler7_id,
804 p_bool7_cd,
805 p_ler8_id,
806 p_bool8_cd,
807 p_ler9_id,
808 p_bool9_cd,
809 p_ler10_id,
810 p_eval_cd,
811 p_eval_rl,
812 p_tlrnc_dys_num,
813 p_eval_ler_id,
814 p_eval_ler_det_cd,
815 p_eval_ler_det_rl,
816 p_clp_attribute_category,
817 p_clp_attribute1,
818 p_clp_attribute2,
819 p_clp_attribute3,
820 p_clp_attribute4,
821 p_clp_attribute5,
822 p_clp_attribute6,
823 p_clp_attribute7,
824 p_clp_attribute8,
825 p_clp_attribute9,
826 p_clp_attribute10,
827 p_clp_attribute11,
828 p_clp_attribute12,
829 p_clp_attribute13,
830 p_clp_attribute14,
831 p_clp_attribute15,
832 p_clp_attribute16,
833 p_clp_attribute17,
834 p_clp_attribute18,
835 p_clp_attribute19,
836 p_clp_attribute20,
837 p_clp_attribute21,
838 p_clp_attribute22,
839 p_clp_attribute23,
840 p_clp_attribute24,
841 p_clp_attribute25,
842 p_clp_attribute26,
843 p_clp_attribute27,
844 p_clp_attribute28,
845 p_clp_attribute29,
846 p_clp_attribute30,
847 null
848 );
849 --
850 -- Having converted the arguments into the ben_clp_rec
851 -- plsql record structure we call the corresponding record
852 -- business process.
853 --
854 ins(l_rec, p_effective_date);
855 --
856 -- Set the OUT arguments.
857 --
858 p_clpse_lf_evt_id := l_rec.clpse_lf_evt_id;
859 p_effective_start_date := l_rec.effective_start_date;
860 p_effective_end_date := l_rec.effective_end_date;
861 p_object_version_number := l_rec.object_version_number;
862 --
863 --
864 hr_utility.set_location(' Leaving:'||l_proc, 10);
865 End ins;
866 --
867 end ben_clp_ins;