DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_PMP_INS

Source


1 Package Body per_pmp_ins as
2 /* $Header: pepmprhi.pkb 120.12.12020000.1 2012/06/29 01:50:28 appldev ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  per_pmp_ins.';  -- Global package name
9 --
10 -- The following global variables are only to be used by
11 -- the set_base_key_value and pre_insert procedures.
12 --
13 g_plan_id_i  number   default null;
14 --
15 -- ----------------------------------------------------------------------------
16 -- |------------------------< set_base_key_value >----------------------------|
17 -- ----------------------------------------------------------------------------
18 procedure set_base_key_value
19   (p_plan_id  in  number) is
20 --
21   l_proc       varchar2(72) := g_package||'set_base_key_value';
22 --
23 Begin
24   hr_utility.set_location('Entering:'||l_proc, 10);
25   --
26   per_pmp_ins.g_plan_id_i := p_plan_id;
27   --
31 --
28   hr_utility.set_location(' Leaving:'||l_proc, 20);
29 End set_base_key_value;
30 --
32 -- ----------------------------------------------------------------------------
33 -- |------------------------------< insert_dml >------------------------------|
34 -- ----------------------------------------------------------------------------
35 -- {Start Of Comments}
36 --
37 -- Description:
38 --   This procedure controls the actual dml insert logic. The processing of
39 --   this procedure are as follows:
40 --   1) Initialise the object_version_number to 1 if the object_version_number
41 --      is defined as an attribute for this entity.
42 --   2) To set and unset the g_api_dml status as required (as we are about to
43 --      perform dml).
44 --   3) To insert the row into the schema.
45 --   4) To trap any constraint violations that may have occurred.
46 --   5) To raise any other errors.
47 --
48 -- Prerequisites:
49 --   This is an internal private procedure which must be called from the ins
50 --   procedure and must have all mandatory attributes set (except the
51 --   object_version_number which is initialised within this procedure).
52 --
53 -- In Parameters:
54 --   A Pl/Sql record structre.
55 --
56 -- Post Success:
57 --   The specified row will be inserted into the schema.
58 --
59 -- Post Failure:
60 --   On the insert dml failure it is important to note that we always reset the
61 --   g_api_dml status to false.
62 --   If a check, unique or parent integrity constraint violation is raised the
63 --   constraint_error procedure will be called.
64 --   If any other error is reported, the error will be raised after the
65 --   g_api_dml status is reset.
66 --
67 -- Developer Implementation Notes:
68 --   None.
69 --
70 -- Access Status:
71 --   Internal Row Handler Use Only.
72 --
73 -- {End Of Comments}
74 -- ----------------------------------------------------------------------------
75 Procedure insert_dml
76   (p_rec in out nocopy per_pmp_shd.g_rec_type
77   ) is
78 --
79   l_proc  varchar2(72) := g_package||'insert_dml';
80 --
81 Begin
82   hr_utility.set_location('Entering:'||l_proc, 5);
83   p_rec.object_version_number := 1;  -- Initialise the object version
84   --
85   --
86   -- Insert the row into: per_perf_mgmt_plans
87   --
88   insert into per_perf_mgmt_plans
89       (plan_id
90       ,object_version_number
91       ,plan_name
92       ,administrator_person_id
93       ,previous_plan_id
94       ,start_date
95       ,end_date
96       ,status_code
97       ,hierarchy_type_code
98       ,supervisor_id
99       ,supervisor_assignment_id
100       ,organization_structure_id
101       ,org_structure_version_id
102       ,top_organization_id
103       ,position_structure_id
104       ,pos_structure_version_id
105       ,top_position_id
106       ,hierarchy_levels
107       ,automatic_enrollment_flag
108       ,assignment_types_code
109       ,primary_asg_only_flag
110       ,include_obj_setting_flag
111       ,obj_setting_start_date
112       ,obj_setting_deadline
113       ,obj_set_outside_period_flag
114       ,method_code
115       ,notify_population_flag
116       ,automatic_allocation_flag
117       ,copy_past_objectives_flag
118       ,sharing_alignment_task_flag
119       ,include_appraisals_flag
120       ,change_sc_status_flag
121       ,attribute_category
122       ,attribute1
123       ,attribute2
124       ,attribute3
125       ,attribute4
126       ,attribute5
127       ,attribute6
128       ,attribute7
129       ,attribute8
130       ,attribute9
131       ,attribute10
132       ,attribute11
133       ,attribute12
134       ,attribute13
135       ,attribute14
136       ,attribute15
137       ,attribute16
138       ,attribute17
139       ,attribute18
140       ,attribute19
141       ,attribute20
142       ,attribute21
143       ,attribute22
144       ,attribute23
145       ,attribute24
146       ,attribute25
147       ,attribute26
148       ,attribute27
149       ,attribute28
150       ,attribute29
151       ,attribute30
152      ,update_library_objectives    -- 8740021 bug fix
153      ,automatic_approval_flag
154       )
155   Values
156     (p_rec.plan_id
157     ,p_rec.object_version_number
158     ,p_rec.plan_name
159     ,p_rec.administrator_person_id
160     ,p_rec.previous_plan_id
161     ,p_rec.start_date
162     ,p_rec.end_date
163     ,p_rec.status_code
164     ,p_rec.hierarchy_type_code
165     ,p_rec.supervisor_id
166     ,p_rec.supervisor_assignment_id
167     ,p_rec.organization_structure_id
168     ,p_rec.org_structure_version_id
169     ,p_rec.top_organization_id
170     ,p_rec.position_structure_id
171     ,p_rec.pos_structure_version_id
172     ,p_rec.top_position_id
173     ,p_rec.hierarchy_levels
174     ,p_rec.automatic_enrollment_flag
175     ,p_rec.assignment_types_code
176     ,p_rec.primary_asg_only_flag
177     ,p_rec.include_obj_setting_flag
178     ,p_rec.obj_setting_start_date
179     ,p_rec.obj_setting_deadline
180     ,p_rec.obj_set_outside_period_flag
181     ,p_rec.method_code
182     ,p_rec.notify_population_flag
183     ,p_rec.automatic_allocation_flag
184     ,p_rec.copy_past_objectives_flag
185     ,p_rec.sharing_alignment_task_flag
186     ,p_rec.include_appraisals_flag
190     ,p_rec.attribute2
187     ,p_rec.change_sc_status_flag
188     ,p_rec.attribute_category
189     ,p_rec.attribute1
191     ,p_rec.attribute3
192     ,p_rec.attribute4
193     ,p_rec.attribute5
194     ,p_rec.attribute6
195     ,p_rec.attribute7
196     ,p_rec.attribute8
197     ,p_rec.attribute9
198     ,p_rec.attribute10
199     ,p_rec.attribute11
200     ,p_rec.attribute12
201     ,p_rec.attribute13
202     ,p_rec.attribute14
203     ,p_rec.attribute15
204     ,p_rec.attribute16
205     ,p_rec.attribute17
206     ,p_rec.attribute18
207     ,p_rec.attribute19
208     ,p_rec.attribute20
209     ,p_rec.attribute21
210     ,p_rec.attribute22
211     ,p_rec.attribute23
212     ,p_rec.attribute24
213     ,p_rec.attribute25
214     ,p_rec.attribute26
215     ,p_rec.attribute27
216     ,p_rec.attribute28
217     ,p_rec.attribute29
218     ,p_rec.attribute30
219     ,p_rec.update_library_objectives  -- 8740021 bug fix
220     ,p_rec.automatic_approval_flag
221     );
222   --
223   --
224   hr_utility.set_location(' Leaving:'||l_proc, 10);
225 Exception
226   When hr_api.check_integrity_violated Then
227     -- A check constraint has been violated
228     --
229     per_pmp_shd.constraint_error
230       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
231   When hr_api.parent_integrity_violated Then
232     -- Parent integrity has been violated
233     --
234     per_pmp_shd.constraint_error
235       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
236   When hr_api.unique_integrity_violated Then
237     -- Unique integrity has been violated
238     --
239     per_pmp_shd.constraint_error
240       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
241   When Others Then
242     --
243     Raise;
244 End insert_dml;
245 --
246 -- ----------------------------------------------------------------------------
247 -- |------------------------------< pre_insert >------------------------------|
248 -- ----------------------------------------------------------------------------
249 -- {Start Of Comments}
250 --
251 -- Description:
252 --   This private procedure contains any processing which is required before
253 --   the insert dml. Presently, if the entity has a corresponding primary
254 --   key which is maintained by an associating sequence, the primary key for
255 --   the entity will be populated with the next sequence value in
256 --   preparation for the insert dml.
257 --
258 -- Prerequisites:
259 --   This is an internal procedure which is called from the ins procedure.
260 --
261 -- In Parameters:
262 --   A Pl/Sql record structure.
263 --
264 -- Post Success:
265 --   Processing continues.
266 --
267 -- Post Failure:
268 --   If an error has occurred, an error message and exception will be raised
269 --   but not handled.
270 --
271 -- Developer Implementation Notes:
272 --   Any pre-processing required before the insert dml is issued should be
273 --   coded within this procedure. As stated above, a good example is the
274 --   generation of a primary key number via a corresponding sequence.
275 --   It is important to note that any 3rd party maintenance should be reviewed
276 --   before placing in this procedure.
277 --
278 -- Access Status:
279 --   Internal Row Handler Use Only.
280 --
281 -- {End Of Comments}
282 -- ----------------------------------------------------------------------------
283 Procedure pre_insert
284   (p_rec  in out nocopy per_pmp_shd.g_rec_type
285   ) is
286 --
287   Cursor C_Sel1 is select per_perf_mgmt_plans_s.nextval from sys.dual;
288 --
289   Cursor C_Sel2 is
290     Select null
291       from per_perf_mgmt_plans
292      where plan_id =
293              per_pmp_ins.g_plan_id_i;
294 --
295   l_proc   varchar2(72) := g_package||'pre_insert';
296   l_exists varchar2(1);
297 --
298 Begin
299   hr_utility.set_location('Entering:'||l_proc, 5);
300   --
301   If (per_pmp_ins.g_plan_id_i is not null) Then
302     --
303     -- Verify registered primary key values not already in use
304     --
305     Open C_Sel2;
306     Fetch C_Sel2 into l_exists;
307     If C_Sel2%found Then
308        Close C_Sel2;
309        --
310        -- The primary key values are already in use.
311        --
312        fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
313        fnd_message.set_token('TABLE_NAME','per_perf_mgmt_plans');
314        fnd_message.raise_error;
315     End If;
316     Close C_Sel2;
317     --
318     -- Use registered key values and clear globals
319     --
320     p_rec.plan_id :=
321       per_pmp_ins.g_plan_id_i;
322     per_pmp_ins.g_plan_id_i := null;
323   Else
324     --
325     -- No registerd key values, so select the next sequence number
326     --
327     --
328     -- Select the next sequence number
329     --
330     Open C_Sel1;
331     Fetch C_Sel1 Into p_rec.plan_id;
332     Close C_Sel1;
333   End If;
334   --
335   hr_utility.set_location(' Leaving:'||l_proc, 10);
336 End pre_insert;
337 --
338 -- ----------------------------------------------------------------------------
339 -- |-----------------------------< post_insert >------------------------------|
340 -- ----------------------------------------------------------------------------
341 -- {Start Of Comments}
342 --
343 -- Description:
344 --   This private procedure contains any processing which is required after
348 --   This is an internal procedure which is called from the ins procedure.
345 --   the insert dml.
346 --
347 -- Prerequisites:
349 --
350 -- In Parameters:
351 --   A Pl/Sql record structre.
352 --
353 -- Post Success:
354 --   Processing continues.
355 --
356 -- Post Failure:
357 --   If an error has occurred, an error message and exception will be raised
358 --   but not handled.
359 --
360 -- Developer Implementation Notes:
361 --   Any post-processing required after the insert dml is issued should be
362 --   coded within this procedure. It is important to note that any 3rd party
363 --   maintenance should be reviewed before placing in this procedure.
364 --
365 -- Access Status:
366 --   Internal Row Handler Use Only.
367 --
368 -- {End Of Comments}
369 -- ----------------------------------------------------------------------------
370 Procedure post_insert
371   (p_effective_date               in date
372   ,p_rec                          in per_pmp_shd.g_rec_type
373   ,p_duplicate_name_warning       in boolean
374   ,p_no_life_events_warning       in boolean
375   ) is
376 --
377   l_proc  varchar2(72) := g_package||'post_insert';
378 --
379 Begin
380   hr_utility.set_location('Entering:'||l_proc, 5);
381   begin
382     --
383     per_pmp_rki.after_insert
384       (p_effective_date              => p_effective_date
385       ,p_plan_id
386       => p_rec.plan_id
387       ,p_object_version_number
388       => p_rec.object_version_number
389       ,p_plan_name
390       => p_rec.plan_name
391       ,p_administrator_person_id
392       => p_rec.administrator_person_id
393       ,p_previous_plan_id
394       => p_rec.previous_plan_id
395       ,p_start_date
396       => p_rec.start_date
397       ,p_end_date
398       => p_rec.end_date
399       ,p_status_code
400       => p_rec.status_code
401       ,p_hierarchy_type_code
402       => p_rec.hierarchy_type_code
403       ,p_supervisor_id
404       => p_rec.supervisor_id
405       ,p_supervisor_assignment_id
406       => p_rec.supervisor_assignment_id
407       ,p_organization_structure_id
408       => p_rec.organization_structure_id
409       ,p_org_structure_version_id
410       => p_rec.org_structure_version_id
411       ,p_top_organization_id
412       => p_rec.top_organization_id
413       ,p_position_structure_id
414       => p_rec.position_structure_id
415       ,p_pos_structure_version_id
416       => p_rec.pos_structure_version_id
417       ,p_top_position_id
418       => p_rec.top_position_id
419       ,p_hierarchy_levels
420       => p_rec.hierarchy_levels
421       ,p_automatic_enrollment_flag
422       => p_rec.automatic_enrollment_flag
423       ,p_assignment_types_code
424       => p_rec.assignment_types_code
425       ,p_primary_asg_only_flag
426       => p_rec.primary_asg_only_flag
427       ,p_include_obj_setting_flag
428       => p_rec.include_obj_setting_flag
429       ,p_obj_setting_start_date
430       => p_rec.obj_setting_start_date
431       ,p_obj_setting_deadline
432       => p_rec.obj_setting_deadline
433       ,p_obj_set_outside_period_flag
434       => p_rec.obj_set_outside_period_flag
435       ,p_method_code
436       => p_rec.method_code
437       ,p_notify_population_flag
438       => p_rec.notify_population_flag
439       ,p_automatic_allocation_flag
440       => p_rec.automatic_allocation_flag
441       ,p_copy_past_objectives_flag
442       => p_rec.copy_past_objectives_flag
443       ,p_sharing_alignment_task_flag
444       => p_rec.sharing_alignment_task_flag
445       ,p_include_appraisals_flag
446       => p_rec.include_appraisals_flag
447       ,p_change_sc_status_flag =>   p_rec.change_sc_status_flag
448       ,p_attribute_category
449       => p_rec.attribute_category
450       ,p_attribute1
451       => p_rec.attribute1
452       ,p_attribute2
453       => p_rec.attribute2
454       ,p_attribute3
455       => p_rec.attribute3
456       ,p_attribute4
457       => p_rec.attribute4
458       ,p_attribute5
459       => p_rec.attribute5
460       ,p_attribute6
461       => p_rec.attribute6
462       ,p_attribute7
463       => p_rec.attribute7
464       ,p_attribute8
465       => p_rec.attribute8
466       ,p_attribute9
467       => p_rec.attribute9
468       ,p_attribute10
469       => p_rec.attribute10
470       ,p_attribute11
471       => p_rec.attribute11
472       ,p_attribute12
473       => p_rec.attribute12
474       ,p_attribute13
475       => p_rec.attribute13
476       ,p_attribute14
477       => p_rec.attribute14
478       ,p_attribute15
479       => p_rec.attribute15
480       ,p_attribute16
481       => p_rec.attribute16
482       ,p_attribute17
483       => p_rec.attribute17
484       ,p_attribute18
485       => p_rec.attribute18
486       ,p_attribute19
487       => p_rec.attribute19
488       ,p_attribute20
489       => p_rec.attribute20
490       ,p_attribute21
491       => p_rec.attribute21
492       ,p_attribute22
493       => p_rec.attribute22
494       ,p_attribute23
495       => p_rec.attribute23
496       ,p_attribute24
497       => p_rec.attribute24
498       ,p_attribute25
499       => p_rec.attribute25
500       ,p_attribute26
501       => p_rec.attribute26
502       ,p_attribute27
503       => p_rec.attribute27
504       ,p_attribute28
505       => p_rec.attribute28
506       ,p_attribute29
510      ,p_update_library_objectives
507       => p_rec.attribute29
508       ,p_attribute30
509       => p_rec.attribute30
511       => p_rec.update_library_objectives  -- 8740021 bug fix
512      ,p_automatic_approval_flag
513       => p_rec.automatic_approval_flag
514 
515       );
516     --
517   exception
518     --
519     when hr_api.cannot_find_prog_unit then
520       --
521       hr_api.cannot_find_prog_unit_error
522         (p_module_name => 'PER_PERF_MGMT_PLANS'
523         ,p_hook_type   => 'AI');
524       --
525   end;
526   --
527   hr_utility.set_location(' Leaving:'||l_proc, 10);
528 End post_insert;
529 --
530 -- ----------------------------------------------------------------------------
531 -- |---------------------------------< ins >----------------------------------|
532 -- ----------------------------------------------------------------------------
533 Procedure ins
534   (p_effective_date               in date
535   ,p_rec                          in out nocopy per_pmp_shd.g_rec_type
536   ,p_duplicate_name_warning       out nocopy boolean
537   ,p_no_life_events_warning       out nocopy boolean
538   ) is
539 --
540   l_proc  varchar2(72) := g_package||'ins';
541 --
542 Begin
543   hr_utility.set_location('Entering:'||l_proc, 5);
544   --
545   -- Call the supporting insert validate operations
546   --
547   per_pmp_bus.insert_validate
548      (p_effective_date
549      ,p_rec
550      ,p_duplicate_name_warning
551      ,p_no_life_events_warning
552      );
553 
554   --
555   -- Call to raise any errors on multi-message list
556   hr_multi_message.end_validation_set;
557   --
558   -- Call the supporting pre-insert operation
559   --
560   per_pmp_ins.pre_insert(p_rec);
561   --
562   -- Insert the row
563   --
564   per_pmp_ins.insert_dml(p_rec);
565   --
566   -- Call the supporting post-insert operation
567   --
568   per_pmp_ins.post_insert
569      (p_effective_date
570      ,p_rec
571      ,p_duplicate_name_warning
572      ,p_no_life_events_warning
573      );
574   --
575   -- Call to raise any errors on multi-message list
576   hr_multi_message.end_validation_set;
577   --
578   hr_utility.set_location('Leaving:'||l_proc, 20);
579 end ins;
580 --
581 -- ----------------------------------------------------------------------------
582 -- |---------------------------------< ins >----------------------------------|
583 -- ----------------------------------------------------------------------------
584 Procedure ins
585   (p_effective_date               in     date
586   ,p_plan_name                      in     varchar2
587   ,p_administrator_person_id        in     number
588   ,p_previous_plan_id               in     number   default null
589   ,p_start_date                     in     date
590   ,p_end_date                       in     date
591   ,p_automatic_enrollment_flag      in     varchar2
592   ,p_assignment_types_code          in     varchar2
593   ,p_primary_asg_only_flag          in     varchar2
594   ,p_include_obj_setting_flag       in     varchar2
595   ,p_obj_set_outside_period_flag    in     varchar2
596   ,p_method_code                    in     varchar2
597   ,p_notify_population_flag         in     varchar2
598   ,p_automatic_allocation_flag      in     varchar2
599   ,p_copy_past_objectives_flag      in     varchar2
600   ,p_sharing_alignment_task_flag    in     varchar2
601   ,p_include_appraisals_flag        in     varchar2
602   ,p_hierarchy_type_code            in     varchar2 default null
603   ,p_supervisor_id                  in     number   default null
604   ,p_supervisor_assignment_id       in     number   default null
605   ,p_organization_structure_id      in     number   default null
606   ,p_org_structure_version_id       in     number   default null
607   ,p_top_organization_id            in     number   default null
608   ,p_position_structure_id          in     number   default null
609   ,p_pos_structure_version_id       in     number   default null
610   ,p_top_position_id                in     number   default null
611   ,p_hierarchy_levels               in     number   default null
612   ,p_obj_setting_start_date         in     date     default null
613   ,p_obj_setting_deadline           in     date     default null
614   ,p_change_sc_status_flag   in     varchar2
615   ,p_attribute_category             in     varchar2 default null
616   ,p_attribute1                     in     varchar2 default null
617   ,p_attribute2                     in     varchar2 default null
618   ,p_attribute3                     in     varchar2 default null
619   ,p_attribute4                     in     varchar2 default null
620   ,p_attribute5                     in     varchar2 default null
621   ,p_attribute6                     in     varchar2 default null
622   ,p_attribute7                     in     varchar2 default null
623   ,p_attribute8                     in     varchar2 default null
624   ,p_attribute9                     in     varchar2 default null
625   ,p_attribute10                    in     varchar2 default null
626   ,p_attribute11                    in     varchar2 default null
627   ,p_attribute12                    in     varchar2 default null
628   ,p_attribute13                    in     varchar2 default null
629   ,p_attribute14                    in     varchar2 default null
630   ,p_attribute15                    in     varchar2 default null
631   ,p_attribute16                    in     varchar2 default null
632   ,p_attribute17                    in     varchar2 default null
633   ,p_attribute18                    in     varchar2 default null
637   ,p_attribute22                    in     varchar2 default null
634   ,p_attribute19                    in     varchar2 default null
635   ,p_attribute20                    in     varchar2 default null
636   ,p_attribute21                    in     varchar2 default null
638   ,p_attribute23                    in     varchar2 default null
639   ,p_attribute24                    in     varchar2 default null
640   ,p_attribute25                    in     varchar2 default null
641   ,p_attribute26                    in     varchar2 default null
642   ,p_attribute27                    in     varchar2 default null
643   ,p_attribute28                    in     varchar2 default null
644   ,p_attribute29                    in     varchar2 default null
645   ,p_attribute30                    in     varchar2 default null
646   ,p_plan_id                           out nocopy number
647   ,p_object_version_number             out nocopy number
648   ,p_status_code                       out nocopy varchar2
649   ,p_duplicate_name_warning            out nocopy boolean
650   ,p_no_life_events_warning            out nocopy boolean
651   ,p_update_library_objectives in varchar2  default null    -- 8740021 bug fix
652   ,p_automatic_approval_flag in varchar2  default null
653   ) is
654 --
655   l_rec   per_pmp_shd.g_rec_type;
656   l_proc  varchar2(72) := g_package||'ins';
657   l_status_code  CONSTANT varchar2(5) := 'DRAFT';
658 --
659 Begin
660   hr_utility.set_location('Entering:'||l_proc, 5);
661   --
662   -- Call conversion function to turn arguments into the
663   -- p_rec structure.
664   --
665   l_rec :=
666   per_pmp_shd.convert_args
667     (null
668     ,null
669     ,p_plan_name
670     ,p_administrator_person_id
671     ,p_previous_plan_id
672     ,p_start_date
673     ,p_end_date
674     ,l_status_code
675     ,p_hierarchy_type_code
676     ,p_supervisor_id
677     ,p_supervisor_assignment_id
678     ,p_organization_structure_id
679     ,p_org_structure_version_id
680     ,p_top_organization_id
681     ,p_position_structure_id
682     ,p_pos_structure_version_id
683     ,p_top_position_id
684     ,p_hierarchy_levels
685     ,p_automatic_enrollment_flag
686     ,p_assignment_types_code
687     ,p_primary_asg_only_flag
688     ,p_include_obj_setting_flag
689     ,p_obj_setting_start_date
690     ,p_obj_setting_deadline
691     ,p_obj_set_outside_period_flag
692     ,p_method_code
693     ,p_notify_population_flag
694     ,p_automatic_allocation_flag
695     ,p_copy_past_objectives_flag
696     ,p_sharing_alignment_task_flag
697     ,p_include_appraisals_flag
698     ,p_change_sc_status_flag
699     ,p_attribute_category
700     ,p_attribute1
701     ,p_attribute2
702     ,p_attribute3
703     ,p_attribute4
704     ,p_attribute5
705     ,p_attribute6
706     ,p_attribute7
707     ,p_attribute8
708     ,p_attribute9
709     ,p_attribute10
710     ,p_attribute11
711     ,p_attribute12
712     ,p_attribute13
713     ,p_attribute14
714     ,p_attribute15
715     ,p_attribute16
716     ,p_attribute17
717     ,p_attribute18
718     ,p_attribute19
719     ,p_attribute20
720     ,p_attribute21
721     ,p_attribute22
722     ,p_attribute23
723     ,p_attribute24
724     ,p_attribute25
725     ,p_attribute26
726     ,p_attribute27
727     ,p_attribute28
728     ,p_attribute29
729     ,p_attribute30
730     ,p_update_library_objectives   -- 8740021 bug fix
731     ,p_automatic_approval_flag
732     );
733 
734   --
735   -- Having converted the arguments into the per_pmp_rec
736   -- plsql record structure we call the corresponding record business process.
737   --
738   per_pmp_ins.ins
739      (p_effective_date
740      ,l_rec
741      ,p_duplicate_name_warning
742      ,p_no_life_events_warning
743      );
744   --
745   -- As the primary key argument(s)
746   -- are specified as an OUT's we must set these values.
747   --
748   p_plan_id := l_rec.plan_id;
749   p_object_version_number := l_rec.object_version_number;
750   p_status_code := l_rec.status_code;
751   --
752   hr_utility.set_location(' Leaving:'||l_proc, 10);
753 
754 End ins;
755 --
756 end per_pmp_ins;