DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_KAD_UPD

Source


1 Package Body per_kad_upd as
2 /* $Header: pekadrhi.pkb 120.1 2011/11/17 11:35:55 sidsaxen ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  per_kad_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_kad_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 hr_utility.set_location(l_proc, 6);
66   per_kad_shd.g_api_dml := true;  -- Set the api dml status
67   --
68 hr_utility.set_location(l_proc, 7);
69   -- Update the per_addresses Row
70   --
71   update per_addresses
72   set
73   address_id                        = p_rec.address_id,
74 -- 70.2 change a start.
75   date_from                         = p_rec.date_from,
76 -- 70.2 change a end.
77   address_line1                     = p_rec.address_line1,
78   address_line2                     = p_rec.address_line2,
79   address_line3                     = p_rec.address_line3,
80   address_type                      = p_rec.address_type,
81   comments                          = p_rec.comments,
82   country                           = p_rec.country,
83   date_to                           = p_rec.date_to,
84   postal_code                       = p_rec.postal_code,
85   region_1                          = p_rec.region_1,
86   region_2                          = p_rec.region_2,
87   region_3                          = p_rec.region_3,
88   telephone_number_1                = p_rec.telephone_number_1,
89   telephone_number_2                = p_rec.telephone_number_2,
90   telephone_number_3                = p_rec.telephone_number_3,
91   town_or_city                      = p_rec.town_or_city,
92   request_id                        = p_rec.request_id,
93   program_application_id            = p_rec.program_application_id,
94   program_id                        = p_rec.program_id,
95   program_update_date               = p_rec.program_update_date,
96   addr_attribute_category           = p_rec.addr_attribute_category,
97   addr_attribute1                   = p_rec.addr_attribute1,
98   addr_attribute2                   = p_rec.addr_attribute2,
102   addr_attribute6                   = p_rec.addr_attribute6,
99   addr_attribute3                   = p_rec.addr_attribute3,
100   addr_attribute4                   = p_rec.addr_attribute4,
101   addr_attribute5                   = p_rec.addr_attribute5,
103   addr_attribute7                   = p_rec.addr_attribute7,
104   addr_attribute8                   = p_rec.addr_attribute8,
105   addr_attribute9                   = p_rec.addr_attribute9,
106   addr_attribute10                  = p_rec.addr_attribute10,
107   addr_attribute11                  = p_rec.addr_attribute11,
108   addr_attribute12                  = p_rec.addr_attribute12,
109   addr_attribute13                  = p_rec.addr_attribute13,
110   addr_attribute14                  = p_rec.addr_attribute14,
111   addr_attribute15                  = p_rec.addr_attribute15,
112   addr_attribute16                  = p_rec.addr_attribute16,
113   addr_attribute17                  = p_rec.addr_attribute17,
114   addr_attribute18                  = p_rec.addr_attribute18,
115   addr_attribute19                  = p_rec.addr_attribute19,
116   addr_attribute20                  = p_rec.addr_attribute20,
117   object_version_number             = p_rec.object_version_number
118   where address_id = p_rec.address_id;
119   --
120 hr_utility.set_location(l_proc, 8);
121   per_kad_shd.g_api_dml := false;   -- Unset the api dml status
122   --
123   hr_utility.set_location(' Leaving:'||l_proc, 10);
124 --
125 Exception
126   When hr_api.check_integrity_violated Then
127     -- A check constraint has been violated
128     per_kad_shd.g_api_dml := false;   -- Unset the api dml status
129     per_kad_shd.constraint_error
130       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
131   When hr_api.parent_integrity_violated Then
132     -- Parent integrity has been violated
133     per_kad_shd.g_api_dml := false;   -- Unset the api dml status
134     per_kad_shd.constraint_error
135       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
136   When hr_api.unique_integrity_violated Then
137     -- Unique integrity has been violated
138     per_kad_shd.g_api_dml := false;   -- Unset the api dml status
139     per_kad_shd.constraint_error
140       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
141   When Others Then
142     per_kad_shd.g_api_dml := false;   -- Unset the api dml status
143     Raise;
144 End update_dml;
145 --
146 -- ----------------------------------------------------------------------------
147 -- |------------------------------< pre_update >------------------------------|
148 -- ----------------------------------------------------------------------------
149 -- {Start Of Comments}
150 --
151 -- Description:
152 --   This private procedure contains any processing which is required before
153 --   the update dml.
154 --
155 -- Pre Conditions:
156 --   This is an internal procedure which is called from the upd procedure.
157 --
158 -- In Arguments:
159 --   A Pl/Sql record structre.
160 --
161 -- Post Success:
162 --   Processing continues.
163 --
164 -- Post Failure:
165 --   If an error has occurred, an error message and exception will be raised
166 --   but not handled.
167 --
168 -- Developer Implementation Notes:
169 --   Any pre-processing required before the update dml is issued should be
170 --   coded within this procedure. It is important to note that any 3rd party
171 --   maintenance should be reviewed before placing in this procedure.
172 --
173 -- Access Status:
174 --   Internal Table Handler Use Only.
175 --
176 -- {End Of Comments}
177 -- ----------------------------------------------------------------------------
178 Procedure pre_update(p_rec in per_kad_shd.g_rec_type) is
179 --
180   l_proc  varchar2(72) := g_package||'pre_update';
181 --
182 Begin
183   hr_utility.set_location('Entering:'||l_proc, 5);
184   --
185   hr_utility.set_location(' Leaving:'||l_proc, 10);
186 End pre_update;
187 --
188 -- ----------------------------------------------------------------------------
189 -- |-----------------------------< post_update >------------------------------|
190 -- ----------------------------------------------------------------------------
191 -- {Start Of Comments}
192 --
193 -- Description:
194 --   This private procedure contains any processing which is required after the
195 --   update dml.
196 --
197 -- Pre Conditions:
198 --   This is an internal procedure which is called from the upd procedure.
199 --
200 -- In Arguments:
201 --   A Pl/Sql record structre.
202 --
203 -- Post Success:
204 --   Processing continues.
205 --
206 -- Post Failure:
207 --   If an error has occurred, an error message and exception will be raised
208 --   but not handled.
209 --
210 -- Developer Implementation Notes:
211 --   Any post-processing required after the update dml is issued should be
212 --   coded within this procedure. It is important to note that any 3rd party
213 --   maintenance should be reviewed before placing in this procedure.
214 --
215 -- Access Status:
216 --   Internal Table Handler Use Only.
217 --
218 -- {End Of Comments}
219 -- ----------------------------------------------------------------------------
220 Procedure post_update(p_rec            in per_kad_shd.g_rec_type,
221                       p_effective_date in date) is
222   --
223   l_proc  varchar2(72) := g_package||'post_update';
224   --
225   -- Fix for WWBUG 1408379
226   --
227   l_old               ben_add_ler.g_add_ler_rec;
228   l_new               ben_add_ler.g_add_ler_rec;
229   --
230   -- End of Fix for WWBUG 1408379
231   --
232 Begin
236   --
233   hr_utility.set_location('Entering:'||l_proc, 5);
234   --
235   -- Fix for WWBUG 1408379
237   l_old.person_id := per_kad_shd.g_old_rec.person_id;
238   l_old.business_group_id := per_kad_shd.g_old_rec.business_group_id;
239   l_old.date_from := per_kad_shd.g_old_rec.date_from;
240   l_old.date_to := per_kad_shd.g_old_rec.date_to;
241   l_old.primary_flag := per_kad_shd.g_old_rec.primary_flag;
242   l_old.postal_code := per_kad_shd.g_old_rec.postal_code;
243   l_old.region_2 := per_kad_shd.g_old_rec.region_2;
244   l_old.address_type := per_kad_shd.g_old_rec.address_type;
245   l_old.address_id := per_kad_shd.g_old_rec.address_id;
246   l_new.person_id := p_rec.person_id;
247   l_new.business_group_id := p_rec.business_group_id;
248   l_new.date_from := p_rec.date_from;
249   l_new.date_to := p_rec.date_to;
250   l_new.primary_flag := p_rec.primary_flag;
251   l_new.postal_code := p_rec.postal_code;
252   l_new.region_2 := p_rec.region_2;
253   l_new.address_type := p_rec.address_type;
254   l_new.address_id := p_rec.address_id;
255   --
256   ben_add_ler.ler_chk(p_old            => l_old,
257                       p_new            => l_new,
258                       p_effective_date => l_new.date_from);
259   --
260   -- End of Fix for WWBUG 1408379
261   --
262   hr_utility.set_location(' Leaving:'||l_proc, 10);
263 End post_update;
264 --
265 -- ----------------------------------------------------------------------------
266 -- |-----------------------------< convert_defs >-----------------------------|
267 -- ----------------------------------------------------------------------------
268 -- {Start Of Comments}
269 --
270 -- Description:
271 --   The Convert_Defs function has one very important function:
272 --   It must return the record structure for the row with all system defaulted
273 --   values converted into its corresponding argument value for update. When
274 --   we attempt to update a row through the Upd business process , certain
275 --   arguments can be defaulted which enables flexibility in the calling of
276 --   the upd process (e.g. only attributes which need to be updated need to be
277 --   specified). For the upd business process to determine which attributes
278 --   have NOT been specified we need to check if the argument has a reserved
279 --   system default value. Therefore, for all attributes which have a
280 --   corresponding reserved system default mechanism specified we need to
281 --   check if a system default is being used. If a system default is being
282 --   used then we convert the defaulted value into its corresponding attribute
283 --   value held in the g_old_rec data structure.
284 --
285 -- Pre Conditions:
286 --   This private function can only be called from the upd process.
287 --
288 -- In Arguments:
289 --   A Pl/Sql record structre.
290 --
291 -- Post Success:
292 --   The record structure will be returned with all system defaulted argument
293 --   values converted into its current row attribute value.
294 --
295 -- Post Failure:
296 --   No direct error handling is required within this function. Any possible
297 --   errors within this function will be a PL/SQL value error due to conversion
298 --   of datatypes or data lengths.
299 --
300 -- Developer Implementation Notes:
301 --   None.
302 --
303 -- Access Status:
304 --   Internal Table Handler Use Only.
305 --
306 -- {End Of Comments}
307 -- ----------------------------------------------------------------------------
308 Function convert_defs(p_rec in out nocopy per_kad_shd.g_rec_type)
309          Return per_kad_shd.g_rec_type is
310 --
311   l_proc  varchar2(72) := g_package||'convert_defs';
312 --
313 Begin
314   --
315   hr_utility.set_location('Entering:'||l_proc, 5);
316   --
317   -- We must now examine each argument value in the
318   -- p_rec plsql record structure
319   -- to see if a system default is being used. If a system default
320   -- is being used then we must set to the 'current' argument value.
321   --
322   If (p_rec.business_group_id = hr_api.g_number) then
323     p_rec.business_group_id :=
324     per_kad_shd.g_old_rec.business_group_id;
325   End If;
326   If (p_rec.person_id = hr_api.g_number) then
327     p_rec.person_id :=
328     per_kad_shd.g_old_rec.person_id;
329   End If;
330   If (p_rec.date_from = hr_api.g_date) then
331     p_rec.date_from :=
332     per_kad_shd.g_old_rec.date_from;
333   End If;
334   If (p_rec.primary_flag = hr_api.g_varchar2) then
335     p_rec.primary_flag :=
336     per_kad_shd.g_old_rec.primary_flag;
337   End If;
338   If (p_rec.style = hr_api.g_varchar2) then
339     p_rec.style :=
340     per_kad_shd.g_old_rec.style;
341   End If;
342   If (p_rec.address_line1 = hr_api.g_varchar2) then
343     p_rec.address_line1 :=
344     per_kad_shd.g_old_rec.address_line1;
345   End If;
346   If (p_rec.address_line2 = hr_api.g_varchar2) then
347     p_rec.address_line2 :=
348     per_kad_shd.g_old_rec.address_line2;
349   End If;
350   If (p_rec.address_line3 = hr_api.g_varchar2) then
351     p_rec.address_line3 :=
352     per_kad_shd.g_old_rec.address_line3;
353   End If;
354   If (p_rec.address_type = hr_api.g_varchar2) then
355     p_rec.address_type :=
356     per_kad_shd.g_old_rec.address_type;
357   End If;
358   If (p_rec.comments = hr_api.g_varchar2) then
359     p_rec.comments :=
360     per_kad_shd.g_old_rec.comments;
361   End If;
362   If (p_rec.country = hr_api.g_varchar2) then
363     p_rec.country :=
364     per_kad_shd.g_old_rec.country;
365   End If;
366   If (p_rec.date_to = hr_api.g_date) then
367     p_rec.date_to :=
368     per_kad_shd.g_old_rec.date_to;
372     per_kad_shd.g_old_rec.postal_code;
369   End If;
370   If (p_rec.postal_code = hr_api.g_varchar2) then
371     p_rec.postal_code :=
373   End If;
374   If (p_rec.region_1 = hr_api.g_varchar2) then
375     p_rec.region_1 :=
376     per_kad_shd.g_old_rec.region_1;
377   End If;
378   If (p_rec.region_2 = hr_api.g_varchar2) then
379     p_rec.region_2 :=
380     per_kad_shd.g_old_rec.region_2;
381   End If;
382   If (p_rec.region_3 = hr_api.g_varchar2) then
383     p_rec.region_3 :=
384     per_kad_shd.g_old_rec.region_3;
385   End If;
386   If (p_rec.telephone_number_1 = hr_api.g_varchar2) then
387     p_rec.telephone_number_1 :=
388     per_kad_shd.g_old_rec.telephone_number_1;
389   End If;
390   If (p_rec.telephone_number_2 = hr_api.g_varchar2) then
391     p_rec.telephone_number_2 :=
392     per_kad_shd.g_old_rec.telephone_number_2;
393   End If;
394   If (p_rec.telephone_number_3 = hr_api.g_varchar2) then
395     p_rec.telephone_number_3 :=
396     per_kad_shd.g_old_rec.telephone_number_3;
397   End If;
398   If (p_rec.town_or_city = hr_api.g_varchar2) then
399     p_rec.town_or_city :=
400     per_kad_shd.g_old_rec.town_or_city;
401   End If;
402   If (p_rec.request_id = hr_api.g_number) then
403     p_rec.request_id :=
404     per_kad_shd.g_old_rec.request_id;
405   End If;
406   If (p_rec.program_application_id = hr_api.g_number) then
407     p_rec.program_application_id :=
408     per_kad_shd.g_old_rec.program_application_id;
409   End If;
410   If (p_rec.program_id = hr_api.g_number) then
411     p_rec.program_id :=
412     per_kad_shd.g_old_rec.program_id;
413   End If;
414   If (p_rec.program_update_date = hr_api.g_date) then
415     p_rec.program_update_date :=
416     per_kad_shd.g_old_rec.program_update_date;
417   End If;
418   If (p_rec.addr_attribute_category = hr_api.g_varchar2) then
419     p_rec.addr_attribute_category :=
420     per_kad_shd.g_old_rec.addr_attribute_category;
421   End If;
422   If (p_rec.addr_attribute1 = hr_api.g_varchar2) then
423     p_rec.addr_attribute1 :=
424     per_kad_shd.g_old_rec.addr_attribute1;
425   End If;
426   If (p_rec.addr_attribute2 = hr_api.g_varchar2) then
427     p_rec.addr_attribute2 :=
428     per_kad_shd.g_old_rec.addr_attribute2;
429   End If;
430   If (p_rec.addr_attribute3 = hr_api.g_varchar2) then
431     p_rec.addr_attribute3 :=
432     per_kad_shd.g_old_rec.addr_attribute3;
433   End If;
434   If (p_rec.addr_attribute4 = hr_api.g_varchar2) then
435     p_rec.addr_attribute4 :=
436     per_kad_shd.g_old_rec.addr_attribute4;
437   End If;
438   If (p_rec.addr_attribute5 = hr_api.g_varchar2) then
439     p_rec.addr_attribute5 :=
440     per_kad_shd.g_old_rec.addr_attribute5;
441   End If;
442   If (p_rec.addr_attribute6 = hr_api.g_varchar2) then
443     p_rec.addr_attribute6 :=
444     per_kad_shd.g_old_rec.addr_attribute6;
445   End If;
446   If (p_rec.addr_attribute7 = hr_api.g_varchar2) then
447     p_rec.addr_attribute7 :=
448     per_kad_shd.g_old_rec.addr_attribute7;
449   End If;
450   If (p_rec.addr_attribute8 = hr_api.g_varchar2) then
451     p_rec.addr_attribute8 :=
452     per_kad_shd.g_old_rec.addr_attribute8;
453   End If;
454   If (p_rec.addr_attribute9 = hr_api.g_varchar2) then
455     p_rec.addr_attribute9 :=
456     per_kad_shd.g_old_rec.addr_attribute9;
457   End If;
458   If (p_rec.addr_attribute10 = hr_api.g_varchar2) then
459     p_rec.addr_attribute10 :=
460     per_kad_shd.g_old_rec.addr_attribute10;
461   End If;
462   If (p_rec.addr_attribute11 = hr_api.g_varchar2) then
463     p_rec.addr_attribute11 :=
464     per_kad_shd.g_old_rec.addr_attribute11;
465   End If;
466   If (p_rec.addr_attribute12 = hr_api.g_varchar2) then
467     p_rec.addr_attribute12 :=
468     per_kad_shd.g_old_rec.addr_attribute12;
469   End If;
470   If (p_rec.addr_attribute13 = hr_api.g_varchar2) then
471     p_rec.addr_attribute13 :=
472     per_kad_shd.g_old_rec.addr_attribute13;
473   End If;
474   If (p_rec.addr_attribute14 = hr_api.g_varchar2) then
475     p_rec.addr_attribute14 :=
476     per_kad_shd.g_old_rec.addr_attribute14;
477   End If;
478   If (p_rec.addr_attribute15 = hr_api.g_varchar2) then
479     p_rec.addr_attribute15 :=
480     per_kad_shd.g_old_rec.addr_attribute15;
481   End If;
482   If (p_rec.addr_attribute16 = hr_api.g_varchar2) then
483     p_rec.addr_attribute16 :=
484     per_kad_shd.g_old_rec.addr_attribute16;
485   End If;
486   If (p_rec.addr_attribute17 = hr_api.g_varchar2) then
487     p_rec.addr_attribute17 :=
488     per_kad_shd.g_old_rec.addr_attribute17;
489   End If;
490   If (p_rec.addr_attribute18 = hr_api.g_varchar2) then
491     p_rec.addr_attribute18 :=
492     per_kad_shd.g_old_rec.addr_attribute18;
493   End If;
494   If (p_rec.addr_attribute19 = hr_api.g_varchar2) then
495     p_rec.addr_attribute19 :=
496     per_kad_shd.g_old_rec.addr_attribute19;
497   End If;
498   If (p_rec.addr_attribute20 = hr_api.g_varchar2) then
499     p_rec.addr_attribute20 :=
500     per_kad_shd.g_old_rec.addr_attribute20;
501   End If;
502 
503   --
504   -- Return the plsql record structure.
505   --
506   hr_utility.set_location(' Leaving:'||l_proc, 10);
507   Return(p_rec);
508 --
509 End convert_defs;
510 --
511 -- ----------------------------------------------------------------------------
512 -- |---------------------------------< upd >----------------------------------|
513 -- ----------------------------------------------------------------------------
514 Procedure upd
515   (
519   ) is
516    p_rec            in out nocopy per_kad_shd.g_rec_type
517   ,p_validate       in     boolean default false
518   ,p_effective_date in     date
520 --
521   l_proc  varchar2(72) := g_package||'upd';
522   l_convert per_kad_shd.g_rec_type;
523 --
524 Begin
525   hr_utility.set_location('Entering:'||l_proc, 5);
526   --
527   -- Determine if the business process is to be validated.
528   --
529   If p_validate then
530     --
531     -- Issue the savepoint.
532     --
533     SAVEPOINT upd_per_add;
534   End If;
535   --
536   -- We must lock the row which we need to update.
537   --
538   per_kad_shd.lck
539 	(
540 	p_rec.address_id,
541 	p_rec.object_version_number
542 	);
543   --
544   -- 1. During an update system defaults are used to determine if
545   --    arguments have been defaulted or not. We must therefore
546   --    derive the full record structure values to be updated.
547   --
548   -- 2. Call the supporting update validate operations.
549   --
550   l_convert := convert_defs(p_rec);
551   --
552   per_kad_bus.update_validate(l_convert
553                              ,p_effective_date
554                              );
555   --
556   -- Call the supporting pre-update operation
557   --
558   pre_update(p_rec);
559   --
560   -- Update the row.
561   --
562   update_dml(p_rec);
563   --
564   -- Call the supporting post-update operation
565   --
566   post_update(p_rec,p_effective_date);
567   --
568   -- If we are validating then raise the Validate_Enabled exception
569   --
570   If p_validate then
571     Raise HR_Api.Validate_Enabled;
572   End If;
573   --
574   hr_utility.set_location(' Leaving:'||l_proc, 10);
575 Exception
576   When HR_Api.Validate_Enabled Then
577     --
578     -- As the Validate_Enabled exception has been raised
579     -- we must rollback to the savepoint
580     --
581     ROLLBACK TO upd_per_add;
582 End upd;
583 --
584 -- ----------------------------------------------------------------------------
585 -- |---------------------------------< upd >----------------------------------|
586 -- ----------------------------------------------------------------------------
587 Procedure upd
588   (
589    p_address_id               in     number
590 -- 70.2 change a start.
591   ,p_date_from                in     date             default hr_api.g_date
592 -- 70.2 change a end.
593   ,p_address_line1            in     varchar2         default hr_api.g_varchar2
594   ,p_address_line2            in     varchar2         default hr_api.g_varchar2
595   ,p_address_line3            in     varchar2         default hr_api.g_varchar2
596   ,p_address_type             in     varchar2         default hr_api.g_varchar2
597   ,p_comments                 in     clob            default hr_api.g_varchar2
598   ,p_country                  in     varchar2         default hr_api.g_varchar2
599   ,p_date_to                  in     date             default hr_api.g_date
600   ,p_postal_code              in     varchar2         default hr_api.g_varchar2
601   ,p_region_1                 in     varchar2         default hr_api.g_varchar2
602   ,p_region_2                 in     varchar2         default hr_api.g_varchar2
603   ,p_region_3                 in     varchar2         default hr_api.g_varchar2
604   ,p_telephone_number_1       in     varchar2         default hr_api.g_varchar2
605   ,p_telephone_number_2       in     varchar2         default hr_api.g_varchar2
606   ,p_telephone_number_3       in     varchar2         default hr_api.g_varchar2
607   ,p_town_or_city             in     varchar2         default hr_api.g_varchar2
608   ,p_request_id               in     number           default hr_api.g_number
609   ,p_program_application_id   in     number           default hr_api.g_number
610   ,p_program_id               in     number           default hr_api.g_number
611   ,p_program_update_date      in     date             default hr_api.g_date
612   ,p_addr_attribute_category  in     varchar2         default hr_api.g_varchar2
613   ,p_addr_attribute1          in     varchar2         default hr_api.g_varchar2
614   ,p_addr_attribute2          in     varchar2         default hr_api.g_varchar2
615   ,p_addr_attribute3          in     varchar2         default hr_api.g_varchar2
616   ,p_addr_attribute4          in     varchar2         default hr_api.g_varchar2
617   ,p_addr_attribute5          in     varchar2         default hr_api.g_varchar2
618   ,p_addr_attribute6          in     varchar2         default hr_api.g_varchar2
619   ,p_addr_attribute7          in     varchar2         default hr_api.g_varchar2
620   ,p_addr_attribute8          in     varchar2         default hr_api.g_varchar2
621   ,p_addr_attribute9          in     varchar2         default hr_api.g_varchar2
622   ,p_addr_attribute10         in     varchar2         default hr_api.g_varchar2
623   ,p_addr_attribute11         in     varchar2         default hr_api.g_varchar2
624   ,p_addr_attribute12         in     varchar2         default hr_api.g_varchar2
625   ,p_addr_attribute13         in     varchar2         default hr_api.g_varchar2
626   ,p_addr_attribute14         in     varchar2         default hr_api.g_varchar2
627   ,p_addr_attribute15         in     varchar2         default hr_api.g_varchar2
628   ,p_addr_attribute16         in     varchar2         default hr_api.g_varchar2
629   ,p_addr_attribute17         in     varchar2         default hr_api.g_varchar2
630   ,p_addr_attribute18         in     varchar2         default hr_api.g_varchar2
631   ,p_addr_attribute19         in     varchar2         default hr_api.g_varchar2
632   ,p_addr_attribute20         in     varchar2         default hr_api.g_varchar2
633   ,p_object_version_number    in out nocopy number
634   ,p_validate                 in     boolean      default false
635   ,p_effective_date           in     date
636   ) is
637 --
638   l_rec	  per_kad_shd.g_rec_type;
639   l_proc  varchar2(72) := g_package||'upd';
640 --
641 Begin
642   hr_utility.set_location('Entering:'||l_proc, 5);
643   --
644   -- Call conversion function to turn arguments into the
645   -- l_rec structure.
646   --
647   l_rec :=
648   per_kad_shd.convert_args
649   (
650   p_address_id,
651 -- 70.2 change a start.
652   hr_api.g_number,
653   hr_api.g_number,
654   p_date_from,
655   hr_api.g_varchar2,
656   hr_api.g_varchar2,
657 -- 70.2 change a end.
658   p_address_line1,
659   p_address_line2,
660   p_address_line3,
661   p_address_type,
662   p_comments,
663   p_country,
664   p_date_to,
665   p_postal_code,
666   p_region_1,
667   p_region_2,
668   p_region_3,
669   p_telephone_number_1,
670   p_telephone_number_2,
671   p_telephone_number_3,
672   p_town_or_city,
673   p_request_id,
674   p_program_application_id,
675   p_program_id,
676   p_program_update_date,
677   p_addr_attribute_category,
678   p_addr_attribute1,
679   p_addr_attribute2,
680   p_addr_attribute3,
681   p_addr_attribute4,
682   p_addr_attribute5,
683   p_addr_attribute6,
684   p_addr_attribute7,
685   p_addr_attribute8,
686   p_addr_attribute9,
687   p_addr_attribute10,
688   p_addr_attribute11,
689   p_addr_attribute12,
690   p_addr_attribute13,
691   p_addr_attribute14,
692   p_addr_attribute15,
693   p_addr_attribute16,
694   p_addr_attribute17,
695   p_addr_attribute18,
696   p_addr_attribute19,
697   p_addr_attribute20,
698   p_object_version_number
699   );
700   --
701   -- Having converted the arguments into the
702   -- plsql record structure we call the corresponding record
703   -- business process.
704   --
705   upd(l_rec
706      ,p_validate
707      ,p_effective_date
708      );
709   p_object_version_number := l_rec.object_version_number;
710   --
711   hr_utility.set_location(' Leaving:'||l_proc, 10);
712 End upd;
713 --
714 end per_kad_upd;