DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_STS_UPD

Source


1 Package Body pqh_sts_upd as
2 /* $Header: pqstsrhi.pkb 120.0 2005/05/29 02:43 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pqh_sts_upd.';  -- Global package name
9 g_debug boolean := hr_utility.debug_enabled;
10 --
11 -- ----------------------------------------------------------------------------
12 -- |------------------------------< update_dml >------------------------------|
13 -- ----------------------------------------------------------------------------
14 -- {Start Of Comments}
15 --
16 -- Description:
17 --   This procedure controls the actual dml update logic. The processing of
18 --   this procedure is:
19 --   1) Increment the object_version_number by 1 if the object_version_number
20 --      is defined as an attribute for this entity.
21 --   2) To set and unset the g_api_dml status as required (as we are about to
22 --      perform dml).
23 --   3) To update the specified row in the schema using the primary key in
24 --      the predicates.
25 --   4) To trap any constraint violations that may have occurred.
26 --   5) To raise any other errors.
27 --
28 -- Prerequisites:
29 --   This is an internal private procedure which must be called from the upd
30 --   procedure.
31 --
32 -- In Parameters:
33 --   A Pl/Sql record structre.
34 --
35 -- Post Success:
36 --   The specified row will be updated in the schema.
37 --
38 -- Post Failure:
39 --   On the update dml failure it is important to note that we always reset the
40 --   g_api_dml status to false.
41 --   If a check, unique or parent integrity constraint violation is raised the
42 --   constraint_error procedure will be called.
43 --   If any other error is reported, the error will be raised after the
44 --   g_api_dml status is reset.
45 --
46 -- Developer Implementation Notes:
47 --   The update 'set' attribute list should be modified if any of your
48 --   attributes are not updateable.
49 --
50 -- Access Status:
51 --   Internal Row Handler Use Only.
52 --
53 -- {End Of Comments}
54 -- ----------------------------------------------------------------------------
55 Procedure update_dml
56   (p_rec in out nocopy pqh_sts_shd.g_rec_type
57   ) is
58 --
59   l_proc  varchar2(72) := g_package||'update_dml';
60 --
61 Begin
62      if g_debug then
63    --
64      hr_utility.set_location('Entering:'||l_proc, 5);
65    --
66      End if;
67   --
68   -- Increment the object version
69   p_rec.object_version_number := p_rec.object_version_number + 1;
70   --
71   --
72   --
73   -- Update the pqh_fr_stat_situations Row
74   --
75   update pqh_fr_stat_situations
76     set
77      statutory_situation_id          = p_rec.statutory_situation_id
78     ,business_group_id               = p_rec.business_group_id
79     ,situation_name                  = p_rec.situation_name
80     ,type_of_ps                      = p_rec.type_of_ps
81     ,situation_type                  = p_rec.situation_type
82     ,sub_type                        = p_rec.sub_type
83     ,source                          = p_rec.source
84     ,location                        = p_rec.location
85     ,reason                          = p_rec.reason
86     ,default_flag                    = p_rec.is_default
87     ,date_from                       = trunc(p_rec.date_from)
88     ,date_to                         = trunc(p_rec.date_to)
89     ,request_type                    = p_rec.request_type
90     ,employee_agreement_needed       = p_rec.employee_agreement_needed
91     ,manager_agreement_needed        = p_rec.manager_agreement_needed
92     ,print_arrette                   = p_rec.print_arrette
93     ,reserve_position                = p_rec.reserve_position
94     ,allow_progression_flag          = p_rec.allow_progressions
95     ,extend_probation_period_flag    = p_rec.extend_probation_period
96     ,remuneration_paid               = p_rec.remuneration_paid
97     ,pay_share                       = p_rec.pay_share
98     ,pay_periods                     = p_rec.pay_periods
99     ,frequency                       = p_rec.frequency
100     ,first_period_max_duration       = p_rec.first_period_max_duration
101     ,min_duration_per_request        = p_rec.min_duration_per_request
102     ,max_duration_per_request        = p_rec.max_duration_per_request
103     ,max_duration_whole_career       = p_rec.max_duration_whole_career
104     ,renewable_allowed               = p_rec.renewable_allowed
105     ,max_no_of_renewals              = p_rec.max_no_of_renewals
106     ,max_duration_per_renewal        = p_rec.max_duration_per_renewal
107     ,max_tot_continuous_duration     = p_rec.max_tot_continuous_duration
108     ,object_version_number           = p_rec.object_version_number
109     ,remunerate_assign_status_id     = p_rec.remunerate_assign_status_id
110     where statutory_situation_id = p_rec.statutory_situation_id;
111   --
112   --
113   --
114      if g_debug then
115    --
116       hr_utility.set_location(' Leaving:'||l_proc, 10);
117       --
118       End if;
119 --
120 Exception
121   When hr_api.check_integrity_violated Then
122     -- A check constraint has been violated
123     --
124     pqh_sts_shd.constraint_error
125       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
126   When hr_api.parent_integrity_violated Then
127     -- Parent integrity has been violated
128     --
129     pqh_sts_shd.constraint_error
130       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
131   When hr_api.unique_integrity_violated Then
132     -- Unique integrity has been violated
133     --
134     pqh_sts_shd.constraint_error
135       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
136   When Others Then
137     --
138     Raise;
139 End update_dml;
140 --
141 -- ----------------------------------------------------------------------------
142 -- |------------------------------< pre_update >------------------------------|
143 -- ----------------------------------------------------------------------------
144 -- {Start Of Comments}
145 --
146 -- Description:
147 --   This private procedure contains any processing which is required before
148 --   the update dml.
149 --
150 -- Prerequisites:
151 --   This is an internal procedure which is called from the upd procedure.
152 --
153 -- In Parameters:
154 --   A Pl/Sql record structure.
155 --
156 -- Post Success:
157 --   Processing continues.
158 --
159 -- Post Failure:
160 --   If an error has occurred, an error message and exception wil be raised
161 --   but not handled.
162 --
163 -- Developer Implementation Notes:
164 --   Any pre-processing required before the update dml is issued should be
165 --   coded within this procedure. It is important to note that any 3rd party
166 --   maintenance should be reviewed before placing in this procedure.
167 --
168 -- Access Status:
169 --   Internal Row Handler Use Only.
170 --
171 -- {End Of Comments}
172 -- ----------------------------------------------------------------------------
173 Procedure pre_update
174   (p_rec in pqh_sts_shd.g_rec_type
175   ) is
176 --
177   l_proc  varchar2(72) := g_package||'pre_update';
178 --
179 Begin
180      if g_debug then
181    --
182   hr_utility.set_location('Entering:'||l_proc, 5);
183   --
184   hr_utility.set_location(' Leaving:'||l_proc, 10);
185     --
186     End if;
187 End pre_update;
188 --
189 -- ----------------------------------------------------------------------------
190 -- |-----------------------------< post_update >------------------------------|
191 -- ----------------------------------------------------------------------------
192 -- {Start Of Comments}
193 --
194 -- Description:
195 --   This private procedure contains any processing which is required after
196 --   the update dml.
197 --
198 -- Prerequisites:
199 --   This is an internal procedure which is called from the upd procedure.
200 --
201 -- In Parameters:
202 --   A Pl/Sql record structure.
203 --
204 -- Post Success:
205 --   Processing continues.
206 --
207 -- Post Failure:
208 --   If an error has occurred, an error message and exception will be raised
209 --   but not handled.
210 --
211 -- Developer Implementation Notes:
212 --   Any post-processing required after the update dml is issued should be
213 --   coded within this procedure. It is important to note that any 3rd party
214 --   maintenance should be reviewed before placing in this procedure.
215 --
216 -- Access Status:
217 --   Internal Row Handler Use Only.
218 --
219 -- {End Of Comments}
220 -- ----------------------------------------------------------------------------
221 Procedure post_update
222   (p_effective_date               in date
223   ,p_rec                          in pqh_sts_shd.g_rec_type
224   ) is
225 --
226   l_proc  varchar2(72) := g_package||'post_update';
227 --
228 Begin
229      if g_debug then
230    --
231      hr_utility.set_location('Entering:'||l_proc, 5);
232      --
233      end if;
234   begin
235     --
236     pqh_sts_rku.after_update
237       (p_effective_date              => trunc(p_effective_date)
238       ,p_statutory_situation_id
239       => p_rec.statutory_situation_id
240       ,p_business_group_id
241       => p_rec.business_group_id
242       ,p_situation_name
243       => p_rec.situation_name
244       ,p_type_of_ps
245       => p_rec.type_of_ps
246       ,p_situation_type
247       => p_rec.situation_type
248       ,p_sub_type
249       => p_rec.sub_type
250       ,p_source
251       => p_rec.source
252       ,p_location
253       => p_rec.location
254       ,p_reason
255       => p_rec.reason
256       ,p_is_default
257       => p_rec.is_default
258       ,p_date_from
259       => trunc(p_rec.date_from)
260       ,p_date_to
261       => trunc(p_rec.date_to)
262       ,p_request_type
263       => p_rec.request_type
264       ,p_employee_agreement_needed
265       => p_rec.employee_agreement_needed
266       ,p_manager_agreement_needed
267       => p_rec.manager_agreement_needed
268       ,p_print_arrette
269       => p_rec.print_arrette
270       ,p_reserve_position
271       => p_rec.reserve_position
272       ,p_allow_progressions
273       => p_rec.allow_progressions
274       ,p_extend_probation_period
275       => p_rec.extend_probation_period
276       ,p_remuneration_paid
277       => p_rec.remuneration_paid
278       ,p_pay_share
279       => p_rec.pay_share
280       ,p_pay_periods
281       => p_rec.pay_periods
282       ,p_frequency
283       => p_rec.frequency
284       ,p_first_period_max_duration
285       => p_rec.first_period_max_duration
286       ,p_min_duration_per_request
287       => p_rec.min_duration_per_request
288       ,p_max_duration_per_request
289       => p_rec.max_duration_per_request
290       ,p_max_duration_whole_career
291       => p_rec.max_duration_whole_career
292       ,p_renewable_allowed
293       => p_rec.renewable_allowed
294       ,p_max_no_of_renewals
295       => p_rec.max_no_of_renewals
296       ,p_max_duration_per_renewal
297       => p_rec.max_duration_per_renewal
298       ,p_max_tot_continuous_duration
299       => p_rec.max_tot_continuous_duration
300       ,p_object_version_number
301       => p_rec.object_version_number
302       ,p_remunerate_assign_status_id
303       => p_rec.remunerate_assign_status_id
304       ,p_business_group_id_o
305       => pqh_sts_shd.g_old_rec.business_group_id
306       ,p_situation_name_o
307       => pqh_sts_shd.g_old_rec.situation_name
308       ,p_type_of_ps_o
309       => pqh_sts_shd.g_old_rec.type_of_ps
310       ,p_situation_type_o
311       => pqh_sts_shd.g_old_rec.situation_type
312       ,p_sub_type_o
313       => pqh_sts_shd.g_old_rec.sub_type
314       ,p_source_o
315       => pqh_sts_shd.g_old_rec.source
316       ,p_location_o
317       => pqh_sts_shd.g_old_rec.location
318       ,p_reason_o
319       => pqh_sts_shd.g_old_rec.reason
320       ,p_is_default_o
321       => pqh_sts_shd.g_old_rec.is_default
322       ,p_date_from_o
323       => pqh_sts_shd.g_old_rec.date_from
324       ,p_date_to_o
325       => pqh_sts_shd.g_old_rec.date_to
326       ,p_request_type_o
327       => pqh_sts_shd.g_old_rec.request_type
328       ,p_employee_agreement_needed_o
329       => pqh_sts_shd.g_old_rec.employee_agreement_needed
330       ,p_manager_agreement_needed_o
331       => pqh_sts_shd.g_old_rec.manager_agreement_needed
332       ,p_print_arrette_o
333       => pqh_sts_shd.g_old_rec.print_arrette
334       ,p_reserve_position_o
335       => pqh_sts_shd.g_old_rec.reserve_position
336       ,p_allow_progressions_o
337       => pqh_sts_shd.g_old_rec.allow_progressions
338       ,p_extend_probation_period_o
339       => pqh_sts_shd.g_old_rec.extend_probation_period
340       ,p_remuneration_paid_o
341       => pqh_sts_shd.g_old_rec.remuneration_paid
342       ,p_pay_share_o
343       => pqh_sts_shd.g_old_rec.pay_share
344       ,p_pay_periods_o
345       => pqh_sts_shd.g_old_rec.pay_periods
346       ,p_frequency_o
347       => pqh_sts_shd.g_old_rec.frequency
348       ,p_first_period_max_duration_o
349       => pqh_sts_shd.g_old_rec.first_period_max_duration
350       ,p_min_duration_per_request_o
351       => pqh_sts_shd.g_old_rec.min_duration_per_request
352       ,p_max_duration_per_request_o
353       => pqh_sts_shd.g_old_rec.max_duration_per_request
354       ,p_max_duration_whole_career_o
355       => pqh_sts_shd.g_old_rec.max_duration_whole_career
356       ,p_renewable_allowed_o
357       => pqh_sts_shd.g_old_rec.renewable_allowed
358       ,p_max_no_of_renewals_o
359       => pqh_sts_shd.g_old_rec.max_no_of_renewals
360       ,p_max_duration_per_renewal_o
361       => pqh_sts_shd.g_old_rec.max_duration_per_renewal
362       ,p_max_tot_continuous_duratio_o
363       => pqh_sts_shd.g_old_rec.max_tot_continuous_duration
364       ,p_object_version_number_o
365       => pqh_sts_shd.g_old_rec.object_version_number
366       ,p_remunerate_assign_stat_id_o
367       => pqh_sts_shd.g_old_rec.remunerate_assign_status_id
368       );
369     --
370   exception
371     --
372     when hr_api.cannot_find_prog_unit then
373       --
374       hr_api.cannot_find_prog_unit_error
375         (p_module_name => 'PQH_FR_STAT_SITUATIONS'
376         ,p_hook_type   => 'AU');
377       --
378   end;
379   --
380    if g_debug then
381    --
382   	hr_utility.set_location(' Leaving:'||l_proc, 10);
383    --
384    End if;
385 
386 End post_update;
387 --
388 -- ----------------------------------------------------------------------------
389 -- |-----------------------------< convert_defs >-----------------------------|
390 -- ----------------------------------------------------------------------------
391 -- {Start Of Comments}
392 --
393 -- Description:
394 --   The Convert_Defs procedure has one very important function:
395 --   It must return the record structure for the row with all system defaulted
396 --   values converted into its corresponding parameter value for update. When
397 --   we attempt to update a row through the Upd process , certain
398 --   parameters can be defaulted which enables flexibility in the calling of
399 --   the upd process (e.g. only attributes which need to be updated need to be
400 --   specified). For the upd process to determine which attributes
401 --   have NOT been specified we need to check if the parameter has a reserved
402 --   system default value. Therefore, for all parameters which have a
403 --   corresponding reserved system default mechanism specified we need to
404 --   check if a system default is being used. If a system default is being
405 --   used then we convert the defaulted value into its corresponding attribute
406 --   value held in the g_old_rec data structure.
407 --
408 -- Prerequisites:
409 --   This private function can only be called from the upd process.
410 --
411 -- In Parameters:
412 --   A Pl/Sql record structure.
413 --
414 -- Post Success:
415 --   The record structure will be returned with all system defaulted parameter
416 --   values converted into its current row attribute value.
417 --
418 -- Post Failure:
419 --   No direct error handling is required within this function. Any possible
420 --   errors within this procedure will be a PL/SQL value error due to
421 --   conversion of datatypes or data lengths.
422 --
423 -- Developer Implementation Notes:
424 --   None.
425 --
426 -- Access Status:
427 --   Internal Row Handler Use Only.
428 --
429 -- {End Of Comments}
430 -- ----------------------------------------------------------------------------
431 Procedure convert_defs
432   (p_rec in out nocopy pqh_sts_shd.g_rec_type
433   ) is
434 --
435 Begin
436   --
437   -- We must now examine each argument value in the
438   -- p_rec plsql record structure
439   -- to see if a system default is being used. If a system default
440   -- is being used then we must set to the 'current' argument value.
441   --
442   If (p_rec.business_group_id = hr_api.g_number) then
443     p_rec.business_group_id :=
444     pqh_sts_shd.g_old_rec.business_group_id;
445   End If;
446   If (p_rec.situation_name = hr_api.g_varchar2) then
447     p_rec.situation_name :=
448     pqh_sts_shd.g_old_rec.situation_name;
449   End If;
450   If (p_rec.type_of_ps = hr_api.g_varchar2) then
451     p_rec.type_of_ps :=
452     pqh_sts_shd.g_old_rec.type_of_ps;
453   End If;
454   If (p_rec.situation_type = hr_api.g_varchar2) then
455     p_rec.situation_type :=
456     pqh_sts_shd.g_old_rec.situation_type;
457   End If;
458   If (p_rec.sub_type = hr_api.g_varchar2) then
459     p_rec.sub_type :=
460     pqh_sts_shd.g_old_rec.sub_type;
461   End If;
462   If (p_rec.source = hr_api.g_varchar2) then
463     p_rec.source :=
464     pqh_sts_shd.g_old_rec.source;
465   End If;
466   If (p_rec.location = hr_api.g_varchar2) then
467     p_rec.location :=
468     pqh_sts_shd.g_old_rec.location;
469   End If;
470   If (p_rec.reason = hr_api.g_varchar2) then
471     p_rec.reason :=
472     pqh_sts_shd.g_old_rec.reason;
473   End If;
474   If (p_rec.is_default = hr_api.g_varchar2) then
475     p_rec.is_default :=
476     pqh_sts_shd.g_old_rec.is_default;
477   End If;
478   If (p_rec.date_from = hr_api.g_date) then
479     p_rec.date_from :=
480     pqh_sts_shd.g_old_rec.date_from;
481   End If;
482   If (p_rec.date_to = hr_api.g_date) then
483     p_rec.date_to :=
484     pqh_sts_shd.g_old_rec.date_to;
485   End If;
486   If (p_rec.request_type = hr_api.g_varchar2) then
487     p_rec.request_type :=
488     pqh_sts_shd.g_old_rec.request_type;
489   End If;
490   If (p_rec.employee_agreement_needed = hr_api.g_varchar2) then
491     p_rec.employee_agreement_needed :=
492     pqh_sts_shd.g_old_rec.employee_agreement_needed;
493   End If;
494   If (p_rec.manager_agreement_needed = hr_api.g_varchar2) then
495     p_rec.manager_agreement_needed :=
496     pqh_sts_shd.g_old_rec.manager_agreement_needed;
497   End If;
498   If (p_rec.print_arrette = hr_api.g_varchar2) then
499     p_rec.print_arrette :=
500     pqh_sts_shd.g_old_rec.print_arrette;
501   End If;
502   If (p_rec.reserve_position = hr_api.g_varchar2) then
503     p_rec.reserve_position :=
504     pqh_sts_shd.g_old_rec.reserve_position;
505   End If;
506   If (p_rec.allow_progressions = hr_api.g_varchar2) then
507     p_rec.allow_progressions :=
508     pqh_sts_shd.g_old_rec.reserve_position;
509   End If;
510   If (p_rec.extend_probation_period  = hr_api.g_varchar2) then
511     p_rec.extend_probation_period  :=
512     pqh_sts_shd.g_old_rec.reserve_position;
513   End If;
514   If (p_rec.remuneration_paid = hr_api.g_varchar2) then
515     p_rec.remuneration_paid :=
516     pqh_sts_shd.g_old_rec.remuneration_paid;
517   End If;
518   If (p_rec.pay_share = hr_api.g_number) then
519     p_rec.pay_share :=
520     pqh_sts_shd.g_old_rec.pay_share;
521   End If;
522   If (p_rec.pay_periods = hr_api.g_number) then
523     p_rec.pay_periods :=
524     pqh_sts_shd.g_old_rec.pay_periods;
525   End If;
526   If (p_rec.frequency = hr_api.g_varchar2) then
527     p_rec.frequency :=
528     pqh_sts_shd.g_old_rec.frequency;
529   End If;
530   If (p_rec.first_period_max_duration = hr_api.g_number) then
531     p_rec.first_period_max_duration :=
532     pqh_sts_shd.g_old_rec.first_period_max_duration;
533   End If;
534   If (p_rec.min_duration_per_request = hr_api.g_number) then
535     p_rec.min_duration_per_request :=
536     pqh_sts_shd.g_old_rec.min_duration_per_request;
537   End If;
538   If (p_rec.max_duration_per_request = hr_api.g_number) then
539     p_rec.max_duration_per_request :=
540     pqh_sts_shd.g_old_rec.max_duration_per_request;
541   End If;
542   If (p_rec.max_duration_whole_career = hr_api.g_number) then
543     p_rec.max_duration_whole_career :=
544     pqh_sts_shd.g_old_rec.max_duration_whole_career;
545   End If;
546   If (p_rec.renewable_allowed = hr_api.g_varchar2) then
547     p_rec.renewable_allowed :=
548     pqh_sts_shd.g_old_rec.renewable_allowed;
549   End If;
550   If (p_rec.max_no_of_renewals = hr_api.g_number) then
551     p_rec.max_no_of_renewals :=
552     pqh_sts_shd.g_old_rec.max_no_of_renewals;
553   End If;
554   If (p_rec.max_duration_per_renewal = hr_api.g_number) then
555     p_rec.max_duration_per_renewal :=
556     pqh_sts_shd.g_old_rec.max_duration_per_renewal;
557   End If;
558   If (p_rec.max_tot_continuous_duration = hr_api.g_number) then
559     p_rec.max_tot_continuous_duration :=
560     pqh_sts_shd.g_old_rec.max_tot_continuous_duration;
561   End If;
562   If (p_rec.remunerate_assign_status_id = hr_api.g_number) then
563     p_rec.remunerate_assign_status_id :=
564     pqh_sts_shd.g_old_rec.remunerate_assign_status_id;
565   End If;
566   --
567 End convert_defs;
568 --
569 -- ----------------------------------------------------------------------------
570 -- |---------------------------------< upd >----------------------------------|
571 -- ----------------------------------------------------------------------------
572 Procedure upd
573   (p_effective_date               in date
574   ,p_rec                          in out nocopy pqh_sts_shd.g_rec_type
575   ) is
576 --
577   l_proc  varchar2(72) := g_package||'upd';
578 --
579 Begin
580 
581  g_debug := hr_utility.debug_enabled;
582 
583 if g_debug then
584    --
585   hr_utility.set_location('Entering:'||l_proc, 5);
586   --
587   End if;
588   --
589   -- We must lock the row which we need to update.
590   --
591   pqh_sts_shd.lck
592     (p_rec.statutory_situation_id
593     ,p_rec.object_version_number
594     );
595   --
596   -- 1. During an update system defaults are used to determine if
597   --    arguments have been defaulted or not. We must therefore
598   --    derive the full record structure values to be updated.
599   --
600   -- 2. Call the supporting update validate operations.
601   --
602   convert_defs(p_rec);
603   pqh_sts_bus.update_validate
604      (p_effective_date
605      ,p_rec
606      );
607   --
608   -- Call to raise any errors on multi-message list
609   hr_multi_message.end_validation_set;
610   --
611   -- Call the supporting pre-update operation
612   --
613   pqh_sts_upd.pre_update(p_rec);
614   --
615   -- Update the row.
616   --
617   pqh_sts_upd.update_dml(p_rec);
618   --
619   -- Call the supporting post-update operation
620   --
621   pqh_sts_upd.post_update
622      (p_effective_date
623      ,p_rec
624      );
625   --
626   -- Call to raise any errors on multi-message list
627   hr_multi_message.end_validation_set;
628 End upd;
629 --
630 -- ----------------------------------------------------------------------------
631 -- |---------------------------------< upd >----------------------------------|
632 -- ----------------------------------------------------------------------------
633 Procedure upd
634   (p_effective_date               in     date
635   ,p_statutory_situation_id       in     number
636   ,p_object_version_number        in out nocopy number
637   ,p_business_group_id            in     number    default hr_api.g_number
638   ,p_situation_name               in     varchar2  default hr_api.g_varchar2
639   ,p_type_of_ps                   in     varchar2  default hr_api.g_varchar2
640   ,p_situation_type               in     varchar2  default hr_api.g_varchar2
641   ,p_sub_type                     in     varchar2  default hr_api.g_varchar2
642   ,p_source                       in     varchar2  default hr_api.g_varchar2
643   ,p_location                     in     varchar2  default hr_api.g_varchar2
644   ,p_reason                       in     varchar2  default hr_api.g_varchar2
645   ,p_is_default                   in     varchar2  default hr_api.g_varchar2
646   ,p_date_from                    in     date      default hr_api.g_date
647   ,p_date_to                      in     date      default hr_api.g_date
648   ,p_request_type                 in     varchar2  default hr_api.g_varchar2
649   ,p_employee_agreement_needed    in     varchar2  default hr_api.g_varchar2
650   ,p_manager_agreement_needed     in     varchar2  default hr_api.g_varchar2
651   ,p_print_arrette                in     varchar2  default hr_api.g_varchar2
652   ,p_reserve_position             in     varchar2  default hr_api.g_varchar2
653   ,p_allow_progressions           in     varchar2  default hr_api.g_varchar2
654   ,p_extend_probation_period      in     varchar2  default hr_api.g_varchar2
655   ,p_remuneration_paid            in     varchar2  default hr_api.g_varchar2
656   ,p_pay_share                    in     number    default hr_api.g_number
657   ,p_pay_periods                  in     number    default hr_api.g_number
658   ,p_frequency                    in     varchar2  default hr_api.g_varchar2
659   ,p_first_period_max_duration    in     number    default hr_api.g_number
660   ,p_min_duration_per_request     in     number    default hr_api.g_number
661   ,p_max_duration_per_request     in     number    default hr_api.g_number
662   ,p_max_duration_whole_career    in     number    default hr_api.g_number
663   ,p_renewable_allowed            in     varchar2  default hr_api.g_varchar2
664   ,p_max_no_of_renewals           in     number    default hr_api.g_number
665   ,p_max_duration_per_renewal     in     number    default hr_api.g_number
666   ,p_max_tot_continuous_duration  in     number    default hr_api.g_number
667   ,p_remunerate_assign_status_id  in     number    default hr_api.g_number
668   ) is
669 --
670   l_rec   pqh_sts_shd.g_rec_type;
671   l_proc  varchar2(72) := g_package||'upd';
672 --
673 Begin
674 
675 g_debug := hr_utility.debug_enabled;
676 
677 if g_debug then
678    --
679   hr_utility.set_location('Entering:'||l_proc, 5);
680   --
681   End if;
682   --
683   -- Call conversion function to turn arguments into the
684   -- l_rec structure.
685   --
686   l_rec :=
687   pqh_sts_shd.convert_args
688   (p_statutory_situation_id
689   ,p_business_group_id
690   ,p_situation_name
691   ,p_type_of_ps
692   ,p_situation_type
693   ,p_sub_type
694   ,p_source
695   ,p_location
696   ,p_reason
697   ,p_is_default
698   ,p_date_from
699   ,p_date_to
700   ,p_request_type
701   ,p_employee_agreement_needed
702   ,p_manager_agreement_needed
703   ,p_print_arrette
704   ,p_reserve_position
705   ,p_allow_progressions
706   ,p_extend_probation_period
707   ,p_remuneration_paid
708   ,p_pay_share
709   ,p_pay_periods
710   ,p_frequency
711   ,p_first_period_max_duration
712   ,p_min_duration_per_request
713   ,p_max_duration_per_request
714   ,p_max_duration_whole_career
715   ,p_renewable_allowed
716   ,p_max_no_of_renewals
717   ,p_max_duration_per_renewal
718   ,p_max_tot_continuous_duration
719   ,p_object_version_number
720   ,p_remunerate_assign_status_id
721   );
722   --
723   -- Having converted the arguments into the
724   -- plsql record structure we call the corresponding record
725   -- business process.
726   --
727   pqh_sts_upd.upd
728      (p_effective_date
729      ,l_rec
730      );
731   p_object_version_number := l_rec.object_version_number;
732   --
733   if g_debug then
734    --
735   hr_utility.set_location(' Leaving:'||l_proc, 10);
736   --
737   End if;
738   --
739 End upd;
740 --
741 end pqh_sts_upd;