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