[Home] [Help]
PACKAGE BODY: APPS.BEN_PRY_INS
Source
1 Package Body ben_pry_ins as
2 /* $Header: bepryrhi.pkb 120.5.12010000.3 2008/08/05 15:23:35 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pry_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 structure.
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_pry_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
63 ) is
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_prtt_rmt_aprvd_fr_pymt_f t
70 where t.prtt_rmt_aprvd_fr_pymt_id = p_rec.prtt_rmt_aprvd_fr_pymt_id
71 and t.effective_start_date =
72 ben_pry_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_prtt_rmt_aprvd_fr_pymt_f.created_by%TYPE;
77 l_creation_date ben_prtt_rmt_aprvd_fr_pymt_f.creation_date%TYPE;
78 l_last_update_date ben_prtt_rmt_aprvd_fr_pymt_f.last_update_date%TYPE;
79 l_last_updated_by ben_prtt_rmt_aprvd_fr_pymt_f.last_updated_by%TYPE;
80 l_last_update_login ben_prtt_rmt_aprvd_fr_pymt_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_prtt_rmt_aprvd_fr_pymt_f'
90 ,p_base_key_column => 'prtt_rmt_aprvd_fr_pymt_id'
91 ,p_base_key_value => p_rec.prtt_rmt_aprvd_fr_pymt_id
92 );
93 --
94 -- Set the effective start and end dates to the corresponding
95 -- validation start and end dates
96 --
97 p_rec.effective_start_date := p_validation_start_date;
98 p_rec.effective_end_date := p_validation_end_date;
99 --
100 -- If the datetrack_mode is not INSERT then we must populate the WHO
101 -- columns with the 'old' creation values and 'new' updated values.
102 --
103 If (p_datetrack_mode <> hr_api.g_insert) then
104 hr_utility.set_location(l_proc, 10);
105 --
106 -- Select the 'old' created values
107 --
108 Open C_Sel1;
109 Fetch C_Sel1 Into l_created_by, l_creation_date;
110 If C_Sel1%notfound Then
111 --
112 -- The previous 'old' created row has not been found. We need
113 -- to error as an internal datetrack problem exists.
114 --
115 Close C_Sel1;
116 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
117 fnd_message.set_token('PROCEDURE', l_proc);
118 fnd_message.set_token('STEP','10');
119 fnd_message.raise_error;
120 End If;
121 Close C_Sel1;
122 --
123 -- Set the AOL updated WHO values
124 --
125 l_last_update_date := sysdate;
126 l_last_updated_by := fnd_global.user_id;
127 l_last_update_login := fnd_global.login_id;
128 End If;
129 --
130 ben_pry_shd.g_api_dml := true; -- Set the api dml status
131 --
132 -- Insert the row into: ben_prtt_rmt_aprvd_fr_pymt_f
133 --
134 insert into ben_prtt_rmt_aprvd_fr_pymt_f
135 (prtt_rmt_aprvd_fr_pymt_id
136 ,prtt_reimbmt_rqst_id
137 ,effective_start_date
138 ,effective_end_date
139 ,apprvd_fr_pymt_num
140 ,adjmt_flag
141 ,aprvd_fr_pymt_amt
142 ,pymt_stat_cd
143 ,pymt_stat_rsn_cd
144 ,pymt_stat_ovrdn_rsn_cd
145 ,pymt_stat_prr_to_ovrd_cd
146 ,business_group_id
147 ,element_entry_value_id
148 ,pry_attribute_category
149 ,pry_attribute1
150 ,pry_attribute2
151 ,pry_attribute3
152 ,pry_attribute4
153 ,pry_attribute5
154 ,pry_attribute6
155 ,pry_attribute7
156 ,pry_attribute8
157 ,pry_attribute9
158 ,pry_attribute10
159 ,pry_attribute11
160 ,pry_attribute12
161 ,pry_attribute13
162 ,pry_attribute14
163 ,pry_attribute15
164 ,pry_attribute16
165 ,pry_attribute17
166 ,pry_attribute18
167 ,pry_attribute19
168 ,pry_attribute20
169 ,pry_attribute21
170 ,pry_attribute22
171 ,pry_attribute23
172 ,pry_attribute24
173 ,pry_attribute25
174 ,pry_attribute26
175 ,pry_attribute27
176 ,pry_attribute28
177 ,pry_attribute29
178 ,pry_attribute30
179 ,object_version_number
180 ,created_by
181 ,creation_date
182 ,last_update_date
183 ,last_updated_by
184 ,last_update_login
185 )
186 Values
187 (p_rec.prtt_rmt_aprvd_fr_pymt_id
188 ,p_rec.prtt_reimbmt_rqst_id
189 ,p_rec.effective_start_date
190 ,p_rec.effective_end_date
191 ,p_rec.apprvd_fr_pymt_num
192 ,p_rec.adjmt_flag
193 ,p_rec.aprvd_fr_pymt_amt
194 ,p_rec.pymt_stat_cd
195 ,p_rec.pymt_stat_rsn_cd
196 ,p_rec.pymt_stat_ovrdn_rsn_cd
197 ,p_rec.pymt_stat_prr_to_ovrd_cd
198 ,p_rec.business_group_id
199 ,p_rec.element_entry_value_id
200 ,p_rec.pry_attribute_category
201 ,p_rec.pry_attribute1
202 ,p_rec.pry_attribute2
203 ,p_rec.pry_attribute3
204 ,p_rec.pry_attribute4
205 ,p_rec.pry_attribute5
206 ,p_rec.pry_attribute6
207 ,p_rec.pry_attribute7
208 ,p_rec.pry_attribute8
209 ,p_rec.pry_attribute9
210 ,p_rec.pry_attribute10
211 ,p_rec.pry_attribute11
212 ,p_rec.pry_attribute12
213 ,p_rec.pry_attribute13
214 ,p_rec.pry_attribute14
215 ,p_rec.pry_attribute15
216 ,p_rec.pry_attribute16
217 ,p_rec.pry_attribute17
218 ,p_rec.pry_attribute18
219 ,p_rec.pry_attribute19
220 ,p_rec.pry_attribute20
221 ,p_rec.pry_attribute21
222 ,p_rec.pry_attribute22
223 ,p_rec.pry_attribute23
224 ,p_rec.pry_attribute24
225 ,p_rec.pry_attribute25
226 ,p_rec.pry_attribute26
227 ,p_rec.pry_attribute27
228 ,p_rec.pry_attribute28
229 ,p_rec.pry_attribute29
230 ,p_rec.pry_attribute30
231 ,p_rec.object_version_number
232 ,l_created_by
233 ,l_creation_date
234 ,l_last_update_date
235 ,l_last_updated_by
236 ,l_last_update_login
237 );
238 --
239 ben_pry_shd.g_api_dml := false; -- Unset the api dml status
240 hr_utility.set_location(' Leaving:'||l_proc, 15);
241 --
242 Exception
243 When hr_api.check_integrity_violated Then
244 -- A check constraint has been violated
245 ben_pry_shd.g_api_dml := false; -- Unset the api dml status
246 ben_pry_shd.constraint_error
247 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
248 When hr_api.unique_integrity_violated Then
249 -- Unique integrity has been violated
250 ben_pry_shd.g_api_dml := false; -- Unset the api dml status
251 ben_pry_shd.constraint_error
252 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
253 When Others Then
254 ben_pry_shd.g_api_dml := false; -- Unset the api dml status
255 Raise;
256 End dt_insert_dml;
257 --
258 -- ----------------------------------------------------------------------------
259 -- |------------------------------< insert_dml >------------------------------|
260 -- ----------------------------------------------------------------------------
261 Procedure insert_dml
262 (p_rec in out nocopy ben_pry_shd.g_rec_type
263 ,p_effective_date in date
264 ,p_datetrack_mode in varchar2
265 ,p_validation_start_date in date
266 ,p_validation_end_date in date
267 ) is
268 --
269 l_proc varchar2(72) := g_package||'insert_dml';
270 --
271 Begin
272 hr_utility.set_location('Entering:'||l_proc, 5);
273 --
274 ben_pry_ins.dt_insert_dml
275 (p_rec => p_rec
276 ,p_effective_date => p_effective_date
277 ,p_datetrack_mode => p_datetrack_mode
278 ,p_validation_start_date => p_validation_start_date
279 ,p_validation_end_date => p_validation_end_date
280 );
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 structure.
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_pry_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
330 ) is
331 --
332 l_proc varchar2(72) := g_package||'pre_insert';
333 --
334 Cursor C_Sel1 is select ben_prtt_rmt_aprvd_fr_pymt_s.nextval from sys.dual;
335 Cursor C_num is
336 select nvl(max(apprvd_fr_pymt_num),0) + 1
337 from ben_prtt_rmt_aprvd_fr_pymt_f
338 where prtt_reimbmt_rqst_id = p_rec.prtt_reimbmt_rqst_id ;
339
340 --
341 Begin
342 hr_utility.set_location('Entering:'||l_proc, 5);
343 --
344 --
345 -- Select the next sequence number
346 --
347 Open C_Sel1;
348 Fetch C_Sel1 Into p_rec.prtt_rmt_aprvd_fr_pymt_id;
349 Close C_Sel1;
350 --
351 open c_num ;
352 fetch c_num into p_rec.apprvd_fr_pymt_num ;
353 close c_num ;
354 --
355 hr_utility.set_location(' Leaving:'||l_proc, 10);
356 End pre_insert;
357 --
358 -- ----------------------------------------------------------------------------
359 -- |----------------------------< post_insert >-------------------------------|
360 -- ----------------------------------------------------------------------------
361 -- {Start Of Comments}
362 --
363 -- Description:
364 -- This private procedure contains any processing which is required after
365 -- the insert dml.
366 --
367 -- Prerequisites:
368 -- This is an internal procedure which is called from the ins procedure.
369 --
370 -- In Parameters:
371 -- A Pl/Sql record structure.
372 --
373 -- Post Success:
374 -- Processing continues.
375 --
376 -- Post Failure:
377 -- If an error has occurred, an error message and exception will be raised
378 -- but not handled.
379 --
380 -- Developer Implementation Notes:
381 -- Any post-processing required after the insert dml is issued should be
382 -- coded within this procedure. It is important to note that any 3rd party
383 -- maintenance should be reviewed before placing in this procedure.
384 --
385 -- Access Status:
386 -- Internal Row Handler Use Only.
387 --
388 -- {End Of Comments}
389 -- ----------------------------------------------------------------------------
390 Procedure post_insert
391 (p_rec in ben_pry_shd.g_rec_type
392 ,p_effective_date in date
393 ,p_datetrack_mode in varchar2
394 ,p_validation_start_date in date
395 ,p_validation_end_date in date
396 ) is
397 --
398 l_proc varchar2(72) := g_package||'post_insert';
399 --
400 Begin
401 hr_utility.set_location('Entering:'||l_proc, 5);
402 begin
403 --
404 ben_pry_rki.after_insert
405 (p_effective_date
406 => p_effective_date
407 ,p_validation_start_date
408 => p_validation_start_date
409 ,p_validation_end_date
410 => p_validation_end_date
411 ,p_prtt_rmt_aprvd_fr_pymt_id
412 => p_rec.prtt_rmt_aprvd_fr_pymt_id
413 ,p_prtt_reimbmt_rqst_id
414 => p_rec.prtt_reimbmt_rqst_id
415 ,p_effective_start_date
416 => p_rec.effective_start_date
417 ,p_effective_end_date
418 => p_rec.effective_end_date
419 ,p_apprvd_fr_pymt_num
420 => p_rec.apprvd_fr_pymt_num
421 ,p_adjmt_flag
422 => p_rec.adjmt_flag
423 ,p_aprvd_fr_pymt_amt
424 => p_rec.aprvd_fr_pymt_amt
425 ,p_pymt_stat_cd
426 => p_rec.pymt_stat_cd
427 ,p_pymt_stat_rsn_cd
428 => p_rec.pymt_stat_rsn_cd
429 ,p_pymt_stat_ovrdn_rsn_cd
430 => p_rec.pymt_stat_ovrdn_rsn_cd
431 ,p_pymt_stat_prr_to_ovrd_cd
432 => p_rec.pymt_stat_prr_to_ovrd_cd
433 ,p_business_group_id
434 => p_rec.business_group_id
435 ,p_element_entry_value_id => p_rec.element_entry_value_id
436 ,p_pry_attribute_category
437 => p_rec.pry_attribute_category
438 ,p_pry_attribute1
439 => p_rec.pry_attribute1
440 ,p_pry_attribute2
441 => p_rec.pry_attribute2
442 ,p_pry_attribute3
443 => p_rec.pry_attribute3
444 ,p_pry_attribute4
445 => p_rec.pry_attribute4
446 ,p_pry_attribute5
447 => p_rec.pry_attribute5
448 ,p_pry_attribute6
449 => p_rec.pry_attribute6
450 ,p_pry_attribute7
451 => p_rec.pry_attribute7
452 ,p_pry_attribute8
453 => p_rec.pry_attribute8
454 ,p_pry_attribute9
455 => p_rec.pry_attribute9
456 ,p_pry_attribute10
457 => p_rec.pry_attribute10
458 ,p_pry_attribute11
459 => p_rec.pry_attribute11
460 ,p_pry_attribute12
461 => p_rec.pry_attribute12
462 ,p_pry_attribute13
463 => p_rec.pry_attribute13
464 ,p_pry_attribute14
465 => p_rec.pry_attribute14
466 ,p_pry_attribute15
467 => p_rec.pry_attribute15
468 ,p_pry_attribute16
469 => p_rec.pry_attribute16
470 ,p_pry_attribute17
471 => p_rec.pry_attribute17
472 ,p_pry_attribute18
473 => p_rec.pry_attribute18
474 ,p_pry_attribute19
475 => p_rec.pry_attribute19
476 ,p_pry_attribute20
477 => p_rec.pry_attribute20
478 ,p_pry_attribute21
479 => p_rec.pry_attribute21
480 ,p_pry_attribute22
481 => p_rec.pry_attribute22
482 ,p_pry_attribute23
483 => p_rec.pry_attribute23
484 ,p_pry_attribute24
485 => p_rec.pry_attribute24
486 ,p_pry_attribute25
487 => p_rec.pry_attribute25
488 ,p_pry_attribute26
489 => p_rec.pry_attribute26
490 ,p_pry_attribute27
491 => p_rec.pry_attribute27
492 ,p_pry_attribute28
493 => p_rec.pry_attribute28
494 ,p_pry_attribute29
495 => p_rec.pry_attribute29
496 ,p_pry_attribute30
497 => p_rec.pry_attribute30
498 ,p_object_version_number
499 => p_rec.object_version_number
500 );
501 --
502 exception
503 --
504 when hr_api.cannot_find_prog_unit then
505 --
506 hr_api.cannot_find_prog_unit_error
507 (p_module_name => 'BEN_PRTT_RMT_APRVD_FR_PYMT_F'
508 ,p_hook_type => 'AI');
509 --
510 end;
511 --
512 hr_utility.set_location(' Leaving:'||l_proc, 10);
513 End post_insert;
514 --
515 -- ----------------------------------------------------------------------------
516 -- |-------------------------------< ins_lck >--------------------------------|
517 -- ----------------------------------------------------------------------------
518 -- {Start Of Comments}
519 --
520 -- Description:
521 -- The ins_lck process has one main function to perform. When inserting
522 -- a datetracked row, we must validate the DT mode.
523 --
524 -- Prerequisites:
525 -- This procedure can only be called for the datetrack mode of INSERT.
526 --
527 -- In Parameters:
528 --
529 -- Post Success:
530 -- On successful completion of the ins_lck process the parental
531 -- datetracked rows will be locked providing the p_enforce_foreign_locking
532 -- argument value is TRUE.
533 -- If the p_enforce_foreign_locking argument value is FALSE then the
534 -- parential rows are not locked.
535 --
536 -- Post Failure:
537 -- The Lck process can fail for:
538 -- 1) When attempting to lock the row the row could already be locked by
539 -- another user. This will raise the HR_Api.Object_Locked exception.
540 -- 2) When attempting to the lock the parent which doesn't exist.
541 -- For the entity to be locked the parent must exist!
542 --
543 -- Developer Implementation Notes:
544 -- None.
545 --
546 -- Access Status:
547 -- Internal Row Handler Use Only.
548 --
549 -- {End Of Comments}
550 -- ----------------------------------------------------------------------------
551 Procedure ins_lck
552 (p_effective_date in date
553 ,p_datetrack_mode in varchar2
554 ,p_rec in ben_pry_shd.g_rec_type
555 ,p_validation_start_date out nocopy date
556 ,p_validation_end_date out nocopy date
557 ) is
558 --
559 l_proc varchar2(72) := g_package||'ins_lck';
560 l_validation_start_date date;
561 l_validation_end_date date;
562 --
563 Begin
564 hr_utility.set_location('Entering:'||l_proc, 5);
565 --
566 -- Validate the datetrack mode mode getting the validation start
567 -- and end dates for the specified datetrack operation.
568 --
569 dt_api.validate_dt_mode
570 (p_effective_date => p_effective_date
571 ,p_datetrack_mode => p_datetrack_mode
572 ,p_base_table_name => 'ben_prtt_rmt_aprvd_fr_pymt_f'
573 ,p_base_key_column => 'prtt_rmt_aprvd_fr_pymt_id'
574 ,p_base_key_value => p_rec.prtt_rmt_aprvd_fr_pymt_id
575 ,p_parent_table_name1 => 'ben_prtt_reimbmt_rqst_f'
576 ,p_parent_key_column1 => 'prtt_reimbmt_rqst_id'
577 ,p_parent_key_value1 => p_rec.prtt_reimbmt_rqst_id
578 ,p_enforce_foreign_locking => true
579 ,p_validation_start_date => l_validation_start_date
580 ,p_validation_end_date => l_validation_end_date
581 );
582 --
583 -- Set the validation start and end date OUT arguments
584 --
585 p_validation_start_date := l_validation_start_date;
586 p_validation_end_date := l_validation_end_date;
587 --
588 hr_utility.set_location(' Leaving:'||l_proc, 10);
589 --
590 End ins_lck;
591 --
592 -- ----------------------------------------------------------------------------
593 -- |---------------------------------< ins >----------------------------------|
594 -- ----------------------------------------------------------------------------
595 Procedure ins
596 (p_effective_date in date
597 ,p_rec in out nocopy ben_pry_shd.g_rec_type
598 ) is
599 --
600 l_proc varchar2(72) := g_package||'ins';
601 l_datetrack_mode varchar2(30) := hr_api.g_insert;
602 l_validation_start_date date;
603 l_validation_end_date date;
604 --
605 Begin
606 hr_utility.set_location('Entering:'||l_proc, 5);
607 --
608 -- Call the lock operation
609 --
610 ben_pry_ins.ins_lck
611 (p_effective_date => p_effective_date
612 ,p_datetrack_mode => l_datetrack_mode
613 ,p_rec => p_rec
614 ,p_validation_start_date => l_validation_start_date
615 ,p_validation_end_date => l_validation_end_date
616 );
617 --
618 -- Call the supporting insert validate operations
619 --
620 ben_pry_bus.insert_validate
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 --
628 -- Call the supporting pre-insert operation
629 --
630 ben_pry_ins.pre_insert
631 (p_rec => p_rec
632 ,p_effective_date => p_effective_date
633 ,p_datetrack_mode => l_datetrack_mode
634 ,p_validation_start_date => l_validation_start_date
635 ,p_validation_end_date => l_validation_end_date
636 );
637 --
638 -- Insert the row
639 --
640 ben_pry_ins.insert_dml
641 (p_rec => p_rec
642 ,p_effective_date => p_effective_date
643 ,p_datetrack_mode => l_datetrack_mode
644 ,p_validation_start_date => l_validation_start_date
645 ,p_validation_end_date => l_validation_end_date
646 );
647 --
648 -- Call the supporting post-insert operation
649 --
650 ben_pry_ins.post_insert
651 (p_rec => p_rec
652 ,p_effective_date => p_effective_date
653 ,p_datetrack_mode => l_datetrack_mode
654 ,p_validation_start_date => l_validation_start_date
655 ,p_validation_end_date => l_validation_end_date
656 );
657 --
658 hr_utility.set_location('Leaving:'||l_proc,10);
659 end ins;
660 --
661 -- ----------------------------------------------------------------------------
662 -- |---------------------------------< ins >----------------------------------|
663 -- ----------------------------------------------------------------------------
664 Procedure ins
665 (p_effective_date in date
666 ,p_prtt_reimbmt_rqst_id in number
667 ,p_apprvd_fr_pymt_num in number default null
668 ,p_adjmt_flag in varchar2 default null
669 ,p_aprvd_fr_pymt_amt in number default null
670 ,p_pymt_stat_cd in varchar2 default null
671 ,p_pymt_stat_rsn_cd in varchar2 default null
672 ,p_pymt_stat_ovrdn_rsn_cd in varchar2 default null
673 ,p_pymt_stat_prr_to_ovrd_cd in varchar2 default null
674 ,p_business_group_id in number default null
675 ,p_element_entry_value_id in number default null
676 ,p_pry_attribute_category in varchar2 default null
677 ,p_pry_attribute1 in varchar2 default null
678 ,p_pry_attribute2 in varchar2 default null
679 ,p_pry_attribute3 in varchar2 default null
680 ,p_pry_attribute4 in varchar2 default null
681 ,p_pry_attribute5 in varchar2 default null
682 ,p_pry_attribute6 in varchar2 default null
683 ,p_pry_attribute7 in varchar2 default null
684 ,p_pry_attribute8 in varchar2 default null
685 ,p_pry_attribute9 in varchar2 default null
686 ,p_pry_attribute10 in varchar2 default null
687 ,p_pry_attribute11 in varchar2 default null
688 ,p_pry_attribute12 in varchar2 default null
689 ,p_pry_attribute13 in varchar2 default null
690 ,p_pry_attribute14 in varchar2 default null
691 ,p_pry_attribute15 in varchar2 default null
692 ,p_pry_attribute16 in varchar2 default null
693 ,p_pry_attribute17 in varchar2 default null
694 ,p_pry_attribute18 in varchar2 default null
695 ,p_pry_attribute19 in varchar2 default null
696 ,p_pry_attribute20 in varchar2 default null
697 ,p_pry_attribute21 in varchar2 default null
698 ,p_pry_attribute22 in varchar2 default null
699 ,p_pry_attribute23 in varchar2 default null
700 ,p_pry_attribute24 in varchar2 default null
701 ,p_pry_attribute25 in varchar2 default null
702 ,p_pry_attribute26 in varchar2 default null
703 ,p_pry_attribute27 in varchar2 default null
704 ,p_pry_attribute28 in varchar2 default null
705 ,p_pry_attribute29 in varchar2 default null
706 ,p_pry_attribute30 in varchar2 default null
707 ,p_prtt_rmt_aprvd_fr_pymt_id out nocopy number
708 ,p_object_version_number out nocopy number
709 ,p_effective_start_date out nocopy date
710 ,p_effective_end_date out nocopy date
711 ) is
712 --
713 l_rec ben_pry_shd.g_rec_type;
714 l_proc varchar2(72) := g_package||'ins';
715 --
716 Begin
717 hr_utility.set_location('Entering:'||l_proc, 5);
718 --
719 -- Call conversion function to turn arguments into the
720 -- p_rec structure.
721 --
722 l_rec :=
723 ben_pry_shd.convert_args
724 (null
725 ,p_prtt_reimbmt_rqst_id
726 ,null
727 ,null
728 ,p_apprvd_fr_pymt_num
729 ,p_adjmt_flag
730 ,p_aprvd_fr_pymt_amt
731 ,p_pymt_stat_cd
732 ,p_pymt_stat_rsn_cd
733 ,p_pymt_stat_ovrdn_rsn_cd
734 ,p_pymt_stat_prr_to_ovrd_cd
735 ,p_business_group_id
736 ,p_element_entry_value_id
737 ,p_pry_attribute_category
738 ,p_pry_attribute1
739 ,p_pry_attribute2
740 ,p_pry_attribute3
741 ,p_pry_attribute4
742 ,p_pry_attribute5
743 ,p_pry_attribute6
744 ,p_pry_attribute7
745 ,p_pry_attribute8
746 ,p_pry_attribute9
747 ,p_pry_attribute10
748 ,p_pry_attribute11
749 ,p_pry_attribute12
750 ,p_pry_attribute13
751 ,p_pry_attribute14
752 ,p_pry_attribute15
753 ,p_pry_attribute16
754 ,p_pry_attribute17
755 ,p_pry_attribute18
756 ,p_pry_attribute19
757 ,p_pry_attribute20
758 ,p_pry_attribute21
759 ,p_pry_attribute22
760 ,p_pry_attribute23
761 ,p_pry_attribute24
762 ,p_pry_attribute25
763 ,p_pry_attribute26
764 ,p_pry_attribute27
765 ,p_pry_attribute28
766 ,p_pry_attribute29
767 ,p_pry_attribute30
768 ,null
769 );
770 --
771 -- Having converted the arguments into the ben_pry_rec
772 -- plsql record structure we call the corresponding record
773 -- business process.
774 --
775 ben_pry_ins.ins
776 (p_effective_date
777 ,l_rec
778 );
779 --
780 -- Set the OUT arguments.
781 --
782 p_prtt_rmt_aprvd_fr_pymt_id := l_rec.prtt_rmt_aprvd_fr_pymt_id;
783 p_effective_start_date := l_rec.effective_start_date;
784 p_effective_end_date := l_rec.effective_end_date;
785 p_object_version_number := l_rec.object_version_number;
786 --
787 --
788 hr_utility.set_location(' Leaving:'||l_proc, 10);
789 End ins;
790 --
791 end ben_pry_ins;