[Home] [Help]
PACKAGE BODY: APPS.BEN_PRG_INS
Source
1 Package Body ben_prg_ins as
2 /* $Header: beprgrhi.pkb 120.1 2008/02/05 09:42:42 rtagarra noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_prg_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_prg_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_pl_regn_f t
70 where t.pl_regn_id = p_rec.pl_regn_id
71 and t.effective_start_date =
72 ben_prg_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_pl_regn_f.created_by%TYPE;
77 l_creation_date ben_pl_regn_f.creation_date%TYPE;
78 l_last_update_date ben_pl_regn_f.last_update_date%TYPE;
79 l_last_updated_by ben_pl_regn_f.last_updated_by%TYPE;
80 l_last_update_login ben_pl_regn_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_pl_regn_f',
90 p_base_key_column => 'pl_regn_id',
91 p_base_key_value => p_rec.pl_regn_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_prg_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_pl_regn_f
132 --
133 insert into ben_pl_regn_f
134 ( pl_regn_id,
135 effective_end_date,
136 effective_start_date,
137 business_group_id,
138 regn_id,
139 pl_id,
140 rptg_grp_id,
141 hghly_compd_det_rl,
142 key_ee_det_rl,
143 cntr_nndscrn_rl,
144 cvg_nndscrn_rl,
145 five_pct_ownr_rl,
146 regy_pl_typ_cd,
147 prg_attribute_category,
148 prg_attribute1,
149 prg_attribute2,
150 prg_attribute3,
151 prg_attribute4,
152 prg_attribute5,
153 prg_attribute6,
154 prg_attribute7,
155 prg_attribute8,
156 prg_attribute9,
157 prg_attribute10,
158 prg_attribute11,
159 prg_attribute12,
160 prg_attribute13,
161 prg_attribute14,
162 prg_attribute15,
163 prg_attribute16,
164 prg_attribute17,
165 prg_attribute18,
166 prg_attribute19,
167 prg_attribute20,
168 prg_attribute21,
169 prg_attribute22,
170 prg_attribute23,
171 prg_attribute24,
172 prg_attribute25,
173 prg_attribute26,
174 prg_attribute27,
175 prg_attribute28,
176 prg_attribute29,
177 prg_attribute30,
178 object_version_number
179 , created_by,
180 creation_date,
181 last_update_date,
182 last_updated_by,
183 last_update_login
184 )
185 Values
186 ( p_rec.pl_regn_id,
187 p_rec.effective_end_date,
188 p_rec.effective_start_date,
189 p_rec.business_group_id,
190 p_rec.regn_id,
191 p_rec.pl_id,
192 p_rec.rptg_grp_id,
193 p_rec.hghly_compd_det_rl,
194 p_rec.key_ee_det_rl,
195 p_rec.cntr_nndscrn_rl,
196 p_rec.cvg_nndscrn_rl,
197 p_rec.five_pct_ownr_rl,
198 p_rec.regy_pl_typ_cd,
199 p_rec.prg_attribute_category,
200 p_rec.prg_attribute1,
201 p_rec.prg_attribute2,
202 p_rec.prg_attribute3,
203 p_rec.prg_attribute4,
204 p_rec.prg_attribute5,
205 p_rec.prg_attribute6,
206 p_rec.prg_attribute7,
207 p_rec.prg_attribute8,
208 p_rec.prg_attribute9,
209 p_rec.prg_attribute10,
210 p_rec.prg_attribute11,
211 p_rec.prg_attribute12,
212 p_rec.prg_attribute13,
213 p_rec.prg_attribute14,
214 p_rec.prg_attribute15,
215 p_rec.prg_attribute16,
216 p_rec.prg_attribute17,
217 p_rec.prg_attribute18,
218 p_rec.prg_attribute19,
219 p_rec.prg_attribute20,
220 p_rec.prg_attribute21,
221 p_rec.prg_attribute22,
222 p_rec.prg_attribute23,
223 p_rec.prg_attribute24,
224 p_rec.prg_attribute25,
225 p_rec.prg_attribute26,
226 p_rec.prg_attribute27,
227 p_rec.prg_attribute28,
228 p_rec.prg_attribute29,
229 p_rec.prg_attribute30,
230 p_rec.object_version_number
231 , l_created_by,
232 l_creation_date,
233 l_last_update_date,
234 l_last_updated_by,
235 l_last_update_login
236 );
237 --
238 ben_prg_shd.g_api_dml := false; -- Unset the api dml status
239 hr_utility.set_location(' Leaving:'||l_proc, 15);
240 --
241 Exception
242 When hr_api.check_integrity_violated Then
243 -- A check constraint has been violated
244 ben_prg_shd.g_api_dml := false; -- Unset the api dml status
245 ben_prg_shd.constraint_error
246 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
247 When hr_api.unique_integrity_violated Then
248 -- Unique integrity has been violated
249 ben_prg_shd.g_api_dml := false; -- Unset the api dml status
250 ben_prg_shd.constraint_error
251 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
252 When Others Then
253 ben_prg_shd.g_api_dml := false; -- Unset the api dml status
254 Raise;
255 End dt_insert_dml;
256 --
257 -- ----------------------------------------------------------------------------
258 -- |------------------------------< insert_dml >------------------------------|
259 -- ----------------------------------------------------------------------------
260 Procedure insert_dml
261 (p_rec in out nocopy ben_prg_shd.g_rec_type,
262 p_effective_date in date,
263 p_datetrack_mode in varchar2,
264 p_validation_start_date in date,
265 p_validation_end_date in date) is
266 --
267 l_proc varchar2(72) := g_package||'insert_dml';
268 --
269 Begin
270 hr_utility.set_location('Entering:'||l_proc, 5);
271 --
272 dt_insert_dml(p_rec => p_rec,
273 p_effective_date => p_effective_date,
274 p_datetrack_mode => p_datetrack_mode,
275 p_validation_start_date => p_validation_start_date,
276 p_validation_end_date => p_validation_end_date);
277 --
278 hr_utility.set_location(' Leaving:'||l_proc, 10);
279 End insert_dml;
280 --
281 -- ----------------------------------------------------------------------------
282 -- |------------------------------< pre_insert >------------------------------|
283 -- ----------------------------------------------------------------------------
284 -- {Start Of Comments}
285 --
286 -- Description:
287 -- This private procedure contains any processing which is required before
288 -- the insert dml. Presently, if the entity has a corresponding primary
289 -- key which is maintained by an associating sequence, the primary key for
290 -- the entity will be populated with the next sequence value in
291 -- preparation for the insert dml.
292 -- Also, if comments are defined for this entity, the comments insert
293 -- logic will also be called, generating a comment_id if required.
294 --
295 -- Prerequisites:
296 -- This is an internal procedure which is called from the ins procedure.
297 --
298 -- In Parameters:
299 -- A Pl/Sql record structre.
300 --
301 -- Post Success:
302 -- Processing continues.
303 --
304 -- Post Failure:
305 -- If an error has occurred, an error message and exception will be raised
306 -- but not handled.
307 --
308 -- Developer Implementation Notes:
309 -- Any pre-processing required before the insert dml is issued should be
310 -- coded within this procedure. As stated above, a good example is the
311 -- generation of a primary key number via a corresponding sequence.
312 -- It is important to note that any 3rd party maintenance should be reviewed
313 -- before placing in this procedure.
314 --
315 -- Access Status:
316 -- Internal Row Handler Use Only.
317 --
318 -- {End Of Comments}
319 -- ----------------------------------------------------------------------------
320 Procedure pre_insert
321 (p_rec in out nocopy ben_prg_shd.g_rec_type,
322 p_effective_date in date,
323 p_datetrack_mode in varchar2,
324 p_validation_start_date in date,
325 p_validation_end_date in date) is
326 --
327 l_proc varchar2(72) := g_package||'pre_insert';
328 --
329 cursor c1 is
330 select ben_pl_regn_f_s.nextval
331 from sys.dual;
332 --
333 Begin
334 hr_utility.set_location('Entering:'||l_proc, 5);
335 --
336 open c1;
337 --
338 fetch c1 into p_rec.pl_regn_id;
339 --
340 close c1;
341 --
342 hr_utility.set_location(' Leaving:'||l_proc, 10);
343 End pre_insert;
344 --
345 -- ----------------------------------------------------------------------------
346 -- |-----------------------------< post_insert >------------------------------|
347 -- ----------------------------------------------------------------------------
348 -- {Start Of Comments}
349 --
350 -- Description:
351 -- This private procedure contains any processing which is required after the
352 -- insert dml.
353 --
354 -- Prerequisites:
355 -- This is an internal procedure which is called from the ins procedure.
356 --
357 -- In Parameters:
358 -- A Pl/Sql record structre.
359 --
360 -- Post Success:
361 -- Processing continues.
362 --
363 -- Post Failure:
364 -- If an error has occurred, an error message and exception will be raised
365 -- but not handled.
366 --
367 -- Developer Implementation Notes:
368 -- Any post-processing required after the insert dml is issued should be
369 -- coded within this procedure. It is important to note that any 3rd party
370 -- maintenance should be reviewed before placing in this procedure.
371 --
372 -- Access Status:
373 -- Internal Row Handler Use Only.
374 --
375 -- {End Of Comments}
376 -- ----------------------------------------------------------------------------
377 Procedure post_insert
378 (p_rec in ben_prg_shd.g_rec_type,
379 p_effective_date in date,
380 p_datetrack_mode in varchar2,
381 p_validation_start_date in date,
382 p_validation_end_date in date) is
383 --
384 l_proc varchar2(72) := g_package||'post_insert';
385 --
386 Begin
387 hr_utility.set_location('Entering:'||l_proc, 5);
388 --
389 --
390 -- Start of API User Hook for post_insert.
391 --
392 begin
393 --
394 ben_prg_rki.after_insert
395 (
396 p_pl_regn_id => p_rec.pl_regn_id
397 ,p_effective_end_date => p_rec.effective_end_date
398 ,p_effective_start_date => p_rec.effective_start_date
402 ,p_rptg_grp_id => p_rec.rptg_grp_id
399 ,p_business_group_id => p_rec.business_group_id
400 ,p_regn_id => p_rec.regn_id
401 ,p_pl_id => p_rec.pl_id
403 ,p_hghly_compd_det_rl => p_rec.hghly_compd_det_rl
404 ,p_key_ee_det_rl => p_rec.key_ee_det_rl
405 ,p_cntr_nndscrn_rl => p_rec.cntr_nndscrn_rl
406 ,p_cvg_nndscrn_rl => p_rec.cvg_nndscrn_rl
407 ,p_five_pct_ownr_rl => p_rec.five_pct_ownr_rl
408 ,p_regy_pl_typ_cd => p_rec.regy_pl_typ_cd
409 ,p_prg_attribute_category => p_rec.prg_attribute_category
410 ,p_prg_attribute1 => p_rec.prg_attribute1
411 ,p_prg_attribute2 => p_rec.prg_attribute2
412 ,p_prg_attribute3 => p_rec.prg_attribute3
413 ,p_prg_attribute4 => p_rec.prg_attribute4
414 ,p_prg_attribute5 => p_rec.prg_attribute5
415 ,p_prg_attribute6 => p_rec.prg_attribute6
416 ,p_prg_attribute7 => p_rec.prg_attribute7
417 ,p_prg_attribute8 => p_rec.prg_attribute8
418 ,p_prg_attribute9 => p_rec.prg_attribute9
419 ,p_prg_attribute10 => p_rec.prg_attribute10
420 ,p_prg_attribute11 => p_rec.prg_attribute11
421 ,p_prg_attribute12 => p_rec.prg_attribute12
422 ,p_prg_attribute13 => p_rec.prg_attribute13
423 ,p_prg_attribute14 => p_rec.prg_attribute14
424 ,p_prg_attribute15 => p_rec.prg_attribute15
425 ,p_prg_attribute16 => p_rec.prg_attribute16
426 ,p_prg_attribute17 => p_rec.prg_attribute17
427 ,p_prg_attribute18 => p_rec.prg_attribute18
428 ,p_prg_attribute19 => p_rec.prg_attribute19
429 ,p_prg_attribute20 => p_rec.prg_attribute20
430 ,p_prg_attribute21 => p_rec.prg_attribute21
431 ,p_prg_attribute22 => p_rec.prg_attribute22
432 ,p_prg_attribute23 => p_rec.prg_attribute23
433 ,p_prg_attribute24 => p_rec.prg_attribute24
434 ,p_prg_attribute25 => p_rec.prg_attribute25
435 ,p_prg_attribute26 => p_rec.prg_attribute26
436 ,p_prg_attribute27 => p_rec.prg_attribute27
437 ,p_prg_attribute28 => p_rec.prg_attribute28
438 ,p_prg_attribute29 => p_rec.prg_attribute29
439 ,p_prg_attribute30 => p_rec.prg_attribute30
440 ,p_object_version_number => p_rec.object_version_number
441 ,p_effective_date => p_effective_date
442 ,p_validation_start_date => p_validation_start_date
443 ,p_validation_end_date => p_validation_end_date
444 );
445 --
446 exception
447 --
448 when hr_api.cannot_find_prog_unit then
449 --
450 hr_api.cannot_find_prog_unit_error
451 (p_module_name => 'ben_pl_regn_f'
452 ,p_hook_type => 'AI');
453 --
454 end;
455 --
456 -- End of API User Hook for post_insert.
457 --
458 hr_utility.set_location(' Leaving:'||l_proc, 10);
459 End post_insert;
460 --
461 -- ----------------------------------------------------------------------------
462 -- |-------------------------------< ins_lck >--------------------------------|
463 -- ----------------------------------------------------------------------------
464 -- {Start Of Comments}
465 --
466 -- Description:
467 -- The ins_lck process has one main function to perform. When inserting
468 -- a datetracked row, we must validate the DT mode.
469 -- be manipulated.
470 --
471 -- Prerequisites:
472 -- This procedure can only be called for the datetrack mode of INSERT.
473 --
474 -- In Parameters:
475 --
476 -- Post Success:
477 -- On successful completion of the ins_lck process the parental
478 -- datetracked rows will be locked providing the p_enforce_foreign_locking
479 -- argument value is TRUE.
480 -- If the p_enforce_foreign_locking argument value is FALSE then the
481 -- parential rows are not locked.
482 --
483 -- Post Failure:
484 -- The Lck process can fail for:
485 -- 1) When attempting to lock the row the row could already be locked by
486 -- another user. This will raise the HR_Api.Object_Locked exception.
487 -- 2) When attempting to the lock the parent which doesn't exist.
488 -- For the entity to be locked the parent must exist!
489 --
490 -- Developer Implementation Notes:
491 -- None.
492 --
493 -- Access Status:
494 -- Internal Row Handler Use Only.
495 --
496 -- {End Of Comments}
497 -- ----------------------------------------------------------------------------
498 Procedure ins_lck
499 (p_effective_date in date,
500 p_datetrack_mode in varchar2,
501 p_rec in ben_prg_shd.g_rec_type,
502 p_validation_start_date out nocopy date,
503 p_validation_end_date out nocopy date) is
504 --
505 l_proc varchar2(72) := g_package||'ins_lck';
506 l_validation_start_date date;
507 l_validation_end_date date;
508 --
509 Begin
510 hr_utility.set_location('Entering:'||l_proc, 5);
511 --
512 -- Validate the datetrack mode mode getting the validation start
513 -- and end dates for the specified datetrack operation.
514 --
515 dt_api.validate_dt_mode
516 (p_effective_date => p_effective_date,
517 p_datetrack_mode => p_datetrack_mode,
518 p_base_table_name => 'ben_pl_regn_f',
519 p_base_key_column => 'pl_regn_id',
520 p_base_key_value => p_rec.pl_regn_id,
521 p_parent_table_name1 => 'ff_formulas_f',
522 p_parent_key_column1 => 'formula_id',
523 p_parent_key_value1 => p_rec.hghly_compd_det_rl,
524 p_parent_table_name2 => 'ff_formulas_f',
525 p_parent_key_column2 => 'formula_id',
526 p_parent_key_value2 => p_rec.key_ee_det_rl,
527 p_parent_table_name3 => 'ff_formulas_f',
528 p_parent_key_column3 => 'formula_id',
529 p_parent_key_value3 => p_rec.cntr_nndscrn_rl,
530 p_parent_table_name4 => 'ff_formulas_f',
531 p_parent_key_column4 => 'formula_id',
532 p_parent_key_value4 => p_rec.cvg_nndscrn_rl,
533 p_parent_table_name5 => 'ff_formulas_f',
534 p_parent_key_column5 => 'formula_id',
535 p_parent_key_value5 => p_rec.five_pct_ownr_rl,
536 p_parent_table_name6 => 'ben_regn_f',
537 p_parent_key_column6 => 'regn_id',
538 p_parent_key_value6 => p_rec.regn_id,
539 p_parent_table_name7 => 'ben_pl_f',
540 p_parent_key_column7 => 'pl_id',
541 p_parent_key_value7 => p_rec.pl_id,
542 p_enforce_foreign_locking => true,
543 p_validation_start_date => l_validation_start_date,
544 p_validation_end_date => l_validation_end_date);
545 --
546 -- Set the validation start and end date OUT arguments
547 --
548 p_validation_start_date := l_validation_start_date;
549 p_validation_end_date := l_validation_end_date;
550 --
551 hr_utility.set_location(' Leaving:'||l_proc, 10);
552 --
553 End ins_lck;
554 --
555 -- ----------------------------------------------------------------------------
556 -- |---------------------------------< ins >----------------------------------|
557 -- ----------------------------------------------------------------------------
558 Procedure ins
559 (
560 p_rec in out nocopy ben_prg_shd.g_rec_type,
561 p_effective_date in date
562 ) is
563 --
564 l_proc varchar2(72) := g_package||'ins';
565 l_datetrack_mode varchar2(30) := 'INSERT';
566 l_validation_start_date date;
567 l_validation_end_date date;
568 --
569 Begin
570 hr_utility.set_location('Entering:'||l_proc, 5);
571 --
572 -- Call the lock operation
573 --
574 ins_lck
575 (p_effective_date => p_effective_date,
576 p_datetrack_mode => l_datetrack_mode,
577 p_rec => p_rec,
578 p_validation_start_date => l_validation_start_date,
579 p_validation_end_date => l_validation_end_date);
580 --
581 -- Call the supporting insert validate operations
582 --
583 ben_prg_bus.insert_validate
584 (p_rec => p_rec,
585 p_effective_date => p_effective_date,
586 p_datetrack_mode => l_datetrack_mode,
587 p_validation_start_date => l_validation_start_date,
588 p_validation_end_date => l_validation_end_date);
589 --
590 -- Call the supporting pre-insert operation
591 --
592 pre_insert
593 (p_rec => p_rec,
594 p_effective_date => p_effective_date,
595 p_datetrack_mode => l_datetrack_mode,
596 p_validation_start_date => l_validation_start_date,
597 p_validation_end_date => l_validation_end_date);
598 --
599 -- Insert the row
600 --
601 insert_dml
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 post-insert operation
609 --
610 post_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 end ins;
617 --
618 -- ----------------------------------------------------------------------------
619 -- |---------------------------------< ins >----------------------------------|
620 -- ----------------------------------------------------------------------------
621 Procedure ins
622 (
623 p_pl_regn_id out nocopy number,
624 p_effective_end_date out nocopy date,
625 p_effective_start_date out nocopy date,
626 p_business_group_id in number,
627 p_regn_id in number,
628 p_pl_id in number,
629 p_rptg_grp_id in number default null,
630 p_hghly_compd_det_rl in number default null,
631 p_key_ee_det_rl in number default null,
632 p_cntr_nndscrn_rl in number default null,
633 p_cvg_nndscrn_rl in number default null,
634 p_five_pct_ownr_rl in number default null,
635 p_regy_pl_typ_cd in varchar2 default null,
636 p_prg_attribute_category in varchar2 default null,
637 p_prg_attribute1 in varchar2 default null,
638 p_prg_attribute2 in varchar2 default null,
639 p_prg_attribute3 in varchar2 default null,
640 p_prg_attribute4 in varchar2 default null,
641 p_prg_attribute5 in varchar2 default null,
642 p_prg_attribute6 in varchar2 default null,
643 p_prg_attribute7 in varchar2 default null,
644 p_prg_attribute8 in varchar2 default null,
645 p_prg_attribute9 in varchar2 default null,
646 p_prg_attribute10 in varchar2 default null,
647 p_prg_attribute11 in varchar2 default null,
648 p_prg_attribute12 in varchar2 default null,
649 p_prg_attribute13 in varchar2 default null,
650 p_prg_attribute14 in varchar2 default null,
651 p_prg_attribute15 in varchar2 default null,
652 p_prg_attribute16 in varchar2 default null,
653 p_prg_attribute17 in varchar2 default null,
654 p_prg_attribute18 in varchar2 default null,
655 p_prg_attribute19 in varchar2 default null,
656 p_prg_attribute20 in varchar2 default null,
657 p_prg_attribute21 in varchar2 default null,
658 p_prg_attribute22 in varchar2 default null,
659 p_prg_attribute23 in varchar2 default null,
660 p_prg_attribute24 in varchar2 default null,
661 p_prg_attribute25 in varchar2 default null,
662 p_prg_attribute26 in varchar2 default null,
663 p_prg_attribute27 in varchar2 default null,
664 p_prg_attribute28 in varchar2 default null,
665 p_prg_attribute29 in varchar2 default null,
666 p_prg_attribute30 in varchar2 default null,
667 p_object_version_number out nocopy number,
668 p_effective_date in date
669 ) is
670 --
671 l_rec ben_prg_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_prg_shd.convert_args
682 (
683 null,
684 null,
685 null,
686 p_business_group_id,
687 p_regn_id,
688 p_pl_id,
689 p_rptg_grp_id,
690 p_hghly_compd_det_rl,
691 p_key_ee_det_rl,
692 p_cntr_nndscrn_rl,
693 p_cvg_nndscrn_rl,
694 p_five_pct_ownr_rl,
695 p_regy_pl_typ_cd,
696 p_prg_attribute_category,
697 p_prg_attribute1,
698 p_prg_attribute2,
699 p_prg_attribute3,
700 p_prg_attribute4,
701 p_prg_attribute5,
702 p_prg_attribute6,
703 p_prg_attribute7,
704 p_prg_attribute8,
705 p_prg_attribute9,
706 p_prg_attribute10,
707 p_prg_attribute11,
708 p_prg_attribute12,
709 p_prg_attribute13,
710 p_prg_attribute14,
711 p_prg_attribute15,
712 p_prg_attribute16,
713 p_prg_attribute17,
714 p_prg_attribute18,
715 p_prg_attribute19,
716 p_prg_attribute20,
717 p_prg_attribute21,
718 p_prg_attribute22,
719 p_prg_attribute23,
720 p_prg_attribute24,
721 p_prg_attribute25,
722 p_prg_attribute26,
723 p_prg_attribute27,
724 p_prg_attribute28,
725 p_prg_attribute29,
726 p_prg_attribute30,
727 null
728 );
729 --
730 -- Having converted the arguments into the ben_prg_rec
731 -- plsql record structure we call the corresponding record
732 -- business process.
733 --
734 ins(l_rec, p_effective_date);
735 --
736 -- Set the OUT arguments.
737 --
738 p_pl_regn_id := l_rec.pl_regn_id;
739 p_effective_start_date := l_rec.effective_start_date;
740 p_effective_end_date := l_rec.effective_end_date;
741 p_object_version_number := l_rec.object_version_number;
742 --
743 --
744 hr_utility.set_location(' Leaving:'||l_proc, 10);
745 End ins;
746 --
747 end ben_prg_ins;