DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_DE_ENT_MINUTES_SWI

Source


1 Package Body pqh_de_ent_minutes_swi As
2 /* $Header: pqetmswi.pkb 115.1 2002/11/27 23:43:25 rpasapul noship $ */
3 --
4 -- Package variables
5 --
6 g_package  varchar2(33) := 'pqh_de_ent_minutes_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |--------------------------< delete_ent_minutes >--------------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE delete_ent_minutes
12   (p_validate                     in     number    default hr_api.g_false_num
13   ,p_ent_minutes_id               in     number
14   ,p_object_version_number        in     number
15   ,p_return_status                   out nocopy varchar2
16   ) is
17   --
18   -- Variables for API Boolean parameters
19   l_validate                      boolean;
20   --
21   -- Variables for IN/OUT parameters
22   --
23   -- Other variables
24   l_proc    varchar2(72) := g_package ||'delete_ent_minutes';
25 Begin
26   hr_utility.set_location(' Entering:' || l_proc,10);
27   --
28   -- Issue a savepoint
29   --
30   savepoint delete_ent_minutes_swi;
31   --
32   -- Initialise Multiple Message Detection
33   --
34   hr_multi_message.enable_message_list;
35   --
36   -- Remember IN OUT parameter IN values
37   --
38   --
39   -- Convert constant values to their corresponding boolean value
40   --
41   l_validate :=
42     hr_api.constant_to_boolean
43       (p_constant_value => p_validate);
44   --
45   -- Register Surrogate ID or user key values
46   --
47   --
48   -- Call API
49   --
50   pqh_de_ent_minutes_api.delete_ent_minutes
51     (p_validate                     => l_validate
52     ,p_ent_minutes_id               => p_ent_minutes_id
53     ,p_object_version_number        => p_object_version_number
54     );
55   --
56   -- Convert API warning boolean parameter values to specific
57   -- messages and add them to Multiple Message List
58   --
59   --
60   -- Convert API non-warning boolean parameter values
61   --
62   --
63   -- Derive the API return status value based on whether
64   -- messages of any type exist in the Multiple Message List.
65   -- Also disable Multiple Message Detection.
66   --
67   p_return_status := hr_multi_message.get_return_status_disable;
68   hr_utility.set_location(' Leaving:' || l_proc,20);
69   --
70 exception
71   when hr_multi_message.error_message_exist then
72     --
73     -- Catch the Multiple Message List exception which
74     -- indicates API processing has been aborted because
75     -- at least one message exists in the list.
76     --
77     rollback to delete_ent_minutes_swi;
78     --
79     -- Reset IN OUT parameters and set OUT parameters
80     --
81     p_return_status := hr_multi_message.get_return_status_disable;
82     hr_utility.set_location(' Leaving:' || l_proc, 30);
83   when others then
84     --
85     -- When Multiple Message Detection is enabled catch
86     -- any Application specific or other unexpected
87     -- exceptions.  Adding appropriate details to the
88     -- Multiple Message List.  Otherwise re-raise the
89     -- error.
90     --
91     rollback to delete_ent_minutes_swi;
92     if hr_multi_message.unexpected_error_add(l_proc) then
93        hr_utility.set_location(' Leaving:' || l_proc,40);
94        raise;
95     end if;
96     --
97     -- Reset IN OUT and set OUT parameters
98     --
99     p_return_status := hr_multi_message.get_return_status_disable;
100     hr_utility.set_location(' Leaving:' || l_proc,50);
101 end delete_ent_minutes;
102 -- ----------------------------------------------------------------------------
103 -- |--------------------------< insert_ent_minutes >--------------------------|
104 -- ----------------------------------------------------------------------------
105 PROCEDURE insert_ent_minutes
106   (p_validate                     in     number    default hr_api.g_false_num
107   ,p_effective_date               in     date
108   ,p_tariff_group_cd              in     varchar2
109   ,p_ent_minutes_cd               in     varchar2
110   ,p_description                  in     varchar2
111   ,p_business_group_id            in     number
112   ,p_ent_minutes_id                  out nocopy number
113   ,p_object_version_number           out nocopy number
114   ,p_return_status                   out nocopy varchar2
115   ) is
116   --
117   -- Variables for API Boolean parameters
118   l_validate                      boolean;
119   --
120   -- Variables for IN/OUT parameters
121   --
122   -- Other variables
123   l_proc    varchar2(72) := g_package ||'insert_ent_minutes';
124 Begin
125   hr_utility.set_location(' Entering:' || l_proc,10);
126   --
127   -- Issue a savepoint
128   --
129   savepoint insert_ent_minutes_swi;
130   --
131   -- Initialise Multiple Message Detection
132   --
133   hr_multi_message.enable_message_list;
134   --
135   -- Remember IN OUT parameter IN values
136   --
137   --
138   -- Convert constant values to their corresponding boolean value
139   --
140   l_validate :=
141     hr_api.constant_to_boolean
142       (p_constant_value => p_validate);
143   --
144   -- Register Surrogate ID or user key values
145   --
146   --
147   -- Call API
148   --
149   pqh_de_ent_minutes_api.insert_ent_minutes
150     (p_validate                     => l_validate
151     ,p_effective_date               => p_effective_date
152     ,p_tariff_group_cd              => p_tariff_group_cd
153     ,p_ent_minutes_cd               => p_ent_minutes_cd
154     ,p_description                  => p_description
155     ,p_business_group_id            => p_business_group_id
156     ,p_ent_minutes_id               => p_ent_minutes_id
157     ,p_object_version_number        => p_object_version_number
158     );
159   --
160   -- Convert API warning boolean parameter values to specific
161   -- messages and add them to Multiple Message List
162   --
163   --
164   -- Convert API non-warning boolean parameter values
165   --
166   --
167   -- Derive the API return status value based on whether
168   -- messages of any type exist in the Multiple Message List.
169   -- Also disable Multiple Message Detection.
170   --
171   p_return_status := hr_multi_message.get_return_status_disable;
172   hr_utility.set_location(' Leaving:' || l_proc,20);
173   --
174 exception
175   when hr_multi_message.error_message_exist then
176     --
177     -- Catch the Multiple Message List exception which
178     -- indicates API processing has been aborted because
179     -- at least one message exists in the list.
180     --
181     rollback to insert_ent_minutes_swi;
182     --
183     -- Reset IN OUT parameters and set OUT parameters
184     --
185     p_ent_minutes_id               := null;
186     p_object_version_number        := null;
187     p_return_status := hr_multi_message.get_return_status_disable;
188     hr_utility.set_location(' Leaving:' || l_proc, 30);
189   when others then
190     --
191     -- When Multiple Message Detection is enabled catch
192     -- any Application specific or other unexpected
193     -- exceptions.  Adding appropriate details to the
194     -- Multiple Message List.  Otherwise re-raise the
195     -- error.
196     --
197     rollback to insert_ent_minutes_swi;
198     if hr_multi_message.unexpected_error_add(l_proc) then
199        hr_utility.set_location(' Leaving:' || l_proc,40);
200        raise;
201     end if;
202     --
203     -- Reset IN OUT and set OUT parameters
204     --
205     p_ent_minutes_id               := null;
206     p_object_version_number        := null;
207     p_return_status := hr_multi_message.get_return_status_disable;
208     hr_utility.set_location(' Leaving:' || l_proc,50);
209 end insert_ent_minutes;
210 -- ----------------------------------------------------------------------------
211 -- |--------------------------< update_ent_minutes >--------------------------|
212 -- ----------------------------------------------------------------------------
213 PROCEDURE update_ent_minutes
214   (p_validate                     in     number    default hr_api.g_false_num
215   ,p_effective_date               in     date
216   ,p_ent_minutes_id               in     number
217   ,p_object_version_number        in out nocopy number
218   ,p_tariff_group_cd              in     varchar2  default hr_api.g_varchar2
219   ,p_ent_minutes_cd               in     varchar2  default hr_api.g_varchar2
220   ,p_description                  in     varchar2  default hr_api.g_varchar2
221   ,p_business_group_id            in     number    default hr_api.g_number
222   ,p_return_status                   out nocopy varchar2
223   ) is
224   --
225   -- Variables for API Boolean parameters
226   l_validate                      boolean;
227   --
228   -- Variables for IN/OUT parameters
229   l_object_version_number         number;
230   --
231   -- Other variables
232   l_proc    varchar2(72) := g_package ||'update_ent_minutes';
233 Begin
234   hr_utility.set_location(' Entering:' || l_proc,10);
235   --
236   -- Issue a savepoint
237   --
238   savepoint update_ent_minutes_swi;
239   --
240   -- Initialise Multiple Message Detection
241   --
242   hr_multi_message.enable_message_list;
243   --
244   -- Remember IN OUT parameter IN values
245   --
246   l_object_version_number         := p_object_version_number;
247   --
248   -- Convert constant values to their corresponding boolean value
249   --
250   l_validate :=
251     hr_api.constant_to_boolean
252       (p_constant_value => p_validate);
253   --
254   -- Register Surrogate ID or user key values
255   --
256   --
257   -- Call API
258   --
259   pqh_de_ent_minutes_api.update_ent_minutes
260     (p_validate                     => l_validate
261     ,p_effective_date               => p_effective_date
262     ,p_ent_minutes_id               => p_ent_minutes_id
263     ,p_object_version_number        => p_object_version_number
264     ,p_tariff_group_cd              => p_tariff_group_cd
265     ,p_ent_minutes_cd               => p_ent_minutes_cd
266     ,p_description                  => p_description
267     ,p_business_group_id            => p_business_group_id
268     );
269   --
270   -- Convert API warning boolean parameter values to specific
271   -- messages and add them to Multiple Message List
272   --
273   --
274   -- Convert API non-warning boolean parameter values
275   --
276   --
277   -- Derive the API return status value based on whether
278   -- messages of any type exist in the Multiple Message List.
279   -- Also disable Multiple Message Detection.
280   --
281   p_return_status := hr_multi_message.get_return_status_disable;
282   hr_utility.set_location(' Leaving:' || l_proc,20);
283   --
284 exception
285   when hr_multi_message.error_message_exist then
286     --
287     -- Catch the Multiple Message List exception which
288     -- indicates API processing has been aborted because
289     -- at least one message exists in the list.
290     --
291     rollback to update_ent_minutes_swi;
292     --
293     -- Reset IN OUT parameters and set OUT parameters
294     --
295     p_object_version_number        := l_object_version_number;
296     p_return_status := hr_multi_message.get_return_status_disable;
297     hr_utility.set_location(' Leaving:' || l_proc, 30);
298   when others then
299     --
300     -- When Multiple Message Detection is enabled catch
301     -- any Application specific or other unexpected
302     -- exceptions.  Adding appropriate details to the
303     -- Multiple Message List.  Otherwise re-raise the
304     -- error.
305     --
306     rollback to update_ent_minutes_swi;
307     if hr_multi_message.unexpected_error_add(l_proc) then
308        hr_utility.set_location(' Leaving:' || l_proc,40);
309        raise;
310     end if;
311     --
312     -- Reset IN OUT and set OUT parameters
313     --
314     p_object_version_number        := l_object_version_number;
315     p_return_status := hr_multi_message.get_return_status_disable;
316     hr_utility.set_location(' Leaving:' || l_proc,50);
317 end update_ent_minutes;
318 end pqh_de_ent_minutes_swi;