[Home] [Help]
PACKAGE BODY: APPS.BEN_ERP_INS
Source
1 Package Body ben_erp_ins as
2 /* $Header: beerprhi.pkb 115.7 2002/12/16 13:25:29 vsethi ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_erp_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.
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
46 -- g_api_dml status is reset.
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_erp_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_enrt_perd_for_pl_f t
70 where t.enrt_perd_for_pl_id = p_rec.enrt_perd_for_pl_id
71 and t.effective_start_date =
72 ben_erp_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_enrt_perd_for_pl_f.created_by%TYPE;
77 l_creation_date ben_enrt_perd_for_pl_f.creation_date%TYPE;
78 l_last_update_date ben_enrt_perd_for_pl_f.last_update_date%TYPE;
79 l_last_updated_by ben_enrt_perd_for_pl_f.last_updated_by%TYPE;
80 l_last_update_login ben_enrt_perd_for_pl_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_enrt_perd_for_pl_f',
90 p_base_key_column => 'enrt_perd_for_pl_id',
91 p_base_key_value => p_rec.enrt_perd_for_pl_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 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
116 hr_utility.set_message_token('PROCEDURE', l_proc);
117 hr_utility.set_message_token('STEP','10');
118 hr_utility.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_erp_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_enrt_perd_for_pl_f
132 --
133 insert into ben_enrt_perd_for_pl_f
134 ( enrt_perd_for_pl_id,
135 effective_start_date,
136 effective_end_date,
137 enrt_cvg_strt_dt_cd,
138 enrt_cvg_strt_dt_rl,
139 enrt_cvg_end_dt_cd,
140 enrt_cvg_end_dt_rl,
141 rt_strt_dt_cd,
142 rt_strt_dt_rl,
143 rt_end_dt_cd,
144 rt_end_dt_rl,
145 enrt_perd_id,
146 pl_id,
147 lee_rsn_id,
148 business_group_id,
149 erp_attribute_category,
150 erp_attribute1,
151 erp_attribute2,
152 erp_attribute3,
153 erp_attribute4,
154 erp_attribute5,
155 erp_attribute6,
156 erp_attribute7,
157 erp_attribute8,
158 erp_attribute9,
159 erp_attribute10,
160 erp_attribute11,
161 erp_attribute12,
162 erp_attribute13,
163 erp_attribute14,
164 erp_attribute15,
165 erp_attribute16,
166 erp_attribute17,
167 erp_attribute18,
168 erp_attribute19,
169 erp_attribute20,
170 erp_attribute21,
171 erp_attribute22,
172 erp_attribute23,
173 erp_attribute24,
174 erp_attribute25,
175 erp_attribute26,
176 erp_attribute27,
177 erp_attribute28,
178 erp_attribute29,
179 erp_attribute30,
180 object_version_number
181 , created_by,
182 creation_date,
183 last_update_date,
184 last_updated_by,
185 last_update_login
186 )
187 Values
188 ( p_rec.enrt_perd_for_pl_id,
189 p_rec.effective_start_date,
190 p_rec.effective_end_date,
191 p_rec.enrt_cvg_strt_dt_cd,
192 p_rec.enrt_cvg_strt_dt_rl,
193 p_rec.enrt_cvg_end_dt_cd,
194 p_rec.enrt_cvg_end_dt_rl,
195 p_rec.rt_strt_dt_cd,
196 p_rec.rt_strt_dt_rl,
197 p_rec.rt_end_dt_cd,
198 p_rec.rt_end_dt_rl,
199 p_rec.enrt_perd_id,
200 p_rec.pl_id,
201 p_rec.lee_rsn_id,
202 p_rec.business_group_id,
203 p_rec.erp_attribute_category,
204 p_rec.erp_attribute1,
205 p_rec.erp_attribute2,
206 p_rec.erp_attribute3,
207 p_rec.erp_attribute4,
208 p_rec.erp_attribute5,
209 p_rec.erp_attribute6,
210 p_rec.erp_attribute7,
211 p_rec.erp_attribute8,
212 p_rec.erp_attribute9,
213 p_rec.erp_attribute10,
214 p_rec.erp_attribute11,
215 p_rec.erp_attribute12,
216 p_rec.erp_attribute13,
217 p_rec.erp_attribute14,
218 p_rec.erp_attribute15,
219 p_rec.erp_attribute16,
220 p_rec.erp_attribute17,
221 p_rec.erp_attribute18,
222 p_rec.erp_attribute19,
223 p_rec.erp_attribute20,
224 p_rec.erp_attribute21,
225 p_rec.erp_attribute22,
226 p_rec.erp_attribute23,
227 p_rec.erp_attribute24,
228 p_rec.erp_attribute25,
229 p_rec.erp_attribute26,
230 p_rec.erp_attribute27,
231 p_rec.erp_attribute28,
232 p_rec.erp_attribute29,
233 p_rec.erp_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 );
241 --
242 ben_erp_shd.g_api_dml := false; -- Unset the api dml status
243 hr_utility.set_location(' Leaving:'||l_proc, 15);
244 --
245 Exception
246 When hr_api.check_integrity_violated Then
247 -- A check constraint has been violated
248 ben_erp_shd.g_api_dml := false; -- Unset the api dml status
249 ben_erp_shd.constraint_error
250 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
251 When hr_api.unique_integrity_violated Then
252 -- Unique integrity has been violated
253 ben_erp_shd.g_api_dml := false; -- Unset the api dml status
254 ben_erp_shd.constraint_error
255 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
256 When Others Then
257 ben_erp_shd.g_api_dml := false; -- Unset the api dml status
258 Raise;
259 End dt_insert_dml;
260 --
261 -- ----------------------------------------------------------------------------
262 -- |------------------------------< insert_dml >------------------------------|
263 -- ----------------------------------------------------------------------------
264 Procedure insert_dml
265 (p_rec in out nocopy ben_erp_shd.g_rec_type,
266 p_effective_date in date,
267 p_datetrack_mode in varchar2,
268 p_validation_start_date in date,
269 p_validation_end_date in date) is
270 --
271 l_proc varchar2(72) := g_package||'insert_dml';
272 --
273 Begin
274 hr_utility.set_location('Entering:'||l_proc, 5);
275 --
276 dt_insert_dml(p_rec => p_rec,
277 p_effective_date => p_effective_date,
278 p_datetrack_mode => p_datetrack_mode,
279 p_validation_start_date => p_validation_start_date,
280 p_validation_end_date => p_validation_end_date);
281 --
282 hr_utility.set_location(' Leaving:'||l_proc, 10);
283 End insert_dml;
284 --
285 -- ----------------------------------------------------------------------------
286 -- |------------------------------< pre_insert >------------------------------|
287 -- ----------------------------------------------------------------------------
288 -- {Start Of Comments}
289 --
290 -- Description:
291 -- This private procedure contains any processing which is required before
292 -- the insert dml. Presently, if the entity has a corresponding primary
293 -- key which is maintained by an associating sequence, the primary key for
294 -- the entity will be populated with the next sequence value in
295 -- preparation for the insert dml.
296 -- Also, if comments are defined for this entity, the comments insert
297 -- logic will also be called, generating a comment_id if required.
298 --
299 -- Prerequisites:
300 -- This is an internal procedure which is called from the ins procedure.
301 --
302 -- In Parameters:
303 -- A Pl/Sql record structre.
304 --
305 -- Post Success:
306 -- Processing continues.
307 --
308 -- Post Failure:
309 -- If an error has occurred, an error message and exception will be raised
310 -- but not handled.
311 --
312 -- Developer Implementation Notes:
313 -- Any pre-processing required before the insert dml is issued should be
314 -- coded within this procedure. As stated above, a good example is the
315 -- generation of a primary key number via a corresponding sequence.
316 -- It is important to note that any 3rd party maintenance should be reviewed
317 -- before placing in this procedure.
318 --
319 -- Access Status:
320 -- Internal Row Handler Use Only.
321 --
322 -- {End Of Comments}
323 -- ----------------------------------------------------------------------------
324 Procedure pre_insert
325 (p_rec in out nocopy ben_erp_shd.g_rec_type,
326 p_effective_date in date,
327 p_datetrack_mode in varchar2,
328 p_validation_start_date in date,
329 p_validation_end_date in date) is
330 --
331 l_proc varchar2(72) := g_package||'pre_insert';
332 --
333 Cursor C_Sel1 is select ben_enrt_perd_for_pl_f_s.nextval from sys.dual;
334 --
335 Begin
336 hr_utility.set_location('Entering:'||l_proc, 5);
337 --
338 -- Select the next sequence number
339 --
340 Open C_Sel1;
341 Fetch C_Sel1 Into p_rec.enrt_perd_for_pl_id;
342 Close C_Sel1;
343 --
344 hr_utility.set_location(' Leaving:'||l_proc, 10);
345 End pre_insert;
346 --
347 -- ----------------------------------------------------------------------------
348 -- |-----------------------------< post_insert >------------------------------|
349 -- ----------------------------------------------------------------------------
350 -- {Start Of Comments}
351 --
352 -- Description:
353 -- This private procedure contains any processing which is required after the
354 -- insert dml.
355 --
356 -- Prerequisites:
357 -- This is an internal procedure which is called from the ins procedure.
358 --
359 -- In Parameters:
360 -- A Pl/Sql record structre.
361 --
362 -- Post Success:
363 -- Processing continues.
364 --
365 -- Post Failure:
366 -- If an error has occurred, an error message and exception will be raised
367 -- but not handled.
368 --
369 -- Developer Implementation Notes:
370 -- Any post-processing required after the insert dml is issued should be
371 -- coded within this procedure. It is important to note that any 3rd party
372 -- maintenance should be reviewed before placing in this procedure.
373 --
374 -- Access Status:
375 -- Internal Row Handler Use Only.
376 --
377 -- {End Of Comments}
378 -- ----------------------------------------------------------------------------
379 Procedure post_insert
380 (p_rec in ben_erp_shd.g_rec_type,
381 p_effective_date in date,
382 p_datetrack_mode in varchar2,
383 p_validation_start_date in date,
384 p_validation_end_date in date) is
385 --
386 l_proc varchar2(72) := g_package||'post_insert';
387 --
388 Begin
389 hr_utility.set_location('Entering:'||l_proc, 5);
390 --
391 --
392 -- Start of API User Hook for post_insert.
393 --
394 begin
395 --
396 ben_erp_rki.after_insert
397 (
398 p_enrt_perd_for_pl_id =>p_rec.enrt_perd_for_pl_id
399 ,p_effective_start_date =>p_rec.effective_start_date
400 ,p_effective_end_date =>p_rec.effective_end_date
401 ,p_enrt_cvg_strt_dt_cd =>p_rec.enrt_cvg_strt_dt_cd
402 ,p_enrt_cvg_strt_dt_rl =>p_rec.enrt_cvg_strt_dt_rl
403 ,p_enrt_cvg_end_dt_cd =>p_rec.enrt_cvg_end_dt_cd
404 ,p_enrt_cvg_end_dt_rl =>p_rec.enrt_cvg_end_dt_rl
405 ,p_rt_strt_dt_cd =>p_rec.rt_strt_dt_cd
406 ,p_rt_strt_dt_rl =>p_rec.rt_strt_dt_rl
407 ,p_rt_end_dt_cd =>p_rec.rt_end_dt_cd
408 ,p_rt_end_dt_rl =>p_rec.rt_end_dt_rl
409 ,p_enrt_perd_id =>p_rec.enrt_perd_id
410 ,p_pl_id =>p_rec.pl_id
411 ,p_lee_rsn_id =>p_rec.lee_rsn_id
412 ,p_business_group_id =>p_rec.business_group_id
413 ,p_erp_attribute_category =>p_rec.erp_attribute_category
414 ,p_erp_attribute1 =>p_rec.erp_attribute1
415 ,p_erp_attribute2 =>p_rec.erp_attribute2
416 ,p_erp_attribute3 =>p_rec.erp_attribute3
417 ,p_erp_attribute4 =>p_rec.erp_attribute4
418 ,p_erp_attribute5 =>p_rec.erp_attribute5
419 ,p_erp_attribute6 =>p_rec.erp_attribute6
420 ,p_erp_attribute7 =>p_rec.erp_attribute7
421 ,p_erp_attribute8 =>p_rec.erp_attribute8
425 ,p_erp_attribute12 =>p_rec.erp_attribute12
422 ,p_erp_attribute9 =>p_rec.erp_attribute9
423 ,p_erp_attribute10 =>p_rec.erp_attribute10
424 ,p_erp_attribute11 =>p_rec.erp_attribute11
426 ,p_erp_attribute13 =>p_rec.erp_attribute13
427 ,p_erp_attribute14 =>p_rec.erp_attribute14
428 ,p_erp_attribute15 =>p_rec.erp_attribute15
429 ,p_erp_attribute16 =>p_rec.erp_attribute16
430 ,p_erp_attribute17 =>p_rec.erp_attribute17
431 ,p_erp_attribute18 =>p_rec.erp_attribute18
432 ,p_erp_attribute19 =>p_rec.erp_attribute19
433 ,p_erp_attribute20 =>p_rec.erp_attribute20
434 ,p_erp_attribute21 =>p_rec.erp_attribute21
435 ,p_erp_attribute22 =>p_rec.erp_attribute22
436 ,p_erp_attribute23 =>p_rec.erp_attribute23
437 ,p_erp_attribute24 =>p_rec.erp_attribute24
438 ,p_erp_attribute25 =>p_rec.erp_attribute25
439 ,p_erp_attribute26 =>p_rec.erp_attribute26
440 ,p_erp_attribute27 =>p_rec.erp_attribute27
441 ,p_erp_attribute28 =>p_rec.erp_attribute28
442 ,p_erp_attribute29 =>p_rec.erp_attribute29
443 ,p_erp_attribute30 =>p_rec.erp_attribute30
444 ,p_object_version_number =>p_rec.object_version_number
445 ,p_effective_date =>p_effective_date
446 ,p_validation_start_date =>p_validation_start_date
447 ,p_validation_end_date =>p_validation_end_date
448 );
449 --
450 exception
451 --
452 when hr_api.cannot_find_prog_unit then
453 --
454 hr_api.cannot_find_prog_unit_error
455 (p_module_name => 'ben_enrt_perd_for_pl_f'
456 ,p_hook_type => 'AI');
457 --
458 end;
459 --
460 -- End of API User Hook for post_insert.
461 --
462 --
463 hr_utility.set_location(' Leaving:'||l_proc, 10);
464 End post_insert;
465 --
466 -- ----------------------------------------------------------------------------
467 -- |-------------------------------< ins_lck >--------------------------------|
468 -- ----------------------------------------------------------------------------
469 -- {Start Of Comments}
470 --
471 -- Description:
472 -- The ins_lck process has one main function to perform. When inserting
473 -- a datetracked row, we must validate the DT mode.
474 -- be manipulated.
475 --
476 -- Prerequisites:
477 -- This procedure can only be called for the datetrack mode of INSERT.
478 --
479 -- In Parameters:
480 --
481 -- Post Success:
482 -- On successful completion of the ins_lck process the parental
483 -- datetracked rows will be locked providing the p_enforce_foreign_locking
484 -- argument value is TRUE.
485 -- If the p_enforce_foreign_locking argument value is FALSE then the
486 -- parential rows are not locked.
487 --
488 -- Post Failure:
489 -- The Lck process can fail for:
490 -- 1) When attempting to lock the row the row could already be locked by
491 -- another user. This will raise the HR_Api.Object_Locked exception.
492 -- 2) When attempting to the lock the parent which doesn't exist.
493 -- For the entity to be locked the parent must exist!
494 --
495 -- Developer Implementation Notes:
496 -- None.
497 --
498 -- Access Status:
499 -- Internal Row Handler Use Only.
500 --
501 -- {End Of Comments}
502 -- ----------------------------------------------------------------------------
503 Procedure ins_lck
504 (p_effective_date in date,
505 p_datetrack_mode in varchar2,
506 p_rec in ben_erp_shd.g_rec_type,
507 p_validation_start_date out nocopy date,
508 p_validation_end_date out nocopy date) is
509 --
510 l_proc varchar2(72) := g_package||'ins_lck';
511 l_validation_start_date date;
512 l_validation_end_date date;
513 --
514 Begin
515 hr_utility.set_location('Entering:'||l_proc, 5);
516 --
517 -- Validate the datetrack mode mode getting the validation start
518 -- and end dates for the specified datetrack operation.
519 --
520 dt_api.validate_dt_mode
521 (p_effective_date => p_effective_date,
522 p_datetrack_mode => p_datetrack_mode,
523 p_base_table_name => 'ben_enrt_perd_for_pl_f',
524 p_base_key_column => 'enrt_perd_for_pl_id',
525 p_base_key_value => p_rec.enrt_perd_for_pl_id,
526 p_parent_table_name1 => 'ben_lee_rsn_f',
527 p_parent_key_column1 => 'lee_rsn_id',
528 p_parent_key_value1 => p_rec.lee_rsn_id,
529 p_parent_table_name2 => 'ben_pl_f',
530 p_parent_key_column2 => 'pl_id',
531 p_parent_key_value2 => p_rec.pl_id,
532 p_enforce_foreign_locking => true,
533 p_validation_start_date => l_validation_start_date,
534 p_validation_end_date => l_validation_end_date);
535 --
536 -- Set the validation start and end date OUT arguments
537 --
538 p_validation_start_date := l_validation_start_date;
539 p_validation_end_date := l_validation_end_date;
540 --
541 hr_utility.set_location(' Leaving:'||l_proc, 10);
542 --
543 End ins_lck;
544 --
545 -- ----------------------------------------------------------------------------
549 (
546 -- |---------------------------------< ins >----------------------------------|
547 -- ----------------------------------------------------------------------------
548 Procedure ins
550 p_rec in out nocopy ben_erp_shd.g_rec_type,
551 p_effective_date in date
552 ) is
553 --
554 l_proc varchar2(72) := g_package||'ins';
555 l_datetrack_mode varchar2(30) := 'INSERT';
556 l_validation_start_date date;
557 l_validation_end_date date;
558 --
559 Begin
560 hr_utility.set_location('Entering:'||l_proc, 5);
561 --
562 -- Call the lock operation
563 --
564 ins_lck
565 (p_effective_date => p_effective_date,
566 p_datetrack_mode => l_datetrack_mode,
567 p_rec => p_rec,
568 p_validation_start_date => l_validation_start_date,
569 p_validation_end_date => l_validation_end_date);
570 --
571 -- Call the supporting insert validate operations
572 --
573 ben_erp_bus.insert_validate
574 (p_rec => p_rec,
575 p_effective_date => p_effective_date,
576 p_datetrack_mode => l_datetrack_mode,
577 p_validation_start_date => l_validation_start_date,
578 p_validation_end_date => l_validation_end_date);
579 --
580 -- Call the supporting pre-insert operation
581 --
582 pre_insert
583 (p_rec => p_rec,
584 p_effective_date => p_effective_date,
585 p_datetrack_mode => l_datetrack_mode,
586 p_validation_start_date => l_validation_start_date,
587 p_validation_end_date => l_validation_end_date);
588 --
589 -- Insert the row
590 --
591 insert_dml
592 (p_rec => p_rec,
593 p_effective_date => p_effective_date,
594 p_datetrack_mode => l_datetrack_mode,
595 p_validation_start_date => l_validation_start_date,
596 p_validation_end_date => l_validation_end_date);
597 --
598 -- Call the supporting post-insert operation
599 --
600 post_insert
601 (p_rec => p_rec,
602 p_effective_date => p_effective_date,
603 p_datetrack_mode => l_datetrack_mode,
604 p_validation_start_date => l_validation_start_date,
605 p_validation_end_date => l_validation_end_date);
606 end ins;
607 --
608 -- ----------------------------------------------------------------------------
609 -- |---------------------------------< ins >----------------------------------|
610 -- ----------------------------------------------------------------------------
611 Procedure ins
612 (
613 p_enrt_perd_for_pl_id out nocopy number,
614 p_effective_start_date out nocopy date,
615 p_effective_end_date out nocopy date,
616 p_enrt_cvg_strt_dt_cd in varchar2 default null,
617 p_enrt_cvg_strt_dt_rl in number default null,
618 p_enrt_cvg_end_dt_cd in varchar2 default null,
619 p_enrt_cvg_end_dt_rl in number default null,
620 p_rt_strt_dt_cd in varchar2 default null,
621 p_rt_strt_dt_rl in number default null,
622 p_rt_end_dt_cd in varchar2 default null,
623 p_rt_end_dt_rl in number default null,
624 p_enrt_perd_id in number default null,
625 p_pl_id in number,
626 p_lee_rsn_id in number default null,
627 p_business_group_id in number,
628 p_erp_attribute_category in varchar2 default null,
629 p_erp_attribute1 in varchar2 default null,
630 p_erp_attribute2 in varchar2 default null,
631 p_erp_attribute3 in varchar2 default null,
632 p_erp_attribute4 in varchar2 default null,
633 p_erp_attribute5 in varchar2 default null,
634 p_erp_attribute6 in varchar2 default null,
635 p_erp_attribute7 in varchar2 default null,
636 p_erp_attribute8 in varchar2 default null,
637 p_erp_attribute9 in varchar2 default null,
638 p_erp_attribute10 in varchar2 default null,
639 p_erp_attribute11 in varchar2 default null,
640 p_erp_attribute12 in varchar2 default null,
641 p_erp_attribute13 in varchar2 default null,
642 p_erp_attribute14 in varchar2 default null,
643 p_erp_attribute15 in varchar2 default null,
644 p_erp_attribute16 in varchar2 default null,
645 p_erp_attribute17 in varchar2 default null,
646 p_erp_attribute18 in varchar2 default null,
647 p_erp_attribute19 in varchar2 default null,
648 p_erp_attribute20 in varchar2 default null,
649 p_erp_attribute21 in varchar2 default null,
650 p_erp_attribute22 in varchar2 default null,
651 p_erp_attribute23 in varchar2 default null,
652 p_erp_attribute24 in varchar2 default null,
653 p_erp_attribute25 in varchar2 default null,
654 p_erp_attribute26 in varchar2 default null,
655 p_erp_attribute27 in varchar2 default null,
657 p_erp_attribute29 in varchar2 default null,
658 p_erp_attribute30 in varchar2 default null,
659 p_object_version_number out nocopy number,
660 p_effective_date in date
661 ) is
662 --
663 l_rec ben_erp_shd.g_rec_type;
664 l_proc varchar2(72) := g_package||'ins';
665 --
666 Begin
667 hr_utility.set_location('Entering:'||l_proc, 5);
668 --
669 -- Call conversion function to turn arguments into the
670 -- p_rec structure.
671 --
672 l_rec :=
673 ben_erp_shd.convert_args
674 (
675 null,
676 null,
677 null,
678 p_enrt_cvg_strt_dt_cd,
679 p_enrt_cvg_strt_dt_rl,
680 p_enrt_cvg_end_dt_cd,
681 p_enrt_cvg_end_dt_rl,
682 p_rt_strt_dt_cd,
683 p_rt_strt_dt_rl,
684 p_rt_end_dt_cd,
685 p_rt_end_dt_rl,
686 p_enrt_perd_id,
687 p_pl_id,
688 p_lee_rsn_id,
689 p_business_group_id,
690 p_erp_attribute_category,
691 p_erp_attribute1,
692 p_erp_attribute2,
693 p_erp_attribute3,
694 p_erp_attribute4,
695 p_erp_attribute5,
696 p_erp_attribute6,
697 p_erp_attribute7,
698 p_erp_attribute8,
699 p_erp_attribute9,
700 p_erp_attribute10,
701 p_erp_attribute11,
702 p_erp_attribute12,
703 p_erp_attribute13,
704 p_erp_attribute14,
705 p_erp_attribute15,
706 p_erp_attribute16,
707 p_erp_attribute17,
708 p_erp_attribute18,
709 p_erp_attribute19,
710 p_erp_attribute20,
711 p_erp_attribute21,
712 p_erp_attribute22,
713 p_erp_attribute23,
714 p_erp_attribute24,
715 p_erp_attribute25,
716 p_erp_attribute26,
717 p_erp_attribute27,
718 p_erp_attribute28,
719 p_erp_attribute29,
720 p_erp_attribute30,
721 null
722 );
723 --
724 -- Having converted the arguments into the ben_erp_rec
725 -- plsql record structure we call the corresponding record
726 -- business process.
727 --
728 ins(l_rec, p_effective_date);
729 --
730 -- Set the OUT arguments.
731 --
732 p_enrt_perd_for_pl_id := l_rec.enrt_perd_for_pl_id;
733 p_effective_start_date := l_rec.effective_start_date;
734 p_effective_end_date := l_rec.effective_end_date;
735 p_object_version_number := l_rec.object_version_number;
736 --
737 --
738 hr_utility.set_location(' Leaving:'||l_proc, 10);
739 End ins;
740 --
741 end ben_erp_ins;
656 p_erp_attribute28 in varchar2 default null,