[Home] [Help]
PACKAGE BODY: APPS.PQH_DE_TKTDTLS_API
Source
1 Package Body PQH_DE_TKTDTLS_API as
2 /* $Header: pqtktapi.pkb 115.1 2002/12/05 00:30:14 rpasapul noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := 'PQH_DE_TKTDTLS_API.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |--------------------------< Insert_TKT_DTLS >--------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure Insert_TKT_DTLS
13 (p_validate in boolean default false
14 ,p_effective_date in date
15 ,p_TATIGKEIT_NUMBER In Varchar2 Default NULL
16 ,P_DESCRIPTION In Varchar2
17 ,P_TATIGKEIT_DETAIL_ID out nocopy Number
18 ,p_object_version_number out nocopy number) is
19 --
20 -- Declare cursors and local variables
21 --
22
23 l_proc varchar2(72) := g_package||'Insert_TKT_DTLS';
24 l_object_Version_Number PQH_DE_TATIGKEIT_DETAILS.OBJECT_VERSION_NUMBER%TYPE;
25 L_Effective_Date Date;
26 l_TATIGKEIT_DETAIL_ID PQH_DE_TATIGKEIT_DETAILS.TATIGKEIT_DETAIL_ID%TYPE;
27
28
29 begin
30 hr_utility.set_location('Entering:'|| l_proc, 10);
31 --
32 -- Issue a savepoint
33 --
34 savepoint Insert_TKT_DTLS;
35 --
36 -- Truncate the time portion from all IN date parameters
37 --
38 l_effective_date := Trunc(p_effective_Date);
39 --
40 -- Call Before Process User Hook
41 --
42
43
44
45 begin
46 PQH_DE_TKTDTLS_BK1.Insert_TKT_DTLS_b
47 (p_effective_date => L_Effective_Date
48 ,p_TATIGKEIT_NUMBER => p_TATIGKEIT_NUMBER
49 ,P_DESCRIPTION => P_DESCRIPTION );
50
51
52 exception
53 when hr_api.cannot_find_prog_unit then
54 hr_api.cannot_find_prog_unit_error
55 (p_module_name => 'CREATE_TATIGKEIT_DETAILS'
56 ,p_hook_type => 'BP'
57 );
58 end;
59 --
60 -- Validation in addition to Row Handlers
61 --
62 --
63 -- Process Logic
64 pqh_tkt_ins.ins
65 (p_effective_date => l_Effective_date
66 ,p_tatigkeit_number => P_tatigkeit_number
67 ,p_description => P_DESCRIPTION
68 ,p_tatigkeit_detail_id => l_tatigkeit_detail_id
69 ,p_object_version_number => l_OBJECT_VERSION_NUMBER
70 );
71
72 --
73 -- Call After Process User Hook
74 --
75 begin
76
77
78 PQH_DE_TKTDTLS_BK1.Insert_TKT_DTLS_a
79 (p_effective_date => L_Effective_Date
80 ,p_TATIGKEIT_NUMBER => p_TATIGKEIT_NUMBER
81 ,P_DESCRIPTION => P_DESCRIPTION
82 ,P_TATIGKEIT_DETAIL_ID => l_TATIGKEIT_DETAIL_ID
83 ,p_object_version_number => l_object_version_number);
84
85
86 exception
87 when hr_api.cannot_find_prog_unit then
88 hr_api.cannot_find_prog_unit_error
89 (p_module_name => 'CREATE_TATIGKEIT_DETAILS'
90 ,p_hook_type => 'AP'
91 );
92 end;
93 --
94 -- When in validation only mode raise the Validate_Enabled exception
95 --
96 if p_validate then
97 raise hr_api.validate_enabled;
98 end if;
99 --
100 -- Set all output arguments
101 --
102 P_TATIGKEIT_DETAIL_ID := l_TATIGKEIT_DETAIL_ID;
103 p_object_version_number := l_object_version_number;
104
105 --
106 hr_utility.set_location(' Leaving:'||l_proc, 70);
107 exception
108 when hr_api.validate_enabled then
109 --
110 -- As the Validate_Enabled exception has been raised
111 -- we must rollback to the savepoint
112 --
113 rollback to Insert_TKT_DTLS;
114 --
115 -- Only set output warning arguments
116 -- (Any key or derived arguments must be set to null
117 -- when validation only mode is being used.)
118 --
119 p_TATIGKEIT_DETAIL_ID := null;
120 p_object_version_number := null;
121 hr_utility.set_location(' Leaving:'||l_proc, 80);
122
123 when others then
124 p_TATIGKEIT_DETAIL_ID := null;
125 p_object_version_number := null;
126 --
127 -- A validation or unexpected error has occured
128 --
129 rollback to Insert_TKT_DTLS;
130 hr_utility.set_location(' Leaving:'||l_proc, 90);
131 raise;
132 end Insert_TKT_DTLS;
133
134 --
135 -- ----------------------------------------------------------------------------
136 -- |--------------------------< Update_TKT_DTLS >--------------------------|
137 -- ----------------------------------------------------------------------------
138
139 procedure Update_TKT_DTLS
140 (p_validate in boolean default false
141 ,p_effective_date in date
142 ,p_TATIGKEIT_NUMBER In Varchar2 Default hr_api.g_Varchar2
143 ,P_DESCRIPTION In Varchar2 Default hr_api.g_Varchar2
144 ,P_TATIGKEIT_DETAIL_ID In Number
145 ,p_object_version_number in out nocopy number) Is
146
147 l_proc varchar2(72) := g_package||'Update_TKT_DTLS';
148 l_object_Version_Number PQH_DE_TATIGKEIT_DETAILS.OBJECT_VERSION_NUMBER%TYPE := P_Object_version_Number;
149 L_Effective_Date Date;
150
151 Begin
152 hr_utility.set_location('Entering:'|| l_proc, 10);
153 --
154 -- Issue a savepoint
155 --
156 savepoint Update_TKT_DTLS;
157 --
158 -- Truncate the time portion from all IN date parameters
159 --
160 l_effective_date := Trunc(p_effective_Date);
161 --
162 -- Call Before Process User Hook
163 --
164 begin
165
166
167 PQH_DE_TKTDTLS_BK2.Update_TKT_DTLS_b
168 (p_effective_date => L_Effective_Date
169 ,p_TATIGKEIT_NUMBER => p_TATIGKEIT_NUMBER
170 ,P_DESCRIPTION => P_DESCRIPTION
171 ,P_TATIGKEIT_DETAIL_ID => p_TATIGKEIT_DETAIL_ID
172 ,p_object_version_number => l_object_version_number);
173
174
175 exception
176 when hr_api.cannot_find_prog_unit then
177 hr_api.cannot_find_prog_unit_error
178 (p_module_name => 'UPDATE_TATIGKEIT_DETAILS'
179 ,p_hook_type => 'BP'
180 );
181 end;
182
183 pqh_tkt_upd.upd
184 (p_effective_date => l_Effective_Date
185 ,p_tatigkeit_detail_id => p_TATIGKEIT_DETAIL_ID
186 ,p_object_version_number => l_object_version_number
187 ,p_tatigkeit_number => p_TATIGKEIT_NUMBER
188 ,p_description => P_DESCRIPTION ) ;
189
190 --
191 --
192 -- Call After Process User Hook
193 --
194 begin
195
196
197 PQH_DE_TKTDTLS_BK2.Update_TKT_DTLS_a
198 (p_effective_date => L_Effective_Date
199 ,p_TATIGKEIT_NUMBER => p_TATIGKEIT_NUMBER
200 ,P_DESCRIPTION => P_DESCRIPTION
201 ,P_TATIGKEIT_DETAIL_ID => p_TATIGKEIT_DETAIL_ID
202 ,p_object_version_number => l_object_version_number);
203
204 exception
205 when hr_api.cannot_find_prog_unit then
206 hr_api.cannot_find_prog_unit_error
207 (p_module_name => 'UPDATE_TATIGKEIT_DETAILS'
208 ,p_hook_type => 'AP'
209 );
210 end;
211 --
212 -- When in validation only mode raise the Validate_Enabled exception
213 --
214 if p_validate then
215 raise hr_api.validate_enabled;
216 end if;
217 --
218 -- Set all output arguments
219 --
220
221 p_object_version_number := l_object_version_number;
222
223 --
224 hr_utility.set_location(' Leaving:'||l_proc, 70);
225 exception
226 when hr_api.validate_enabled then
227 --
228 -- As the Validate_Enabled exception has been raised
229 -- we must rollback to the savepoint
230 --
231 rollback to Update_TKT_DTLS;
232 --
233 -- Only set output warning arguments
234 -- (Any key or derived arguments must be set to null
235 -- when validation only mode is being used.)
236 --
237 hr_utility.set_location(' Leaving:'||l_proc, 80);
238
239 when others then
240 p_object_version_number := l_object_version_number;
241 --
242 -- A validation or unexpected error has occured
243 --
244 rollback to Update_TKT_DTLS;
245 hr_utility.set_location(' Leaving:'||l_proc, 90);
246 raise;
247 end Update_TKT_DTLS;
248
249 --
250 -- ----------------------------------------------------------------------------
251 -- |-------------------< delete_TKT_DTLS>-----------------------------------|
252 -- ----------------------------------------------------------------------------
253 procedure delete_TKT_DTLS
254 (p_validate in boolean default false
255 ,p_TATIGKEIT_DETAIL_ID In Number
256 ,p_object_version_number In number) Is --
257
258 -- Declare cursors and local variables
259 --
260 l_proc varchar2(72) := g_package||'delete_TKT_DTLS';
261 --
262 begin
263 hr_utility.set_location('Entering:'|| l_proc, 10);
264 --
265 -- Issue a savepoint
266 --
267 savepoint delete_TKT_DTLS;
268 --
269 -- Call Before Process User Hook
270 --
271 begin
272 PQH_DE_TKTDTLS_BK3.Delete_TKT_DTLS_b
273 (p_TATIGKEIT_DETAIL_Id => p_TATIGKEIT_DETAIL_Id
274 ,p_object_version_number => p_object_version_number);
275 exception
276 when hr_api.cannot_find_prog_unit then
277 hr_api.cannot_find_prog_unit_error
278 (p_module_name => 'DELETE_TATIGKEIT_DETAILS'
279 ,p_hook_type => 'BP');
280 end;
281 --
282 -- Process Logic
283 --
284 pqh_tkt_del.del
285 (p_tatigkeit_detail_id => p_TATIGKEIT_DETAIL_Id
286 ,p_object_version_number => p_object_version_number
287 );
288 --
289 -- Call After Process User Hook
290 --
291 begin
292
293 PQH_DE_TKTDTLS_BK3.Delete_TKT_DTLS_a
294 (p_TATIGKEIT_DETAIL_Id => p_TATIGKEIT_DETAIL_Id
295 ,p_object_version_number => p_object_version_number);
296
297 exception
298 when hr_api.cannot_find_prog_unit then
299 hr_api.cannot_find_prog_unit_error
300 (p_module_name => 'DELETE_TATIGKEIT_DETAILS'
301 ,p_hook_type => 'AP');
302 end;
303 --
304 -- When in validation only mode raise the Validate_Enabled exception
305 --
306 if p_validate then
307 raise hr_api.validate_enabled;
308 end if;
309 --
310 -- Set all output arguments
311 --
312 hr_utility.set_location(' Leaving:'||l_proc, 70);
313 exception
314 when hr_api.validate_enabled then
315 --
316 -- As the Validate_Enabled exception has been raised
317 -- we must rollback to the savepoint
318 --
319 rollback to delete_TKT_DTLS;
320 --
321 -- Only set output warning arguments
322 -- (Any key or derived arguments must be set to null
323 -- when validation only mode is being used.)
324 --
325 hr_utility.set_location(' Leaving:'||l_proc, 80);
326 when others then
327 --
328 -- A validation or unexpected error has occured
329 --
330 rollback to delete_TKT_DTLS;
331 hr_utility.set_location(' Leaving:'||l_proc, 90);
332 raise;
333 end delete_TKT_DTLS;
334
335 end PQH_DE_TKTDTLS_API;