[Home] [Help]
PACKAGE BODY: APPS.BEN_ECV_INS
Source
1 Package body ben_ecv_ins as
2 /* $Header: beecvrhi.pkb 120.1 2005/07/29 09:50:17 rbingi noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_ecv_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_ecv_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_eligy_crit_values_f t
70 where t.eligy_crit_values_id = p_rec.eligy_crit_values_id
71 and t.effective_start_date = ben_ecv_shd.g_old_rec.effective_start_date
72 and t.effective_end_date = (p_validation_start_date - 1);
73 --
74 l_proc varchar2(72) := g_package||'dt_insert_dml';
75 l_created_by ben_eligy_crit_values_f.created_by%TYPE;
76 l_creation_date ben_eligy_crit_values_f.creation_date%TYPE;
77 l_last_update_date ben_eligy_crit_values_f.last_update_date%TYPE;
78 l_last_updated_by ben_eligy_crit_values_f.last_updated_by%TYPE;
79 l_last_update_login ben_eligy_crit_values_f.last_update_login%TYPE;
80 --
81 Begin
82 hr_utility.set_location('Entering :'||l_proc,10);
83 --
84 -- Get the object version number for the insert
85 --
86 p_rec.object_version_number :=
87 dt_api.get_object_version_number
88 (p_base_table_name => 'BEN_ELIGY_CRIT_VALUES_F',
89 p_base_key_column => 'eligy_crit_values_id',
90 p_base_key_value => p_rec.eligy_crit_values_id
91 );
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_ecv_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into ben_eligy_crit_values_f
132 --
133 Insert into ben_eligy_crit_values_f
134 (
135 eligy_crit_values_id,
136 eligy_prfl_id,
137 eligy_criteria_id,
138 effective_start_date,
139 effective_end_date,
140 ordr_num,
141 number_value1,
142 number_value2,
143 char_value1,
144 char_value2,
145 date_value1,
146 date_value2,
147 excld_flag,
148 business_group_id,
149 legislation_code,
150 ecv_attribute_category,
151 ecv_attribute1,
152 ecv_attribute2,
153 ecv_attribute3,
154 ecv_attribute4,
155 ecv_attribute5,
156 ecv_attribute6,
157 ecv_attribute7,
158 ecv_attribute8,
159 ecv_attribute9,
160 ecv_attribute10,
161 ecv_attribute11,
162 ecv_attribute12,
163 ecv_attribute13,
164 ecv_attribute14,
165 ecv_attribute15,
166 ecv_attribute16,
167 ecv_attribute17,
168 ecv_attribute18,
169 ecv_attribute19,
170 ecv_attribute20,
171 ecv_attribute21,
172 ecv_attribute22,
173 ecv_attribute23,
174 ecv_attribute24,
175 ecv_attribute25,
176 ecv_attribute26,
177 ecv_attribute27,
178 ecv_attribute28,
179 ecv_attribute29,
180 ecv_attribute30,
181 object_version_number,
182 created_by,
183 creation_date,
184 last_update_date,
185 last_updated_by,
186 last_update_login,
187 criteria_score,
188 criteria_weight,
189 char_value3,
190 char_value4,
191 number_value3,
192 number_value4,
193 date_value3,
194 date_value4
195 )
196 values
197 (
198 p_rec.eligy_crit_values_id,
199 p_rec.eligy_prfl_id,
200 p_rec.eligy_criteria_id,
201 p_rec.effective_start_date,
202 p_rec.effective_end_date,
203 p_rec.ordr_num,
204 p_rec.number_value1,
205 p_rec.number_value2,
206 p_rec.char_value1,
207 p_rec.char_value2,
208 p_rec.date_value1,
209 p_rec.date_value2,
210 p_rec.excld_flag,
211 p_rec.business_group_id,
212 p_rec.legislation_code,
213 p_rec.ecv_attribute_category,
214 p_rec.ecv_attribute1,
215 p_rec.ecv_attribute2,
216 p_rec.ecv_attribute3,
217 p_rec.ecv_attribute4,
218 p_rec.ecv_attribute5,
219 p_rec.ecv_attribute6,
220 p_rec.ecv_attribute7,
221 p_rec.ecv_attribute8,
222 p_rec.ecv_attribute9,
223 p_rec.ecv_attribute10,
224 p_rec.ecv_attribute11,
225 p_rec.ecv_attribute12,
226 p_rec.ecv_attribute13,
227 p_rec.ecv_attribute14,
228 p_rec.ecv_attribute15,
229 p_rec.ecv_attribute16,
230 p_rec.ecv_attribute17,
231 p_rec.ecv_attribute18,
232 p_rec.ecv_attribute19,
233 p_rec.ecv_attribute20,
234 p_rec.ecv_attribute21,
235 p_rec.ecv_attribute22,
236 p_rec.ecv_attribute23,
237 p_rec.ecv_attribute24,
238 p_rec.ecv_attribute25,
239 p_rec.ecv_attribute26,
240 p_rec.ecv_attribute27,
241 p_rec.ecv_attribute28,
242 p_rec.ecv_attribute29,
243 p_rec.ecv_attribute30,
244 p_rec.object_version_number,
245 l_created_by,
246 l_creation_date,
247 l_last_update_date,
248 l_last_updated_by,
249 l_last_update_login,
250 p_rec.criteria_score,
251 p_rec.criteria_weight,
252 p_rec.char_value3,
253 p_rec.char_value4,
254 p_rec.number_value3,
255 p_rec.number_value4,
256 p_rec.date_value3,
257 p_rec.date_value4
258 );
259 --
260 ben_ecv_shd.g_api_dml := false; -- Unset the api dml status
261 hr_utility.set_location(' Leaving:'||l_proc, 15);
262 --
263 Exception
264 When hr_api.check_integrity_violated Then
265 -- A check constraint has been violated
266 ben_ecv_shd.g_api_dml := false; -- Unset the api dml status
267 ben_ecv_shd.constraint_error
268 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
269 When hr_api.unique_integrity_violated Then
270 -- Unique integrity has been violated
271 ben_ecv_shd.g_api_dml := false; -- Unset the api dml status
272 ben_ecv_shd.constraint_error
273 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
274 When Others Then
275 ben_ecv_shd.g_api_dml := false; -- Unset the api dml status
276 Raise;
277 End dt_insert_dml;
278 --
279 -- ----------------------------------------------------------------------------
280 -- |------------------------------< insert_dml >------------------------------|
281 -- ----------------------------------------------------------------------------
282 Procedure insert_dml
283 (p_rec in out nocopy ben_ecv_shd.g_rec_type,
284 p_effective_date in date,
285 p_datetrack_mode in varchar2,
286 p_validation_start_date in date,
287 p_validation_end_date in date) is
288 --
289 l_proc varchar2(72) := g_package||'insert_dml';
290 --
291 Begin
292 hr_utility.set_location('Entering:'||l_proc, 5);
293 --
294 dt_insert_dml(p_rec => p_rec,
295 p_effective_date => p_effective_date,
296 p_datetrack_mode => p_datetrack_mode,
297 p_validation_start_date => p_validation_start_date,
298 p_validation_end_date => p_validation_end_date);
299 --
300 hr_utility.set_location(' Leaving:'||l_proc, 10);
301 End insert_dml;
302 --
303 -- ----------------------------------------------------------------------------
304 -- |------------------------------< pre_insert >------------------------------|
305 -- ----------------------------------------------------------------------------
306 -- {Start Of Comments}
307 --
308 -- Description:
309 -- This private procedure contains any processing which is required before
310 -- the insert dml. Presently, if the entity has a corresponding primary
311 -- key which is maintained by an associating sequence, the primary key for
312 -- the entity will be populated with the next sequence value in
313 -- preparation for the insert dml.
314 -- Also, if comments are defined for this entity, the comments insert
315 -- logic will also be called, generating a comment_id if required.
316 --
317 -- Prerequisites:
318 -- This is an internal procedure which is called from the ins procedure.
319 --
320 -- In Parameters:
321 -- A Pl/Sql record structre.
322 --
323 -- Post Success:
324 -- Processing continues.
325 --
326 -- Post Failure:
327 -- If an error has occurred, an error message and exception will be raised
328 -- but not handled.
329 --
330 -- Developer Implementation Notes:
331 -- Any pre-processing required before the insert dml is issued should be
332 -- coded within this procedure. As stated above, a good example is the
333 -- generation of a primary key number via a corresponding sequence.
334 -- It is important to note that any 3rd party maintenance should be reviewed
335 -- before placing in this procedure.
336 --
337 -- Access Status:
338 -- Internal Row Handler Use Only.
339 --
340 -- {End Of Comments}
341 -- ----------------------------------------------------------------------------
342 Procedure pre_insert
343 (p_rec in out nocopy ben_ecv_shd.g_rec_type,
344 p_effective_date in date,
345 p_datetrack_mode in varchar2,
346 p_validation_start_date in date,
347 p_validation_end_date in date) is
348 --
349 l_proc varchar2(72) := g_package||'pre_insert';
350 --
351 Cursor C_Sel1 is select ben_eligy_crit_values_s.nextval from sys.dual;
352 --
353 Begin
354 hr_utility.set_location('Entering:'||l_proc, 5);
355 --
356 --
357 -- Select the next sequence number
358 --
359 Open C_Sel1;
360 Fetch C_Sel1 Into p_rec.eligy_crit_values_id;
361 Close C_Sel1;
362 --
363 --
364 hr_utility.set_location(' Leaving:'||l_proc, 10);
365 End pre_insert;
366 --
367 -- ----------------------------------------------------------------------------
368 -- |-----------------------------< post_insert >------------------------------|
369 -- ----------------------------------------------------------------------------
370 -- {Start Of Comments}
371 --
372 -- Description:
373 -- This private procedure contains any processing which is required after the
374 -- insert dml.
375 --
376 -- Prerequisites:
377 -- This is an internal procedure which is called from the ins procedure.
378 --
379 -- In Parameters:
380 -- A Pl/Sql record structre.
381 --
382 -- Post Success:
383 -- Processing continues.
384 --
385 -- Post Failure:
386 -- If an error has occurred, an error message and exception will be raised
387 -- but not handled.
388 --
389 -- Developer Implementation Notes:
390 -- Any post-processing required after the insert dml is issued should be
391 -- coded within this procedure. It is important to note that any 3rd party
392 -- maintenance should be reviewed before placing in this procedure.
393 --
394 -- Access Status:
395 -- Internal Row Handler Use Only.
396 --
397 -- {End Of Comments}
398 -- ----------------------------------------------------------------------------
399 Procedure post_insert
400 (p_rec in ben_ecv_shd.g_rec_type,
401 p_effective_date in date,
402 p_datetrack_mode in varchar2,
403 p_validation_start_date in date,
404 p_validation_end_date in date) is
405 --
406 l_proc varchar2(72) := g_package||'post_insert';
407 --
408 Begin
409 hr_utility.set_location('Entering:'||l_proc, 5);
410 --
411 --
412 -- Start of API User Hook for post_insert.
413 --
414 begin
415 --
416 ben_ecv_rki.after_insert
417 (
418 p_eligy_crit_values_id => p_rec.eligy_crit_values_id
419 ,p_eligy_prfl_id => p_rec.eligy_prfl_id
420 ,p_eligy_criteria_id => p_rec.eligy_criteria_id
421 ,p_effective_start_date => p_rec.effective_start_date
422 ,p_effective_end_date => p_rec.effective_end_date
423 ,p_ordr_num => p_rec.ordr_num
424 ,p_number_value1 => p_rec.number_value1
425 ,p_number_value2 => p_rec.number_value2
426 ,p_char_value1 => p_rec.char_value1
427 ,p_char_value2 => p_rec.char_value2
428 ,p_date_value1 => p_rec.date_value1
429 ,p_date_value2 => p_rec.date_value2
430 ,p_excld_flag => p_rec.excld_flag
431 ,p_business_group_id => p_rec.business_group_id
432 ,p_legislation_code => p_rec.legislation_code
433 ,p_ecv_attribute_category => p_rec.ecv_attribute_category
434 ,p_ecv_attribute1 => p_rec.ecv_attribute1
435 ,p_ecv_attribute2 => p_rec.ecv_attribute2
436 ,p_ecv_attribute3 => p_rec.ecv_attribute3
437 ,p_ecv_attribute4 => p_rec.ecv_attribute4
438 ,p_ecv_attribute5 => p_rec.ecv_attribute5
439 ,p_ecv_attribute6 => p_rec.ecv_attribute6
440 ,p_ecv_attribute7 => p_rec.ecv_attribute7
441 ,p_ecv_attribute8 => p_rec.ecv_attribute8
442 ,p_ecv_attribute9 => p_rec.ecv_attribute9
443 ,p_ecv_attribute10 => p_rec.ecv_attribute10
444 ,p_ecv_attribute11 => p_rec.ecv_attribute11
445 ,p_ecv_attribute12 => p_rec.ecv_attribute12
446 ,p_ecv_attribute13 => p_rec.ecv_attribute13
447 ,p_ecv_attribute14 => p_rec.ecv_attribute14
448 ,p_ecv_attribute15 => p_rec.ecv_attribute15
449 ,p_ecv_attribute16 => p_rec.ecv_attribute16
450 ,p_ecv_attribute17 => p_rec.ecv_attribute17
451 ,p_ecv_attribute18 => p_rec.ecv_attribute18
452 ,p_ecv_attribute19 => p_rec.ecv_attribute19
453 ,p_ecv_attribute20 => p_rec.ecv_attribute20
454 ,p_ecv_attribute21 => p_rec.ecv_attribute21
455 ,p_ecv_attribute22 => p_rec.ecv_attribute22
456 ,p_ecv_attribute23 => p_rec.ecv_attribute23
457 ,p_ecv_attribute24 => p_rec.ecv_attribute24
458 ,p_ecv_attribute25 => p_rec.ecv_attribute25
459 ,p_ecv_attribute26 => p_rec.ecv_attribute26
460 ,p_ecv_attribute27 => p_rec.ecv_attribute27
461 ,p_ecv_attribute28 => p_rec.ecv_attribute28
462 ,p_ecv_attribute29 => p_rec.ecv_attribute29
463 ,p_ecv_attribute30 => p_rec.ecv_attribute30
464 ,p_object_version_number => p_rec.object_version_number
465 ,p_effective_date => p_effective_date
466 ,p_validation_start_date => p_validation_start_date
467 ,p_validation_end_date => p_validation_end_date
468 ,p_criteria_score => p_rec.criteria_score
469 ,p_criteria_weight => p_rec.criteria_weight
470 ,p_char_value3 => p_rec.char_value3
471 ,p_char_value4 => p_rec.char_value4
472 ,p_number_value3 => p_rec.number_value3
473 ,p_number_value4 => p_rec.number_value4
474 ,p_date_value3 => p_rec.date_value3
475 ,p_date_value4 => p_rec.date_value4
476 );
477 --
478 exception
479 --
480 when hr_api.cannot_find_prog_unit then
481 --
482 hr_api.cannot_find_prog_unit_error
483 (p_module_name => 'ben_eligy_crit_values_f'
484 ,p_hook_type => 'AI');
485 --
486 end;
487 --
488 -- End of API User Hook for post_insert.
489 --
490 --
491 hr_utility.set_location(' Leaving:'||l_proc, 10);
492 End post_insert;
493 --
494 -- ----------------------------------------------------------------------------
495 -- |-------------------------------< ins_lck >--------------------------------|
496 -- ----------------------------------------------------------------------------
497 -- {Start Of Comments}
498 --
499 -- Description:
500 -- The ins_lck process has one main function to perform. When inserting
501 -- a datetracked row, we must validate the DT mode.
502 -- be manipulated.
503 --
504 -- Prerequisites:
505 -- This procedure can only be called for the datetrack mode of INSERT.
506 --
507 -- In Parameters:
508 --
509 -- Post Success:
510 -- On successful completion of the ins_lck process the parental
511 -- datetracked rows will be locked providing the p_enforce_foreign_locking
512 -- argument value is TRUE.
513 -- If the p_enforce_foreign_locking argument value is FALSE then the
514 -- parential rows are not locked.
515 --
516 -- Post Failure:
517 -- The Lck process can fail for:
518 -- 1) When attempting to lock the row the row could already be locked by
519 -- another user. This will raise the HR_Api.Object_Locked exception.
520 -- 2) When attempting to the lock the parent which doesn't exist.
521 -- For the entity to be locked the parent must exist!
522 --
523 -- Developer Implementation Notes:
524 -- None.
525 --
526 -- Access Status:
527 -- Internal Row Handler Use Only.
528 --
529 -- {End Of Comments}
530 -- ----------------------------------------------------------------------------
531 Procedure ins_lck
532 (p_effective_date in date,
533 p_datetrack_mode in varchar2,
534 p_rec in ben_ecv_shd.g_rec_type,
535 p_validation_start_date out nocopy date,
536 p_validation_end_date out nocopy date) is
537 --
538 l_proc varchar2(72) := g_package||'ins_lck';
539 l_validation_start_date date;
540 l_validation_end_date date;
541 --
542 Begin
543 hr_utility.set_location('Entering:'||l_proc, 5);
544 --
545 -- Validate the datetrack mode mode getting the validation start
546 -- and end dates for the specified datetrack operation.
547 --
548 dt_api.validate_dt_mode
549 (p_effective_date => p_effective_date,
550 p_datetrack_mode => p_datetrack_mode,
551 p_base_table_name => 'ben_eligy_crit_values_f',
552 p_base_key_column => 'eligy_crit_values_id',
553 p_base_key_value => p_rec.eligy_crit_values_id,
554 -- p_parent_table_name1 => 'ben_eligy_criteria',
555 -- p_parent_key_column1 => 'eligy_criteria_id',
556 -- p_parent_key_value1 => p_rec.eligy_criteria_id,
557 p_parent_table_name2 => 'ben_eligy_prfl_f',
558 p_parent_key_column2 => 'eligy_prfl_id',
559 p_parent_key_value2 => p_rec.eligy_prfl_id,
560 p_enforce_foreign_locking => true,
561 p_validation_start_date => l_validation_start_date,
562 p_validation_end_date => l_validation_end_date);
563 --
564 -- Set the validation start and end date OUT arguments
565 --
566 p_validation_start_date := l_validation_start_date;
567 p_validation_end_date := l_validation_end_date;
568 --
569 hr_utility.set_location(' Leaving:'||l_proc, 10);
570 --
571 End ins_lck;
572 --
573 -- ----------------------------------------------------------------------------
574 -- |---------------------------------< ins >----------------------------------|
575 -- ----------------------------------------------------------------------------
576 Procedure ins
577 (
578 p_rec in out nocopy ben_ecv_shd.g_rec_type,
579 p_effective_date in date
580 ) is
581 --
582 l_proc varchar2(72) := g_package||'ins';
583 l_datetrack_mode varchar2(30) := 'INSERT';
584 l_validation_start_date date;
585 l_validation_end_date date;
586 --
587 begin
588 hr_utility.set_location('Entering:'||l_proc, 5);
589 --
590 -- Call the lock operation
591 --
592 ins_lck
593 (p_effective_date => p_effective_date,
594 p_datetrack_mode => l_datetrack_mode,
595 p_rec => p_rec,
596 p_validation_start_date => l_validation_start_date,
597 p_validation_end_date => l_validation_end_date);
598 --
599 -- Call the supporting insert validate operations
600 --
601 ben_ecv_bus.insert_validate
602 (p_rec => p_rec,
603 p_effective_date => p_effective_date,
604 p_datetrack_mode => l_datetrack_mode,
605 p_validation_start_date => l_validation_start_date,
606 p_validation_end_date => l_validation_end_date);
607 --
608 -- Call the supporting pre-insert operation
609 --
610 pre_insert
611 (p_rec => p_rec,
612 p_effective_date => p_effective_date,
613 p_datetrack_mode => l_datetrack_mode,
614 p_validation_start_date => l_validation_start_date,
615 p_validation_end_date => l_validation_end_date);
616 --
617 -- Insert the row
618 --
619 insert_dml
620 (p_rec => p_rec,
621 p_effective_date => p_effective_date,
622 p_datetrack_mode => l_datetrack_mode,
623 p_validation_start_date => l_validation_start_date,
624 p_validation_end_date => l_validation_end_date);
625 --
626 -- Call the supporting post-insert operation
627 --
628 post_insert
629 (p_rec => p_rec,
630 p_effective_date => p_effective_date,
631 p_datetrack_mode => l_datetrack_mode,
632 p_validation_start_date => l_validation_start_date,
633 p_validation_end_date => l_validation_end_date);
634 end ins;
635 --
636 -- ----------------------------------------------------------------------------
637 -- |---------------------------------< ins >----------------------------------|
638 -- ----------------------------------------------------------------------------
639 Procedure ins
640 (
641 p_eligy_crit_values_id Out nocopy Number
642 ,p_eligy_prfl_id In Number default NULL
643 ,p_eligy_criteria_id In Number default NULL
644 ,p_effective_start_date Out nocopy Date
645 ,p_effective_end_date Out nocopy Date
646 ,p_ordr_num In Number default NULL
647 ,p_number_value1 In Number default NULL
648 ,p_number_value2 In Number default NULL
649 ,p_char_value1 In Varchar2 default NULL
650 ,p_char_value2 In Varchar2 default NULL
651 ,p_date_value1 In Date default NULL
652 ,p_date_value2 In Date default NULL
653 ,p_excld_flag In Varchar2 default 'N'
654 ,p_business_group_id In Number default NULL
655 ,p_legislation_code In varchar2 default NULL
656 ,p_ecv_attribute_category In Varchar2 default NULL
657 ,p_ecv_attribute1 In Varchar2 default NULL
658 ,p_ecv_attribute2 In Varchar2 default NULL
659 ,p_ecv_attribute3 In Varchar2 default NULL
660 ,p_ecv_attribute4 In Varchar2 default NULL
661 ,p_ecv_attribute5 In Varchar2 default NULL
662 ,p_ecv_attribute6 In Varchar2 default NULL
663 ,p_ecv_attribute7 In Varchar2 default NULL
664 ,p_ecv_attribute8 In Varchar2 default NULL
665 ,p_ecv_attribute9 In Varchar2 default NULL
666 ,p_ecv_attribute10 In Varchar2 default NULL
667 ,p_ecv_attribute11 In Varchar2 default NULL
668 ,p_ecv_attribute12 In Varchar2 default NULL
669 ,p_ecv_attribute13 In Varchar2 default NULL
670 ,p_ecv_attribute14 In Varchar2 default NULL
671 ,p_ecv_attribute15 In Varchar2 default NULL
672 ,p_ecv_attribute16 In Varchar2 default NULL
673 ,p_ecv_attribute17 In Varchar2 default NULL
674 ,p_ecv_attribute18 In Varchar2 default NULL
675 ,p_ecv_attribute19 In Varchar2 default NULL
676 ,p_ecv_attribute20 In Varchar2 default NULL
677 ,p_ecv_attribute21 In Varchar2 default NULL
678 ,p_ecv_attribute22 In Varchar2 default NULL
679 ,p_ecv_attribute23 In Varchar2 default NULL
680 ,p_ecv_attribute24 In Varchar2 default NULL
681 ,p_ecv_attribute25 In Varchar2 default NULL
682 ,p_ecv_attribute26 In Varchar2 default NULL
683 ,p_ecv_attribute27 In Varchar2 default NULL
684 ,p_ecv_attribute28 In Varchar2 default NULL
685 ,p_ecv_attribute29 In Varchar2 default NULL
686 ,p_ecv_attribute30 In Varchar2 default NULL
687 ,p_object_version_number Out nocopy Number
688 ,p_effective_date In Date
689 ,p_criteria_score In Number default NULL
690 ,p_criteria_weight In Number default NULL
691 ,p_char_value3 In Varchar2 default NULL
692 ,p_char_value4 In Varchar2 default NULL
693 ,p_number_value3 In Number default NULL
694 ,p_number_value4 In Number default NULL
695 ,p_date_value3 In Date default NULL
696 ,p_date_value4 In Date default NULL
697 ) is
698 --
699 l_rec ben_ecv_shd.g_rec_type;
700 l_proc varchar2(72) := g_package||'ins';
701 --
702
703 Begin
704 hr_utility.set_location('Entering:'||l_proc, 5);
705 --
706 -- Call conversion function to turn arguments into the
707 -- p_rec structure.
708 --
709 l_rec :=
710 ben_ecv_shd.convert_args
711 (
712 NULL,
713 p_eligy_prfl_id,
714 p_eligy_criteria_id,
715 NULL,
716 NULL,
717 p_ordr_num,
718 p_number_value1,
719 p_number_value2,
720 p_char_value1,
721 p_char_value2,
722 p_date_value1,
723 p_date_value2,
724 p_excld_flag,
725 p_business_group_id,
726 p_legislation_code,
727 p_ecv_attribute_category,
728 p_ecv_attribute1,
729 p_ecv_attribute2,
730 p_ecv_attribute3,
731 p_ecv_attribute4,
732 p_ecv_attribute5,
733 p_ecv_attribute6,
734 p_ecv_attribute7,
735 p_ecv_attribute8,
736 p_ecv_attribute9,
737 p_ecv_attribute10,
738 p_ecv_attribute11,
739 p_ecv_attribute12,
740 p_ecv_attribute13,
741 p_ecv_attribute14,
742 p_ecv_attribute15,
743 p_ecv_attribute16,
744 p_ecv_attribute17,
745 p_ecv_attribute18,
746 p_ecv_attribute19,
747 p_ecv_attribute20,
748 p_ecv_attribute21,
749 p_ecv_attribute22,
750 p_ecv_attribute23,
751 p_ecv_attribute24,
752 p_ecv_attribute25,
753 p_ecv_attribute26,
754 p_ecv_attribute27,
755 p_ecv_attribute28,
756 p_ecv_attribute29,
757 p_ecv_attribute30,
758 NULL,
759 p_criteria_score,
760 p_criteria_weight,
761 p_char_value3,
762 p_char_value4,
763 p_number_value3,
764 p_number_value4,
765 p_date_value3,
766 p_date_value4
767 );
768 --
769 -- Having converted the arguments into the ben_ecv_rec
770 -- plsql record structure we call the corresponding record
771 -- business process.
772 --
773 ins(l_rec, p_effective_date);
774 --
775 -- Set the OUT arguments.
776 --
777 p_eligy_crit_values_id := l_rec.eligy_crit_values_id;
778 p_effective_start_date := l_rec.effective_start_date;
779 p_effective_end_date := l_rec.effective_end_date;
780 p_object_version_number := l_rec.object_version_number;
781 --
782 --
783 hr_utility.set_location(' Leaving:'||l_proc, 10);
784 end ins;
785 --
786 end ben_ecv_ins;