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