DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_EGR_INS

Source


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