DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_DE_TKTDTLS_SWI

Source


1 Package Body pqh_de_tktdtls_swi As
2 /* $Header: pqtktswi.pkb 115.1 2002/12/05 00:30:27 rpasapul noship $ */
3 --
4 -- Package variables
5 --
6 g_package  varchar2(33) := 'pqh_de_tktdtls_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |----------------------------< delete_tkt_dtls >---------------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE delete_tkt_dtls
12   (p_validate                     in     number    default hr_api.g_false_num
13   ,p_tatigkeit_detail_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_tkt_dtls';
25 Begin
26   hr_utility.set_location(' Entering:' || l_proc,10);
27   --
28   -- Issue a savepoint
29   --
30   savepoint delete_tkt_dtls_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_tktdtls_api.delete_tkt_dtls
51     (p_validate                     => l_validate
52     ,p_tatigkeit_detail_id          => p_tatigkeit_detail_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_tkt_dtls_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_tkt_dtls_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_tkt_dtls;
102 -- ----------------------------------------------------------------------------
103 -- |----------------------------< insert_tkt_dtls >---------------------------|
104 -- ----------------------------------------------------------------------------
105 PROCEDURE insert_tkt_dtls
106   (p_validate                     in     number    default hr_api.g_false_num
107   ,p_effective_date               in     date
108   ,p_tatigkeit_number             in     varchar2  default hr_api.g_varchar2
109   ,p_description                  in     varchar2
110   ,p_tatigkeit_detail_id             out nocopy number
111   ,p_object_version_number           out nocopy number
112   ,p_return_status                   out nocopy varchar2
113   ) is
114   --
115   -- Variables for API Boolean parameters
116   l_validate                      boolean;
117   --
118   -- Variables for IN/OUT parameters
119   --
120   -- Other variables
121   l_proc    varchar2(72) := g_package ||'insert_tkt_dtls';
122 Begin
123   hr_utility.set_location(' Entering:' || l_proc,10);
124   --
125   -- Issue a savepoint
126   --
127   savepoint insert_tkt_dtls_swi;
128   --
129   -- Initialise Multiple Message Detection
130   --
131   hr_multi_message.enable_message_list;
132   --
133   -- Remember IN OUT parameter IN values
134   --
135   --
136   -- Convert constant values to their corresponding boolean value
137   --
138   l_validate :=
139     hr_api.constant_to_boolean
140       (p_constant_value => p_validate);
141   --
142   -- Register Surrogate ID or user key values
143   --
144   pqh_tkt_ins.set_base_key_value
145     (p_tatigkeit_detail_id => p_tatigkeit_detail_id
146     );
147   --
148   -- Call API
149   --
150   pqh_de_tktdtls_api.insert_tkt_dtls
151     (p_validate                     => l_validate
152     ,p_effective_date               => p_effective_date
153     ,p_tatigkeit_number             => p_tatigkeit_number
154     ,p_description                  => p_description
155     ,p_tatigkeit_detail_id          => p_tatigkeit_detail_id
156     ,p_object_version_number        => p_object_version_number
157     );
158   --
159   -- Convert API warning boolean parameter values to specific
160   -- messages and add them to Multiple Message List
161   --
162   --
163   -- Convert API non-warning boolean parameter values
164   --
165   --
166   -- Derive the API return status value based on whether
167   -- messages of any type exist in the Multiple Message List.
168   -- Also disable Multiple Message Detection.
169   --
170   p_return_status := hr_multi_message.get_return_status_disable;
171   hr_utility.set_location(' Leaving:' || l_proc,20);
172   --
173 exception
174   when hr_multi_message.error_message_exist then
175     --
176     -- Catch the Multiple Message List exception which
177     -- indicates API processing has been aborted because
178     -- at least one message exists in the list.
179     --
180     rollback to insert_tkt_dtls_swi;
181     --
182     -- Reset IN OUT parameters and set OUT parameters
183     --
184     p_tatigkeit_detail_id          := null;
185     p_object_version_number        := null;
186     p_return_status := hr_multi_message.get_return_status_disable;
187     hr_utility.set_location(' Leaving:' || l_proc, 30);
188   when others then
189     --
190     -- When Multiple Message Detection is enabled catch
191     -- any Application specific or other unexpected
192     -- exceptions.  Adding appropriate details to the
193     -- Multiple Message List.  Otherwise re-raise the
194     -- error.
195     --
196     rollback to insert_tkt_dtls_swi;
197     if hr_multi_message.unexpected_error_add(l_proc) then
198        hr_utility.set_location(' Leaving:' || l_proc,40);
199        raise;
200     end if;
201     --
202     -- Reset IN OUT and set OUT parameters
203     --
204     p_tatigkeit_detail_id          := null;
205     p_object_version_number        := null;
206     p_return_status := hr_multi_message.get_return_status_disable;
207     hr_utility.set_location(' Leaving:' || l_proc,50);
208 end insert_tkt_dtls;
209 -- ----------------------------------------------------------------------------
210 -- |----------------------------< update_tkt_dtls >---------------------------|
211 -- ----------------------------------------------------------------------------
212 PROCEDURE update_tkt_dtls
213   (p_validate                     in     number    default hr_api.g_false_num
214   ,p_effective_date               in     date
215   ,p_tatigkeit_number             in     varchar2  default hr_api.g_varchar2
216   ,p_description                  in     varchar2  default hr_api.g_varchar2
217   ,p_tatigkeit_detail_id          in     number
218   ,p_object_version_number        in   out nocopy number
219   ,p_return_status                   out nocopy varchar2
220   ) is
221   --
222   -- Variables for API Boolean parameters
223   l_validate                      boolean;
224   --
225   -- Variables for IN/OUT parameters
226   --
227   -- Other variables
228   l_proc    varchar2(72) := g_package ||'update_tkt_dtls';
229 Begin
230   hr_utility.set_location(' Entering:' || l_proc,10);
231   --
232   -- Issue a savepoint
233   --
234   savepoint update_tkt_dtls_swi;
235   --
236   -- Initialise Multiple Message Detection
237   --
238   hr_multi_message.enable_message_list;
239   --
240   -- Remember IN OUT parameter IN values
241   --
242   --
243   -- Convert constant values to their corresponding boolean value
244   --
245   l_validate :=
246     hr_api.constant_to_boolean
247       (p_constant_value => p_validate);
248   --
249   -- Register Surrogate ID or user key values
250   --
251   --
252   -- Call API
253   --
254   pqh_de_tktdtls_api.update_tkt_dtls
255     (p_validate                     => l_validate
256     ,p_effective_date               => p_effective_date
257     ,p_tatigkeit_number             => p_tatigkeit_number
258     ,p_description                  => p_description
259     ,p_tatigkeit_detail_id          => p_tatigkeit_detail_id
260     ,p_object_version_number        => p_object_version_number
261     );
262   --
263   -- Convert API warning boolean parameter values to specific
264   -- messages and add them to Multiple Message List
265   --
266   --
267   -- Convert API non-warning boolean parameter values
268   --
269   --
270   -- Derive the API return status value based on whether
271   -- messages of any type exist in the Multiple Message List.
272   -- Also disable Multiple Message Detection.
273   --
274   p_return_status := hr_multi_message.get_return_status_disable;
275   hr_utility.set_location(' Leaving:' || l_proc,20);
276   --
277 exception
278   when hr_multi_message.error_message_exist then
279     --
280     -- Catch the Multiple Message List exception which
281     -- indicates API processing has been aborted because
282     -- at least one message exists in the list.
283     --
284     rollback to update_tkt_dtls_swi;
285     --
286     -- Reset IN OUT parameters and set OUT parameters
287     --
288     p_object_version_number        := null;
289     p_return_status := hr_multi_message.get_return_status_disable;
290     hr_utility.set_location(' Leaving:' || l_proc, 30);
291   when others then
292     --
293     -- When Multiple Message Detection is enabled catch
294     -- any Application specific or other unexpected
295     -- exceptions.  Adding appropriate details to the
296     -- Multiple Message List.  Otherwise re-raise the
297     -- error.
298     --
299     rollback to update_tkt_dtls_swi;
300     if hr_multi_message.unexpected_error_add(l_proc) then
301        hr_utility.set_location(' Leaving:' || l_proc,40);
302        raise;
303     end if;
304     --
305     -- Reset IN OUT and set OUT parameters
306     --
307     p_object_version_number        := null;
308     p_return_status := hr_multi_message.get_return_status_disable;
309     hr_utility.set_location(' Leaving:' || l_proc,50);
310 end update_tkt_dtls;
311 end pqh_de_tktdtls_swi;