DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_IN_LOCATION_API

Source


1 PACKAGE Body hr_in_location_api AS
2 /* $Header: pelocini.pkb 115.0 2004/05/25 04:15 gaugupta noship $ */
3 g_package  VARCHAR2(33) := 'hr_in_location_api.';
4 g_trace BOOLEAN ;
5 
6 -- ----------------------------------------------------------------------------
7 -- |-------------------------------< create_in_location >------------------------|
8 -- ----------------------------------------------------------------------------
9 
10 
11 PROCEDURE create_in_location
12   (   p_validate                       IN  BOOLEAN   DEFAULT false
13      ,p_effective_date                 IN  DATE
14      ,p_language_code                  IN  VARCHAR2  DEFAULT null
15      ,p_location_code                  IN  VARCHAR2
16      ,p_description                    IN  VARCHAR2  DEFAULT NULL
17      ,p_timezone_code                  IN  VARCHAR2  DEFAULT NULL
18      ,p_tp_header_id                   IN  NUMBER    DEFAULT NULL
19      ,p_ece_tp_location_code           IN  VARCHAR2  DEFAULT NULL
20      ,p_flat_door_block                IN  VARCHAR2
21      ,p_building_village               IN  VARCHAR2  DEFAULT NULL
22      ,p_road_street                    IN  VARCHAR2  DEFAULT NULL
23      ,p_bill_to_site_flag              IN  VARCHAR2  DEFAULT 'Y'
24      ,p_country                        IN  VARCHAR2  DEFAULT NULL
25      ,p_designated_receiver_id         IN  NUMBER    DEFAULT NULL
26      ,p_in_organization_flag           IN  VARCHAR2  DEFAULT 'Y'
27      ,p_inactive_date                  IN  DATE      DEFAULT NULL
28      ,p_operating_unit_id              IN  NUMBER    DEFAULT NULL
29      ,p_inventory_organization_id      IN  NUMBER    DEFAULT NULL
30      ,p_office_site_flag               IN  VARCHAR2  DEFAULT 'Y'
31      ,p_postal_code                    IN  VARCHAR2  DEFAULT NULL
32      ,p_receiving_site_flag            IN  VARCHAR2  DEFAULT 'Y'
33      ,p_ship_to_location_id            IN  NUMBER    DEFAULT NULL
34      ,p_ship_to_site_flag              IN  VARCHAR2  DEFAULT 'Y'
35      ,p_style                          IN  VARCHAR2  DEFAULT NULL
36      ,p_tax_name                       IN  VARCHAR2  DEFAULT NULL
37      ,p_telephone_number               IN  VARCHAR2  DEFAULT NULL
38      ,p_fax_number                     IN  VARCHAR2  DEFAULT NULL
39      ,p_area                           IN  VARCHAR2  DEFAULT NULL
40      ,p_town_city_district             IN  VARCHAR2
41      ,p_state_ut                       IN  VARCHAR2  DEFAULT NULL
42      ,p_email                          IN  VARCHAR2  DEFAULT NULL
43      ,p_attribute_category             IN  VARCHAR2  DEFAULT NULL
44      ,p_attribute1                     IN  VARCHAR2  DEFAULT NULL
45      ,p_attribute2                     IN  VARCHAR2  DEFAULT NULL
46      ,p_attribute3                     IN  VARCHAR2  DEFAULT NULL
47      ,p_attribute4                     IN  VARCHAR2  DEFAULT NULL
48      ,p_attribute5                     IN  VARCHAR2  DEFAULT NULL
49      ,p_attribute6                     IN  VARCHAR2  DEFAULT NULL
50      ,p_attribute7                     IN  VARCHAR2  DEFAULT NULL
51      ,p_attribute8                     IN  VARCHAR2  DEFAULT NULL
52      ,p_attribute9                     IN  VARCHAR2  DEFAULT NULL
53      ,p_attribute10                    IN  VARCHAR2  DEFAULT NULL
54      ,p_attribute11                    IN  VARCHAR2  DEFAULT NULL
55      ,p_attribute12                    IN  VARCHAR2  DEFAULT NULL
56      ,p_attribute13                    IN  VARCHAR2  DEFAULT NULL
57      ,p_attribute14                    IN  VARCHAR2  DEFAULT NULL
58      ,p_attribute15                    IN  VARCHAR2  DEFAULT NULL
59      ,p_attribute16                    IN  VARCHAR2  DEFAULT NULL
60      ,p_attribute17                    IN  VARCHAR2  DEFAULT NULL
61      ,p_attribute18                    IN  VARCHAR2  DEFAULT NULL
62      ,p_attribute19                    IN  VARCHAR2  DEFAULT NULL
63      ,p_attribute20                    IN  VARCHAR2  DEFAULT NULL
64      ,p_global_attribute_category      IN  VARCHAR2  DEFAULT NULL
65      ,p_global_attribute1              IN  VARCHAR2  DEFAULT NULL
66      ,p_global_attribute2              IN  VARCHAR2  DEFAULT NULL
67      ,p_global_attribute3              IN  VARCHAR2  DEFAULT NULL
68      ,p_global_attribute4              IN  VARCHAR2  DEFAULT NULL
69      ,p_global_attribute5              IN  VARCHAR2  DEFAULT NULL
70      ,p_global_attribute6              IN  VARCHAR2  DEFAULT NULL
71      ,p_global_attribute7              IN  VARCHAR2  DEFAULT NULL
72      ,p_global_attribute8              IN  VARCHAR2  DEFAULT NULL
73      ,p_global_attribute9              IN  VARCHAR2  DEFAULT NULL
74      ,p_global_attribute10             IN  VARCHAR2  DEFAULT NULL
75      ,p_global_attribute11             IN  VARCHAR2  DEFAULT NULL
76      ,p_global_attribute12             IN  VARCHAR2  DEFAULT NULL
77      ,p_global_attribute13             IN  VARCHAR2  DEFAULT NULL
78      ,p_global_attribute14             IN  VARCHAR2  DEFAULT NULL
79      ,p_global_attribute15             IN  VARCHAR2  DEFAULT NULL
80      ,p_global_attribute16             IN  VARCHAR2  DEFAULT NULL
81      ,p_global_attribute17             IN  VARCHAR2  DEFAULT NULL
82      ,p_global_attribute18             IN  VARCHAR2  DEFAULT NULL
83      ,p_global_attribute19             IN  VARCHAR2  DEFAULT NULL
84      ,p_global_attribute20             IN  VARCHAR2  DEFAULT NULL
85      ,p_business_group_id              IN  NUMBER    DEFAULT NULL
86      ,p_location_id                    OUT NOCOPY NUMBER
87      ,p_object_version_number          OUT NOCOPY NUMBER
88   ) IS
89   -- Declare cursors and local variables
90   --
91     l_proc   VARCHAR2(72);
92   --
93  begin
94 
95  l_proc  := g_package||'create_in_location';
96  g_trace := hr_utility.debug_enabled ;
97 
98  IF g_trace THEN
99    hr_utility.set_location('Entering: '||l_proc, 10);
100  END IF ;
101 
102  hr_location_api.create_location
103       (
104       p_validate                      => p_validate
105      ,p_effective_date                => p_effective_date
106      ,p_language_code                 => p_language_code
107      ,p_location_code                 => p_location_code
108      ,p_description                   => p_description
109      ,p_timezone_code                 => p_timezone_code
110      ,p_tp_header_id                  => p_tp_header_id
111      ,p_ece_tp_location_code          => p_ece_tp_location_code
112      ,p_address_line_1                => p_flat_door_block
113      ,p_address_line_2                => p_building_village
114      ,p_address_line_3                => p_road_street
115      ,p_bill_to_site_flag             => p_bill_to_site_flag
116      ,p_country                       => 'IN'
117      ,p_designated_receiver_id        => p_designated_receiver_id
118      ,p_in_organization_flag          => p_in_organization_flag
119      ,p_inactive_date                 => p_inactive_date
120      ,p_operating_unit_id             => p_operating_unit_id
121      ,p_inventory_organization_id     => p_inventory_organization_id
122      ,p_office_site_flag              => p_office_site_flag
123      ,p_postal_code                   => p_postal_code
124      ,p_receiving_site_flag           => p_receiving_site_flag
125      ,p_ship_to_location_id           => p_ship_to_location_id
126      ,p_ship_to_site_flag             => p_ship_to_site_flag
127      ,p_style                         => 'IN'
128      ,p_tax_name                      => p_tax_name
129      ,p_telephone_number_1            => p_telephone_number
130      ,p_telephone_number_2            => p_fax_number
131      ,p_loc_information14             => p_area
132      ,p_loc_information15             => p_town_city_district
133      ,p_loc_information16             => p_state_ut
134      ,p_loc_information17             => p_email
135      ,p_attribute_category            => p_attribute_category
136      ,p_attribute1                    => p_attribute1
137      ,p_attribute2                    => p_attribute2
138      ,p_attribute3                    => p_attribute3
139      ,p_attribute4                    => p_attribute4
140      ,p_attribute5                    => p_attribute5
141      ,p_attribute6                    => p_attribute6
142      ,p_attribute7                    => p_attribute7
143      ,p_attribute8                    => p_attribute8
144      ,p_attribute9                    => p_attribute9
145      ,p_attribute10                   => p_attribute10
146      ,p_attribute11                   => p_attribute11
147      ,p_attribute12                   => p_attribute12
148      ,p_attribute13                   => p_attribute13
149      ,p_attribute14                   => p_attribute14
150      ,p_attribute15                   => p_attribute15
151      ,p_attribute16                   => p_attribute16
152      ,p_attribute17                   => p_attribute17
153      ,p_attribute18                   => p_attribute18
154      ,p_attribute19                   => p_attribute19
155      ,p_attribute20                   => p_attribute20
156      ,p_global_attribute_category     => p_global_attribute_category
157      ,p_global_attribute1             => p_global_attribute1
158      ,p_global_attribute2             => p_global_attribute2
159      ,p_global_attribute3             => p_global_attribute3
160      ,p_global_attribute4             => p_global_attribute4
161      ,p_global_attribute5             => p_global_attribute5
162      ,p_global_attribute6             => p_global_attribute6
163      ,p_global_attribute7             => p_global_attribute7
164      ,p_global_attribute8             => p_global_attribute8
165      ,p_global_attribute9             => p_global_attribute9
166      ,p_global_attribute10            => p_global_attribute10
167      ,p_global_attribute11            => p_global_attribute11
168      ,p_global_attribute12            => p_global_attribute12
169      ,p_global_attribute13            => p_global_attribute13
170      ,p_global_attribute14            => p_global_attribute14
171      ,p_global_attribute15            => p_global_attribute15
172      ,p_global_attribute16            => p_global_attribute16
173      ,p_global_attribute17            => p_global_attribute17
174      ,p_global_attribute18            => p_global_attribute18
175      ,p_global_attribute19            => p_global_attribute19
176      ,p_global_attribute20            => p_global_attribute20
177      ,p_business_group_id             => p_business_group_id
178      ,p_location_id           	      => p_location_id
179      ,p_object_version_number 	      => p_object_version_number );
180 
181    IF g_trace THEN
182      hr_utility.set_location('Leaving: '||l_proc, 30);
183    END IF ;
184 
185  END create_in_location ;
186 
187 -- ----------------------------------------------------------------------------
188 -- |-------------------------------< update_in_location >------------------------|
189 -- ----------------------------------------------------------------------------
190 
191 PROCEDURE update_in_location
192   (   p_validate                       IN  BOOLEAN   DEFAULT false
193      ,p_effective_date                 IN  DATE
194      ,p_language_code                  IN  VARCHAR2  DEFAULT null
195      ,p_location_id                    IN  NUMBER
196      ,p_location_code                  IN  VARCHAR2  DEFAULT hr_api.g_varchar2
197      ,p_description                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
198      ,p_timezone_code                  IN  VARCHAR2  DEFAULT hr_api.g_varchar2
199      ,p_tp_header_id                   IN  NUMBER    DEFAULT hr_api.g_number
200      ,p_ece_tp_location_code           IN  VARCHAR2  DEFAULT hr_api.g_varchar2
201      ,p_flat_door_block                IN  VARCHAR2  DEFAULT hr_api.g_varchar2
202      ,p_building_village               IN  VARCHAR2  DEFAULT hr_api.g_varchar2
203      ,p_road_street                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
204      ,p_bill_to_site_flag              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
205      ,p_country                        IN  VARCHAR2  DEFAULT hr_api.g_varchar2
206      ,p_designated_receiver_id         IN  NUMBER    DEFAULT hr_api.g_number
207      ,p_in_organization_flag           IN  VARCHAR2  DEFAULT hr_api.g_varchar2
208      ,p_inactive_date                  IN  DATE      DEFAULT hr_api.g_date
209      ,p_operating_unit_id              IN  NUMBER    DEFAULT NULL
210      ,p_inventory_organization_id      IN  NUMBER    DEFAULT hr_api.g_number
211      ,p_office_site_flag               IN  VARCHAR2  DEFAULT hr_api.g_varchar2
212      ,p_postal_code                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
213      ,p_receiving_site_flag            IN  VARCHAR2  DEFAULT hr_api.g_varchar2
214      ,p_ship_to_location_id            IN  NUMBER    DEFAULT hr_api.g_number
215      ,p_ship_to_site_flag              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
216      ,p_style                          IN  VARCHAR2  DEFAULT hr_api.g_varchar2
217      ,p_tax_name                       IN  VARCHAR2  DEFAULT hr_api.g_varchar2
218      ,p_telephone_number               IN  VARCHAR2  DEFAULT hr_api.g_varchar2
219      ,p_fax_number                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
220      ,p_area                           IN  VARCHAR2  DEFAULT hr_api.g_varchar2
221      ,p_town_city_district             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
222      ,p_state_ut                       IN  VARCHAR2  DEFAULT hr_api.g_varchar2
223      ,p_email                          IN  VARCHAR2  DEFAULT hr_api.g_varchar2
224      ,p_attribute_category             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
225      ,p_attribute1                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
226      ,p_attribute2                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
227      ,p_attribute3                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
228      ,p_attribute4                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
229      ,p_attribute5                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
230      ,p_attribute6                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
231      ,p_attribute7                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
232      ,p_attribute8                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
233      ,p_attribute9                     IN  VARCHAR2  DEFAULT hr_api.g_varchar2
234      ,p_attribute10                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
235      ,p_attribute11                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
236      ,p_attribute12                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
237      ,p_attribute13                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
238      ,p_attribute14                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
239      ,p_attribute15                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
240      ,p_attribute16                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
241      ,p_attribute17                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
242      ,p_attribute18                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
243      ,p_attribute19                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
244      ,p_attribute20                    IN  VARCHAR2  DEFAULT hr_api.g_varchar2
245      ,p_global_attribute_category      IN  VARCHAR2  DEFAULT hr_api.g_varchar2
246      ,p_global_attribute1              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
247      ,p_global_attribute2              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
248      ,p_global_attribute3              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
249      ,p_global_attribute4              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
250      ,p_global_attribute5              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
251      ,p_global_attribute6              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
252      ,p_global_attribute7              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
253      ,p_global_attribute8              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
254      ,p_global_attribute9              IN  VARCHAR2  DEFAULT hr_api.g_varchar2
255      ,p_global_attribute10             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
256      ,p_global_attribute11             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
257      ,p_global_attribute12             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
258      ,p_global_attribute13             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
259      ,p_global_attribute14             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
260      ,p_global_attribute15             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
261      ,p_global_attribute16             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
262      ,p_global_attribute17             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
263      ,p_global_attribute18             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
264      ,p_global_attribute19             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
265      ,p_global_attribute20             IN  VARCHAR2  DEFAULT hr_api.g_varchar2
266      ,p_object_version_number          IN OUT NOCOPY NUMBER
267   ) IS
268 
269  -- Declare cursors and local variables
270  --
271     l_proc      VARCHAR2(72);
272  --
273  begin
274 
275  l_proc  := g_package||'update_in_location';
276  g_trace := hr_utility.debug_enabled ;
277 
278  IF g_trace THEN
279     hr_utility.set_location('Entering: '||l_proc, 10);
280  END IF ;
281 
282  hr_location_api.update_location
283       (
284       p_validate                      => p_validate
285      ,p_effective_date                => p_effective_date
286      ,p_language_code                 => p_language_code
287      ,p_location_code                 => p_location_code
288      ,p_description                   => p_description
289      ,p_timezone_code                 => p_timezone_code
290      ,p_tp_header_id                  => p_tp_header_id
291      ,p_ece_tp_location_code          => p_ece_tp_location_code
292      ,p_address_line_1                => p_flat_door_block
293      ,p_address_line_2                => p_building_village
294      ,p_address_line_3                => p_road_street
295      ,p_bill_to_site_flag             => p_bill_to_site_flag
296      ,p_country                       => p_country
297      ,p_designated_receiver_id        => p_designated_receiver_id
298      ,p_in_organization_flag          => p_in_organization_flag
299      ,p_inactive_date                 => p_inactive_date
300      ,p_operating_unit_id             => p_operating_unit_id
301      ,p_inventory_organization_id     => p_inventory_organization_id
302      ,p_office_site_flag              => p_office_site_flag
303      ,p_postal_code                   => p_postal_code
304      ,p_receiving_site_flag           => p_receiving_site_flag
305      ,p_ship_to_location_id           => p_ship_to_location_id
306      ,p_ship_to_site_flag             => p_ship_to_site_flag
307      ,p_style                         => 'IN'
308      ,p_tax_name                      => p_tax_name
309      ,p_telephone_number_1            => p_telephone_number
310      ,p_telephone_number_2            => p_fax_number
311      ,p_loc_information14             => p_area
312      ,p_loc_information15             => p_town_city_district
313      ,p_loc_information16             => p_state_ut
314      ,p_loc_information17             => p_email
315      ,p_attribute_category            => p_attribute_category
316      ,p_attribute1                    => p_attribute1
317      ,p_attribute2                    => p_attribute2
318      ,p_attribute3                    => p_attribute3
319      ,p_attribute4                    => p_attribute4
320      ,p_attribute5                    => p_attribute5
321      ,p_attribute6                    => p_attribute6
322      ,p_attribute7                    => p_attribute7
323      ,p_attribute8                    => p_attribute8
324      ,p_attribute9                    => p_attribute9
325      ,p_attribute10                   => p_attribute10
326      ,p_attribute11                   => p_attribute11
327      ,p_attribute12                   => p_attribute12
328      ,p_attribute13                   => p_attribute13
329      ,p_attribute14                   => p_attribute14
330      ,p_attribute15                   => p_attribute15
331      ,p_attribute16                   => p_attribute16
332      ,p_attribute17                   => p_attribute17
333      ,p_attribute18                   => p_attribute18
334      ,p_attribute19                   => p_attribute19
335      ,p_attribute20                   => p_attribute20
336      ,p_global_attribute_category     => p_global_attribute_category
337      ,p_global_attribute1             => p_global_attribute1
338      ,p_global_attribute2             => p_global_attribute2
339      ,p_global_attribute3             => p_global_attribute3
340      ,p_global_attribute4             => p_global_attribute4
341      ,p_global_attribute5             => p_global_attribute5
342      ,p_global_attribute6             => p_global_attribute6
343      ,p_global_attribute7             => p_global_attribute7
344      ,p_global_attribute8             => p_global_attribute8
345      ,p_global_attribute9             => p_global_attribute9
346      ,p_global_attribute10            => p_global_attribute10
347      ,p_global_attribute11            => p_global_attribute11
348      ,p_global_attribute12            => p_global_attribute12
349      ,p_global_attribute13            => p_global_attribute13
350      ,p_global_attribute14            => p_global_attribute14
351      ,p_global_attribute15            => p_global_attribute15
352      ,p_global_attribute16            => p_global_attribute16
353      ,p_global_attribute17            => p_global_attribute17
354      ,p_global_attribute18            => p_global_attribute18
355      ,p_global_attribute19            => p_global_attribute19
356      ,p_global_attribute20            => p_global_attribute20
357      ,p_location_id           	      => p_location_id
358      ,p_object_version_number 	      => p_object_version_number );
359 
360    IF g_trace THEN
361      hr_utility.set_location('Leaving: '||l_proc, 30);
362    END IF ;
363  END update_in_location ;
364 
365 
366 END hr_in_location_api ;