DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_VGR_UPD

Source


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