DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_EJP_INS

Source


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