DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_TJR_UPD

Source


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