[Home] [Help]
PACKAGE BODY: APPS.HR_LOCATION_INTERNAL
Source
1 PACKAGE BODY hr_location_internal AS
2 /* $Header: hrlocbsi.pkb 115.4 2003/09/23 07:31:27 ptitoren noship $ */
3 --
4 -- Package Variables
5 --
6 g_package VARCHAR2(33) := ' hr_location_api.';
7 --
8 --------------------------------------------------------------------------------
9 g_dummy number(1); -- Dummy for cursor returns which are not needed
10 g_business_group_id number(15); -- For validating translation;
11 g_legislation_code varchar2(150); -- For validating translation;
12 --------------------------------------------------------------------------------
13 -- ----------------------------------------------------------------------------
14 -- |-------------------------< create__generic_location >----------------------|
15 -- ----------------------------------------------------------------------------
16 --
17 PROCEDURE create_generic_location
18 ( p_validate IN BOOLEAN DEFAULT false
19 ,p_effective_date IN DATE
20 ,p_language_code IN VARCHAR2 DEFAULT hr_api.userenv_lang
21 ,p_location_code IN VARCHAR2
22 ,p_description IN VARCHAR2 DEFAULT NULL
23 ,p_timezone_code IN VARCHAR2 DEFAULT NULL
24 ,p_tp_header_id IN NUMBER DEFAULT NULL
25 ,p_ece_tp_location_code IN VARCHAR2 DEFAULT NULL
26 ,p_address_line_1 IN VARCHAR2 DEFAULT NULL
27 ,p_address_line_2 IN VARCHAR2 DEFAULT NULL
28 ,p_address_line_3 IN VARCHAR2 DEFAULT NULL
29 ,p_bill_to_site_flag IN VARCHAR2 DEFAULT 'Y'
30 ,p_country IN VARCHAR2 DEFAULT NULL
31 ,p_designated_receiver_id IN NUMBER DEFAULT NULL
32 ,p_in_organization_flag IN VARCHAR2 DEFAULT 'Y'
33 ,p_inactive_date IN DATE DEFAULT NULL
34 ,p_operating_unit_id IN NUMBER DEFAULT NULL
35 ,p_inventory_organization_id IN NUMBER DEFAULT NULL
36 ,p_office_site_flag IN VARCHAR2 DEFAULT 'Y'
37 ,p_postal_code IN VARCHAR2 DEFAULT NULL
38 ,p_receiving_site_flag IN VARCHAR2 DEFAULT 'Y'
39 ,p_region_1 IN VARCHAR2 DEFAULT NULL
40 ,p_region_2 IN VARCHAR2 DEFAULT NULL
41 ,p_region_3 IN VARCHAR2 DEFAULT NULL
42 ,p_ship_to_location_id IN NUMBER DEFAULT NULL
43 ,p_ship_to_site_flag IN VARCHAR2 DEFAULT 'Y'
44 ,p_style IN VARCHAR2 DEFAULT NULL
45 ,p_tax_name IN VARCHAR2 DEFAULT NULL
46 ,p_telephone_number_1 IN VARCHAR2 DEFAULT NULL
47 ,p_telephone_number_2 IN VARCHAR2 DEFAULT NULL
48 ,p_telephone_number_3 IN VARCHAR2 DEFAULT NULL
49 ,p_town_or_city IN VARCHAR2 DEFAULT NULL
50 ,p_loc_information13 IN VARCHAR2 DEFAULT NULL
51 ,p_loc_information14 IN VARCHAR2 DEFAULT NULL
52 ,p_loc_information15 IN VARCHAR2 DEFAULT NULL
53 ,p_loc_information16 IN VARCHAR2 DEFAULT NULL
54 ,p_loc_information17 IN VARCHAR2 DEFAULT NULL
55 ,p_loc_information18 IN VARCHAR2 DEFAULT NULL
56 ,p_loc_information19 IN VARCHAR2 DEFAULT NULL
57 ,p_loc_information20 IN VARCHAR2 DEFAULT NULL
58 ,p_attribute_category IN VARCHAR2 DEFAULT NULL
59 ,p_attribute1 IN VARCHAR2 DEFAULT NULL
60 ,p_attribute2 IN VARCHAR2 DEFAULT NULL
61 ,p_attribute3 IN VARCHAR2 DEFAULT NULL
62 ,p_attribute4 IN VARCHAR2 DEFAULT NULL
63 ,p_attribute5 IN VARCHAR2 DEFAULT NULL
64 ,p_attribute6 IN VARCHAR2 DEFAULT NULL
65 ,p_attribute7 IN VARCHAR2 DEFAULT NULL
66 ,p_attribute8 IN VARCHAR2 DEFAULT NULL
67 ,p_attribute9 IN VARCHAR2 DEFAULT NULL
68 ,p_attribute10 IN VARCHAR2 DEFAULT NULL
69 ,p_attribute11 IN VARCHAR2 DEFAULT NULL
70 ,p_attribute12 IN VARCHAR2 DEFAULT NULL
71 ,p_attribute13 IN VARCHAR2 DEFAULT NULL
72 ,p_attribute14 IN VARCHAR2 DEFAULT NULL
73 ,p_attribute15 IN VARCHAR2 DEFAULT NULL
77 ,p_attribute19 IN VARCHAR2 DEFAULT NULL
74 ,p_attribute16 IN VARCHAR2 DEFAULT NULL
75 ,p_attribute17 IN VARCHAR2 DEFAULT NULL
76 ,p_attribute18 IN VARCHAR2 DEFAULT NULL
78 ,p_attribute20 IN VARCHAR2 DEFAULT NULL
79 ,p_global_attribute_category IN VARCHAR2 DEFAULT NULL
80 ,p_global_attribute1 IN VARCHAR2 DEFAULT NULL
81 ,p_global_attribute2 IN VARCHAR2 DEFAULT NULL
82 ,p_global_attribute3 IN VARCHAR2 DEFAULT NULL
83 ,p_global_attribute4 IN VARCHAR2 DEFAULT NULL
84 ,p_global_attribute5 IN VARCHAR2 DEFAULT NULL
85 ,p_global_attribute6 IN VARCHAR2 DEFAULT NULL
86 ,p_global_attribute7 IN VARCHAR2 DEFAULT NULL
87 ,p_global_attribute8 IN VARCHAR2 DEFAULT NULL
88 ,p_global_attribute9 IN VARCHAR2 DEFAULT NULL
89 ,p_global_attribute10 IN VARCHAR2 DEFAULT NULL
90 ,p_global_attribute11 IN VARCHAR2 DEFAULT NULL
91 ,p_global_attribute12 IN VARCHAR2 DEFAULT NULL
92 ,p_global_attribute13 IN VARCHAR2 DEFAULT NULL
93 ,p_global_attribute14 IN VARCHAR2 DEFAULT NULL
94 ,p_global_attribute15 IN VARCHAR2 DEFAULT NULL
95 ,p_global_attribute16 IN VARCHAR2 DEFAULT NULL
96 ,p_global_attribute17 IN VARCHAR2 DEFAULT NULL
97 ,p_global_attribute18 IN VARCHAR2 DEFAULT NULL
98 ,p_global_attribute19 IN VARCHAR2 DEFAULT NULL
99 ,p_global_attribute20 IN VARCHAR2 DEFAULT NULL
100 ,p_business_group_id IN NUMBER DEFAULT NULL
101 ,p_legal_address_flag IN VARCHAR2 DEFAULT NULL
102 ,p_location_id OUT NOCOPY NUMBER
103 ,p_object_version_number OUT NOCOPY NUMBER
104
105 ) IS
106 --
107 -- Declare cursors and local variables
108 --
109 l_proc VARCHAR2(72) := g_package||'create_generic_location';
110 l_location_id hr_locations_all.location_id%TYPE;
111 l_object_version_number hr_locations_all.object_version_number%TYPE;
112 l_language_code hr_locations_all_tl.language%TYPE;
113 l_inactive_date DATE;
114 --
115 BEGIN
116 --
117 hr_utility.set_location('Entering:'|| l_proc, 10);
118 --
119 -- Issue a savepoint
120 --
121 savepoint create_generic_location;
122 --
123 hr_utility.set_location(l_proc, 15);
124 --
125 -- All date input parameters must be truncated to remove time elements
126 --
127 l_inactive_date := trunc (p_inactive_date);
128 --
129 --
130 -- Validate the language parameter. l_language_code should be passed to functions
131 -- instead of p_language_code from now on, to allow an IN OUT parameter to
132 -- be passed through.
133 --
134 l_language_code := p_language_code;
135 hr_api.validate_language_code(p_language_code => l_language_code);
136 --
137 hr_utility.set_location(l_proc, 20);
138 --
139 -- Insert non-translatable rows into HR_LOCATIONS_ALL first
140 hr_loc_ins.ins
141 ( p_effective_date => p_effective_date
142 ,p_location_id => l_location_id
143 ,p_object_version_number => l_object_version_number
144 ,p_location_code => p_location_code
145 ,p_timezone_code => p_timezone_code
146 ,p_address_line_1 => p_address_line_1
147 ,p_address_line_2 => p_address_line_2
148 ,p_address_line_3 => p_address_line_3
149 ,p_bill_to_site_flag => p_bill_to_site_flag
150 ,p_country => p_country
151 ,p_description => p_description
152 ,p_designated_receiver_id => p_designated_receiver_id
153 ,p_in_organization_flag => p_in_organization_flag
154 ,p_inactive_date => l_inactive_date
155 ,p_operating_unit_id => p_operating_unit_id
156 ,p_inventory_organization_id => p_inventory_organization_id
157 ,p_office_site_flag => p_office_site_flag
158 ,p_postal_code => p_postal_code
159 ,p_receiving_site_flag => p_receiving_site_flag
160 ,p_region_1 => p_region_1
161 ,p_region_2 => p_region_2
162 ,p_region_3 => p_region_3
163 ,p_ship_to_location_id => p_ship_to_location_id
164 ,p_ship_to_site_flag => p_ship_to_site_flag
165 ,p_style => p_style
166 ,p_tax_name => p_tax_name
167 ,p_telephone_number_1 => p_telephone_number_1
168 ,p_telephone_number_2 => p_telephone_number_2
169 ,p_telephone_number_3 => p_telephone_number_3
170 ,p_town_or_city => p_town_or_city
171 ,p_loc_information13 => p_loc_information13
172 ,p_loc_information14 => p_loc_information14
173 ,p_loc_information15 => p_loc_information15
174 ,p_loc_information16 => p_loc_information16
175 ,p_loc_information17 => p_loc_information17
176 ,p_loc_information18 => p_loc_information18
177 ,p_loc_information19 => p_loc_information19
178 ,p_loc_information20 => p_loc_information20
179 ,p_attribute_category => p_attribute_category
180 ,p_attribute1 => p_attribute1
181 ,p_attribute2 => p_attribute2
182 ,p_attribute3 => p_attribute3
183 ,p_attribute4 => p_attribute4
184 ,p_attribute5 => p_attribute5
185 ,p_attribute6 => p_attribute6
186 ,p_attribute7 => p_attribute7
187 ,p_attribute8 => p_attribute8
188 ,p_attribute9 => p_attribute9
189 ,p_attribute10 => p_attribute10
190 ,p_attribute11 => p_attribute11
191 ,p_attribute12 => p_attribute12
192 ,p_attribute13 => p_attribute13
193 ,p_attribute14 => p_attribute14
194 ,p_attribute15 => p_attribute15
195 ,p_attribute16 => p_attribute16
196 ,p_attribute17 => p_attribute17
197 ,p_attribute18 => p_attribute18
198 ,p_attribute19 => p_attribute19
199 ,p_attribute20 => p_attribute20
200 ,p_global_attribute_category => p_global_attribute_category
201 ,p_global_attribute1 => p_global_attribute1
202 ,p_global_attribute2 => p_global_attribute2
203 ,p_global_attribute3 => p_global_attribute3
204 ,p_global_attribute4 => p_global_attribute4
205 ,p_global_attribute5 => p_global_attribute5
206 ,p_global_attribute6 => p_global_attribute6
207 ,p_global_attribute7 => p_global_attribute7
208 ,p_global_attribute8 => p_global_attribute8
209 ,p_global_attribute9 => p_global_attribute9
210 ,p_global_attribute10 => p_global_attribute10
211 ,p_global_attribute11 => p_global_attribute11
212 ,p_global_attribute12 => p_global_attribute12
213 ,p_global_attribute13 => p_global_attribute13
214 ,p_global_attribute14 => p_global_attribute14
215 ,p_global_attribute15 => p_global_attribute15
216 ,p_global_attribute16 => p_global_attribute16
217 ,p_global_attribute17 => p_global_attribute17
218 ,p_global_attribute18 => p_global_attribute18
219 ,p_global_attribute19 => p_global_attribute19
220 ,p_global_attribute20 => p_global_attribute20
221 ,p_legal_address_flag => p_legal_address_flag
222 ,p_tp_header_id => p_tp_header_id
223 ,p_ece_tp_location_code => p_ece_tp_location_code
224 ,p_business_group_id => p_business_group_id
225 );
226 --
227 -- Now insert translatable rows in HR_LOCATIONS_ALL_TL table
228 hr_lot_ins.ins_tl
229 ( p_language_code => l_language_code,
230 p_location_id => l_location_id,
231 p_location_code => p_location_code,
232 p_description => p_description,
233 p_business_group_id => p_business_group_id
234 );
235 --
236 hr_utility.set_location(l_proc, 60);
237 --
238 -- When in validation only mode raise the Validate_Enabled exception
239 --
240 IF p_validate THEN
241 RAISE hr_api.validate_enabled;
242 END IF;
243 --
244 -- Set all output arguments
245 --
246 p_location_id := l_location_id;
247 p_object_version_number := l_object_version_number;
248 --
249 hr_utility.set_location(' Leaving:'||l_proc, 70);
250 --
251 EXCEPTION
252 --
253 WHEN hr_api.validate_enabled THEN
254 --
255 -- As the Validate_Enabled exception has been raised
256 -- we must rollback to the savepoint
257 --
258 ROLLBACK TO create_generic_location;
259 --
260 -- Only set output warning arguments
261 -- (Any key or derived arguments must be set to null
262 -- when validation only mode is being used.)
263 --
264 p_location_id := NULL;
265 p_object_version_number := NULL;
266 hr_utility.set_location(' Leaving:'||l_proc, 80);
267 WHEN OTHERS THEN
268 --
269 -- A validation or unexpected error has occurred
270 ROLLBACK TO create_generic_location;
271 -- Set OUT parameters.
272 p_location_id := NULL;
273 p_object_version_number := NULL;
274 hr_utility.set_location(' Leaving:'||l_proc, 90);
275 RAISE;
276 --
277 END create_generic_location;
278 -- ----------------------------------------------------------------------------
279 -- |--------------------------< update_generic_location >-----------------------------|
280 -- ----------------------------------------------------------------------------
281 --
282 PROCEDURE update_generic_location
283 ( p_validate IN BOOLEAN DEFAULT false
284 ,p_effective_date IN DATE
285 ,p_language_code IN VARCHAR2 DEFAULT hr_api.userenv_lang
286 ,p_location_id IN NUMBER
287 ,p_location_code IN VARCHAR2 DEFAULT hr_api.g_varchar2
288 ,p_description IN VARCHAR2 DEFAULT hr_api.g_varchar2
289 ,p_timezone_code IN VARCHAR2 DEFAULT hr_api.g_varchar2
290 ,p_tp_header_id IN NUMBER DEFAULT hr_api.g_number
291 ,p_ece_tp_location_code IN VARCHAR2 DEFAULT hr_api.g_varchar2
292 ,p_address_line_1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
293 ,p_address_line_2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
294 ,p_address_line_3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
295 ,p_bill_to_site_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
296 ,p_country IN VARCHAR2 DEFAULT hr_api.g_varchar2
297 ,p_designated_receiver_id IN NUMBER DEFAULT hr_api.g_number
298 ,p_in_organization_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
299 ,p_inactive_date IN DATE DEFAULT hr_api.g_date
300 ,p_operating_unit_id IN NUMBER DEFAULT NULL
301 ,p_inventory_organization_id IN NUMBER DEFAULT hr_api.g_number
302 ,p_office_site_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
303 ,p_postal_code IN VARCHAR2 DEFAULT hr_api.g_varchar2
304 ,p_receiving_site_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
305 ,p_region_1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
306 ,p_region_2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
307 ,p_region_3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
308 ,p_ship_to_location_id IN NUMBER DEFAULT hr_api.g_number
309 ,p_ship_to_site_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
310 ,p_style IN VARCHAR2 DEFAULT hr_api.g_varchar2
311 ,p_tax_name IN VARCHAR2 DEFAULT hr_api.g_varchar2
312 ,p_telephone_number_1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
313 ,p_telephone_number_2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
314 ,p_telephone_number_3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
315 ,p_town_or_city IN VARCHAR2 DEFAULT hr_api.g_varchar2
316 ,p_loc_information13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
317 ,p_loc_information14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
318 ,p_loc_information15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
319 ,p_loc_information16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
320 ,p_loc_information17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
321 ,p_loc_information18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
322 ,p_loc_information19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
323 ,p_loc_information20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
324 ,p_attribute_category IN VARCHAR2 DEFAULT hr_api.g_varchar2
325 ,p_attribute1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
326 ,p_attribute2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
327 ,p_attribute3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
328 ,p_attribute4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
329 ,p_attribute5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
330 ,p_attribute6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
331 ,p_attribute7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
332 ,p_attribute8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
333 ,p_attribute9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
334 ,p_attribute10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
335 ,p_attribute11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
336 ,p_attribute12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
337 ,p_attribute13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
338 ,p_attribute14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
339 ,p_attribute15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
340 ,p_attribute16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
341 ,p_attribute17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
342 ,p_attribute18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
343 ,p_attribute19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
344 ,p_attribute20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
345 ,p_global_attribute_category IN VARCHAR2 DEFAULT hr_api.g_varchar2
346 ,p_global_attribute1 IN VARCHAR2 DEFAULT hr_api.g_varchar2
347 ,p_global_attribute2 IN VARCHAR2 DEFAULT hr_api.g_varchar2
348 ,p_global_attribute3 IN VARCHAR2 DEFAULT hr_api.g_varchar2
349 ,p_global_attribute4 IN VARCHAR2 DEFAULT hr_api.g_varchar2
350 ,p_global_attribute5 IN VARCHAR2 DEFAULT hr_api.g_varchar2
351 ,p_global_attribute6 IN VARCHAR2 DEFAULT hr_api.g_varchar2
352 ,p_global_attribute7 IN VARCHAR2 DEFAULT hr_api.g_varchar2
353 ,p_global_attribute8 IN VARCHAR2 DEFAULT hr_api.g_varchar2
354 ,p_global_attribute9 IN VARCHAR2 DEFAULT hr_api.g_varchar2
358 ,p_global_attribute13 IN VARCHAR2 DEFAULT hr_api.g_varchar2
355 ,p_global_attribute10 IN VARCHAR2 DEFAULT hr_api.g_varchar2
356 ,p_global_attribute11 IN VARCHAR2 DEFAULT hr_api.g_varchar2
357 ,p_global_attribute12 IN VARCHAR2 DEFAULT hr_api.g_varchar2
359 ,p_global_attribute14 IN VARCHAR2 DEFAULT hr_api.g_varchar2
360 ,p_global_attribute15 IN VARCHAR2 DEFAULT hr_api.g_varchar2
361 ,p_global_attribute16 IN VARCHAR2 DEFAULT hr_api.g_varchar2
362 ,p_global_attribute17 IN VARCHAR2 DEFAULT hr_api.g_varchar2
363 ,p_global_attribute18 IN VARCHAR2 DEFAULT hr_api.g_varchar2
364 ,p_global_attribute19 IN VARCHAR2 DEFAULT hr_api.g_varchar2
365 ,p_global_attribute20 IN VARCHAR2 DEFAULT hr_api.g_varchar2
366 ,p_legal_address_flag IN VARCHAR2 DEFAULT hr_api.g_varchar2
367 ,p_object_version_number IN OUT NOCOPY NUMBER
368 ) IS
369 --
370 -- Declare cursors and local variables
371 --
372 l_proc VARCHAR2(72) := g_package||'update_generic_location';
373 l_object_version_number hr_locations.object_version_number%TYPE;
374 l_language_code hr_locations_all_tl.language%TYPE;
375 l_inactive_date DATE;
376 l_temp_ovn number := p_object_version_number;
377 --
378 BEGIN
379 --
380 hr_utility.set_location('Entering:'|| l_proc, 10);
381 --
382 -- Issue a savepoint.
383 --
384 savepoint update_generic_location;
385 --
386 --
387 -- All date input parameters must be truncated to remove time elements
388 --
389 l_inactive_date := trunc (p_inactive_date);
390 --
391 -- Validate the language parameter.
392 -- l_language_code should be passed to functions
393 -- instead of p_language_code from now on, to allow an IN OUT parameter to be
394 -- passed through.
395 --
396 l_language_code := p_language_code;
397 hr_api.validate_language_code(p_language_code => l_language_code);
398 hr_utility.set_location(l_proc, 20);
399 --
400 --
401 -- Process Logic
402 --
403 l_object_version_number := p_object_version_number;
404 --
405 -- Insert non-translatable rows in HR_LOCATIONS_ALL Table
406 --
407 hr_loc_upd.upd
408 ( p_effective_date => p_effective_date
409 ,p_location_id => p_location_id
410 ,p_object_version_number => l_object_version_number
411 ,p_tp_header_id => p_tp_header_id
412 ,p_ece_tp_location_code => p_ece_tp_location_code
413 ,p_location_code => p_location_code
414 ,p_timezone_code => p_timezone_code
415 ,p_address_line_1 => p_address_line_1
416 ,p_address_line_2 => p_address_line_2
417 ,p_address_line_3 => p_address_line_3
418 ,p_bill_to_site_flag => p_bill_to_site_flag
419 ,p_country => p_country
420 ,p_description => p_description
421 ,p_designated_receiver_id => p_designated_receiver_id
422 ,p_in_organization_flag => p_in_organization_flag
423 ,p_inactive_date => l_inactive_date
424 ,p_operating_unit_id => p_operating_unit_id
425 ,p_inventory_organization_id => p_inventory_organization_id
426 ,p_office_site_flag => p_office_site_flag
427 ,p_postal_code => p_postal_code
428 ,p_receiving_site_flag => p_receiving_site_flag
429 ,p_region_1 => p_region_1
430 ,p_region_2 => p_region_2
431 ,p_region_3 => p_region_3
432 ,p_ship_to_location_id => p_ship_to_location_id
433 ,p_ship_to_site_flag => p_ship_to_site_flag
434 ,p_style => p_style
435 ,p_tax_name => p_tax_name
436 ,p_telephone_number_1 => p_telephone_number_1
437 ,p_telephone_number_2 => p_telephone_number_2
438 ,p_telephone_number_3 => p_telephone_number_3
439 ,p_town_or_city => p_town_or_city
440 ,p_loc_information13 => p_loc_information13
441 ,p_loc_information14 => p_loc_information14
442 ,p_loc_information15 => p_loc_information15
443 ,p_loc_information16 => p_loc_information16
444 ,p_loc_information17 => p_loc_information17
445 ,p_loc_information18 => p_loc_information18
446 ,p_loc_information19 => p_loc_information19
447 ,p_loc_information20 => p_loc_information20
448 ,p_attribute_category => p_attribute_category
449 ,p_attribute1 => p_attribute1
450 ,p_attribute2 => p_attribute2
451 ,p_attribute3 => p_attribute3
452 ,p_attribute4 => p_attribute4
453 ,p_attribute5 => p_attribute5
454 ,p_attribute6 => p_attribute6
455 ,p_attribute7 => p_attribute7
456 ,p_attribute8 => p_attribute8
457 ,p_attribute9 => p_attribute9
458 ,p_attribute10 => p_attribute10
459 ,p_attribute11 => p_attribute11
460 ,p_attribute12 => p_attribute12
461 ,p_attribute13 => p_attribute13
462 ,p_attribute14 => p_attribute14
466 ,p_attribute18 => p_attribute18
463 ,p_attribute15 => p_attribute15
464 ,p_attribute16 => p_attribute16
465 ,p_attribute17 => p_attribute17
467 ,p_attribute19 => p_attribute19
468 ,p_attribute20 => p_attribute20
469 ,p_global_attribute_category => p_global_attribute_category
470 ,p_global_attribute1 => p_global_attribute1
471 ,p_global_attribute2 => p_global_attribute2
472 ,p_global_attribute3 => p_global_attribute3
473 ,p_global_attribute4 => p_global_attribute4
474 ,p_global_attribute5 => p_global_attribute5
475 ,p_global_attribute6 => p_global_attribute6
476 ,p_global_attribute7 => p_global_attribute7
477 ,p_global_attribute8 => p_global_attribute8
478 ,p_global_attribute9 => p_global_attribute9
479 ,p_global_attribute10 => p_global_attribute10
480 ,p_global_attribute11 => p_global_attribute11
481 ,p_global_attribute12 => p_global_attribute12
485 ,p_global_attribute16 => p_global_attribute16
482 ,p_global_attribute13 => p_global_attribute13
483 ,p_global_attribute14 => p_global_attribute14
484 ,p_global_attribute15 => p_global_attribute15
486 ,p_global_attribute17 => p_global_attribute17
487 ,p_global_attribute18 => p_global_attribute18
488 ,p_global_attribute19 => p_global_attribute19
489 ,p_global_attribute20 => p_global_attribute20
490 ,p_legal_address_flag => p_legal_address_flag
491 );
492 --
493 -- Now insert translatable rows in HR_LOCATIONS_ALL_TL table
494 hr_lot_upd.upd_tl
495 ( p_language_code => l_language_code,
496 p_location_id => p_location_id,
497 p_location_code => p_location_code,
498 p_description => p_description);
499 --
500 --
501 hr_utility.set_location(l_proc, 60);
502 --
503 -- When in validation only mode raise the Validate_Enabled exception
504 --
505 IF p_validate THEN
506 RAISE hr_api.validate_enabled;
507 END IF;
508 --
509 -- Set all output arguments. If p_validate was TRUE, this bit is
510 -- never reached, so p_object_version_number is passed back unchanged.
511 --
512 p_object_version_number := l_object_version_number;
513 --
514 hr_utility.set_location(' Leaving:'||l_proc, 70);
515 --
516 EXCEPTION
517 --
518 WHEN hr_api.validate_enabled THEN
519 --
520 -- As the Validate_Enabled exception has been raised
521 -- we must rollback to the savepoint
522 --
523 ROLLBACK TO update_generic_location;
524 --
525 -- Only set output warning arguments
526 -- (Any key or derived arguments must be set to null
527 -- when validation only mode is being used.)
528 -- Reset IN OUT parameters.
529 p_object_version_number := l_temp_ovn;
530 hr_utility.set_location(' Leaving:'||l_proc, 80);
531
532 WHEN OTHERS THEN
533 --
534 -- A validation or unexpected error has occurred
535 ROLLBACK TO update_generic_location;
536 -- Reset IN OUT parameters.
537 p_object_version_number := l_temp_ovn;
538 hr_utility.set_location(' Leaving:'||l_proc, 90);
539 RAISE;
540 --
541 --
542 END update_generic_location;
543 --
544 ---------------------------------------------------------------------------
545 END hr_location_internal;