DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_LOC_UPD

Source


1 PACKAGE BODY hr_loc_upd AS
2 /* $Header: hrlocrhi.pkb 120.7 2006/05/15 13:34:54 srenukun noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  VARCHAR2(33) := '  hr_loc_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(p_rec IN OUT NOCOPY hr_loc_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_loc_shd.g_api_dml := true;  -- Set the api dml status
66   --
67   -- Update the hr_locations_all Row
68   --
69   UPDATE hr_locations_all
70   SET
71   location_id                       = p_rec.location_id,
72   entered_by                        = p_rec.entered_by,
73   location_code                     = p_rec.location_code,
74   timezone_code                     = p_rec.timezone_code,
75   address_line_1                    = p_rec.address_line_1,
76   address_line_2                    = p_rec.address_line_2,
77   address_line_3                    = p_rec.address_line_3,
78   bill_to_site_flag                 = p_rec.bill_to_site_flag,
79   country                           = p_rec.country,
80   description                       = p_rec.description,
81   designated_receiver_id            = p_rec.designated_receiver_id,
82   in_organization_flag              = p_rec.in_organization_flag,
83   inactive_date                     = p_rec.inactive_date,
84   inventory_organization_id         = p_rec.inventory_organization_id,
85   office_site_flag                  = p_rec.office_site_flag,
86   postal_code                       = p_rec.postal_code,
87   receiving_site_flag               = p_rec.receiving_site_flag,
88   region_1                          = p_rec.region_1,
89   region_2                          = p_rec.region_2,
90   region_3                          = p_rec.region_3,
91   ship_to_location_id               = p_rec.ship_to_location_id,
92   ship_to_site_flag                 = p_rec.ship_to_site_flag,
93   derived_locale                    = p_rec.derived_locale,
94   style                             = p_rec.style,
95 --  tax_name                          = p_rec.tax_name,
96   telephone_number_1                = p_rec.telephone_number_1,
97   telephone_number_2                = p_rec.telephone_number_2,
98   telephone_number_3                = p_rec.telephone_number_3,
99   town_or_city                      = p_rec.town_or_city,
100   loc_information13                 = p_rec.loc_information13,
101   loc_information14                 = p_rec.loc_information14,
102   loc_information15                 = p_rec.loc_information15,
103   loc_information16                 = p_rec.loc_information16,
104   loc_information17                 = p_rec.loc_information17,
105   loc_information18                 = p_rec.loc_information18,
106   loc_information19                 = p_rec.loc_information19,
107   loc_information20                 = p_rec.loc_information20,
108   attribute_category                = p_rec.attribute_category,
109   attribute1                        = p_rec.attribute1,
110   attribute2                        = p_rec.attribute2,
111   attribute3                        = p_rec.attribute3,
112   attribute4                        = p_rec.attribute4,
113   attribute5                        = p_rec.attribute5,
114   attribute6                        = p_rec.attribute6,
115   attribute7                        = p_rec.attribute7,
116   attribute8                        = p_rec.attribute8,
117   attribute9                        = p_rec.attribute9,
118   attribute10                       = p_rec.attribute10,
119   attribute11                       = p_rec.attribute11,
120   attribute12                       = p_rec.attribute12,
121   attribute13                       = p_rec.attribute13,
122   attribute14                       = p_rec.attribute14,
123   attribute15                       = p_rec.attribute15,
124   attribute16                       = p_rec.attribute16,
125   attribute17                       = p_rec.attribute17,
126   attribute18                       = p_rec.attribute18,
127   attribute19                       = p_rec.attribute19,
128   attribute20                       = p_rec.attribute20,
129   object_version_number             = p_rec.object_version_number,
130   global_attribute_category         = p_rec.global_attribute_category,
131   global_attribute1                 = p_rec.global_attribute1,
132   global_attribute2                 = p_rec.global_attribute2,
133   global_attribute3                 = p_rec.global_attribute3,
134   global_attribute4                 = p_rec.global_attribute4,
135   global_attribute5                 = p_rec.global_attribute5,
136   global_attribute6                 = p_rec.global_attribute6,
137   global_attribute7                 = p_rec.global_attribute7,
138   global_attribute8                 = p_rec.global_attribute8,
139   global_attribute9                 = p_rec.global_attribute9,
140   global_attribute10                = p_rec.global_attribute10,
141   global_attribute11                = p_rec.global_attribute11,
142   global_attribute12                = p_rec.global_attribute12,
143   global_attribute13                = p_rec.global_attribute13,
144   global_attribute14                = p_rec.global_attribute14,
145   global_attribute15                = p_rec.global_attribute15,
146   global_attribute16                = p_rec.global_attribute16,
147   global_attribute17                = p_rec.global_attribute17,
148   global_attribute18                = p_rec.global_attribute18,
149   global_attribute19                = p_rec.global_attribute19,
150   global_attribute20                = p_rec.global_attribute20,
151   legal_address_flag                = p_rec.legal_address_flag,
152   tp_header_id                      = p_rec.tp_header_id,
153   ece_tp_location_code              = p_rec.ece_tp_location_code,
154   geometry                          = p_rec.geometry
155   WHERE location_id = p_rec.location_id;
156   --
157   hr_loc_shd.g_api_dml := false;   -- Unset the api dml status
158   --
159   hr_utility.set_location(' Leaving:'||l_proc, 10);
160 --
161 EXCEPTION
162   WHEN hr_api.check_integrity_violated THEN
163     -- A check constraint has been violated
164     hr_loc_shd.g_api_dml := false;   -- Unset the api dml status
165     hr_loc_shd.constraint_error
166       (p_constraint_name => hr_api.strip_constraint_name(sqlerrm));
167   WHEN hr_api.parent_integrity_violated THEN
168     -- Parent integrity has been violated
169     hr_loc_shd.g_api_dml := false;   -- Unset the api dml status
170     hr_loc_shd.constraint_error
171       (p_constraint_name => hr_api.strip_constraint_name(sqlerrm));
172   WHEN hr_api.unique_integrity_violated THEN
173     -- Unique integrity has been violated
174     hr_loc_shd.g_api_dml := false;   -- Unset the api dml status
175     hr_loc_shd.constraint_error
176       (p_constraint_name => hr_api.strip_constraint_name(sqlerrm));
177   WHEN OTHERS THEN
178     hr_loc_shd.g_api_dml := false;   -- Unset the api dml status
179     RAISE;
180 END update_dml;
181 --
182 -- ----------------------------------------------------------------------------
183 -- |------------------------------< pre_update >------------------------------|
184 -- ----------------------------------------------------------------------------
185 -- {Start Of Comments}
186 --
187 -- Description:
188 --   This private procedure contains any processing which is required before
189 --   the update dml.
190 --
191 -- Prerequisites:
192 --   This is an internal procedure which is called from the upd procedure.
193 --
194 -- In Parameters:
195 --   A Pl/Sql record structre.
196 --
197 -- Post Success:
198 --   Processing continues.
199 --
200 -- Post Failure:
201 --   If an error has occurred, an error message and exception will be raised
202 --   but not handled.
203 --
204 -- Developer Implementation Notes:
205 --   Any pre-processing required before the update dml is issued should be
206 --   coded within this procedure. It is important to note that any 3rd party
207 --   maintenance should be reviewed before placing in this procedure.
208 --
209 -- Access Status:
210 --   Internal Row Handler Use Only.
211 --
212 -- {End Of Comments}
213 -- ----------------------------------------------------------------------------
214 PROCEDURE pre_update(p_rec            IN OUT NOCOPY hr_loc_shd.g_rec_type
215                     ) IS
216 --
217   l_proc  VARCHAR2(72) := g_package||'pre_update';
218 --
219   l_number_table dbms_describe.number_table;
220   l_varchar_table dbms_describe.varchar2_table;
221   l_package_exists boolean;
222   l_package_name varchar2(30);
223 BEGIN
224 
225 --
226   hr_utility.set_location('Entering:'||l_proc, 5);
227   --
228   hr_loc_shd.derive_locale(p_rec);
229 
230 
231   if((nvl(p_rec.address_line_1,' ') = nvl(hr_loc_shd.g_old_rec.address_line_1,' '))
232   	 and (nvl(p_rec.address_line_2,' ') = nvl(hr_loc_shd.g_old_rec.address_line_2,' '))
233 	 and (nvl(p_rec.address_line_3,' ') = nvl(hr_loc_shd.g_old_rec.address_line_3,' '))
234      and (nvl(p_rec.town_or_city,' ') = nvl(hr_loc_shd.g_old_rec.town_or_city,' '))
235 	 and (nvl(p_rec.region_1,' ') = nvl(hr_loc_shd.g_old_rec.region_1,' '))
236 	 and (nvl(p_rec.region_2,' ') = nvl(hr_loc_shd.g_old_rec.region_2,' '))
237      and (nvl(p_rec.region_3,' ') = nvl(hr_loc_shd.g_old_rec.region_3,' '))
238 	 and (nvl(p_rec.postal_code,' ') = nvl(hr_loc_shd.g_old_rec.postal_code,' '))
239 	 and (nvl(p_rec.country,' ') = nvl(hr_loc_shd.g_old_rec.country,' ')) )	  then
240 
241      hr_utility.set_location('Not calling address2geometry:'||l_proc, 8);
242 
243   else
244   --
245   --
246   -- Enhancement added for Location Searching
247   --
248   if((fnd_profile.value('IRC_INSTALLED_FLAG') in ('Y','D')) and
249       (fnd_profile.value('IRC_GEOCODE_HOST')is not null)
250      )then
251   p_rec.geometry := Irc_location_utility.address2geometry
252      (address_line1       => p_rec.address_line_1
253      ,address_line2       => p_rec.address_line_2
254      ,address_line3       => p_rec.address_line_3
255      ,address_line4       => p_rec.town_or_city
256      ,address_line5       => p_rec.region_1
257      ,address_line6       => p_rec.region_2
258      ,address_line7       => p_rec.region_3
259      ,address_line8       => p_rec.postal_code
260      ,country             => p_rec.country
261      );
262   end if;
263 
264   end if;
265 
266   hr_utility.set_location(' Leaving:'||l_proc, 10);
267 --
268 END pre_update;
269 --
270 -- ----------------------------------------------------------------------------
271 -- |-----------------------------< post_update >------------------------------|
272 -- ----------------------------------------------------------------------------
273 -- {Start Of Comments}
274 --
275 -- Description:
276 --   This private procedure contains any processing which is required after the
277 --   update dml.
278 --
279 -- Prerequisites:
280 --   This is an internal procedure which is called from the upd procedure.
281 --
282 -- In Parameters:
283 --   A Pl/Sql record structre.
284 --
285 -- Post Success:
286 --   Processing continues.
287 --
288 -- Post Failure:
289 --   If an error has occurred, an error message and exception will be raised
290 --   but not handled.
291 --
292 -- Developer Implementation Notes:
293 --   Any post-processing required after the update dml is issued should be
294 --   coded within this procedure. It is important to note that any 3rd party
295 --   maintenance should be reviewed before placing in this procedure.
296 --
297 -- Access Status:
298 --   Internal Row Handler Use Only.
299 --
300 -- {End Of Comments}
301 -- ----------------------------------------------------------------------------
302 PROCEDURE post_update(p_rec IN hr_loc_shd.g_rec_type,
303             p_effective_date IN DATE) IS
304 --
305   l_proc  VARCHAR2(72) := g_package||'post_update';
306 --
307 BEGIN
308   hr_utility.set_location('Entering:'||l_proc, 5);
309     --
310     -- Start of API User Hook for the after update hook
311     --
312     hr_loc_rku.after_update
313    (p_effective_date                => p_effective_date
314         ,p_location_id                   => p_rec.location_id
315    ,p_location_code                 => p_rec.location_code
316         ,p_timezone_code                 => p_rec.timezone_code
317    ,p_address_line_1                => p_rec.address_line_1
318    ,p_address_line_2                => p_rec.address_line_2
319    ,p_address_line_3                => p_rec.address_line_3
320    ,p_bill_to_site_flag             => p_rec.bill_to_site_flag
321    ,p_country                       => p_rec.country
322    ,p_description                   => p_rec.description
323         ,p_designated_receiver_id        => p_rec.designated_receiver_id
324    ,p_in_organization_flag          => p_rec.in_organization_flag
325    ,p_inactive_date                 => p_rec.inactive_date
326    ,p_inventory_organization_id     => p_rec.inventory_organization_id
327    ,p_office_site_flag              => p_rec.office_site_flag
328    ,p_postal_code                   => p_rec.postal_code
329    ,p_receiving_site_flag           => p_rec.receiving_site_flag
330    ,p_region_1                      => p_rec.region_1
331    ,p_region_2                      => p_rec.region_2
332    ,p_region_3                      => p_rec.region_3
333    ,p_ship_to_location_id           => p_rec.ship_to_location_id
334    ,p_ship_to_site_flag             => p_rec.ship_to_site_flag
335    ,p_tax_name                      => p_rec.tax_name
336    ,p_telephone_number_1            => p_rec.telephone_number_1
337    ,p_telephone_number_2            => p_rec.telephone_number_2
338    ,p_telephone_number_3            => p_rec.telephone_number_3
339    ,p_town_or_city                  => p_rec.town_or_city
340         ,p_loc_information13             => p_rec.loc_information13
341         ,p_loc_information14             => p_rec.loc_information14
342         ,p_loc_information15             => p_rec.loc_information15
343         ,p_loc_information16             => p_rec.loc_information16
344    ,p_loc_information17             => p_rec.loc_information17
345    ,p_loc_information18             => p_rec.loc_information18
346    ,p_loc_information19             => p_rec.loc_information19
347    ,p_loc_information20             => p_rec.loc_information20
348    ,p_attribute_category            => p_rec.attribute_category
349    ,p_attribute1                    => p_rec.attribute1
350    ,p_attribute2                    => p_rec.attribute2
351    ,p_attribute3                    => p_rec.attribute3
352    ,p_attribute4                    => p_rec.attribute4
353    ,p_attribute5                    => p_rec.attribute5
354    ,p_attribute6                    => p_rec.attribute6
355    ,p_attribute7                    => p_rec.attribute7
356    ,p_attribute8                    => p_rec.attribute8
357    ,p_attribute9                    => p_rec.attribute9
358    ,p_attribute10                   => p_rec.attribute10
359    ,p_attribute11                   => p_rec.attribute11
360    ,p_attribute12                   => p_rec.attribute12
361    ,p_attribute13                   => p_rec.attribute13
362    ,p_attribute14                   => p_rec.attribute14
363    ,p_attribute15                   => p_rec.attribute15
364    ,p_attribute16                   => p_rec.attribute16
365    ,p_attribute17                   => p_rec.attribute17
366    ,p_attribute18                   => p_rec.attribute18
367    ,p_attribute19                   => p_rec.attribute19
368    ,p_attribute20                   => p_rec.attribute20
369    ,p_global_attribute_category     => p_rec.global_attribute_category
370    ,p_global_attribute1             => p_rec.global_attribute1
371    ,p_global_attribute2             => p_rec.global_attribute2
372    ,p_global_attribute3             => p_rec.global_attribute3
373    ,p_global_attribute4             => p_rec.global_attribute4
374    ,p_global_attribute5             => p_rec.global_attribute5
375    ,p_global_attribute6             => p_rec.global_attribute6
376    ,p_global_attribute7             => p_rec.global_attribute7
377    ,p_global_attribute8             => p_rec.global_attribute8
378    ,p_global_attribute9             => p_rec.global_attribute9
379    ,p_global_attribute10            => p_rec.global_attribute10
380    ,p_global_attribute11            => p_rec.global_attribute11
381    ,p_global_attribute12            => p_rec.global_attribute12
382    ,p_global_attribute13            => p_rec.global_attribute13
383    ,p_global_attribute14            => p_rec.global_attribute14
384    ,p_global_attribute15            => p_rec.global_attribute15
385    ,p_global_attribute16            => p_rec.global_attribute16
386    ,p_global_attribute17            => p_rec.global_attribute17
387    ,p_global_attribute18            => p_rec.global_attribute18
388    ,p_global_attribute19            => p_rec.global_attribute19
389         ,p_global_attribute20            => p_rec.global_attribute20
390         ,p_legal_address_flag            => p_rec.legal_address_flag
391    ,p_tp_header_id                  => p_rec.tp_header_id
392    ,p_ece_tp_location_code          => p_rec.ece_tp_location_code
393    ,p_object_version_number         => p_rec.object_version_number
394         ,p_business_group_id             => p_rec.business_group_id
395 --
396    ,p_location_code_o                 => hr_loc_shd.g_old_rec.location_code
397    ,p_address_line_1_o                => hr_loc_shd.g_old_rec.address_line_1
398    ,p_address_line_2_o                => hr_loc_shd.g_old_rec.address_line_2
399    ,p_address_line_3_o                => hr_loc_shd.g_old_rec.address_line_3
400    ,p_bill_to_site_flag_o             => hr_loc_shd.g_old_rec.bill_to_site_flag
401    ,p_country_o                       => hr_loc_shd.g_old_rec.country
402    ,p_description_o                   => hr_loc_shd.g_old_rec.description
403    ,p_designated_receiver_id_o        => hr_loc_shd.g_old_rec.designated_receiver_id
404    ,p_in_organization_flag_o          => hr_loc_shd.g_old_rec.in_organization_flag
405    ,p_inactive_date_o                 => hr_loc_shd.g_old_rec.inactive_date
406    ,p_inventory_organization_id_o     => hr_loc_shd.g_old_rec.inventory_organization_id
407    ,p_office_site_flag_o              => hr_loc_shd.g_old_rec.office_site_flag
408    ,p_postal_code_o                   => hr_loc_shd.g_old_rec.postal_code
409    ,p_receiving_site_flag_o           => hr_loc_shd.g_old_rec.receiving_site_flag
410    ,p_region_1_o                      => hr_loc_shd.g_old_rec.region_1
411    ,p_region_2_o                      => hr_loc_shd.g_old_rec.region_2
412    ,p_region_3_o                      => hr_loc_shd.g_old_rec.region_3
413    ,p_ship_to_location_id_o           => hr_loc_shd.g_old_rec.ship_to_location_id
414    ,p_ship_to_site_flag_o             => hr_loc_shd.g_old_rec.ship_to_site_flag
415    ,p_style_o                         => hr_loc_shd.g_old_rec.style
416    ,p_tax_name_o                      => hr_loc_shd.g_old_rec.tax_name
417    ,p_telephone_number_1_o            => hr_loc_shd.g_old_rec.telephone_number_1
418    ,p_telephone_number_2_o            => hr_loc_shd.g_old_rec.telephone_number_2
419    ,p_telephone_number_3_o            => hr_loc_shd.g_old_rec.telephone_number_3
420    ,p_town_or_city_o                  => hr_loc_shd.g_old_rec.town_or_city
421         ,p_loc_information13_o             => hr_loc_shd.g_old_rec.loc_information13
422         ,p_loc_information14_o             => hr_loc_shd.g_old_rec.loc_information14
423         ,p_loc_information15_o             => hr_loc_shd.g_old_rec.loc_information15
424         ,p_loc_information16_o             => hr_loc_shd.g_old_rec.loc_information16
425    ,p_loc_information17_o             => hr_loc_shd.g_old_rec.loc_information17
426    ,p_loc_information18_o             => hr_loc_shd.g_old_rec.loc_information18
427    ,p_loc_information19_o             => hr_loc_shd.g_old_rec.loc_information19
428    ,p_loc_information20_o             => hr_loc_shd.g_old_rec.loc_information20
429    ,p_attribute_category_o            => hr_loc_shd.g_old_rec.attribute_category
430    ,p_attribute1_o                    => hr_loc_shd.g_old_rec.attribute1
431    ,p_attribute2_o                    => hr_loc_shd.g_old_rec.attribute2
432    ,p_attribute3_o                    => hr_loc_shd.g_old_rec.attribute3
433    ,p_attribute4_o                    => hr_loc_shd.g_old_rec.attribute4
434    ,p_attribute5_o                    => hr_loc_shd.g_old_rec.attribute5
435    ,p_attribute6_o                    => hr_loc_shd.g_old_rec.attribute6
436    ,p_attribute7_o                    => hr_loc_shd.g_old_rec.attribute7
437    ,p_attribute8_o                    => hr_loc_shd.g_old_rec.attribute8
438    ,p_attribute9_o                    => hr_loc_shd.g_old_rec.attribute9
439    ,p_attribute10_o                   => hr_loc_shd.g_old_rec.attribute10
440    ,p_attribute11_o                   => hr_loc_shd.g_old_rec.attribute11
441    ,p_attribute12_o                   => hr_loc_shd.g_old_rec.attribute12
442    ,p_attribute13_o                   => hr_loc_shd.g_old_rec.attribute13
443    ,p_attribute14_o                   => hr_loc_shd.g_old_rec.attribute14
444    ,p_attribute15_o                   => hr_loc_shd.g_old_rec.attribute15
445    ,p_attribute16_o                   => hr_loc_shd.g_old_rec.attribute16
446    ,p_attribute17_o                   => hr_loc_shd.g_old_rec.attribute17
447    ,p_attribute18_o                   => hr_loc_shd.g_old_rec.attribute18
448    ,p_attribute19_o                   => hr_loc_shd.g_old_rec.attribute19
449    ,p_attribute20_o                   => hr_loc_shd.g_old_rec.attribute20
450    ,p_global_attribute_category_o     => hr_loc_shd.g_old_rec.global_attribute_category
451    ,p_global_attribute1_o             => hr_loc_shd.g_old_rec.global_attribute1
452    ,p_global_attribute2_o             => hr_loc_shd.g_old_rec.global_attribute2
453    ,p_global_attribute3_o             => hr_loc_shd.g_old_rec.global_attribute3
454    ,p_global_attribute4_o             => hr_loc_shd.g_old_rec.global_attribute4
455    ,p_global_attribute5_o             => hr_loc_shd.g_old_rec.global_attribute5
456    ,p_global_attribute6_o             => hr_loc_shd.g_old_rec.global_attribute6
457    ,p_global_attribute7_o             => hr_loc_shd.g_old_rec.global_attribute7
458    ,p_global_attribute8_o             => hr_loc_shd.g_old_rec.global_attribute8
459    ,p_global_attribute9_o             => hr_loc_shd.g_old_rec.global_attribute9
460    ,p_global_attribute10_o            => hr_loc_shd.g_old_rec.global_attribute10
461    ,p_global_attribute11_o            => hr_loc_shd.g_old_rec.global_attribute11
462    ,p_global_attribute12_o            => hr_loc_shd.g_old_rec.global_attribute12
463    ,p_global_attribute13_o            => hr_loc_shd.g_old_rec.global_attribute13
464    ,p_global_attribute14_o            => hr_loc_shd.g_old_rec.global_attribute14
465    ,p_global_attribute15_o            => hr_loc_shd.g_old_rec.global_attribute15
466    ,p_global_attribute16_o            => hr_loc_shd.g_old_rec.global_attribute16
467    ,p_global_attribute17_o            => hr_loc_shd.g_old_rec.global_attribute17
468    ,p_global_attribute18_o            => hr_loc_shd.g_old_rec.global_attribute18
469    ,p_global_attribute19_o            => hr_loc_shd.g_old_rec.global_attribute19
470         ,p_global_attribute20_o            => hr_loc_shd.g_old_rec.global_attribute20
471         ,p_legal_address_flag_o            => hr_loc_shd.g_old_rec.legal_address_flag
472    ,p_tp_header_id_o                  => hr_loc_shd.g_old_rec.tp_header_id
473         ,p_ece_tp_location_code_o          => hr_loc_shd.g_old_rec.ece_tp_location_code
474    ,p_object_version_number_o         => hr_loc_shd.g_old_rec.object_version_number
475         ,p_business_group_id_o             => hr_loc_shd.g_old_rec.business_group_id
476      );
477    EXCEPTION
478     WHEN hr_api.cannot_find_prog_unit THEN
479       hr_api.cannot_find_prog_unit_error
480         (p_module_name => 'HR_LOCATIONS_ALL'
481         ,p_hook_type   => 'AU'
482         );
483     --
484     -- End of API User Hook for the after_update hook
485     --
486   hr_utility.set_location(' Leaving:'||l_proc, 10);
487 END post_update;
488 --
489 -- ----------------------------------------------------------------------------
490 -- |-----------------------------< convert_defs >-----------------------------|
491 -- ----------------------------------------------------------------------------
492 -- {Start Of Comments}
493 --
494 -- Description:
495 --   The Convert_Defs procedure has one very important function:
496 --   It must return the record structure for the row with all system defaulted
497 --   values converted into its corresponding parameter value for update. When
498 --   we attempt to update a row through the Upd process , certain
499 --   parameters can be defaulted which enables flexibility in the calling of
500 --   the upd process (e.g. only attributes which need to be updated need to be
501 --   specified). For the upd process to determine which attributes
502 --   have NOT been specified we need to check if the parameter has a reserved
503 --   system default value. Therefore, for all parameters which have a
504 --   corresponding reserved system default mechanism specified we need to
505 --   check if a system default is being used. If a system default is being
506 --   used then we convert the defaulted value into its corresponding attribute
507 --   value held in the g_old_rec data structure.
508 --
509 -- Prerequisites:
510 --   This private function can only be called from the upd process.
511 --
512 -- In Parameters:
513 --   A Pl/Sql record structre.
514 --
515 -- Post Success:
516 --   The record structure will be returned with all system defaulted parameter
517 --   values converted into its current row attribute value.
518 --
519 -- Post Failure:
520 --   No direct error handling is required within this function. Any possible
521 --   errors within this procedure will be a PL/SQL value error due to conversion
522 
523 --   of datatypes or data lengths.
524 --
525 -- Developer Implementation Notes:
526 --   None.
527 --
528 -- Access Status:
529 --   Internal Row Handler Use Only.
530 --
531 -- {End Of Comments}
532 -- ----------------------------------------------------------------------------
533 PROCEDURE convert_defs(p_rec IN OUT NOCOPY hr_loc_shd.g_rec_type) IS
534 --
535   l_proc  VARCHAR2(72) := g_package||'convert_defs';
536 --
537 BEGIN
538   --
539   hr_utility.set_location('Entering:'||l_proc, 5);
540   --
541   -- We must now examine each argument value in the
542   -- p_rec plsql record structure
543   -- to see if a system default is being used. If a system default
544   -- is being used then we must set to the 'current' argument value.
545   --
546   IF (p_rec.entered_by = hr_api.g_number) THEN
547     p_rec.entered_by :=
548     hr_loc_shd.g_old_rec.entered_by;
549   END IF;
550   IF (p_rec.location_code = hr_api.g_varchar2) THEN
551     p_rec.location_code :=
552     hr_loc_shd.g_old_rec.location_code;
553   END IF;
554   IF (p_rec.address_line_1 = hr_api.g_varchar2) THEN
555     p_rec.address_line_1 :=
556     hr_loc_shd.g_old_rec.address_line_1;
557   END IF;
558   IF (p_rec.address_line_2 = hr_api.g_varchar2) THEN
559     p_rec.address_line_2 :=
560     hr_loc_shd.g_old_rec.address_line_2;
561   END IF;
562   IF (p_rec.address_line_3 = hr_api.g_varchar2) THEN
563     p_rec.address_line_3 :=
564     hr_loc_shd.g_old_rec.address_line_3;
565   END IF;
566   IF (p_rec.bill_to_site_flag = hr_api.g_varchar2) THEN
567     p_rec.bill_to_site_flag :=
568     hr_loc_shd.g_old_rec.bill_to_site_flag;
569   END IF;
570   IF (p_rec.country = hr_api.g_varchar2) THEN
571     p_rec.country :=
572     hr_loc_shd.g_old_rec.country;
573   END IF;
574   IF (p_rec.description = hr_api.g_varchar2) THEN
575     p_rec.description :=
576     hr_loc_shd.g_old_rec.description;
577   END IF;
578   IF (p_rec.designated_receiver_id = hr_api.g_number) THEN
579     p_rec.designated_receiver_id :=
580     hr_loc_shd.g_old_rec.designated_receiver_id;
581   END IF;
582   IF (p_rec.in_organization_flag = hr_api.g_varchar2) THEN
583     p_rec.in_organization_flag :=
584     hr_loc_shd.g_old_rec.in_organization_flag;
585   END IF;
586   IF (p_rec.inactive_date = hr_api.g_date) THEN
587     p_rec.inactive_date :=
588     hr_loc_shd.g_old_rec.inactive_date;
589   END IF;
590   IF (p_rec.inventory_organization_id = hr_api.g_number) THEN
591     p_rec.inventory_organization_id :=
592     hr_loc_shd.g_old_rec.inventory_organization_id;
593   END IF;
594   IF (p_rec.office_site_flag = hr_api.g_varchar2) THEN
595     p_rec.office_site_flag :=
596     hr_loc_shd.g_old_rec.office_site_flag;
597   END IF;
598   IF (p_rec.postal_code = hr_api.g_varchar2) THEN
599     p_rec.postal_code :=
600     hr_loc_shd.g_old_rec.postal_code;
601   END IF;
602   IF (p_rec.receiving_site_flag = hr_api.g_varchar2) THEN
603     p_rec.receiving_site_flag :=
604     hr_loc_shd.g_old_rec.receiving_site_flag;
605   END IF;
606   IF (p_rec.region_1 = hr_api.g_varchar2) THEN
607     p_rec.region_1 :=
608     hr_loc_shd.g_old_rec.region_1;
609   END IF;
610   IF (p_rec.region_2 = hr_api.g_varchar2) THEN
611     p_rec.region_2 :=
612     hr_loc_shd.g_old_rec.region_2;
613   END IF;
614   IF (p_rec.region_3 = hr_api.g_varchar2) THEN
615     p_rec.region_3 :=
616     hr_loc_shd.g_old_rec.region_3;
617   END IF;
618   IF (p_rec.ship_to_location_id = hr_api.g_number) THEN
619     p_rec.ship_to_location_id :=
620     hr_loc_shd.g_old_rec.ship_to_location_id;
621   END IF;
622   IF (p_rec.ship_to_site_flag = hr_api.g_varchar2) THEN
623     p_rec.ship_to_site_flag :=
624     hr_loc_shd.g_old_rec.ship_to_site_flag;
625   END IF;
626   IF (p_rec.style = hr_api.g_varchar2) THEN
627     p_rec.style :=
628     hr_loc_shd.g_old_rec.style;
629   END IF;
630   IF (p_rec.tax_name = hr_api.g_varchar2) THEN
631     p_rec.tax_name :=
632     hr_loc_shd.g_old_rec.tax_name;
633   END IF;
634   IF (p_rec.telephone_number_1 = hr_api.g_varchar2) THEN
635     p_rec.telephone_number_1 :=
636     hr_loc_shd.g_old_rec.telephone_number_1;
637   END IF;
638   IF (p_rec.telephone_number_2 = hr_api.g_varchar2) THEN
639     p_rec.telephone_number_2 :=
640     hr_loc_shd.g_old_rec.telephone_number_2;
641   END IF;
642   IF (p_rec.telephone_number_3 = hr_api.g_varchar2) THEN
643     p_rec.telephone_number_3 :=
644     hr_loc_shd.g_old_rec.telephone_number_3;
645   END IF;
646   IF (p_rec.town_or_city = hr_api.g_varchar2) THEN
647     p_rec.town_or_city :=
648     hr_loc_shd.g_old_rec.town_or_city;
649   END IF;
650   IF (p_rec.loc_information13 = hr_api.g_varchar2) THEN
651     p_rec.loc_information13 :=
652     hr_loc_shd.g_old_rec.loc_information13;
653   END IF;
654   IF (p_rec.loc_information14 = hr_api.g_varchar2) THEN
655     p_rec.loc_information14 :=
656     hr_loc_shd.g_old_rec.loc_information14;
657   END IF;
658   IF (p_rec.loc_information15 = hr_api.g_varchar2) THEN
659     p_rec.loc_information15 :=
660     hr_loc_shd.g_old_rec.loc_information15;
661   END IF;
662   IF (p_rec.loc_information16 = hr_api.g_varchar2) THEN
663     p_rec.loc_information16 :=
664     hr_loc_shd.g_old_rec.loc_information16;
665   END IF;
666   IF (p_rec.loc_information17 = hr_api.g_varchar2) THEN
667     p_rec.loc_information17 :=
668     hr_loc_shd.g_old_rec.loc_information17;
669   END IF;
670   IF (p_rec.loc_information18 = hr_api.g_varchar2) THEN
671     p_rec.loc_information18 :=
672     hr_loc_shd.g_old_rec.loc_information18;
673   END IF;
674   IF (p_rec.loc_information19 = hr_api.g_varchar2) THEN
675     p_rec.loc_information19 :=
676     hr_loc_shd.g_old_rec.loc_information19;
677   END IF;
678   IF (p_rec.loc_information20 = hr_api.g_varchar2) THEN
679     p_rec.loc_information20 :=
680     hr_loc_shd.g_old_rec.loc_information20;
681   END IF;
682   IF (p_rec.attribute_category = hr_api.g_varchar2) THEN
683     p_rec.attribute_category :=
684     hr_loc_shd.g_old_rec.attribute_category;
685   END IF;
686   IF (p_rec.attribute1 = hr_api.g_varchar2) THEN
687     p_rec.attribute1 :=
688     hr_loc_shd.g_old_rec.attribute1;
689   END IF;
690   IF (p_rec.attribute2 = hr_api.g_varchar2) THEN
691     p_rec.attribute2 :=
692     hr_loc_shd.g_old_rec.attribute2;
693   END IF;
694   IF (p_rec.attribute3 = hr_api.g_varchar2) THEN
695     p_rec.attribute3 :=
696     hr_loc_shd.g_old_rec.attribute3;
697   END IF;
698   IF (p_rec.attribute4 = hr_api.g_varchar2) THEN
699     p_rec.attribute4 :=
700     hr_loc_shd.g_old_rec.attribute4;
701   END IF;
702   IF (p_rec.attribute5 = hr_api.g_varchar2) THEN
703     p_rec.attribute5 :=
704     hr_loc_shd.g_old_rec.attribute5;
705   END IF;
706   IF (p_rec.attribute6 = hr_api.g_varchar2) THEN
707     p_rec.attribute6 :=
708     hr_loc_shd.g_old_rec.attribute6;
709   END IF;
710   IF (p_rec.attribute7 = hr_api.g_varchar2) THEN
711     p_rec.attribute7 :=
712     hr_loc_shd.g_old_rec.attribute7;
713   END IF;
714   IF (p_rec.attribute8 = hr_api.g_varchar2) THEN
715     p_rec.attribute8 :=
716     hr_loc_shd.g_old_rec.attribute8;
717   END IF;
718   IF (p_rec.attribute9 = hr_api.g_varchar2) THEN
719     p_rec.attribute9 :=
720     hr_loc_shd.g_old_rec.attribute9;
721   END IF;
722   IF (p_rec.attribute10 = hr_api.g_varchar2) THEN
723     p_rec.attribute10 :=
724     hr_loc_shd.g_old_rec.attribute10;
725   END IF;
726   IF (p_rec.attribute11 = hr_api.g_varchar2) THEN
727     p_rec.attribute11 :=
728     hr_loc_shd.g_old_rec.attribute11;
729   END IF;
730   IF (p_rec.attribute12 = hr_api.g_varchar2) THEN
731     p_rec.attribute12 :=
732     hr_loc_shd.g_old_rec.attribute12;
733   END IF;
734   IF (p_rec.attribute13 = hr_api.g_varchar2) THEN
735     p_rec.attribute13 :=
736     hr_loc_shd.g_old_rec.attribute13;
737   END IF;
738   IF (p_rec.attribute14 = hr_api.g_varchar2) THEN
739     p_rec.attribute14 :=
740     hr_loc_shd.g_old_rec.attribute14;
741   END IF;
742   IF (p_rec.attribute15 = hr_api.g_varchar2) THEN
743     p_rec.attribute15 :=
744     hr_loc_shd.g_old_rec.attribute15;
745   END IF;
746   IF (p_rec.attribute16 = hr_api.g_varchar2) THEN
747     p_rec.attribute16 :=
748     hr_loc_shd.g_old_rec.attribute16;
749   END IF;
750   IF (p_rec.attribute17 = hr_api.g_varchar2) THEN
751     p_rec.attribute17 :=
752     hr_loc_shd.g_old_rec.attribute17;
753   END IF;
754   IF (p_rec.attribute18 = hr_api.g_varchar2) THEN
755     p_rec.attribute18 :=
756     hr_loc_shd.g_old_rec.attribute18;
757   END IF;
758   IF (p_rec.attribute19 = hr_api.g_varchar2) THEN
759     p_rec.attribute19 :=
760     hr_loc_shd.g_old_rec.attribute19;
761   END IF;
762   IF (p_rec.attribute20 = hr_api.g_varchar2) THEN
763     p_rec.attribute20 :=
764     hr_loc_shd.g_old_rec.attribute20;
765   END IF;
766   IF (p_rec.global_attribute_category = hr_api.g_varchar2) THEN
767     p_rec.global_attribute_category :=
768     hr_loc_shd.g_old_rec.global_attribute_category;
769   END IF;
770   IF (p_rec.global_attribute1 = hr_api.g_varchar2) THEN
771     p_rec.global_attribute1 :=
772     hr_loc_shd.g_old_rec.global_attribute1;
773   END IF;
774   IF (p_rec.global_attribute2 = hr_api.g_varchar2) THEN
775     p_rec.global_attribute2 :=
776     hr_loc_shd.g_old_rec.global_attribute2;
777   END IF;
778   IF (p_rec.global_attribute3 = hr_api.g_varchar2) THEN
779     p_rec.global_attribute3 :=
780     hr_loc_shd.g_old_rec.global_attribute3;
781   END IF;
782   IF (p_rec.global_attribute4 = hr_api.g_varchar2) THEN
783     p_rec.global_attribute4 :=
784     hr_loc_shd.g_old_rec.global_attribute4;
785   END IF;
786   IF (p_rec.global_attribute5 = hr_api.g_varchar2) THEN
787     p_rec.global_attribute5 :=
788     hr_loc_shd.g_old_rec.global_attribute5;
789   END IF;
790   IF (p_rec.global_attribute6 = hr_api.g_varchar2) THEN
791     p_rec.global_attribute6 :=
792     hr_loc_shd.g_old_rec.global_attribute6;
793   END IF;
794   IF (p_rec.global_attribute7 = hr_api.g_varchar2) THEN
795     p_rec.global_attribute7 :=
796     hr_loc_shd.g_old_rec.global_attribute7;
797   END IF;
798   IF (p_rec.global_attribute8 = hr_api.g_varchar2) THEN
799     p_rec.global_attribute8 :=
800     hr_loc_shd.g_old_rec.global_attribute8;
801   END IF;
802   IF (p_rec.global_attribute9 = hr_api.g_varchar2) THEN
803     p_rec.global_attribute9 :=
804     hr_loc_shd.g_old_rec.global_attribute9;
805   END IF;
806   IF (p_rec.global_attribute10 = hr_api.g_varchar2) THEN
807     p_rec.global_attribute10 :=
808     hr_loc_shd.g_old_rec.global_attribute10;
809   END IF;
810   IF (p_rec.global_attribute11 = hr_api.g_varchar2) THEN
811     p_rec.global_attribute11 :=
812     hr_loc_shd.g_old_rec.global_attribute11;
813   END IF;
814   IF (p_rec.global_attribute12 = hr_api.g_varchar2) THEN
815     p_rec.global_attribute12 :=
816     hr_loc_shd.g_old_rec.global_attribute12;
817   END IF;
818   IF (p_rec.global_attribute13 = hr_api.g_varchar2) THEN
819     p_rec.global_attribute13 :=
820     hr_loc_shd.g_old_rec.global_attribute13;
821   END IF;
822   IF (p_rec.global_attribute14 = hr_api.g_varchar2) THEN
823     p_rec.global_attribute14 :=
824     hr_loc_shd.g_old_rec.global_attribute14;
825   END IF;
826   IF (p_rec.global_attribute15 = hr_api.g_varchar2) THEN
827     p_rec.global_attribute15 :=
828     hr_loc_shd.g_old_rec.global_attribute15;
829   END IF;
830   IF (p_rec.global_attribute16 = hr_api.g_varchar2) THEN
831     p_rec.global_attribute16 :=
832     hr_loc_shd.g_old_rec.global_attribute16;
833   END IF;
834   IF (p_rec.global_attribute17 = hr_api.g_varchar2) THEN
835     p_rec.global_attribute17 :=
836     hr_loc_shd.g_old_rec.global_attribute17;
837   END IF;
838   IF (p_rec.global_attribute18 = hr_api.g_varchar2) THEN
839     p_rec.global_attribute18 :=
840     hr_loc_shd.g_old_rec.global_attribute18;
841   END IF;
842   IF (p_rec.global_attribute19 = hr_api.g_varchar2) THEN
843     p_rec.global_attribute19 :=
844     hr_loc_shd.g_old_rec.global_attribute19;
845   END IF;
846   IF (p_rec.global_attribute20 = hr_api.g_varchar2) THEN
847     p_rec.global_attribute20 :=
848     hr_loc_shd.g_old_rec.global_attribute20;
849   END IF;
850   IF (p_rec.legal_address_flag = hr_api.g_varchar2) THEN
851     p_rec.legal_address_flag :=
852     hr_loc_shd.g_old_rec.legal_address_flag;
853   END IF;
854   IF (p_rec.tp_header_id = hr_api.g_number) THEN
855     p_rec.tp_header_id :=
856     hr_loc_shd.g_old_rec.tp_header_id;
857   END IF;
858   IF (p_rec.ece_tp_location_code = hr_api.g_varchar2) THEN
859     p_rec.ece_tp_location_code :=
860     hr_loc_shd.g_old_rec.ece_tp_location_code;
861   END IF;
862   IF (p_rec.business_group_id = hr_api.g_number) THEN
863     p_rec.business_group_id :=
864     hr_loc_shd.g_old_rec.business_group_id;
865   END IF;
866   -- Fix 3286235
867   IF (p_rec.timezone_code = hr_api.g_varchar2) THEN
868     p_rec.timezone_code :=
869     hr_loc_shd.g_old_rec.timezone_code;
870   END IF;
871   -- End Fix 3286235
872   --
873   hr_utility.set_location(' Leaving:'||l_proc, 10);
874 --
875 END convert_defs;
876 --
877 -- ----------------------------------------------------------------------------
878 -- |---------------------------------< upd >----------------------------------|
879 -- ----------------------------------------------------------------------------
880 PROCEDURE upd
881   (
882    p_rec               IN OUT NOCOPY hr_loc_shd.g_rec_type
883   ,p_effective_date    IN DATE
884   ,p_operating_unit_id IN NUMBER
885   ) IS
886 --
887   l_proc  VARCHAR2(72) := g_package||'upd';
888 --
889 BEGIN
890   hr_utility.set_location('Entering:'||l_proc, 5);
891   --
892   -- We must lock the row which we need to update.
893   --
894   hr_loc_shd.lck
895    (
896    p_rec.location_id,
897    p_rec.object_version_number
898    );
899   --
900   -- 1. During an update system defaults are used to determine if
901   --    arguments have been defaulted or not. We must therefore
902   --    derive the full record structure values to be updated.
903   --
904   -- 2. Call the supporting update validate operations.
905   --
906   convert_defs(p_rec);
907   --
908   hr_loc_bus.update_validate(p_rec
909                             ,p_effective_date
910              ,p_operating_unit_id);
911   --
912   -- Call the supporting pre-update operation
913   --
914   pre_update(p_rec);
915   --
916   -- Update the row.
917   --
918   update_dml(p_rec);
919   --
920   -- Call the supporting post-update operation
921   --
922   post_update(p_rec,
923               p_effective_date);
924   --
925 END upd;
926 --
927 -- ----------------------------------------------------------------------------
928 -- |---------------------------------< upd >----------------------------------|
929 -- ----------------------------------------------------------------------------
930 PROCEDURE upd
931   (
932   p_effective_date               IN DATE,
933   p_location_id                  IN NUMBER,
934   p_object_version_number        IN OUT NOCOPY NUMBER,
935   p_location_code                IN VARCHAR2         DEFAULT hr_api.g_varchar2,
936   p_timezone_code                IN VARCHAR2         DEFAULT hr_api.g_varchar2,
937   p_address_line_1               IN VARCHAR2         DEFAULT hr_api.g_varchar2,
938   p_address_line_2               IN VARCHAR2         DEFAULT hr_api.g_varchar2,
939   p_address_line_3               IN VARCHAR2         DEFAULT hr_api.g_varchar2,
940   p_bill_to_site_flag            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
941   p_country                      IN VARCHAR2         DEFAULT hr_api.g_varchar2,
942   p_description                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
943   p_designated_receiver_id       IN NUMBER           DEFAULT hr_api.g_number,
944   p_in_organization_flag         IN VARCHAR2         DEFAULT hr_api.g_varchar2,
945   p_inactive_date                IN DATE             DEFAULT hr_api.g_date,
946   p_operating_unit_id            IN NUMBER           DEFAULT NULL,
947   p_inventory_organization_id    IN NUMBER           DEFAULT hr_api.g_number,
948   p_office_site_flag             IN VARCHAR2         DEFAULT hr_api.g_varchar2,
949   p_postal_code                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
950   p_receiving_site_flag          IN VARCHAR2         DEFAULT hr_api.g_varchar2,
951   p_region_1                     IN VARCHAR2         DEFAULT hr_api.g_varchar2,
952   p_region_2                     IN VARCHAR2         DEFAULT hr_api.g_varchar2,
953   p_region_3                     IN VARCHAR2         DEFAULT hr_api.g_varchar2,
954   p_ship_to_location_id          IN NUMBER           DEFAULT hr_api.g_number,
955   p_ship_to_site_flag            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
956   p_style                        IN VARCHAR2         DEFAULT hr_api.g_varchar2,
957   p_tax_name                     IN VARCHAR2         DEFAULT hr_api.g_varchar2,
958   p_telephone_number_1           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
959   p_telephone_number_2           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
960   p_telephone_number_3           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
961   p_town_or_city                 IN VARCHAR2         DEFAULT hr_api.g_varchar2,
962   p_loc_information13            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
963   p_loc_information14            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
964   p_loc_information15            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
965   p_loc_information16            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
966   p_loc_information17            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
967   p_loc_information18            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
968   p_loc_information19            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
969   p_loc_information20            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
970   p_attribute_category           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
971   p_attribute1                   IN VARCHAR2         DEFAULT hr_api.g_varchar2,
972   p_attribute2                   IN VARCHAR2         DEFAULT hr_api.g_varchar2,
973   p_attribute3                   IN VARCHAR2         DEFAULT hr_api.g_varchar2,
974   p_attribute4                   IN VARCHAR2         DEFAULT hr_api.g_varchar2,
975   p_attribute5                   IN VARCHAR2         DEFAULT hr_api.g_varchar2,
976   p_attribute6                   IN VARCHAR2         DEFAULT hr_api.g_varchar2,
977   p_attribute7                   IN VARCHAR2         DEFAULT hr_api.g_varchar2,
978   p_attribute8                   IN VARCHAR2         DEFAULT hr_api.g_varchar2,
979   p_attribute9                   IN VARCHAR2         DEFAULT hr_api.g_varchar2,
980   p_attribute10                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
981   p_attribute11                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
982   p_attribute12                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
983   p_attribute13                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
984   p_attribute14                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
985   p_attribute15                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
986   p_attribute16                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
987   p_attribute17                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
988   p_attribute18                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
989   p_attribute19                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
990   p_attribute20                  IN VARCHAR2         DEFAULT hr_api.g_varchar2,
991   p_global_attribute_category    IN VARCHAR2         DEFAULT hr_api.g_varchar2,
992   p_global_attribute1            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
993   p_global_attribute2            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
994   p_global_attribute3            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
995   p_global_attribute4            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
996   p_global_attribute5            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
997   p_global_attribute6            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
998   p_global_attribute7            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
999   p_global_attribute8            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1000   p_global_attribute9            IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1001   p_global_attribute10           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1002   p_global_attribute11           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1003   p_global_attribute12           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1004   p_global_attribute13           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1005   p_global_attribute14           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1006   p_global_attribute15           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1007   p_global_attribute16           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1008   p_global_attribute17           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1009   p_global_attribute18           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1010   p_global_attribute19           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1011   p_global_attribute20           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1012   p_legal_address_flag           IN VARCHAR2         DEFAULT hr_api.g_varchar2,
1013   p_tp_header_id                 IN NUMBER           DEFAULT hr_api.g_number,
1014   p_ece_tp_location_code         IN VARCHAR2         DEFAULT hr_api.g_varchar2
1015   ) IS
1016 --
1017   l_rec    hr_loc_shd.g_rec_type;
1018   l_proc  VARCHAR2(72) := g_package||'upd';
1019 --
1020 BEGIN
1021   hr_utility.set_location('Entering:'||l_proc, 5);
1022   --
1023   -- Call conversion function to turn arguments into the
1024   -- l_rec structure.
1025   --
1026   l_rec :=
1027   hr_loc_shd.convert_args
1028   (
1029   p_location_id,
1030   p_location_code,
1031   p_timezone_code,
1032   p_address_line_1,
1033   p_address_line_2,
1034   p_address_line_3,
1035   p_bill_to_site_flag,
1036   p_country,
1037   p_description,
1038   p_designated_receiver_id,
1039   p_in_organization_flag,
1040   p_inactive_date,
1041   p_inventory_organization_id,
1042   p_office_site_flag,
1043   p_postal_code,
1044   p_receiving_site_flag,
1045   p_region_1,
1046   p_region_2,
1047   p_region_3,
1048   p_ship_to_location_id,
1049   p_ship_to_site_flag,
1050   p_style,
1051   p_tax_name,
1052   p_telephone_number_1,
1053   p_telephone_number_2,
1054   p_telephone_number_3,
1055   p_town_or_city,
1056   p_loc_information13,
1057   p_loc_information14,
1058   p_loc_information15,
1059   p_loc_information16,
1060   p_loc_information17,
1061   p_loc_information18,
1062   p_loc_information19,
1063   p_loc_information20,
1064   p_attribute_category,
1065   p_attribute1,
1066   p_attribute2,
1067   p_attribute3,
1068   p_attribute4,
1069   p_attribute5,
1070   p_attribute6,
1071   p_attribute7,
1072   p_attribute8,
1073   p_attribute9,
1074   p_attribute10,
1075   p_attribute11,
1076   p_attribute12,
1077   p_attribute13,
1078   p_attribute14,
1079   p_attribute15,
1080   p_attribute16,
1081   p_attribute17,
1082   p_attribute18,
1083   p_attribute19,
1084   p_attribute20,
1085   p_global_attribute_category,
1086   p_global_attribute1,
1087   p_global_attribute2,
1088   p_global_attribute3,
1089   p_global_attribute4,
1090   p_global_attribute5,
1091   p_global_attribute6,
1092   p_global_attribute7,
1093   p_global_attribute8,
1094   p_global_attribute9,
1095   p_global_attribute10,
1096   p_global_attribute11,
1097   p_global_attribute12,
1098   p_global_attribute13,
1099   p_global_attribute14,
1100   p_global_attribute15,
1101   p_global_attribute16,
1102   p_global_attribute17,
1103   p_global_attribute18,
1104   p_global_attribute19,
1105   p_global_attribute20,
1106   p_legal_address_flag,
1107   p_tp_header_id,
1108   p_ece_tp_location_code,
1109   p_object_version_number,
1110   hr_api.g_number                -- business_group_id is not updateable
1111   );
1112   --
1113   -- Having converted the arguments into the
1114   -- plsql record structure we call the corresponding record
1115   -- business process.
1116   --
1117   hr_utility.set_location(' Leaving:'||l_proc, 10);
1118   upd(l_rec
1119     ,p_effective_date
1120     ,p_operating_unit_id);
1121 
1122   p_object_version_number := l_rec.object_version_number;
1123   --
1124   hr_utility.set_location(' Leaving:'||l_proc, 15);
1125 END upd;
1126 --
1127 END hr_loc_upd;