DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_EOU_INS

Source


1 Package Body ben_eou_ins as
2 /* $Header: beeourhi.pkb 120.2 2006/02/27 00:41:49 rtagarra noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_eou_ins.';  -- Global package name
9 --
10 --
11 g_elig_org_unit_prte_id_i  number default null;
12 
13 procedure set_base_key_value
14   (p_elig_org_unit_prte_id  in  number) is
15 --
16   l_proc       varchar2(72) := g_package||'set_base_key_value';
17 --
18 Begin
19   hr_utility.set_location('Entering:'||l_proc, 10);
20   --
21   ben_eou_ins.g_elig_org_unit_prte_id_i := p_elig_org_unit_prte_id;
22   --
23   hr_utility.set_location(' Leaving:'||l_proc, 20);
24 End set_base_key_value;
25 -- ----------------------------------------------------------------------------
26 -- |----------------------------< dt_insert_dml >-----------------------------|
27 -- ----------------------------------------------------------------------------
28 -- {Start Of Comments}
29 --
30 -- Description:
31 --   This procedure controls the actual dml insert logic for datetrack. The
32 --   functions of this procedure are as follows:
33 --   1) Get the object_version_number.
34 --   2) To set the effective start and end dates to the corresponding
35 --      validation start and end dates. Also, the object version number
36 --      record attribute is set.
37 --   3) To set and unset the g_api_dml status as required (as we are about to
38 --      perform dml).
39 --   4) To insert the row into the schema with the derived effective start
40 --      and end dates and the object version number.
41 --   5) To trap any constraint violations that may have occurred.
42 --   6) To raise any other errors.
43 --
44 -- Prerequisites:
45 --   This is an internal private procedure which must be called from the
46 --   insert_dml and pre_update (logic permitting) procedure and must have
47 --   all mandatory arguments set.
48 --
49 -- In Parameters:
50 --   A Pl/Sql record structre.
51 --
52 -- Post Success:
53 --   The specified row will be inserted into the schema.
54 --
55 -- Post Failure:
56 --   On the insert dml failure it is important to note that we always reset the
57 --   g_api_dml status to false.
58 --   If a check or unique integrity constraint violation is raised the
59 --   constraint_error procedure will be called.
60 --   If any other error is reported, the error will be raised after the
61 --   g_api_dml status is reset.
62 --
63 -- Developer Implementation Notes:
64 --   This is an internal datetrack maintenance procedure which should
65 --   not be modified in anyway.
66 --
67 -- Access Status:
68 --   Internal Row Handler Use Only.
69 --
70 -- {End Of Comments}
71 -- ----------------------------------------------------------------------------
72 Procedure dt_insert_dml
73 	(p_rec 			 in out nocopy ben_eou_shd.g_rec_type,
74 	 p_effective_date	 in	date,
75 	 p_datetrack_mode	 in	varchar2,
76 	 p_validation_start_date in	date,
77 	 p_validation_end_date	 in	date) is
78 --
79 -- Cursor to select 'old' created AOL who column values
80 --
81   Cursor C_Sel1 Is
82     select t.created_by,
83            t.creation_date
84     from   ben_elig_org_unit_prte_f t
85     where  t.elig_org_unit_prte_id       = p_rec.elig_org_unit_prte_id
86     and    t.effective_start_date =
87              ben_eou_shd.g_old_rec.effective_start_date
88     and    t.effective_end_date   = (p_validation_start_date - 1);
89 --
90   l_proc		varchar2(72) := g_package||'dt_insert_dml';
91   l_created_by          ben_elig_org_unit_prte_f.created_by%TYPE;
92   l_creation_date       ben_elig_org_unit_prte_f.creation_date%TYPE;
93   l_last_update_date   	ben_elig_org_unit_prte_f.last_update_date%TYPE;
94   l_last_updated_by     ben_elig_org_unit_prte_f.last_updated_by%TYPE;
95   l_last_update_login   ben_elig_org_unit_prte_f.last_update_login%TYPE;
96 --
97 Begin
98   hr_utility.set_location('Entering:'||l_proc, 5);
99   --
100   -- Get the object version number for the insert
101   --
102   p_rec.object_version_number :=
103     dt_api.get_object_version_number
104 	(p_base_table_name => 'ben_elig_org_unit_prte_f',
105 	 p_base_key_column => 'elig_org_unit_prte_id',
106 	 p_base_key_value  => p_rec.elig_org_unit_prte_id);
107   --
108   -- Set the effective start and end dates to the corresponding
109   -- validation start and end dates
110   --
111   p_rec.effective_start_date := p_validation_start_date;
112   p_rec.effective_end_date   := p_validation_end_date;
113   --
114   -- If the datetrack_mode is not INSERT then we must populate the WHO
115   -- columns with the 'old' creation values and 'new' updated values.
116   --
117   If (p_datetrack_mode <> 'INSERT') then
118     hr_utility.set_location(l_proc, 10);
119     --
120     -- Select the 'old' created values
121     --
122     Open C_Sel1;
123     Fetch C_Sel1 Into l_created_by, l_creation_date;
124     If C_Sel1%notfound Then
125       --
126       -- The previous 'old' created row has not been found. We need
127       -- to error as an internal datetrack problem exists.
128       --
129       Close C_Sel1;
130       fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
131       fnd_message.set_token('PROCEDURE', l_proc);
132       fnd_message.set_token('STEP','10');
133       fnd_message.raise_error;
134     End If;
135     Close C_Sel1;
136     --
137     -- Set the AOL updated WHO values
138     --
139     l_last_update_date   := sysdate;
140     l_last_updated_by    := fnd_global.user_id;
141     l_last_update_login  := fnd_global.login_id;
142   End If;
143   --
144   ben_eou_shd.g_api_dml := true;  -- Set the api dml status
145   --
146   -- Insert the row into: ben_elig_org_unit_prte_f
147   --
148   insert into ben_elig_org_unit_prte_f
149   (	elig_org_unit_prte_id,
150 	effective_start_date,
151 	effective_end_date,
152 	business_group_id,
153 	eligy_prfl_id,
154 	organization_id,
155 	excld_flag,
156 	ordr_num,
157 	eou_attribute_category,
158 	eou_attribute1,
159 	eou_attribute2,
160 	eou_attribute3,
161 	eou_attribute4,
162 	eou_attribute5,
163 	eou_attribute6,
164 	eou_attribute7,
165 	eou_attribute8,
166 	eou_attribute9,
167 	eou_attribute10,
168 	eou_attribute11,
169 	eou_attribute12,
170 	eou_attribute13,
171 	eou_attribute14,
172 	eou_attribute15,
173 	eou_attribute16,
174 	eou_attribute17,
175 	eou_attribute18,
176 	eou_attribute19,
177 	eou_attribute20,
178 	eou_attribute21,
179 	eou_attribute22,
180 	eou_attribute23,
181 	eou_attribute24,
182 	eou_attribute25,
183 	eou_attribute26,
184 	eou_attribute27,
185 	eou_attribute28,
186 	eou_attribute29,
187 	eou_attribute30,
188 	object_version_number
189    	, created_by,
190    	creation_date,
191    	last_update_date,
192    	last_updated_by,
193    	last_update_login ,
194 	criteria_score,
195 	criteria_weight
196   )
197   Values
198   (	p_rec.elig_org_unit_prte_id,
199 	p_rec.effective_start_date,
200 	p_rec.effective_end_date,
201 	p_rec.business_group_id,
202 	p_rec.eligy_prfl_id,
203 	p_rec.organization_id,
204 	p_rec.excld_flag,
205 	p_rec.ordr_num,
206 	p_rec.eou_attribute_category,
207 	p_rec.eou_attribute1,
208 	p_rec.eou_attribute2,
209 	p_rec.eou_attribute3,
210 	p_rec.eou_attribute4,
211 	p_rec.eou_attribute5,
212 	p_rec.eou_attribute6,
213 	p_rec.eou_attribute7,
214 	p_rec.eou_attribute8,
215 	p_rec.eou_attribute9,
216 	p_rec.eou_attribute10,
217 	p_rec.eou_attribute11,
218 	p_rec.eou_attribute12,
219 	p_rec.eou_attribute13,
220 	p_rec.eou_attribute14,
221 	p_rec.eou_attribute15,
222 	p_rec.eou_attribute16,
223 	p_rec.eou_attribute17,
224 	p_rec.eou_attribute18,
225 	p_rec.eou_attribute19,
226 	p_rec.eou_attribute20,
227 	p_rec.eou_attribute21,
228 	p_rec.eou_attribute22,
229 	p_rec.eou_attribute23,
230 	p_rec.eou_attribute24,
231 	p_rec.eou_attribute25,
232 	p_rec.eou_attribute26,
233 	p_rec.eou_attribute27,
234 	p_rec.eou_attribute28,
235 	p_rec.eou_attribute29,
236 	p_rec.eou_attribute30,
237 	p_rec.object_version_number
238 	, l_created_by,
239    	l_creation_date,
240    	l_last_update_date,
241    	l_last_updated_by,
242    	l_last_update_login ,
243 	p_Rec.criteria_score,
244 	p_rec.criteria_weight
245   );
246   --
247   ben_eou_shd.g_api_dml := false;   -- Unset the api dml status
248   hr_utility.set_location(' Leaving:'||l_proc, 15);
249 --
250 Exception
251   When hr_api.check_integrity_violated Then
252     -- A check constraint has been violated
253     ben_eou_shd.g_api_dml := false;   -- Unset the api dml status
254     ben_eou_shd.constraint_error
255       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
256   When hr_api.unique_integrity_violated Then
257     -- Unique integrity has been violated
258     ben_eou_shd.g_api_dml := false;   -- Unset the api dml status
259     ben_eou_shd.constraint_error
260       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
261   When Others Then
262     ben_eou_shd.g_api_dml := false;   -- Unset the api dml status
263     Raise;
264 End dt_insert_dml;
265 --
266 -- ----------------------------------------------------------------------------
267 -- |------------------------------< insert_dml >------------------------------|
268 -- ----------------------------------------------------------------------------
269 Procedure insert_dml
270 	(p_rec 			 in out nocopy ben_eou_shd.g_rec_type,
271 	 p_effective_date	 in	date,
272 	 p_datetrack_mode	 in	varchar2,
273 	 p_validation_start_date in	date,
274 	 p_validation_end_date	 in	date) is
275 --
276   l_proc	varchar2(72) := g_package||'insert_dml';
277 --
278 Begin
279   hr_utility.set_location('Entering:'||l_proc, 5);
280   --
281   dt_insert_dml(p_rec			=> p_rec,
282 		p_effective_date	=> p_effective_date,
283 		p_datetrack_mode	=> p_datetrack_mode,
284        		p_validation_start_date	=> p_validation_start_date,
285 		p_validation_end_date	=> p_validation_end_date);
286   --
287   hr_utility.set_location(' Leaving:'||l_proc, 10);
288 End insert_dml;
289 --
290 -- ----------------------------------------------------------------------------
291 -- |------------------------------< pre_insert >------------------------------|
292 -- ----------------------------------------------------------------------------
293 -- {Start Of Comments}
294 --
295 -- Description:
296 --   This private procedure contains any processing which is required before
297 --   the insert dml. Presently, if the entity has a corresponding primary
298 --   key which is maintained by an associating sequence, the primary key for
299 --   the entity will be populated with the next sequence value in
300 --   preparation for the insert dml.
301 --   Also, if comments are defined for this entity, the comments insert
302 --   logic will also be called, generating a comment_id if required.
303 --
304 -- Prerequisites:
305 --   This is an internal procedure which is called from the ins procedure.
306 --
307 -- In Parameters:
308 --   A Pl/Sql record structre.
309 --
310 -- Post Success:
311 --   Processing continues.
312 --
313 -- Post Failure:
314 --   If an error has occurred, an error message and exception will be raised
315 --   but not handled.
316 --
317 -- Developer Implementation Notes:
318 --   Any pre-processing required before the insert dml is issued should be
319 --   coded within this procedure. As stated above, a good example is the
320 --   generation of a primary key number via a corresponding sequence.
321 --   It is important to note that any 3rd party maintenance should be reviewed
322 --   before placing in this procedure.
323 --
324 -- Access Status:
325 --   Internal Row Handler Use Only.
326 --
327 -- {End Of Comments}
328 -- ----------------------------------------------------------------------------
329 Procedure pre_insert
330 	(p_rec  			in out nocopy ben_eou_shd.g_rec_type,
331 	 p_effective_date		in date,
332 	 p_datetrack_mode		in varchar2,
333 	 p_validation_start_date	in date,
334 	 p_validation_end_date		in date) is
335 --
336 --
337   cursor c1 is
338     select ben_elig_org_unit_prte_f_s.nextval
339     from sys.dual;
340 --
341 Cursor C_Sel2 is
342     Select null
343       from ben_elig_org_unit_prte_f
344      where elig_org_unit_prte_id = ben_eou_ins.g_elig_org_unit_prte_id_i;
345 --
346   l_proc        varchar2(72) := g_package||'pre_insert';
347   l_exists      varchar2(1);
348 --
349 Begin
350   hr_utility.set_location('Entering:'||l_proc, 5);
351   --
352     If (ben_eou_ins.g_elig_org_unit_prte_id_i is not null) Then
353 	    --
354 	    -- Verify registered primary key values not already in use
355 	    --
356 	    Open C_Sel2;
357 	    Fetch C_Sel2 into l_exists;
358 	    If C_Sel2%found Then
359 	       Close C_Sel2;
360 	       --
361 	       -- The primary key values are already in use.
362 	       --
363 	       fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
364 	       fnd_message.set_token('TABLE_NAME','ben_elig_org_unit_prte_f');
365 	       fnd_message.raise_error;
366 	    End If;
367 	    Close C_Sel2;
368 	    --
369 	    -- Use registered key values and clear globals
370 	    --
371 	    p_rec.elig_org_unit_prte_id:= ben_eou_ins.g_elig_org_unit_prte_id_i;
372 	    ben_eou_ins.g_elig_org_unit_prte_id_i := null;
373     Else
374        --
375        open c1;
376        fetch c1 into p_rec.elig_org_unit_prte_id;
377        close c1;
378        --
379    End if;
380 
381  hr_utility.set_location(' Leaving:'||l_proc, 10);
382 End pre_insert;
383 --
384 -- ----------------------------------------------------------------------------
385 -- |-----------------------------< post_insert >------------------------------|
386 -- ----------------------------------------------------------------------------
387 -- {Start Of Comments}
388 --
389 -- Description:
390 --   This private procedure contains any processing which is required after the
391 --   insert dml.
392 --
393 -- Prerequisites:
394 --   This is an internal procedure which is called from the ins procedure.
395 --
396 -- In Parameters:
397 --   A Pl/Sql record structre.
398 --
399 -- Post Success:
400 --   Processing continues.
401 --
402 -- Post Failure:
403 --   If an error has occurred, an error message and exception will be raised
404 --   but not handled.
405 --
406 -- Developer Implementation Notes:
407 --   Any post-processing required after the insert dml is issued should be
408 --   coded within this procedure. It is important to note that any 3rd party
409 --   maintenance should be reviewed before placing in this procedure.
410 --
411 -- Access Status:
412 --   Internal Row Handler Use Only.
413 --
414 -- {End Of Comments}
415 -- ----------------------------------------------------------------------------
416 Procedure post_insert
417 	(p_rec 			 in ben_eou_shd.g_rec_type,
418 	 p_effective_date	 in date,
419 	 p_datetrack_mode	 in varchar2,
420 	 p_validation_start_date in date,
421 	 p_validation_end_date	 in date) is
422 --
423   l_proc	varchar2(72) := g_package||'post_insert';
424 --
425 Begin
426   hr_utility.set_location('Entering:'||l_proc, 5);
427 --
428   --
429   -- Start of API User Hook for post_insert.
430   --
431   begin
432     --
433     ben_eou_rki.after_insert
434       (
435   p_elig_org_unit_prte_id         =>p_rec.elig_org_unit_prte_id
436  ,p_effective_start_date          =>p_rec.effective_start_date
437  ,p_effective_end_date            =>p_rec.effective_end_date
438  ,p_business_group_id             =>p_rec.business_group_id
439  ,p_eligy_prfl_id                 =>p_rec.eligy_prfl_id
440  ,p_organization_id               =>p_rec.organization_id
441  ,p_excld_flag                    =>p_rec.excld_flag
442  ,p_ordr_num                      =>p_rec.ordr_num
443  ,p_eou_attribute_category        =>p_rec.eou_attribute_category
444  ,p_eou_attribute1                =>p_rec.eou_attribute1
445  ,p_eou_attribute2                =>p_rec.eou_attribute2
446  ,p_eou_attribute3                =>p_rec.eou_attribute3
447  ,p_eou_attribute4                =>p_rec.eou_attribute4
448  ,p_eou_attribute5                =>p_rec.eou_attribute5
449  ,p_eou_attribute6                =>p_rec.eou_attribute6
450  ,p_eou_attribute7                =>p_rec.eou_attribute7
451  ,p_eou_attribute8                =>p_rec.eou_attribute8
452  ,p_eou_attribute9                =>p_rec.eou_attribute9
453  ,p_eou_attribute10               =>p_rec.eou_attribute10
454  ,p_eou_attribute11               =>p_rec.eou_attribute11
455  ,p_eou_attribute12               =>p_rec.eou_attribute12
456  ,p_eou_attribute13               =>p_rec.eou_attribute13
457  ,p_eou_attribute14               =>p_rec.eou_attribute14
458  ,p_eou_attribute15               =>p_rec.eou_attribute15
459  ,p_eou_attribute16               =>p_rec.eou_attribute16
460  ,p_eou_attribute17               =>p_rec.eou_attribute17
461  ,p_eou_attribute18               =>p_rec.eou_attribute18
462  ,p_eou_attribute19               =>p_rec.eou_attribute19
463  ,p_eou_attribute20               =>p_rec.eou_attribute20
464  ,p_eou_attribute21               =>p_rec.eou_attribute21
465  ,p_eou_attribute22               =>p_rec.eou_attribute22
466  ,p_eou_attribute23               =>p_rec.eou_attribute23
467  ,p_eou_attribute24               =>p_rec.eou_attribute24
468  ,p_eou_attribute25               =>p_rec.eou_attribute25
469  ,p_eou_attribute26               =>p_rec.eou_attribute26
470  ,p_eou_attribute27               =>p_rec.eou_attribute27
471  ,p_eou_attribute28               =>p_rec.eou_attribute28
472  ,p_eou_attribute29               =>p_rec.eou_attribute29
473  ,p_eou_attribute30               =>p_rec.eou_attribute30
474  ,p_object_version_number         =>p_rec.object_version_number
475  ,p_effective_date                =>p_effective_date
476  ,p_validation_start_date         =>p_validation_start_date
477  ,p_validation_end_date           =>p_validation_end_date
478  ,p_criteria_score                =>p_rec.criteria_score
479  ,p_criteria_weight               =>p_rec.criteria_weight
480       );
481     --
482   exception
483     --
484     when hr_api.cannot_find_prog_unit then
485       --
486       hr_api.cannot_find_prog_unit_error
487         (p_module_name => 'ben_elig_org_unit_prte_f'
488         ,p_hook_type   => 'AI');
489       --
490   end;
491   --
492   -- End of API User Hook for post_insert.
493   --
494   --
495   hr_utility.set_location(' Leaving:'||l_proc, 10);
496 End post_insert;
497 --
498 -- ----------------------------------------------------------------------------
499 -- |-------------------------------< ins_lck >--------------------------------|
500 -- ----------------------------------------------------------------------------
501 -- {Start Of Comments}
502 --
503 -- Description:
504 --   The ins_lck process has one main function to perform. When inserting
505 --   a datetracked row, we must validate the DT mode.
506 --   be manipulated.
507 --
508 -- Prerequisites:
509 --   This procedure can only be called for the datetrack mode of INSERT.
510 --
511 -- In Parameters:
512 --
513 -- Post Success:
514 --   On successful completion of the ins_lck process the parental
515 --   datetracked rows will be locked providing the p_enforce_foreign_locking
516 --   argument value is TRUE.
517 --   If the p_enforce_foreign_locking argument value is FALSE then the
518 --   parential rows are not locked.
519 --
520 -- Post Failure:
521 --   The Lck process can fail for:
522 --   1) When attempting to lock the row the row could already be locked by
523 --      another user. This will raise the HR_Api.Object_Locked exception.
524 --   2) When attempting to the lock the parent which doesn't exist.
525 --      For the entity to be locked the parent must exist!
526 --
527 -- Developer Implementation Notes:
528 --   None.
529 --
530 -- Access Status:
531 --   Internal Row Handler Use Only.
532 --
533 -- {End Of Comments}
534 -- ----------------------------------------------------------------------------
535 Procedure ins_lck
536 	(p_effective_date	 in  date,
537 	 p_datetrack_mode	 in  varchar2,
538 	 p_rec	 		 in  ben_eou_shd.g_rec_type,
539 	 p_validation_start_date out nocopy date,
540 	 p_validation_end_date	 out nocopy date) is
541 --
542   l_proc		  varchar2(72) := g_package||'ins_lck';
543   l_validation_start_date date;
544   l_validation_end_date	  date;
545 --
546 Begin
547   hr_utility.set_location('Entering:'||l_proc, 5);
548   --
549   -- Validate the datetrack mode mode getting the validation start
550   -- and end dates for the specified datetrack operation.
551   --
552   dt_api.validate_dt_mode
553 	(p_effective_date	   => p_effective_date,
554 	 p_datetrack_mode	   => p_datetrack_mode,
555 	 p_base_table_name	   => 'ben_elig_org_unit_prte_f',
556 	 p_base_key_column	   => 'elig_org_unit_prte_id',
557 	 p_base_key_value 	   => p_rec.elig_org_unit_prte_id,
558 	 p_parent_table_name1      => 'ben_eligy_prfl_f',
559 	 p_parent_key_column1      => 'eligy_prfl_id',
560 	 p_parent_key_value1       => p_rec.eligy_prfl_id,
561          p_enforce_foreign_locking => true,
562 	 p_validation_start_date   => l_validation_start_date,
563  	 p_validation_end_date	   => l_validation_end_date);
564   --
565   -- Set the validation start and end date OUT arguments
566   --
567   p_validation_start_date := l_validation_start_date;
568   p_validation_end_date   := l_validation_end_date;
569   --
570   hr_utility.set_location(' Leaving:'||l_proc, 10);
571 --
572 End ins_lck;
573 --
574 -- ----------------------------------------------------------------------------
575 -- |---------------------------------< ins >----------------------------------|
576 -- ----------------------------------------------------------------------------
577 Procedure ins
578   (
579   p_rec		   in out nocopy ben_eou_shd.g_rec_type,
580   p_effective_date in     date
581   ) is
582 --
583   l_proc			varchar2(72) := g_package||'ins';
584   l_datetrack_mode		varchar2(30) := 'INSERT';
585   l_validation_start_date	date;
586   l_validation_end_date		date;
587 --
588 Begin
589   hr_utility.set_location('Entering:'||l_proc, 5);
590   --
591   -- Call the lock operation
592   --
593   ins_lck
594 	(p_effective_date	 => p_effective_date,
595 	 p_datetrack_mode	 => l_datetrack_mode,
596 	 p_rec	 		 => p_rec,
597 	 p_validation_start_date => l_validation_start_date,
598 	 p_validation_end_date	 => l_validation_end_date);
599   --
600   -- Call the supporting insert validate operations
601   --
602   ben_eou_bus.insert_validate
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   -- Call the supporting pre-insert operation
610   --
611   pre_insert
612  	(p_rec			 => p_rec,
613 	 p_effective_date	 => p_effective_date,
614 	 p_datetrack_mode	 => l_datetrack_mode,
615 	 p_validation_start_date => l_validation_start_date,
616 	 p_validation_end_date	 => l_validation_end_date);
617   --
618   -- Insert the row
619   --
620   insert_dml
621  	(p_rec			 => p_rec,
622 	 p_effective_date	 => p_effective_date,
623 	 p_datetrack_mode	 => l_datetrack_mode,
624 	 p_validation_start_date => l_validation_start_date,
625 	 p_validation_end_date	 => l_validation_end_date);
626   --
627   -- Call the supporting post-insert operation
628   --
629   post_insert
630  	(p_rec			 => p_rec,
631 	 p_effective_date	 => p_effective_date,
632 	 p_datetrack_mode	 => l_datetrack_mode,
633 	 p_validation_start_date => l_validation_start_date,
634 	 p_validation_end_date	 => l_validation_end_date);
635 end ins;
636 --
637 -- ----------------------------------------------------------------------------
638 -- |---------------------------------< ins >----------------------------------|
639 -- ----------------------------------------------------------------------------
640 Procedure ins
641   (
642   p_elig_org_unit_prte_id        out nocopy number,
643   p_effective_start_date         out nocopy date,
644   p_effective_end_date           out nocopy date,
645   p_business_group_id            in number,
646   p_eligy_prfl_id                in number,
647   p_organization_id              in number,
648   p_excld_flag                   in varchar2,
649   p_ordr_num                     in number           default null,
650   p_eou_attribute_category       in varchar2         default null,
651   p_eou_attribute1               in varchar2         default null,
652   p_eou_attribute2               in varchar2         default null,
653   p_eou_attribute3               in varchar2         default null,
654   p_eou_attribute4               in varchar2         default null,
655   p_eou_attribute5               in varchar2         default null,
656   p_eou_attribute6               in varchar2         default null,
657   p_eou_attribute7               in varchar2         default null,
658   p_eou_attribute8               in varchar2         default null,
659   p_eou_attribute9               in varchar2         default null,
660   p_eou_attribute10              in varchar2         default null,
661   p_eou_attribute11              in varchar2         default null,
662   p_eou_attribute12              in varchar2         default null,
663   p_eou_attribute13              in varchar2         default null,
664   p_eou_attribute14              in varchar2         default null,
665   p_eou_attribute15              in varchar2         default null,
666   p_eou_attribute16              in varchar2         default null,
667   p_eou_attribute17              in varchar2         default null,
668   p_eou_attribute18              in varchar2         default null,
669   p_eou_attribute19              in varchar2         default null,
670   p_eou_attribute20              in varchar2         default null,
671   p_eou_attribute21              in varchar2         default null,
672   p_eou_attribute22              in varchar2         default null,
673   p_eou_attribute23              in varchar2         default null,
674   p_eou_attribute24              in varchar2         default null,
675   p_eou_attribute25              in varchar2         default null,
676   p_eou_attribute26              in varchar2         default null,
677   p_eou_attribute27              in varchar2         default null,
678   p_eou_attribute28              in varchar2         default null,
679   p_eou_attribute29              in varchar2         default null,
680   p_eou_attribute30              in varchar2         default null,
681   p_object_version_number        out nocopy number,
682   p_effective_date		 in date ,
683   p_criteria_score               in number           default null,
684   p_criteria_weight              in number           default null
685   ) is
686 --
687   l_rec		ben_eou_shd.g_rec_type;
688   l_proc	varchar2(72) := g_package||'ins';
689 --
690 Begin
691   hr_utility.set_location('Entering:'||l_proc, 5);
692   --
693   -- Call conversion function to turn arguments into the
694   -- p_rec structure.
695   --
696   l_rec :=
697   ben_eou_shd.convert_args
698   (
699   null,
700   null,
701   null,
702   p_business_group_id,
703   p_eligy_prfl_id,
704   p_organization_id,
705   p_excld_flag,
706   p_ordr_num,
707   p_eou_attribute_category,
708   p_eou_attribute1,
709   p_eou_attribute2,
710   p_eou_attribute3,
711   p_eou_attribute4,
712   p_eou_attribute5,
713   p_eou_attribute6,
714   p_eou_attribute7,
715   p_eou_attribute8,
716   p_eou_attribute9,
717   p_eou_attribute10,
718   p_eou_attribute11,
719   p_eou_attribute12,
720   p_eou_attribute13,
721   p_eou_attribute14,
722   p_eou_attribute15,
723   p_eou_attribute16,
724   p_eou_attribute17,
725   p_eou_attribute18,
726   p_eou_attribute19,
727   p_eou_attribute20,
728   p_eou_attribute21,
729   p_eou_attribute22,
730   p_eou_attribute23,
731   p_eou_attribute24,
732   p_eou_attribute25,
733   p_eou_attribute26,
734   p_eou_attribute27,
735   p_eou_attribute28,
736   p_eou_attribute29,
737   p_eou_attribute30,
738   null ,
739   p_criteria_score,
740   p_criteria_weight
741   );
742   --
743   -- Having converted the arguments into the ben_eou_rec
744   -- plsql record structure we call the corresponding record
745   -- business process.
746   --
747   ins(l_rec, p_effective_date);
748   --
749   -- Set the OUT arguments.
750   --
751   p_elig_org_unit_prte_id        	:= l_rec.elig_org_unit_prte_id;
752   p_effective_start_date  	:= l_rec.effective_start_date;
753   p_effective_end_date    	:= l_rec.effective_end_date;
754   p_object_version_number 	:= l_rec.object_version_number;
755   --
756   --
757   hr_utility.set_location(' Leaving:'||l_proc, 10);
758 End ins;
759 --
760 end ben_eou_ins;