DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_JBR_UPD

Source


1 Package Body per_jbr_upd as
2 /* $Header: pejbrrhi.pkb 115.7 2002/12/06 10:18:00 pkakar ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  per_jbr_upd.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the actual dml update logic. The functions of this
17 --   procedure are as follows:
18 --   1) Increment the object_version_number by 1 if the object_version_number
19 --      is defined as an attribute for this entity.
20 --   2) To set and unset the g_api_dml status as required (as we are about to
21 --      perform dml).
22 --   3) To update the specified row in the schema using the primary key in
23 --      the predicates.
24 --   4) To trap any constraint violations that may have occurred.
25 --   5) To raise any other errors.
26 --
27 -- Pre Conditions:
28 --   This is an internal private procedure which must be called from the upd
29 --   procedure.
30 --
31 -- In Arguments:
32 --   A Pl/Sql record structre.
33 --
34 -- Post Success:
35 --   The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 --   On the update dml failure it is important to note that we always reset the
39 --   g_api_dml status to false.
40 --   If a check, unique or parent integrity constraint violation is raised the
41 --   constraint_error procedure will be called.
42 --   If any other error is reported, the error will be raised after the
43 --   g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 --   The update 'set' arguments list should be modified if any of your
47 --   attributes are not updateable.
48 --
49 -- Access Status:
50 --   Internal Table Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml(p_rec in out nocopy per_jbr_shd.g_rec_type) is
55 --
56   l_proc  varchar2(72) := g_package||'update_dml';
57 --
58 Begin
59   hr_utility.set_location('Entering:'||l_proc, 5);
60   --
61   -- Increment the object version
62   --
63   p_rec.object_version_number := p_rec.object_version_number + 1;
64   --
65   per_jbr_shd.g_api_dml := true;  -- Set the api dml status
66   --
67   -- Update the per_job_requirements Row
68   --
69   update per_job_requirements
70   set
71   analysis_criteria_id              = p_rec.analysis_criteria_id,
72   comments                          = p_rec.comments,
73   date_from                         = p_rec.date_from,
74   date_to                           = p_rec.date_to,
75   essential                         = p_rec.essential,
76   job_id                            = p_rec.job_id,
77   position_id                       = p_rec.position_id,
78   request_id                        = p_rec.request_id,
79   program_application_id            = p_rec.program_application_id,
80   program_id                        = p_rec.program_id,
81   program_update_date               = p_rec.program_update_date,
82   attribute_category                = p_rec.attribute_category,
83   attribute1                        = p_rec.attribute1,
84   attribute2                        = p_rec.attribute2,
85   attribute3                        = p_rec.attribute3,
86   attribute4                        = p_rec.attribute4,
87   attribute5                        = p_rec.attribute5,
88   attribute6                        = p_rec.attribute6,
89   attribute7                        = p_rec.attribute7,
90   attribute8                        = p_rec.attribute8,
91   attribute9                        = p_rec.attribute9,
92   attribute10                       = p_rec.attribute10,
93   attribute11                       = p_rec.attribute11,
94   attribute12                       = p_rec.attribute12,
95   attribute13                       = p_rec.attribute13,
96   attribute14                       = p_rec.attribute14,
97   attribute15                       = p_rec.attribute15,
98   attribute16                       = p_rec.attribute16,
99   attribute17                       = p_rec.attribute17,
100   attribute18                       = p_rec.attribute18,
101   attribute19                       = p_rec.attribute19,
102   attribute20                       = p_rec.attribute20,
103   object_version_number             = p_rec.object_version_number
104   where job_requirement_id = p_rec.job_requirement_id;
105   --
106   per_jbr_shd.g_api_dml := false;   -- Unset the api dml status
107   --
108   hr_utility.set_location(' Leaving:'||l_proc, 10);
109 --
110 Exception
111   When hr_api.check_integrity_violated Then
112     -- A check constraint has been violated
113     per_jbr_shd.g_api_dml := false;   -- Unset the api dml status
114     per_jbr_shd.constraint_error
115       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
116   When hr_api.parent_integrity_violated Then
117     -- Parent integrity has been violated
118     per_jbr_shd.g_api_dml := false;   -- Unset the api dml status
119     per_jbr_shd.constraint_error
120       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
121   When hr_api.unique_integrity_violated Then
122     -- Unique integrity has been violated
123     per_jbr_shd.g_api_dml := false;   -- Unset the api dml status
124     per_jbr_shd.constraint_error
125       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
126   When Others Then
127     per_jbr_shd.g_api_dml := false;   -- Unset the api dml status
128     Raise;
129 End update_dml;
130 --
131 -- ----------------------------------------------------------------------------
132 -- |------------------------------< pre_update >------------------------------|
133 -- ----------------------------------------------------------------------------
134 -- {Start Of Comments}
135 --
136 -- Description:
137 --   This private procedure contains any processing which is required before
138 --   the update dml.
139 --
140 -- Pre Conditions:
141 --   This is an internal procedure which is called from the upd procedure.
142 --
143 -- In Arguments:
144 --   A Pl/Sql record structre.
145 --
146 -- Post Success:
147 --   Processing continues.
148 --
149 -- Post Failure:
150 --   If an error has occurred, an error message and exception will be raised
151 --   but not handled.
152 --
153 -- Developer Implementation Notes:
154 --   Any pre-processing required before the update dml is issued should be
155 --   coded within this procedure. It is important to note that any 3rd party
156 --   maintenance should be reviewed before placing in this procedure.
157 --
158 -- Access Status:
159 --   Internal Table Handler Use Only.
160 --
161 -- {End Of Comments}
162 -- ----------------------------------------------------------------------------
163 Procedure pre_update(p_rec in per_jbr_shd.g_rec_type) is
164 --
165   l_proc  varchar2(72) := g_package||'pre_update';
166 --
167 Begin
168   hr_utility.set_location('Entering:'||l_proc, 5);
169   --
170   hr_utility.set_location(' Leaving:'||l_proc, 10);
171 End pre_update;
172 --
173 -- ----------------------------------------------------------------------------
174 -- |-----------------------------< post_update >------------------------------|
175 -- ----------------------------------------------------------------------------
176 -- {Start Of Comments}
177 --
178 -- Description:
179 --   This private procedure contains any processing which is required after the
180 --   update dml.
181 --
182 -- Pre Conditions:
183 --   This is an internal procedure which is called from the upd procedure.
184 --
185 -- In Arguments:
186 --   A Pl/Sql record structre.
187 --
188 -- Post Success:
189 --   Processing continues.
190 --
191 -- Post Failure:
192 --   If an error has occurred, an error message and exception will be raised
193 --   but not handled.
194 --
195 -- Developer Implementation Notes:
196 --   Any post-processing required after the update dml is issued should be
197 --   coded within this procedure. It is important to note that any 3rd party
198 --   maintenance should be reviewed before placing in this procedure.
199 --
200 -- Access Status:
201 --   Internal Table Handler Use Only.
202 --
203 -- {End Of Comments}
204 -- ----------------------------------------------------------------------------
205 Procedure post_update(p_rec in per_jbr_shd.g_rec_type) is
206 --
207   l_proc  varchar2(72) := g_package||'post_update';
208 --
209 Begin
210   hr_utility.set_location('Entering:'||l_proc, 5);
211   --
212   -- Start of API User Hook for post_update.
213   --
214   begin
215     per_jbr_rku.after_update
216       (
217        p_job_requirement_id            => p_rec.job_requirement_id,
218        p_analysis_criteria_id          => p_rec.analysis_criteria_id,
219        p_comments                      => p_rec.comments,
220        p_date_from                     => p_rec.date_from,
221        p_date_to                       => p_rec.date_to,
222        p_essential                     => p_rec.essential,
223        p_job_id                        => p_rec.job_id,
224        p_position_id                   => p_rec.position_id,
225        p_request_id                    => p_rec.request_id,
226        p_program_application_id        => p_rec.program_application_id,
227        p_program_id                    => p_rec.program_id,
228        p_program_update_date           => p_rec.program_update_date,
229        p_attribute_category            => p_rec.attribute_category,
230        p_attribute1                    => p_rec.attribute1,
231        p_attribute2                    => p_rec.attribute2,
232        p_attribute3                    => p_rec.attribute3,
233        p_attribute4                    => p_rec.attribute4,
234        p_attribute5                    => p_rec.attribute5,
235        p_attribute6                    => p_rec.attribute6,
236        p_attribute7                    => p_rec.attribute7,
237        p_attribute8                    => p_rec.attribute8,
238        p_attribute9                    => p_rec.attribute9,
239        p_attribute10                   => p_rec.attribute10,
240        p_attribute11                   => p_rec.attribute11,
241        p_attribute12                   => p_rec.attribute12,
242        p_attribute13                   => p_rec.attribute13,
243        p_attribute14                   => p_rec.attribute14,
244        p_attribute15                   => p_rec.attribute15,
245        p_attribute16                   => p_rec.attribute16,
246        p_attribute17                   => p_rec.attribute17,
247        p_attribute18                   => p_rec.attribute18,
248        p_attribute19                   => p_rec.attribute19,
249        p_attribute20                   => p_rec.attribute20,
250        p_object_version_number         => p_rec.object_version_number,
251        p_business_group_id_o           => per_jbr_shd.g_old_rec.business_group_id,
252        p_analysis_criteria_id_o        => per_jbr_shd.g_old_rec.analysis_criteria_id,
253        p_comments_o                    => per_jbr_shd.g_old_rec.comments,
254        p_date_from_o                   => per_jbr_shd.g_old_rec.date_from,
255        p_date_to_o                     => per_jbr_shd.g_old_rec.date_to,
256        p_essential_o                   => per_jbr_shd.g_old_rec.essential,
257        p_job_id_o                      => per_jbr_shd.g_old_rec.job_id,
258        p_position_id_o                 => per_jbr_shd.g_old_rec.position_id,
259        p_request_id_o                  => per_jbr_shd.g_old_rec.request_id,
260        p_program_application_id_o      => per_jbr_shd.g_old_rec.program_application_id,
261        p_program_id_o                  => per_jbr_shd.g_old_rec.program_id,
262        p_program_update_date_o         => per_jbr_shd.g_old_rec.program_update_date,
263        p_attribute_category_o          => per_jbr_shd.g_old_rec.attribute_category,
264        p_attribute1_o                  => per_jbr_shd.g_old_rec.attribute1,
265        p_attribute2_o                  => per_jbr_shd.g_old_rec.attribute2,
266        p_attribute3_o                  => per_jbr_shd.g_old_rec.attribute3,
267        p_attribute4_o                  => per_jbr_shd.g_old_rec.attribute4,
268        p_attribute5_o                  => per_jbr_shd.g_old_rec.attribute5,
269        p_attribute6_o                  => per_jbr_shd.g_old_rec.attribute6,
270        p_attribute7_o                  => per_jbr_shd.g_old_rec.attribute7,
271        p_attribute8_o                  => per_jbr_shd.g_old_rec.attribute8,
272        p_attribute9_o                  => per_jbr_shd.g_old_rec.attribute9,
273        p_attribute10_o                 => per_jbr_shd.g_old_rec.attribute10,
274        p_attribute11_o                 => per_jbr_shd.g_old_rec.attribute11,
275        p_attribute12_o                 => per_jbr_shd.g_old_rec.attribute12,
276        p_attribute13_o                 => per_jbr_shd.g_old_rec.attribute13,
277        p_attribute14_o                 => per_jbr_shd.g_old_rec.attribute14,
278        p_attribute15_o                 => per_jbr_shd.g_old_rec.attribute15,
279        p_attribute16_o                 => per_jbr_shd.g_old_rec.attribute16,
280        p_attribute17_o                 => per_jbr_shd.g_old_rec.attribute17,
281        p_attribute18_o                 => per_jbr_shd.g_old_rec.attribute18,
282        p_attribute19_o                 => per_jbr_shd.g_old_rec.attribute19,
283        p_attribute20_o                 => per_jbr_shd.g_old_rec.attribute20,
284        p_object_version_number_o       => per_jbr_shd.g_old_rec.object_version_number
285       );
286   exception
287     when hr_api.cannot_find_prog_unit then
288       hr_api.cannot_find_prog_unit_error
289         (p_module_name => 'PER_JOB_REQUIREMENTS'
290         ,p_hook_type   => 'AU'
291         );
292   end;
293   -- End of API User Hook for post_update.
294   --
295   hr_utility.set_location(' Leaving:'||l_proc, 10);
296 End post_update;
297 --
298 -- ----------------------------------------------------------------------------
299 -- |-----------------------------< convert_defs >-----------------------------|
300 -- ----------------------------------------------------------------------------
301 -- {Start Of Comments}
302 --
303 -- Description:
304 --   The Convert_Defs procedure has one very important function:
305 --   It must return the record structure for the row with all system defaulted
306 --   values converted into its corresponding argument value for update. When
307 --   we attempt to update a row through the Upd business process , certain
308 --   arguments can be defaulted which enables flexibility in the calling of
309 --   the upd process (e.g. only attributes which need to be updated need to be
310 --   specified). For the upd business process to determine which attributes
311 --   have NOT been specified we need to check if the argument has a reserved
312 --   system default value. Therefore, for all attributes which have a
313 --   corresponding reserved system default mechanism specified we need to
314 --   check if a system default is being used. If a system default is being
315 --   used then we convert the defaulted value into its corresponding attribute
316 --   value held in the g_old_rec data structure.
317 --
318 -- Pre Conditions:
319 --   This private function can only be called from the upd process.
320 --
321 -- In Arguments:
322 --   A Pl/Sql record structre.
323 --
324 -- Post Success:
325 --   The record structure will be returned with all system defaulted argument
326 --   values converted into its current row attribute value.
327 --
328 -- Post Failure:
329 --   No direct error handling is required within this function. Any possible
330 --   errors within this procedure will be a PL/SQL value error due to conversion
331 
332 --   of datatypes or data lengths.
333 --
334 -- Developer Implementation Notes:
335 --   None.
336 --
337 -- Access Status:
338 --   Internal Table Handler Use Only.
339 --
340 -- {End Of Comments}
341 -- ----------------------------------------------------------------------------
342 Procedure convert_defs(p_rec in out nocopy per_jbr_shd.g_rec_type) is
343 --
344   l_proc  varchar2(72) := g_package||'convert_defs';
345 --
346 Begin
347   --
348   hr_utility.set_location('Entering:'||l_proc, 5);
349   --
350   -- We must now examine each argument value in the
351   -- p_rec plsql record structure
352   -- to see if a system default is being used. If a system default
353   -- is being used then we must set to the 'current' argument value.
354   --
355   If (p_rec.business_group_id = hr_api.g_number) then
356     p_rec.business_group_id :=
357     per_jbr_shd.g_old_rec.business_group_id;
358   End If;
359   If (p_rec.analysis_criteria_id = hr_api.g_number) then
360     p_rec.analysis_criteria_id :=
361     per_jbr_shd.g_old_rec.analysis_criteria_id;
362   End If;
363   If (p_rec.comments = hr_api.g_varchar2) then
364     p_rec.comments :=
365     per_jbr_shd.g_old_rec.comments;
366   End If;
367   If (p_rec.date_from = hr_api.g_date) then
368     p_rec.date_from :=
369     per_jbr_shd.g_old_rec.date_from;
370   End If;
371   If (p_rec.date_to = hr_api.g_date) then
372     p_rec.date_to :=
373     per_jbr_shd.g_old_rec.date_to;
374   End If;
375   If (p_rec.essential = hr_api.g_varchar2) then
376     p_rec.essential :=
377     per_jbr_shd.g_old_rec.essential;
378   End If;
379   If (p_rec.job_id = hr_api.g_number) then
380     p_rec.job_id :=
381     per_jbr_shd.g_old_rec.job_id;
382   End If;
383   If (p_rec.position_id = hr_api.g_number) then
384     p_rec.position_id :=
385     per_jbr_shd.g_old_rec.position_id;
386   End If;
387   If (p_rec.request_id = hr_api.g_number) then
388     p_rec.request_id :=
389     per_jbr_shd.g_old_rec.request_id;
390   End If;
391   If (p_rec.program_application_id = hr_api.g_number) then
392     p_rec.program_application_id :=
393     per_jbr_shd.g_old_rec.program_application_id;
394   End If;
395   If (p_rec.program_id = hr_api.g_number) then
396     p_rec.program_id :=
397     per_jbr_shd.g_old_rec.program_id;
398   End If;
399   If (p_rec.program_update_date = hr_api.g_date) then
400     p_rec.program_update_date :=
401     per_jbr_shd.g_old_rec.program_update_date;
402   End If;
403   If (p_rec.attribute_category = hr_api.g_varchar2) then
404     p_rec.attribute_category :=
405     per_jbr_shd.g_old_rec.attribute_category;
406   End If;
407   If (p_rec.attribute1 = hr_api.g_varchar2) then
408     p_rec.attribute1 :=
409     per_jbr_shd.g_old_rec.attribute1;
410   End If;
411   If (p_rec.attribute2 = hr_api.g_varchar2) then
412     p_rec.attribute2 :=
413     per_jbr_shd.g_old_rec.attribute2;
414   End If;
415   If (p_rec.attribute3 = hr_api.g_varchar2) then
416     p_rec.attribute3 :=
417     per_jbr_shd.g_old_rec.attribute3;
418   End If;
419   If (p_rec.attribute4 = hr_api.g_varchar2) then
420     p_rec.attribute4 :=
421     per_jbr_shd.g_old_rec.attribute4;
422   End If;
423   If (p_rec.attribute5 = hr_api.g_varchar2) then
424     p_rec.attribute5 :=
425     per_jbr_shd.g_old_rec.attribute5;
426   End If;
427   If (p_rec.attribute6 = hr_api.g_varchar2) then
428     p_rec.attribute6 :=
429     per_jbr_shd.g_old_rec.attribute6;
430   End If;
431   If (p_rec.attribute7 = hr_api.g_varchar2) then
432     p_rec.attribute7 :=
433     per_jbr_shd.g_old_rec.attribute7;
434   End If;
435   If (p_rec.attribute8 = hr_api.g_varchar2) then
436     p_rec.attribute8 :=
437     per_jbr_shd.g_old_rec.attribute8;
438   End If;
439   If (p_rec.attribute9 = hr_api.g_varchar2) then
440     p_rec.attribute9 :=
441     per_jbr_shd.g_old_rec.attribute9;
442   End If;
443   If (p_rec.attribute10 = hr_api.g_varchar2) then
444     p_rec.attribute10 :=
445     per_jbr_shd.g_old_rec.attribute10;
446   End If;
447   If (p_rec.attribute11 = hr_api.g_varchar2) then
448     p_rec.attribute11 :=
449     per_jbr_shd.g_old_rec.attribute11;
450   End If;
451   If (p_rec.attribute12 = hr_api.g_varchar2) then
452     p_rec.attribute12 :=
453     per_jbr_shd.g_old_rec.attribute12;
454   End If;
455   If (p_rec.attribute13 = hr_api.g_varchar2) then
456     p_rec.attribute13 :=
457     per_jbr_shd.g_old_rec.attribute13;
458   End If;
459   If (p_rec.attribute14 = hr_api.g_varchar2) then
460     p_rec.attribute14 :=
461     per_jbr_shd.g_old_rec.attribute14;
462   End If;
463   If (p_rec.attribute15 = hr_api.g_varchar2) then
464     p_rec.attribute15 :=
465     per_jbr_shd.g_old_rec.attribute15;
466   End If;
467   If (p_rec.attribute16 = hr_api.g_varchar2) then
468     p_rec.attribute16 :=
469     per_jbr_shd.g_old_rec.attribute16;
470   End If;
471   If (p_rec.attribute17 = hr_api.g_varchar2) then
472     p_rec.attribute17 :=
473     per_jbr_shd.g_old_rec.attribute17;
474   End If;
475   If (p_rec.attribute18 = hr_api.g_varchar2) then
476     p_rec.attribute18 :=
477     per_jbr_shd.g_old_rec.attribute18;
478   End If;
479   If (p_rec.attribute19 = hr_api.g_varchar2) then
480     p_rec.attribute19 :=
481     per_jbr_shd.g_old_rec.attribute19;
482   End If;
483   If (p_rec.attribute20 = hr_api.g_varchar2) then
484     p_rec.attribute20 :=
485     per_jbr_shd.g_old_rec.attribute20;
486   End If;
487 
488   --
489   hr_utility.set_location(' Leaving:'||l_proc, 10);
490 --
491 End convert_defs;
492 --
493 -- ----------------------------------------------------------------------------
494 -- |---------------------------------< upd >----------------------------------|
495 -- ----------------------------------------------------------------------------
496 Procedure upd
497   (
498    p_rec        in out nocopy per_jbr_shd.g_rec_type,
499    p_validate   in     boolean default false
500   ) is
501 --
502   l_proc  varchar2(72) := g_package||'upd';
503 --
504 Begin
505   hr_utility.set_location('Entering:'||l_proc, 5);
506   --
507   -- Determine if the business process is to be validated.
508   --
509   If p_validate then
510     --
511     -- Issue the savepoint.
512     --
513     SAVEPOINT upd_per_jbr;
514   End If;
515   --
516   -- We must lock the row which we need to update.
517   --
518   per_jbr_shd.lck
519 	(
520 	p_rec.job_requirement_id,
521 	p_rec.object_version_number
522 	);
523   --
524   -- 1. During an update system defaults are used to determine if
525   --    arguments have been defaulted or not. We must therefore
526   --    derive the full record structure values to be updated.
527   --
528   -- 2. Call the supporting update validate operations.
529   --
530   convert_defs(p_rec);
531   per_jbr_bus.update_validate(p_rec);
532   --
533   -- Call the supporting pre-update operation
534   --
535   pre_update(p_rec);
536   --
537   -- Update the row.
538   --
539   update_dml(p_rec);
540   --
541   -- Call the supporting post-update operation
542   --
543   post_update(p_rec);
544   --
545   -- If we are validating then raise the Validate_Enabled exception
546   --
547   If p_validate then
548     Raise HR_Api.Validate_Enabled;
549   End If;
550   --
551   hr_utility.set_location(' Leaving:'||l_proc, 10);
552 Exception
553   When HR_Api.Validate_Enabled Then
554     --
555     -- As the Validate_Enabled exception has been raised
556     -- we must rollback to the savepoint
557     --
558     ROLLBACK TO upd_per_jbr;
559 End upd;
560 --
561 -- ----------------------------------------------------------------------------
562 -- |---------------------------------< upd >----------------------------------|
563 -- ----------------------------------------------------------------------------
564 Procedure upd
565   (
566    p_job_requirement_id           in number,
567    p_analysis_criteria_id         in number           default hr_api.g_number,
568    p_comments                     in varchar2         default hr_api.g_varchar2,
569    p_date_from                    in date             default hr_api.g_date,
570    p_date_to                      in date             default hr_api.g_date,
571    p_essential                    in varchar2         default hr_api.g_varchar2,
572    p_job_id                       in number           default hr_api.g_number,
573    p_position_id                  in number           default hr_api.g_number,
574    p_request_id                   in number           default hr_api.g_number,
575    p_program_application_id       in number           default hr_api.g_number,
576    p_program_id                   in number           default hr_api.g_number,
577    p_program_update_date          in date             default hr_api.g_date,
578    p_attribute_category           in varchar2         default hr_api.g_varchar2,
579    p_attribute1                   in varchar2         default hr_api.g_varchar2,
580    p_attribute2                   in varchar2         default hr_api.g_varchar2,
581    p_attribute3                   in varchar2         default hr_api.g_varchar2,
582    p_attribute4                   in varchar2         default hr_api.g_varchar2,
583    p_attribute5                   in varchar2         default hr_api.g_varchar2,
584    p_attribute6                   in varchar2         default hr_api.g_varchar2,
585    p_attribute7                   in varchar2         default hr_api.g_varchar2,
586    p_attribute8                   in varchar2         default hr_api.g_varchar2,
587    p_attribute9                   in varchar2         default hr_api.g_varchar2,
588    p_attribute10                  in varchar2         default hr_api.g_varchar2,
589    p_attribute11                  in varchar2         default hr_api.g_varchar2,
590    p_attribute12                  in varchar2         default hr_api.g_varchar2,
591    p_attribute13                  in varchar2         default hr_api.g_varchar2,
592    p_attribute14                  in varchar2         default hr_api.g_varchar2,
593    p_attribute15                  in varchar2         default hr_api.g_varchar2,
594    p_attribute16                  in varchar2         default hr_api.g_varchar2,
595    p_attribute17                  in varchar2         default hr_api.g_varchar2,
596    p_attribute18                  in varchar2         default hr_api.g_varchar2,
597    p_attribute19                  in varchar2         default hr_api.g_varchar2,
598    p_attribute20                  in varchar2         default hr_api.g_varchar2,
599    p_object_version_number        in out nocopy number,
600    p_validate                     in boolean      default false
601   ) is
602 --
603   l_rec	  per_jbr_shd.g_rec_type;
604   l_proc  varchar2(72) := g_package||'upd';
605 --
606 Begin
607   hr_utility.set_location('Entering:'||l_proc, 5);
608   --
609   -- Call conversion function to turn arguments into the
610   -- l_rec structure.
611   --
612   l_rec :=
613   per_jbr_shd.convert_args
614   (
615   p_job_requirement_id,
616   hr_api.g_number,
617   p_analysis_criteria_id,
618   p_comments,
619   p_date_from,
620   p_date_to,
621   p_essential,
622   p_job_id,
623   p_position_id,
624   p_request_id,
625   p_program_application_id,
626   p_program_id,
627   p_program_update_date,
628   p_attribute_category,
629   p_attribute1,
630   p_attribute2,
631   p_attribute3,
632   p_attribute4,
633   p_attribute5,
634   p_attribute6,
635   p_attribute7,
636   p_attribute8,
637   p_attribute9,
638   p_attribute10,
639   p_attribute11,
640   p_attribute12,
641   p_attribute13,
642   p_attribute14,
643   p_attribute15,
644   p_attribute16,
645   p_attribute17,
646   p_attribute18,
647   p_attribute19,
648   p_attribute20,
649   p_object_version_number
650   );
651   --
652   -- Having converted the arguments into the
653   -- plsql record structure we call the corresponding record
654   -- business process.
655   --
656   upd(l_rec, p_validate);
657   p_object_version_number := l_rec.object_version_number;
658   --
659   hr_utility.set_location(' Leaving:'||l_proc, 10);
660 End upd;
661 --
662 end per_jbr_upd;