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