DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_DCE_INS

Source


1 Package Body ben_dce_ins as
2 /* $Header: bedcerhi.pkb 120.0.12010000.2 2010/04/07 06:40:25 pvelvano ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  ben_dce_ins.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_insert_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the actual dml insert logic for datetrack. The
17 --   functions of this procedure are as follows:
18 --   1) Get the object_version_number.
19 --   2) To set the effective start and end dates to the corresponding
20 --      validation start and end dates. Also, the object version number
21 --      record attribute is set.
22 --   3) To set and unset the g_api_dml status as required (as we are about to
23 --      perform dml).
24 --   4) To insert the row into the schema with the derived effective start
25 --      and end dates and the object version number.
26 --   5) To trap any constraint violations that may have occurred.
27 --   6) To raise any other errors.
28 --
29 -- Prerequisites:
30 --   This is an internal private procedure which must be called from the
31 --   insert_dml and pre_update (logic permitting) procedure and must have
32 --   all mandatory arguments set.
33 --
34 -- In Parameters:
35 --   A Pl/Sql record structre.
36 --
37 -- Post Success:
38 --   The specified row will be inserted into the schema.
39 --
40 -- Post Failure:
41 --   On the insert dml failure it is important to note that we always reset the
42 --   g_api_dml status to false.
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_dce_shd.g_rec_type,
59 	 p_effective_date	 in	date,
60 	 p_datetrack_mode	 in	varchar2,
61 	 p_validation_start_date in	date,
62 	 p_validation_end_date	 in	date) is
63 --
64 -- Cursor to select 'old' created AOL who column values
65 --
66   Cursor C_Sel1 Is
67     select t.created_by,
68            t.creation_date
69     from   ben_dpnt_cvg_eligy_prfl_f t
70     where  t.dpnt_cvg_eligy_prfl_id       = p_rec.dpnt_cvg_eligy_prfl_id
71     and    t.effective_start_date =
72              ben_dce_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_dpnt_cvg_eligy_prfl_f.created_by%TYPE;
77   l_creation_date       ben_dpnt_cvg_eligy_prfl_f.creation_date%TYPE;
78   l_last_update_date   	ben_dpnt_cvg_eligy_prfl_f.last_update_date%TYPE;
79   l_last_updated_by     ben_dpnt_cvg_eligy_prfl_f.last_updated_by%TYPE;
80   l_last_update_login   ben_dpnt_cvg_eligy_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_dpnt_cvg_eligy_prfl_f',
90 	 p_base_key_column => 'dpnt_cvg_eligy_prfl_id',
91 	 p_base_key_value  => p_rec.dpnt_cvg_eligy_prfl_id);
92   --
93   -- Set the effective start and end dates to the corresponding
94   -- validation start and end dates
95   --
96   p_rec.effective_start_date := p_validation_start_date;
97   p_rec.effective_end_date   := p_validation_end_date;
98   --
99   -- If the datetrack_mode is not INSERT then we must populate the WHO
100   -- columns with the 'old' creation values and 'new' updated values.
101   --
102   If (p_datetrack_mode <> 'INSERT') then
103     hr_utility.set_location(l_proc, 10);
104     --
105     -- Select the 'old' created values
106     --
107     Open C_Sel1;
108     Fetch C_Sel1 Into l_created_by, l_creation_date;
109     If C_Sel1%notfound Then
110       --
111       -- The previous 'old' created row has not been found. We need
112       -- to error as an internal datetrack problem exists.
113       --
114       Close C_Sel1;
115       fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
116       fnd_message.set_token('PROCEDURE', l_proc);
117       fnd_message.set_token('STEP','10');
118       fnd_message.raise_error;
119     End If;
120     Close C_Sel1;
121     --
122     -- Set the AOL updated WHO values
123     --
124     l_last_update_date   := sysdate;
125     l_last_updated_by    := fnd_global.user_id;
126     l_last_update_login  := fnd_global.login_id;
127   End If;
128   --
129   ben_dce_shd.g_api_dml := true;  -- Set the api dml status
130   --
131   -- Insert the row into: ben_dpnt_cvg_eligy_prfl_f
132   --
133   insert into ben_dpnt_cvg_eligy_prfl_f
134   (	dpnt_cvg_eligy_prfl_id,
135 	effective_end_date,
136 	effective_start_date,
137 	business_group_id,
138 	regn_id,
139 	name,
140 	dpnt_cvg_eligy_prfl_stat_cd,
141 	dce_desc,
142 --	military_status_rqmt_ind,
143 	dpnt_cvg_elig_det_rl,
144 	dce_attribute_category,
145 	dce_attribute1,
146 	dce_attribute2,
147 	dce_attribute3,
148 	dce_attribute4,
149 	dce_attribute5,
150 	dce_attribute6,
151 	dce_attribute7,
152 	dce_attribute8,
153 	dce_attribute9,
154 	dce_attribute10,
155 	dce_attribute11,
156 	dce_attribute12,
157 	dce_attribute13,
158 	dce_attribute14,
159 	dce_attribute15,
160 	dce_attribute16,
161 	dce_attribute17,
162 	dce_attribute18,
163 	dce_attribute19,
164 	dce_attribute20,
165 	dce_attribute21,
166 	dce_attribute22,
167 	dce_attribute23,
168 	dce_attribute24,
169 	dce_attribute25,
170 	dce_attribute26,
171 	dce_attribute27,
172 	dce_attribute28,
173 	dce_attribute29,
174 	dce_attribute30,
175 	object_version_number
176    	, created_by,
177    	creation_date,
178    	last_update_date,
179    	last_updated_by,
180    	last_update_login,
181         dpnt_rlshp_flag,
182         dpnt_age_flag,
183         dpnt_stud_flag,
184         dpnt_dsbld_flag,
185         dpnt_mrtl_flag,
186         dpnt_mltry_flag,
187         dpnt_pstl_flag,
188         dpnt_cvrd_in_anthr_pl_flag,
189         dpnt_dsgnt_crntly_enrld_flag,
190 	dpnt_crit_flag
191   )
192   Values
193   (	p_rec.dpnt_cvg_eligy_prfl_id,
194 	p_rec.effective_end_date,
195 	p_rec.effective_start_date,
196 	p_rec.business_group_id,
197 	p_rec.regn_id,
198 	p_rec.name,
199 	p_rec.dpnt_cvg_eligy_prfl_stat_cd,
200 	p_rec.dce_desc,
201 --	p_rec.military_status_rqmt_ind,
202 	p_rec.dpnt_cvg_elig_det_rl,
203 	p_rec.dce_attribute_category,
204 	p_rec.dce_attribute1,
208 	p_rec.dce_attribute5,
205 	p_rec.dce_attribute2,
206 	p_rec.dce_attribute3,
207 	p_rec.dce_attribute4,
209 	p_rec.dce_attribute6,
210 	p_rec.dce_attribute7,
211 	p_rec.dce_attribute8,
212 	p_rec.dce_attribute9,
213 	p_rec.dce_attribute10,
214 	p_rec.dce_attribute11,
215 	p_rec.dce_attribute12,
216 	p_rec.dce_attribute13,
217 	p_rec.dce_attribute14,
218 	p_rec.dce_attribute15,
219 	p_rec.dce_attribute16,
220 	p_rec.dce_attribute17,
221 	p_rec.dce_attribute18,
222 	p_rec.dce_attribute19,
223 	p_rec.dce_attribute20,
224 	p_rec.dce_attribute21,
225 	p_rec.dce_attribute22,
226 	p_rec.dce_attribute23,
227 	p_rec.dce_attribute24,
228 	p_rec.dce_attribute25,
229 	p_rec.dce_attribute26,
230 	p_rec.dce_attribute27,
231 	p_rec.dce_attribute28,
232 	p_rec.dce_attribute29,
233 	p_rec.dce_attribute30,
234 	p_rec.object_version_number
235 	, l_created_by,
236    	l_creation_date,
237    	l_last_update_date,
238    	l_last_updated_by,
239    	l_last_update_login,
240         p_rec.dpnt_rlshp_flag,
241         p_rec.dpnt_age_flag,
242         p_rec.dpnt_stud_flag,
243         p_rec.dpnt_dsbld_flag,
244         p_rec.dpnt_mrtl_flag,
245         p_rec.dpnt_mltry_flag,
246         p_rec.dpnt_pstl_flag,
247         p_rec.dpnt_cvrd_in_anthr_pl_flag,
248         p_rec.dpnt_dsgnt_crntly_enrld_flag,
249 	p_rec.dpnt_crit_flag
250   );
251   --
252   ben_dce_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_dce_shd.g_api_dml := false;   -- Unset the api dml status
259     ben_dce_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_dce_shd.g_api_dml := false;   -- Unset the api dml status
264     ben_dce_shd.constraint_error
265       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
266   When Others Then
267     ben_dce_shd.g_api_dml := false;   -- Unset the api dml status
268     Raise;
269 End dt_insert_dml;
270 --
271 -- ----------------------------------------------------------------------------
272 -- |------------------------------< insert_dml >------------------------------|
273 -- ----------------------------------------------------------------------------
274 Procedure insert_dml
275 	(p_rec 			 in out nocopy ben_dce_shd.g_rec_type,
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_dce_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   l_proc	varchar2(72) := g_package||'pre_insert';
342   cursor c1 is
343 	select BEN_DPNT_CVG_ELIGY_PRFL_F_S.nextval
344 		from sys.dual;
345 --
346 --
347 Begin
348   hr_utility.set_location('Entering:'||l_proc, 5);
349 
350   -- *
354   fetch c1 into p_rec.DPNT_CVG_ELIGY_PRFL_ID;
351   -- * Fetch next sequence number from DB sequence, and assign to primary key,
352   -- *
353   open c1;
355   close c1;
356 
357   hr_utility.set_location(' Leaving:'||l_proc, 10);
358 
359 End pre_insert;
360 --
361 -- ----------------------------------------------------------------------------
362 -- |-----------------------------< post_insert >------------------------------|
363 -- ----------------------------------------------------------------------------
364 -- {Start Of Comments}
365 --
366 -- Description:
367 --   This private procedure contains any processing which is required after the
368 --   insert dml.
369 --
370 -- Prerequisites:
371 --   This is an internal procedure which is called from the ins procedure.
372 --
373 -- In Parameters:
374 --   A Pl/Sql record structre.
375 --
376 -- Post Success:
377 --   Processing continues.
378 --
379 -- Post Failure:
380 --   If an error has occurred, an error message and exception will be raised
381 --   but not handled.
382 --
383 -- Developer Implementation Notes:
384 --   Any post-processing required after the insert dml is issued should be
385 --   coded within this procedure. It is important to note that any 3rd party
386 --   maintenance should be reviewed before placing in this procedure.
387 --
388 -- Access Status:
389 --   Internal Row Handler Use Only.
390 --
391 -- {End Of Comments}
392 -- ----------------------------------------------------------------------------
393 Procedure post_insert
394 	(p_rec 			 in ben_dce_shd.g_rec_type,
395 	 p_effective_date	 in date,
396 	 p_datetrack_mode	 in varchar2,
397 	 p_validation_start_date in date,
398 	 p_validation_end_date	 in date) is
399 --
400   l_proc	varchar2(72) := g_package||'post_insert';
401 --
402 Begin
403   hr_utility.set_location('Entering:'||l_proc, 5);
404 --
405   --
406   -- Start of API User Hook for post_insert.
407   --
408   begin
409     --
410     ben_dce_rki.after_insert
411       (
412   p_dpnt_cvg_eligy_prfl_id        =>p_rec.dpnt_cvg_eligy_prfl_id
413  ,p_effective_end_date            =>p_rec.effective_end_date
414  ,p_effective_start_date          =>p_rec.effective_start_date
415  ,p_business_group_id             =>p_rec.business_group_id
416  ,p_regn_id                       =>p_rec.regn_id
417  ,p_name                          =>p_rec.name
418  ,p_dpnt_cvg_eligy_prfl_stat_cd   =>p_rec.dpnt_cvg_eligy_prfl_stat_cd
419  ,p_dce_desc                      =>p_rec.dce_desc
420 -- ,p_military_status_rqmt_ind      =>p_rec.military_status_rqmt_ind
421  ,p_dpnt_cvg_elig_det_rl          =>p_rec.dpnt_cvg_elig_det_rl
422  ,p_dce_attribute_category        =>p_rec.dce_attribute_category
423  ,p_dce_attribute1                =>p_rec.dce_attribute1
424  ,p_dce_attribute2                =>p_rec.dce_attribute2
425  ,p_dce_attribute3                =>p_rec.dce_attribute3
426  ,p_dce_attribute4                =>p_rec.dce_attribute4
427  ,p_dce_attribute5                =>p_rec.dce_attribute5
428  ,p_dce_attribute6                =>p_rec.dce_attribute6
429  ,p_dce_attribute7                =>p_rec.dce_attribute7
430  ,p_dce_attribute8                =>p_rec.dce_attribute8
431  ,p_dce_attribute9                =>p_rec.dce_attribute9
432  ,p_dce_attribute10               =>p_rec.dce_attribute10
433  ,p_dce_attribute11               =>p_rec.dce_attribute11
434  ,p_dce_attribute12               =>p_rec.dce_attribute12
435  ,p_dce_attribute13               =>p_rec.dce_attribute13
436  ,p_dce_attribute14               =>p_rec.dce_attribute14
437  ,p_dce_attribute15               =>p_rec.dce_attribute15
438  ,p_dce_attribute16               =>p_rec.dce_attribute16
439  ,p_dce_attribute17               =>p_rec.dce_attribute17
440  ,p_dce_attribute18               =>p_rec.dce_attribute18
441  ,p_dce_attribute19               =>p_rec.dce_attribute19
442  ,p_dce_attribute20               =>p_rec.dce_attribute20
443  ,p_dce_attribute21               =>p_rec.dce_attribute21
444  ,p_dce_attribute22               =>p_rec.dce_attribute22
445  ,p_dce_attribute23               =>p_rec.dce_attribute23
446  ,p_dce_attribute24               =>p_rec.dce_attribute24
447  ,p_dce_attribute25               =>p_rec.dce_attribute25
448  ,p_dce_attribute26               =>p_rec.dce_attribute26
449  ,p_dce_attribute27               =>p_rec.dce_attribute27
450  ,p_dce_attribute28               =>p_rec.dce_attribute28
451  ,p_dce_attribute29               =>p_rec.dce_attribute29
452  ,p_dce_attribute30               =>p_rec.dce_attribute30
453  ,p_object_version_number         =>p_rec.object_version_number
454  ,p_effective_date                =>p_effective_date
455  ,p_validation_start_date         =>p_validation_start_date
456  ,p_validation_end_date           =>p_validation_end_date
457  ,p_dpnt_rlshp_flag                => p_rec.dpnt_rlshp_flag
458  ,p_dpnt_age_flag                  => p_rec.dpnt_age_flag
459  ,p_dpnt_stud_flag                 => p_rec.dpnt_stud_flag
460  ,p_dpnt_dsbld_flag                => p_rec.dpnt_dsbld_flag
461  ,p_dpnt_mrtl_flag                 => p_rec.dpnt_mrtl_flag
462  ,p_dpnt_mltry_flag                => p_rec.dpnt_mltry_flag
463  ,p_dpnt_pstl_flag                 => p_rec.dpnt_pstl_flag
464  ,p_dpnt_cvrd_in_anthr_pl_flag     => p_rec.dpnt_cvrd_in_anthr_pl_flag
465  ,p_dpnt_dsgnt_crntly_enrld_flag   => p_rec.dpnt_dsgnt_crntly_enrld_flag
466  ,p_dpnt_crit_flag                 => p_rec.dpnt_crit_flag
467  );
468     --
469   exception
470     --
471     when hr_api.cannot_find_prog_unit then
472       --
473       hr_api.cannot_find_prog_unit_error
474         (p_module_name => 'ben_dpnt_cvg_eligy_prfl_f'
475         ,p_hook_type   => 'AI');
476       --
477   end;
478   --
479   -- End of API User Hook for post_insert.
480   --
481   --
485 -- ----------------------------------------------------------------------------
482   hr_utility.set_location(' Leaving:'||l_proc, 10);
483 End post_insert;
484 --
486 -- |-------------------------------< ins_lck >--------------------------------|
487 -- ----------------------------------------------------------------------------
488 -- {Start Of Comments}
489 --
490 -- Description:
491 --   The ins_lck process has one main function to perform. When inserting
492 --   a datetracked row, we must validate the DT mode.
493 --   be manipulated.
494 --
495 -- Prerequisites:
496 --   This procedure can only be called for the datetrack mode of INSERT.
497 --
498 -- In Parameters:
499 --
500 -- Post Success:
501 --   On successful completion of the ins_lck process the parental
502 --   datetracked rows will be locked providing the p_enforce_foreign_locking
503 --   argument value is TRUE.
504 --   If the p_enforce_foreign_locking argument value is FALSE then the
505 --   parential rows are not locked.
506 --
507 -- Post Failure:
508 --   The Lck process can fail for:
509 --   1) When attempting to lock the row the row could already be locked by
510 --      another user. This will raise the HR_Api.Object_Locked exception.
511 --   2) When attempting to the lock the parent which doesn't exist.
512 --      For the entity to be locked the parent must exist!
513 --
514 -- Developer Implementation Notes:
515 --   None.
516 --
517 -- Access Status:
518 --   Internal Row Handler Use Only.
519 --
520 -- {End Of Comments}
521 -- ----------------------------------------------------------------------------
522 Procedure ins_lck
523 	(p_effective_date	 in  date,
524 	 p_datetrack_mode	 in  varchar2,
525 	 p_rec	 		 in  ben_dce_shd.g_rec_type,
526 	 p_validation_start_date out nocopy date,
527 	 p_validation_end_date	 out nocopy date) is
528 --
529   l_proc		  varchar2(72) := g_package||'ins_lck';
530   l_validation_start_date date;
531   l_validation_end_date	  date;
532 --
533 Begin
534   hr_utility.set_location('Entering:'||l_proc, 5);
535   --
536   -- Validate the datetrack mode mode getting the validation start
537   -- and end dates for the specified datetrack operation.
538   --
539   dt_api.validate_dt_mode
540 	(p_effective_date	   => p_effective_date,
541 	 p_datetrack_mode	   => p_datetrack_mode,
542 	 p_base_table_name	   => 'ben_dpnt_cvg_eligy_prfl_f',
543 	 p_base_key_column	   => 'dpnt_cvg_eligy_prfl_id',
544 	 p_base_key_value 	   => p_rec.dpnt_cvg_eligy_prfl_id,
545 	 p_parent_table_name1      => 'ben_regn_f',
546 	 p_parent_key_column1      => 'regn_id',
547 	 p_parent_key_value1       => p_rec.regn_id,
548          p_enforce_foreign_locking => true,
549 	 p_validation_start_date   => l_validation_start_date,
550  	 p_validation_end_date	   => l_validation_end_date);
551   --
552   -- Set the validation start and end date OUT arguments
553   --
554   p_validation_start_date := l_validation_start_date;
555   p_validation_end_date   := l_validation_end_date;
556   --
557   hr_utility.set_location(' Leaving:'||l_proc, 10);
558 --
559 End ins_lck;
560 --
561 -- ----------------------------------------------------------------------------
562 -- |---------------------------------< ins >----------------------------------|
563 -- ----------------------------------------------------------------------------
564 Procedure ins
565   (
566   p_rec		   in out nocopy ben_dce_shd.g_rec_type,
567   p_effective_date in     date
568   ) is
569 --
570   l_proc			varchar2(72) := g_package||'ins';
571   l_datetrack_mode		varchar2(30) := 'INSERT';
572   l_validation_start_date	date;
573   l_validation_end_date		date;
574 --
575 Begin
576   hr_utility.set_location('Entering:'||l_proc, 5);
577   --
578   -- Call the lock operation
579   --
580   ins_lck
581 	(p_effective_date	 => p_effective_date,
582 	 p_datetrack_mode	 => l_datetrack_mode,
583 	 p_rec	 		 => p_rec,
584 	 p_validation_start_date => l_validation_start_date,
585 	 p_validation_end_date	 => l_validation_end_date);
586   --
587   -- Call the supporting insert validate operations
588   --
589   ben_dce_bus.insert_validate
590 	(p_rec			 => p_rec,
591 	 p_effective_date	 => p_effective_date,
592 	 p_datetrack_mode	 => l_datetrack_mode,
593 	 p_validation_start_date => l_validation_start_date,
594 	 p_validation_end_date	 => l_validation_end_date);
595   --
596   -- Call the supporting pre-insert operation
597   --
598   pre_insert
599  	(p_rec			 => p_rec,
600 	 p_effective_date	 => p_effective_date,
601 	 p_datetrack_mode	 => l_datetrack_mode,
602 	 p_validation_start_date => l_validation_start_date,
603 	 p_validation_end_date	 => l_validation_end_date);
604   --
605   -- Insert the row
606   --
607   insert_dml
608  	(p_rec			 => p_rec,
609 	 p_effective_date	 => p_effective_date,
610 	 p_datetrack_mode	 => l_datetrack_mode,
611 	 p_validation_start_date => l_validation_start_date,
612 	 p_validation_end_date	 => l_validation_end_date);
613   --
614   -- Call the supporting post-insert operation
615   --
616   post_insert
617  	(p_rec			 => p_rec,
618 	 p_effective_date	 => p_effective_date,
619 	 p_datetrack_mode	 => l_datetrack_mode,
620 	 p_validation_start_date => l_validation_start_date,
621 	 p_validation_end_date	 => l_validation_end_date);
622 end ins;
623 --
624 -- ----------------------------------------------------------------------------
625 -- |---------------------------------< ins >----------------------------------|
626 -- ----------------------------------------------------------------------------
627 Procedure ins
628   (
629   p_dpnt_cvg_eligy_prfl_id       out nocopy number,
633   p_regn_id                      in number           default null,
630   p_effective_end_date           out nocopy date,
631   p_effective_start_date         out nocopy date,
632   p_business_group_id            in number,
634   p_name                         in varchar2,
635   p_dpnt_cvg_eligy_prfl_stat_cd  in varchar2         default null,
636   p_dce_desc                     in varchar2         default null,
637 --  p_military_status_rqmt_ind     in varchar2         default null,
638   p_dpnt_cvg_elig_det_rl         in number           default null,
639   p_dce_attribute_category       in varchar2         default null,
640   p_dce_attribute1               in varchar2         default null,
641   p_dce_attribute2               in varchar2         default null,
642   p_dce_attribute3               in varchar2         default null,
643   p_dce_attribute4               in varchar2         default null,
644   p_dce_attribute5               in varchar2         default null,
645   p_dce_attribute6               in varchar2         default null,
646   p_dce_attribute7               in varchar2         default null,
647   p_dce_attribute8               in varchar2         default null,
648   p_dce_attribute9               in varchar2         default null,
649   p_dce_attribute10              in varchar2         default null,
650   p_dce_attribute11              in varchar2         default null,
651   p_dce_attribute12              in varchar2         default null,
652   p_dce_attribute13              in varchar2         default null,
653   p_dce_attribute14              in varchar2         default null,
654   p_dce_attribute15              in varchar2         default null,
655   p_dce_attribute16              in varchar2         default null,
656   p_dce_attribute17              in varchar2         default null,
657   p_dce_attribute18              in varchar2         default null,
658   p_dce_attribute19              in varchar2         default null,
659   p_dce_attribute20              in varchar2         default null,
660   p_dce_attribute21              in varchar2         default null,
661   p_dce_attribute22              in varchar2         default null,
662   p_dce_attribute23              in varchar2         default null,
663   p_dce_attribute24              in varchar2         default null,
664   p_dce_attribute25              in varchar2         default null,
665   p_dce_attribute26              in varchar2         default null,
666   p_dce_attribute27              in varchar2         default null,
667   p_dce_attribute28              in varchar2         default null,
668   p_dce_attribute29              in varchar2         default null,
669   p_dce_attribute30              in varchar2         default null,
670   p_object_version_number        out nocopy number,
671   p_effective_date		 in date,
672   p_dpnt_rlshp_flag                in  varchar2  default 'N',
673   p_dpnt_age_flag                  in  varchar2  default 'N',
674   p_dpnt_stud_flag                 in  varchar2  default 'N',
675   p_dpnt_dsbld_flag                in  varchar2  default 'N',
676   p_dpnt_mrtl_flag                 in  varchar2  default 'N',
677   p_dpnt_mltry_flag                in  varchar2  default 'N',
678   p_dpnt_pstl_flag                 in  varchar2  default 'N',
679   p_dpnt_cvrd_in_anthr_pl_flag     in  varchar2  default 'N',
680   p_dpnt_dsgnt_crntly_enrld_flag   in  varchar2  default 'N',
681   p_dpnt_crit_flag                 in  varchar2  default 'N'
682   ) is
683 --
684   l_rec		ben_dce_shd.g_rec_type;
685   l_proc	varchar2(72) := g_package||'ins';
686 --
687 Begin
688   hr_utility.set_location('Entering:'||l_proc, 5);
689   --
690   -- Call conversion function to turn arguments into the
691   -- p_rec structure.
692   --
693   l_rec :=
694   ben_dce_shd.convert_args
695   (
696   null,
697   null,
698   null,
699   p_business_group_id,
700   p_regn_id,
701   p_name,
702   p_dpnt_cvg_eligy_prfl_stat_cd,
703   p_dce_desc,
704 --  p_military_status_rqmt_ind,
705   p_dpnt_cvg_elig_det_rl,
706   p_dce_attribute_category,
707   p_dce_attribute1,
708   p_dce_attribute2,
709   p_dce_attribute3,
710   p_dce_attribute4,
711   p_dce_attribute5,
712   p_dce_attribute6,
713   p_dce_attribute7,
714   p_dce_attribute8,
715   p_dce_attribute9,
716   p_dce_attribute10,
717   p_dce_attribute11,
718   p_dce_attribute12,
719   p_dce_attribute13,
720   p_dce_attribute14,
721   p_dce_attribute15,
722   p_dce_attribute16,
723   p_dce_attribute17,
724   p_dce_attribute18,
725   p_dce_attribute19,
726   p_dce_attribute20,
727   p_dce_attribute21,
728   p_dce_attribute22,
729   p_dce_attribute23,
730   p_dce_attribute24,
731   p_dce_attribute25,
732   p_dce_attribute26,
733   p_dce_attribute27,
734   p_dce_attribute28,
735   p_dce_attribute29,
736   p_dce_attribute30,
737   null,
738   p_dpnt_rlshp_flag,
739   p_dpnt_age_flag,
740   p_dpnt_stud_flag,
741   p_dpnt_dsbld_flag,
742   p_dpnt_mrtl_flag,
743   p_dpnt_mltry_flag,
744   p_dpnt_pstl_flag ,
745   p_dpnt_cvrd_in_anthr_pl_flag,
746   p_dpnt_dsgnt_crntly_enrld_flag,
747   p_dpnt_crit_flag
748   );
749   --
750   -- Having converted the arguments into the ben_dce_rec
751   -- plsql record structure we call the corresponding record
752   -- business process.
753   --
754   ins(l_rec, p_effective_date);
755   --
756   -- Set the OUT arguments.
757   --
758   p_dpnt_cvg_eligy_prfl_id        	:= l_rec.dpnt_cvg_eligy_prfl_id;
759   p_effective_start_date  	:= l_rec.effective_start_date;
760   p_effective_end_date    	:= l_rec.effective_end_date;
761   p_object_version_number 	:= l_rec.object_version_number;
762   --
763   --
764   hr_utility.set_location(' Leaving:'||l_proc, 10);
765 End ins;
766 --
767 end ben_dce_ins;