DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_VEP_INS

Source


1 Package Body ben_vep_ins as
2 /* $Header: beveprhi.pkb 120.1.12020000.2 2012/07/26 10:36:02 usaraswa ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_vep_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 structure.
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.
46 --   g_api_dml status is reset.
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
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_vep_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
63   ) is
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_VRBL_RT_ELIG_PRFL_f t
70     where  t.vrbl_rt_elig_prfl_id       = p_rec.vrbl_rt_elig_prfl_id
71     and    t.effective_start_date =
72              ben_vep_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_VRBL_RT_ELIG_PRFL_f.created_by%TYPE;
77   l_creation_date       BEN_VRBL_RT_ELIG_PRFL_f.creation_date%TYPE;
78   l_last_update_date   	BEN_VRBL_RT_ELIG_PRFL_f.last_update_date%TYPE;
79   l_last_updated_by     BEN_VRBL_RT_ELIG_PRFL_f.last_updated_by%TYPE;
80   l_last_update_login   BEN_VRBL_RT_ELIG_PRFL_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_VRBL_RT_ELIG_PRFL_f'
90       ,p_base_key_column => 'VRBL_RT_ELIG_PRFL_ID'
91       ,p_base_key_value  => p_rec.vrbl_rt_elig_prfl_id
92       );
93   --
94   -- Set the effective start and end dates to the corresponding
95   -- validation start and end dates
96   --
97   p_rec.effective_start_date := p_validation_start_date;
98   p_rec.effective_end_date   := p_validation_end_date;
99   --
100   -- If the datetrack_mode is not INSERT then we must populate the WHO
101   -- columns with the 'old' creation values and 'new' updated values.
102   --
103   If (p_datetrack_mode <> hr_api.g_insert) then
104     hr_utility.set_location(l_proc, 10);
105     --
106     -- Select the 'old' created values
107     --
108     Open C_Sel1;
109     Fetch C_Sel1 Into l_created_by, l_creation_date;
110     If C_Sel1%notfound Then
111       --
112       -- The previous 'old' created row has not been found. We need
113       -- to error as an internal datetrack problem exists.
114       --
115       Close C_Sel1;
116       fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
117       fnd_message.set_token('PROCEDURE', l_proc);
118       fnd_message.set_token('STEP','10');
119       fnd_message.raise_error;
120     End If;
121     Close C_Sel1;
122     --
123     -- Set the AOL updated WHO values
124     --
125     l_last_update_date   := sysdate;
126     l_last_updated_by    := fnd_global.user_id;
127     l_last_update_login  := fnd_global.login_id;
128   End If;
129   --
130   ben_vep_shd.g_api_dml := true;  -- Set the api dml status
131   --
132   -- Insert the row into: BEN_VRBL_RT_ELIG_PRFL_f
133   --
134   insert into BEN_VRBL_RT_ELIG_PRFL_f
135       (vrbl_rt_elig_prfl_id
136       ,effective_start_date
137       ,effective_end_date
138       ,business_group_id
139       ,vrbl_rt_prfl_id
140       ,eligy_prfl_id
141       ,mndtry_flag
142       ,vep_attribute_category
143       ,vep_attribute1
144       ,vep_attribute2
145       ,vep_attribute3
146       ,vep_attribute4
147       ,vep_attribute5
148       ,vep_attribute6
149       ,vep_attribute7
150       ,vep_attribute8
151       ,vep_attribute9
152       ,vep_attribute10
153       ,vep_attribute11
154       ,vep_attribute12
155       ,vep_attribute13
156       ,vep_attribute14
157       ,vep_attribute15
158       ,vep_attribute16
159       ,vep_attribute17
160       ,vep_attribute18
161       ,vep_attribute19
162       ,vep_attribute20
163       ,vep_attribute21
164       ,vep_attribute22
165       ,vep_attribute23
166       ,vep_attribute24
167       ,vep_attribute25
168       ,vep_attribute26
169       ,vep_attribute27
170       ,vep_attribute28
171       ,vep_attribute29
172       ,vep_attribute30
173       ,object_version_number
174       ,created_by
175       ,creation_date
176       ,last_update_date
177       ,last_updated_by
178       ,last_update_login
179       )
180   Values
181     (p_rec.vrbl_rt_elig_prfl_id
182     ,p_rec.effective_start_date
183     ,p_rec.effective_end_date
184     ,p_rec.business_group_id
185     ,p_rec.vrbl_rt_prfl_id
186     ,p_rec.eligy_prfl_id
187     ,p_rec.mndtry_flag
188     ,p_rec.vep_attribute_category
189     ,p_rec.vep_attribute1
190     ,p_rec.vep_attribute2
191     ,p_rec.vep_attribute3
192     ,p_rec.vep_attribute4
193     ,p_rec.vep_attribute5
194     ,p_rec.vep_attribute6
195     ,p_rec.vep_attribute7
196     ,p_rec.vep_attribute8
197     ,p_rec.vep_attribute9
201     ,p_rec.vep_attribute13
198     ,p_rec.vep_attribute10
199     ,p_rec.vep_attribute11
200     ,p_rec.vep_attribute12
202     ,p_rec.vep_attribute14
203     ,p_rec.vep_attribute15
204     ,p_rec.vep_attribute16
205     ,p_rec.vep_attribute17
206     ,p_rec.vep_attribute18
207     ,p_rec.vep_attribute19
208     ,p_rec.vep_attribute20
209     ,p_rec.vep_attribute21
210     ,p_rec.vep_attribute22
211     ,p_rec.vep_attribute23
212     ,p_rec.vep_attribute24
213     ,p_rec.vep_attribute25
214     ,p_rec.vep_attribute26
215     ,p_rec.vep_attribute27
216     ,p_rec.vep_attribute28
217     ,p_rec.vep_attribute29
218     ,p_rec.vep_attribute30
219     ,p_rec.object_version_number
220     ,l_created_by
221     ,l_creation_date
222     ,l_last_update_date
223     ,l_last_updated_by
224     ,l_last_update_login
225     );
226   --
227   ben_vep_shd.g_api_dml := false;   -- Unset the api dml status
228   hr_utility.set_location(' Leaving:'||l_proc, 15);
229 --
230 Exception
231   When hr_api.check_integrity_violated Then
232     -- A check constraint has been violated
233     ben_vep_shd.g_api_dml := false;   -- Unset the api dml status
234     ben_vep_shd.constraint_error
235       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
236   When hr_api.unique_integrity_violated Then
237     -- Unique integrity has been violated
238     ben_vep_shd.g_api_dml := false;   -- Unset the api dml status
239     ben_vep_shd.constraint_error
240       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
241   When Others Then
242     ben_vep_shd.g_api_dml := false;   -- Unset the api dml status
243     Raise;
244 End dt_insert_dml;
245 --
246 -- ----------------------------------------------------------------------------
247 -- |------------------------------< insert_dml >------------------------------|
248 -- ----------------------------------------------------------------------------
249 Procedure insert_dml
250   (p_rec                   in out nocopy ben_vep_shd.g_rec_type
251   ,p_effective_date        in date
252   ,p_datetrack_mode        in varchar2
253   ,p_validation_start_date in date
254   ,p_validation_end_date   in date
255   ) is
256 --
257   l_proc	varchar2(72) := g_package||'insert_dml';
258 --
259 Begin
260   hr_utility.set_location('Entering:'||l_proc, 5);
261   --
262   ben_vep_ins.dt_insert_dml
263     (p_rec                   => p_rec
264     ,p_effective_date        => p_effective_date
265     ,p_datetrack_mode        => p_datetrack_mode
266     ,p_validation_start_date => p_validation_start_date
267     ,p_validation_end_date   => p_validation_end_date
268     );
269   --
270   hr_utility.set_location(' Leaving:'||l_proc, 10);
271 End insert_dml;
272 --
273 -- ----------------------------------------------------------------------------
274 -- |------------------------------< pre_insert >------------------------------|
275 -- ----------------------------------------------------------------------------
276 -- {Start Of Comments}
277 --
278 -- Description:
279 --   This private procedure contains any processing which is required before
280 --   the insert dml. Presently, if the entity has a corresponding primary
281 --   key which is maintained by an associating sequence, the primary key for
282 --   the entity will be populated with the next sequence value in
283 --   preparation for the insert dml.
284 --   Also, if comments are defined for this entity, the comments insert
285 --   logic will also be called, generating a comment_id if required.
286 --
287 -- Prerequisites:
288 --   This is an internal procedure which is called from the ins procedure.
289 --
290 -- In Parameters:
291 --   A Pl/Sql record structure.
292 --
293 -- Post Success:
294 --   Processing continues.
295 --
296 -- Post Failure:
297 --   If an error has occurred, an error message and exception will be raised
298 --   but not handled.
299 --
300 -- Developer Implementation Notes:
301 --   Any pre-processing required before the insert dml is issued should be
302 --   coded within this procedure. As stated above, a good example is the
303 --   generation of a primary key number via a corresponding sequence.
304 --   It is important to note that any 3rd party maintenance should be reviewed
305 --   before placing in this procedure.
306 --
307 -- Access Status:
308 --   Internal Row Handler Use Only.
309 --
310 -- {End Of Comments}
311 -- ----------------------------------------------------------------------------
312 Procedure pre_insert
313   (p_rec                   in out nocopy ben_vep_shd.g_rec_type
314   ,p_effective_date        in date
315   ,p_datetrack_mode        in varchar2
316   ,p_validation_start_date in date
317   ,p_validation_end_date   in date
318   ) is
319 --
320   l_proc	varchar2(72) := g_package||'pre_insert';
321 --
322   Cursor C_Sel1 is select BEN_VRBL_RT_ELIG_PRFL_s.nextval from sys.dual;
323 --
324 Begin
325   hr_utility.set_location('Entering:'||l_proc, 5);
326   --
327   --
328   -- Select the next sequence number
329   --
330   Open C_Sel1;
331   Fetch C_Sel1 Into p_rec.vrbl_rt_elig_prfl_id;
332   Close C_Sel1;
333   --
334   --
335   hr_utility.set_location(' Leaving:'||l_proc, 10);
336 End pre_insert;
337 --
338 -- ----------------------------------------------------------------------------
339 -- |----------------------------< post_insert >-------------------------------|
340 -- ----------------------------------------------------------------------------
341 -- {Start Of Comments}
342 --
343 -- Description:
344 --   This private procedure contains any processing which is required after the
345 --   insert dml.
346 --
347 -- Prerequisites:
348 --   This is an internal procedure which is called from the ins procedure.
349 --
350 -- In Parameters:
351 --   A Pl/Sql record structure.
352 --
353 -- Post Success:
354 --   Processing continues.
355 --
356 -- Post Failure:
357 --   If an error has occurred, an error message and exception will be raised
358 --   but not handled.
359 --
360 -- Developer Implementation Notes:
361 --   Any post-processing required after the insert dml is issued should be
362 --   coded within this procedure. It is important to note that any 3rd party
363 --   maintenance should be reviewed before placing in this procedure.
364 --
365 -- Access Status:
366 --   Internal Row Handler Use Only.
367 --
368 -- {End Of Comments}
369 -- ----------------------------------------------------------------------------
370 Procedure post_insert
371   (p_rec                   in ben_vep_shd.g_rec_type
372   ,p_effective_date        in date
373   ,p_datetrack_mode        in varchar2
374   ,p_validation_start_date in date
375   ,p_validation_end_date   in date
376   ) is
377 --
378   l_proc	varchar2(72) := g_package||'post_insert';
379 --
380 Begin
381   hr_utility.set_location('Entering:'||l_proc, 5);
382   begin
383     --
384     ben_vep_rki.after_insert
385       (p_effective_date
386       => p_effective_date
387       ,p_validation_start_date
388       => p_validation_start_date
389       ,p_validation_end_date
390       => p_validation_end_date
391       ,p_vrbl_rt_elig_prfl_id
392       => p_rec.vrbl_rt_elig_prfl_id
393       ,p_effective_start_date
394       => p_rec.effective_start_date
395       ,p_effective_end_date
396       => p_rec.effective_end_date
397       ,p_business_group_id
398       => p_rec.business_group_id
399       ,p_vrbl_rt_prfl_id
400       => p_rec.vrbl_rt_prfl_id
401       ,p_eligy_prfl_id
402       => p_rec.eligy_prfl_id
403       ,p_mndtry_flag
404       => p_rec.mndtry_flag
405       ,p_vep_attribute_category
406       => p_rec.vep_attribute_category
407       ,p_vep_attribute1
408       => p_rec.vep_attribute1
409       ,p_vep_attribute2
410       => p_rec.vep_attribute2
411       ,p_vep_attribute3
412       => p_rec.vep_attribute3
413       ,p_vep_attribute4
414       => p_rec.vep_attribute4
415       ,p_vep_attribute5
416       => p_rec.vep_attribute5
417       ,p_vep_attribute6
418       => p_rec.vep_attribute6
419       ,p_vep_attribute7
420       => p_rec.vep_attribute7
421       ,p_vep_attribute8
422       => p_rec.vep_attribute8
423       ,p_vep_attribute9
424       => p_rec.vep_attribute9
425       ,p_vep_attribute10
426       => p_rec.vep_attribute10
427       ,p_vep_attribute11
428       => p_rec.vep_attribute11
429       ,p_vep_attribute12
430       => p_rec.vep_attribute12
431       ,p_vep_attribute13
432       => p_rec.vep_attribute13
433       ,p_vep_attribute14
434       => p_rec.vep_attribute14
435       ,p_vep_attribute15
436       => p_rec.vep_attribute15
437       ,p_vep_attribute16
438       => p_rec.vep_attribute16
439       ,p_vep_attribute17
440       => p_rec.vep_attribute17
444       => p_rec.vep_attribute19
441       ,p_vep_attribute18
442       => p_rec.vep_attribute18
443       ,p_vep_attribute19
445       ,p_vep_attribute20
446       => p_rec.vep_attribute20
447       ,p_vep_attribute21
448       => p_rec.vep_attribute21
449       ,p_vep_attribute22
450       => p_rec.vep_attribute22
451       ,p_vep_attribute23
452       => p_rec.vep_attribute23
453       ,p_vep_attribute24
454       => p_rec.vep_attribute24
455       ,p_vep_attribute25
456       => p_rec.vep_attribute25
457       ,p_vep_attribute26
458       => p_rec.vep_attribute26
459       ,p_vep_attribute27
460       => p_rec.vep_attribute27
461       ,p_vep_attribute28
462       => p_rec.vep_attribute28
463       ,p_vep_attribute29
464       => p_rec.vep_attribute29
465       ,p_vep_attribute30
466       => p_rec.vep_attribute30
467       ,p_object_version_number
468       => p_rec.object_version_number
469       );
470     --
471   exception
472     --
473     when hr_api.cannot_find_prog_unit then
474       --
475       hr_api.cannot_find_prog_unit_error
476         (p_module_name => 'BEN_VRBL_RT_ELIG_PRFL_F'
477         ,p_hook_type   => 'AI');
478       --
479   end;
480   --
481   hr_utility.set_location(' Leaving:'||l_proc, 10);
482 End post_insert;
483 --
484 -- ----------------------------------------------------------------------------
485 -- |-------------------------------< ins_lck >--------------------------------|
486 -- ----------------------------------------------------------------------------
487 -- {Start Of Comments}
488 --
489 -- Description:
490 --   The ins_lck process has one main function to perform. When inserting
491 --   a datetracked row, we must validate the DT mode.
492 --
493 -- Prerequisites:
494 --   This procedure can only be called for the datetrack mode of INSERT.
495 --
496 -- In Parameters:
497 --
498 -- Post Success:
499 --   On successful completion of the ins_lck process the parental
500 --   datetracked rows will be locked providing the p_enforce_foreign_locking
501 --   argument value is TRUE.
502 --   If the p_enforce_foreign_locking argument value is FALSE then the
503 --   parential rows are not locked.
504 --
505 -- Post Failure:
506 --   The Lck process can fail for:
507 --   1) When attempting to lock the row the row could already be locked by
508 --      another user. This will raise the HR_Api.Object_Locked exception.
509 --   2) When attempting to the lock the parent which doesn't exist.
510 --      For the entity to be locked the parent must exist!
511 --
512 -- Developer Implementation Notes:
513 --   None.
514 --
515 -- Access Status:
516 --   Internal Row Handler Use Only.
517 --
518 -- {End Of Comments}
519 -- ----------------------------------------------------------------------------
520 Procedure ins_lck
521   (p_effective_date        in date
522   ,p_datetrack_mode        in varchar2
523   ,p_rec                   in ben_vep_shd.g_rec_type
524   ,p_validation_start_date out nocopy date
525   ,p_validation_end_date   out nocopy date
526   ) is
527 --
528   l_proc		  varchar2(72) := g_package||'ins_lck';
529   l_validation_start_date date;
530   l_validation_end_date	  date;
531 --
532 Begin
533   hr_utility.set_location('Entering:'||l_proc, 5);
534   --
535   -- Validate the datetrack mode mode getting the validation start
536   -- and end dates for the specified datetrack operation.
537   --
538   dt_api.validate_dt_mode
539     (p_effective_date	       => p_effective_date
540     ,p_datetrack_mode          => p_datetrack_mode
541     ,p_base_table_name         => 'BEN_VRBL_RT_ELIG_PRFL_f'
542     ,p_base_key_column         => 'VRBL_RT_ELIG_PRFL_ID'
543     ,p_base_key_value          => p_rec.vrbl_rt_elig_prfl_id
544     ,p_parent_table_name1      => 'BEN_VRBL_RT_PRFL_F'
545     ,p_parent_key_column1      => 'VRBL_RT_PRFL_ID'
546     ,p_parent_key_value1       => p_rec.vrbl_rt_prfl_id
547     ,p_parent_table_name2      => 'BEN_ELIGY_PRFL_F'
548     ,p_parent_key_column2      => 'ELIGY_PRFL_ID'
549     ,p_parent_key_value2       => p_rec.eligy_prfl_id
550     ,p_enforce_foreign_locking => true
551     ,p_validation_start_date   => l_validation_start_date
552     ,p_validation_end_date     => l_validation_end_date
553     );
554   --
555   -- Set the validation start and end date OUT arguments
556   --
557   p_validation_start_date := l_validation_start_date;
558   p_validation_end_date   := l_validation_end_date;
559   --
560   hr_utility.set_location(' Leaving:'||l_proc, 10);
561 --
562 End ins_lck;
563 --
564 -- ----------------------------------------------------------------------------
565 -- |---------------------------------< ins >----------------------------------|
566 -- ----------------------------------------------------------------------------
567 Procedure ins
568   (p_effective_date in     date
569   ,p_rec            in out nocopy ben_vep_shd.g_rec_type
570   ) is
571 --
572   l_proc                        varchar2(72) := g_package||'ins';
573   l_datetrack_mode              varchar2(30) := hr_api.g_insert;
574   l_validation_start_date       date;
575   l_validation_end_date         date;
576 --
577 Begin
578   hr_utility.set_location('Entering:'||l_proc, 5);
579   --
580   -- Call the lock operation
581   --
582   ben_vep_ins.ins_lck
583     (p_effective_date        => p_effective_date
584     ,p_datetrack_mode        => l_datetrack_mode
585     ,p_rec                   => p_rec
586     ,p_validation_start_date => l_validation_start_date
587     ,p_validation_end_date   => l_validation_end_date
591   --
588     );
589   --
590   -- Call the supporting insert validate operations
592   ben_vep_bus.insert_validate
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   --
600   -- Call the supporting pre-insert operation
601   --
602   ben_vep_ins.pre_insert
603     (p_rec                   => p_rec
604     ,p_effective_date        => p_effective_date
605     ,p_datetrack_mode        => l_datetrack_mode
606     ,p_validation_start_date => l_validation_start_date
607     ,p_validation_end_date   => l_validation_end_date
608     );
609   --
610   -- Insert the row
611   --
612   ben_vep_ins.insert_dml
613     (p_rec                   => p_rec
614     ,p_effective_date        => p_effective_date
615     ,p_datetrack_mode        => l_datetrack_mode
616     ,p_validation_start_date => l_validation_start_date
617     ,p_validation_end_date   => l_validation_end_date
618     );
619   --
620   -- Call the supporting post-insert operation
621   --
622   ben_vep_ins.post_insert
623     (p_rec                   => p_rec
624     ,p_effective_date        => p_effective_date
625     ,p_datetrack_mode        => l_datetrack_mode
626     ,p_validation_start_date => l_validation_start_date
627     ,p_validation_end_date   => l_validation_end_date
628     );
629   --
630   hr_utility.set_location('Leaving:'||l_proc,10);
631 end ins;
632 --
633 -- ----------------------------------------------------------------------------
634 -- |---------------------------------< ins >----------------------------------|
635 -- ----------------------------------------------------------------------------
636 Procedure ins
637   (p_effective_date                 in     date
638   ,p_business_group_id              in     number
639   ,p_vrbl_rt_prfl_id                in     number
640   ,p_eligy_prfl_id                  in     number
641   ,p_mndtry_flag                    in     varchar2 default null
642   ,p_vep_attribute_category         in     varchar2 default null
643   ,p_vep_attribute1                 in     varchar2 default null
644   ,p_vep_attribute2                 in     varchar2 default null
645   ,p_vep_attribute3                 in     varchar2 default null
646   ,p_vep_attribute4                 in     varchar2 default null
647   ,p_vep_attribute5                 in     varchar2 default null
648   ,p_vep_attribute6                 in     varchar2 default null
649   ,p_vep_attribute7                 in     varchar2 default null
650   ,p_vep_attribute8                 in     varchar2 default null
651   ,p_vep_attribute9                 in     varchar2 default null
652   ,p_vep_attribute10                in     varchar2 default null
653   ,p_vep_attribute11                in     varchar2 default null
654   ,p_vep_attribute12                in     varchar2 default null
655   ,p_vep_attribute13                in     varchar2 default null
656   ,p_vep_attribute14                in     varchar2 default null
657   ,p_vep_attribute15                in     varchar2 default null
658   ,p_vep_attribute16                in     varchar2 default null
659   ,p_vep_attribute17                in     varchar2 default null
660   ,p_vep_attribute18                in     varchar2 default null
661   ,p_vep_attribute19                in     varchar2 default null
662   ,p_vep_attribute20                in     varchar2 default null
663   ,p_vep_attribute21                in     varchar2 default null
664   ,p_vep_attribute22                in     varchar2 default null
665   ,p_vep_attribute23                in     varchar2 default null
666   ,p_vep_attribute24                in     varchar2 default null
667   ,p_vep_attribute25                in     varchar2 default null
668   ,p_vep_attribute26                in     varchar2 default null
669   ,p_vep_attribute27                in     varchar2 default null
670   ,p_vep_attribute28                in     varchar2 default null
671   ,p_vep_attribute29                in     varchar2 default null
672   ,p_vep_attribute30                in     varchar2 default null
673   ,p_vrbl_rt_elig_prfl_id                          out nocopy number
674   ,p_object_version_number             out nocopy number
675   ,p_effective_start_date              out nocopy date
676   ,p_effective_end_date                out nocopy date
677   ) is
678 --
679   l_rec         ben_vep_shd.g_rec_type;
680   l_proc        varchar2(72) := g_package||'ins';
681 --
682 Begin
683   hr_utility.set_location('Entering:'||l_proc, 5);
684   --
685   -- Call conversion function to turn arguments into the
686   -- p_rec structure.
687   --
688   l_rec :=
689   ben_vep_shd.convert_args
690     (null
691     ,null
692     ,null
693     ,p_business_group_id
694     ,p_vrbl_rt_prfl_id
695     ,p_eligy_prfl_id
696     ,p_mndtry_flag
697     ,p_vep_attribute_category
698     ,p_vep_attribute1
699     ,p_vep_attribute2
700     ,p_vep_attribute3
701     ,p_vep_attribute4
702     ,p_vep_attribute5
703     ,p_vep_attribute6
704     ,p_vep_attribute7
705     ,p_vep_attribute8
706     ,p_vep_attribute9
707     ,p_vep_attribute10
708     ,p_vep_attribute11
709     ,p_vep_attribute12
710     ,p_vep_attribute13
711     ,p_vep_attribute14
712     ,p_vep_attribute15
713     ,p_vep_attribute16
714     ,p_vep_attribute17
715     ,p_vep_attribute18
716     ,p_vep_attribute19
717     ,p_vep_attribute20
718     ,p_vep_attribute21
719     ,p_vep_attribute22
720     ,p_vep_attribute23
721     ,p_vep_attribute24
722     ,p_vep_attribute25
723     ,p_vep_attribute26
724     ,p_vep_attribute27
725     ,p_vep_attribute28
726     ,p_vep_attribute29
727     ,p_vep_attribute30
728     ,null
729     );
730   --
731   -- Having converted the arguments into the ben_vep_rec
732   -- plsql record structure we call the corresponding record
733   -- business process.
734   --
735   ben_vep_ins.ins
736     (p_effective_date
737     ,l_rec
738     );
739   --
740   -- Set the OUT arguments.
741   --
742   p_vrbl_rt_elig_prfl_id             := l_rec.vrbl_rt_elig_prfl_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_vep_ins;