[Home] [Help]
PACKAGE BODY: APPS.OZF_CLAIMS_INT_PUB
Source
1 PACKAGE BODY OZF_Claims_Int_PUB as
2 /* $Header: ozfpcinb.pls 120.0.12010000.2 2008/07/31 11:26:14 kpatro ship $ */
3 -- ===============================================================
4 -- Start of Comments
5 -- Package name
6 -- OZF_Claims_Int_PUB
7 -- Purpose
8 --
9 -- History
10 --
11 -- NOTE
12 --
13 -- 29-Jul-2008 KPATRO Fix for bug 7290916
14 -- End of Comments
15 -- ===============================================================
16
17
18 G_PKG_NAME CONSTANT VARCHAR2(30):= 'OZF_Claims_Int_PUB';
19 G_FILE_NAME CONSTANT VARCHAR2(12) := 'ozfpcinb.pls';
20
21 G_DEBUG BOOLEAN := FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_debug_high);
22
23 PROCEDURE Create_Claims_Int(
24 p_api_version_number IN NUMBER,
25 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
26 p_commit IN VARCHAR2 := FND_API.G_FALSE,
27
28 x_return_status OUT NOCOPY VARCHAR2,
29 x_msg_count OUT NOCOPY NUMBER,
30 x_msg_data OUT NOCOPY VARCHAR2,
31
32 p_claims_int_rec IN claims_int_rec_type := g_miss_claims_int_rec,
33 x_interface_claim_id OUT NOCOPY NUMBER
34 )
35
36 IS
37 L_API_NAME CONSTANT VARCHAR2(30) := 'Create_Claims_Int';
38 L_API_VERSION_NUMBER CONSTANT NUMBER := 1.0;
39 l_pvt_claims_int_rec OZF_Claims_Int_PVT.claims_int_rec_type;
40
41 --Added for 7290916
42 l_claims_int_rec claims_int_rec_type:= p_claims_int_rec;
43
44 BEGIN
45 -- Standard Start of API savepoint
46 SAVEPOINT CREATE_Claims_Int_PUB;
47
48 -- Standard call to check for call compatibility.
49 IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
50 p_api_version_number,
51 l_api_name,
52 G_PKG_NAME)
53 THEN
54 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
55 END IF;
56
57 -- Initialize message list if p_init_msg_list is set to TRUE.
58 IF FND_API.to_Boolean( p_init_msg_list )
59 THEN
60 FND_MSG_PUB.initialize;
61 END IF;
62
63 -- Debug Message
64 IF g_debug THEN
65 OZF_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
66 END IF;
67
68
69 -- Initialize API return status to SUCCESS
70 x_return_status := FND_API.G_RET_STS_SUCCESS;
71
72 --Added For 7290916
73 l_pvt_claims_int_rec.interface_claim_id := l_claims_int_rec.interface_claim_id;
74 l_pvt_claims_int_rec.object_version_number := l_claims_int_rec.object_version_number;
75 l_pvt_claims_int_rec.last_update_date := l_claims_int_rec.last_update_date;
76 l_pvt_claims_int_rec.last_updated_by := l_claims_int_rec.last_updated_by;
77 l_pvt_claims_int_rec.creation_date := l_claims_int_rec.creation_date;
78 l_pvt_claims_int_rec.created_by := l_claims_int_rec.created_by;
79 l_pvt_claims_int_rec.last_update_login := l_claims_int_rec.last_update_login;
80 l_pvt_claims_int_rec.request_id := l_claims_int_rec.request_id;
81 l_pvt_claims_int_rec.program_application_id := l_claims_int_rec.program_application_id;
82 l_pvt_claims_int_rec.program_update_date := l_claims_int_rec.program_update_date;
83 l_pvt_claims_int_rec.program_id := l_claims_int_rec.program_id;
84 l_pvt_claims_int_rec.created_from := l_claims_int_rec.created_from;
85 l_pvt_claims_int_rec.batch_id := l_claims_int_rec.batch_id;
86 l_pvt_claims_int_rec.claim_id := l_claims_int_rec.claim_id;
87 l_pvt_claims_int_rec.claim_number := l_claims_int_rec.claim_number;
88 l_pvt_claims_int_rec.claim_type_id := l_claims_int_rec.claim_type_id;
89 l_pvt_claims_int_rec.claim_class := l_claims_int_rec.claim_class;
90 l_pvt_claims_int_rec.claim_date := l_claims_int_rec.claim_date;
91 l_pvt_claims_int_rec.due_date := l_claims_int_rec.due_date;
92 l_pvt_claims_int_rec.owner_id := l_claims_int_rec.owner_id;
93 l_pvt_claims_int_rec.history_event := l_claims_int_rec.history_event;
94 l_pvt_claims_int_rec.history_event_date := l_claims_int_rec.history_event_date;
95 l_pvt_claims_int_rec.history_event_description := l_claims_int_rec.history_event_description;
96 l_pvt_claims_int_rec.split_from_claim_id := l_claims_int_rec.split_from_claim_id;
97 l_pvt_claims_int_rec.duplicate_claim_id := l_claims_int_rec.duplicate_claim_id;
98 l_pvt_claims_int_rec.split_date := l_claims_int_rec.split_date;
99 l_pvt_claims_int_rec.root_claim_id := l_claims_int_rec.root_claim_id;
100 l_pvt_claims_int_rec.amount := l_claims_int_rec.amount;
101 l_pvt_claims_int_rec.amount_adjusted := l_claims_int_rec.amount_adjusted;
102 l_pvt_claims_int_rec.amount_remaining := l_claims_int_rec.amount_remaining;
103 l_pvt_claims_int_rec.amount_settled := l_claims_int_rec.amount_settled;
104 l_pvt_claims_int_rec.acctd_amount := l_claims_int_rec.acctd_amount;
105 l_pvt_claims_int_rec.acctd_amount_remaining := l_claims_int_rec.acctd_amount_remaining;
106 l_pvt_claims_int_rec.tax_amount := l_claims_int_rec.tax_amount;
107 l_pvt_claims_int_rec.tax_code := l_claims_int_rec.tax_code;
108 l_pvt_claims_int_rec.tax_calculation_flag := l_claims_int_rec.tax_calculation_flag;
109 l_pvt_claims_int_rec.currency_code := l_claims_int_rec.currency_code;
110 l_pvt_claims_int_rec.exchange_rate_type := l_claims_int_rec.exchange_rate_type;
111 l_pvt_claims_int_rec.exchange_rate_date := l_claims_int_rec.exchange_rate_date;
112 l_pvt_claims_int_rec.exchange_rate := l_claims_int_rec.exchange_rate;
113 l_pvt_claims_int_rec.set_of_books_id := l_claims_int_rec.set_of_books_id;
114 l_pvt_claims_int_rec.original_claim_date := l_claims_int_rec.original_claim_date;
115 l_pvt_claims_int_rec.source_object_id := l_claims_int_rec.source_object_id;
116 l_pvt_claims_int_rec.source_object_class := l_claims_int_rec.source_object_class;
117 l_pvt_claims_int_rec.source_object_type_id := l_claims_int_rec.source_object_type_id;
118 l_pvt_claims_int_rec.source_object_number := l_claims_int_rec.source_object_number;
119 l_pvt_claims_int_rec.cust_account_id := l_claims_int_rec.cust_account_id;
120 l_pvt_claims_int_rec.cust_billto_acct_site_id := l_claims_int_rec.cust_billto_acct_site_id;
121 l_pvt_claims_int_rec.cust_shipto_acct_site_id := l_claims_int_rec.cust_shipto_acct_site_id;
122 l_pvt_claims_int_rec.location_id := l_claims_int_rec.location_id;
123 l_pvt_claims_int_rec.pay_related_account_flag := l_claims_int_rec.pay_related_account_flag;
124 l_pvt_claims_int_rec.related_cust_account_id := l_claims_int_rec.related_cust_account_id;
125 l_pvt_claims_int_rec.related_site_use_id := l_claims_int_rec.related_site_use_id;
126 l_pvt_claims_int_rec.relationship_type := l_claims_int_rec.relationship_type;
127 l_pvt_claims_int_rec.vendor_id := l_claims_int_rec.vendor_id;
128 l_pvt_claims_int_rec.vendor_site_id := l_claims_int_rec.vendor_site_id;
129 l_pvt_claims_int_rec.reason_type := l_claims_int_rec.reason_type;
130 l_pvt_claims_int_rec.reason_code_id := l_claims_int_rec.reason_code_id;
131 l_pvt_claims_int_rec.task_template_group_id := l_claims_int_rec.task_template_group_id;
132 l_pvt_claims_int_rec.status_code := l_claims_int_rec.status_code;
133 l_pvt_claims_int_rec.user_status_id := l_claims_int_rec.user_status_id;
134 l_pvt_claims_int_rec.sales_rep_id := l_claims_int_rec.sales_rep_id;
135 l_pvt_claims_int_rec.collector_id := l_claims_int_rec.collector_id;
136 l_pvt_claims_int_rec.contact_id := l_claims_int_rec.contact_id;
137 l_pvt_claims_int_rec.broker_id := l_claims_int_rec.broker_id;
138 l_pvt_claims_int_rec.territory_id := l_claims_int_rec.territory_id;
139 l_pvt_claims_int_rec.customer_ref_date := l_claims_int_rec.customer_ref_date;
140 l_pvt_claims_int_rec.customer_ref_number := l_claims_int_rec.customer_ref_number;
141 l_pvt_claims_int_rec.assigned_to := l_claims_int_rec.assigned_to;
142 l_pvt_claims_int_rec.receipt_id := l_claims_int_rec.receipt_id;
143 l_pvt_claims_int_rec.receipt_number := l_claims_int_rec.receipt_number;
144 l_pvt_claims_int_rec.doc_sequence_id := l_claims_int_rec.doc_sequence_id;
145 l_pvt_claims_int_rec.doc_sequence_value := l_claims_int_rec.doc_sequence_value;
146 l_pvt_claims_int_rec.gl_date := l_claims_int_rec.gl_date;
147 l_pvt_claims_int_rec.payment_method := l_claims_int_rec.payment_method;
148 l_pvt_claims_int_rec.voucher_id := l_claims_int_rec.voucher_id;
149 l_pvt_claims_int_rec.voucher_number := l_claims_int_rec.voucher_number;
150 l_pvt_claims_int_rec.payment_reference_id := l_claims_int_rec.payment_reference_id;
151 l_pvt_claims_int_rec.payment_reference_number := l_claims_int_rec.payment_reference_number;
152 l_pvt_claims_int_rec.payment_reference_date := l_claims_int_rec.payment_reference_date;
153 l_pvt_claims_int_rec.payment_status := l_claims_int_rec.payment_status;
154 l_pvt_claims_int_rec.approved_flag := l_claims_int_rec.approved_flag;
155 l_pvt_claims_int_rec.approved_date := l_claims_int_rec.approved_date;
156 l_pvt_claims_int_rec.approved_by := l_claims_int_rec.approved_by;
157 l_pvt_claims_int_rec.settled_date := l_claims_int_rec.settled_date;
158 l_pvt_claims_int_rec.settled_by := l_claims_int_rec.settled_by;
159 l_pvt_claims_int_rec.effective_date := l_claims_int_rec.effective_date;
160 l_pvt_claims_int_rec.custom_setup_id := l_claims_int_rec.custom_setup_id;
161 l_pvt_claims_int_rec.task_id := l_claims_int_rec.task_id;
162 l_pvt_claims_int_rec.country_id := l_claims_int_rec.country_id;
163 l_pvt_claims_int_rec.comments := l_claims_int_rec.comments;
164 l_pvt_claims_int_rec.attribute_category := l_claims_int_rec.attribute_category;
165 l_pvt_claims_int_rec.attribute1 := l_claims_int_rec.attribute1;
166 l_pvt_claims_int_rec.attribute2 := l_claims_int_rec.attribute2;
167 l_pvt_claims_int_rec.attribute3 := l_claims_int_rec.attribute3;
168 l_pvt_claims_int_rec.attribute4 := l_claims_int_rec.attribute4;
169 l_pvt_claims_int_rec.attribute5 := l_claims_int_rec.attribute5;
170 l_pvt_claims_int_rec.attribute6 := l_claims_int_rec.attribute6;
171 l_pvt_claims_int_rec.attribute7 := l_claims_int_rec.attribute7;
172 l_pvt_claims_int_rec.attribute8 := l_claims_int_rec.attribute8;
173 l_pvt_claims_int_rec.attribute9 := l_claims_int_rec.attribute9;
174 l_pvt_claims_int_rec.attribute10 := l_claims_int_rec.attribute10;
175 l_pvt_claims_int_rec.attribute11 := l_claims_int_rec.attribute11;
176 l_pvt_claims_int_rec.attribute12 := l_claims_int_rec.attribute12;
177 l_pvt_claims_int_rec.attribute13 := l_claims_int_rec.attribute13;
178 l_pvt_claims_int_rec.attribute14 := l_claims_int_rec.attribute14;
179 l_pvt_claims_int_rec.attribute15 := l_claims_int_rec.attribute15;
180 l_pvt_claims_int_rec.deduction_attribute_category := l_claims_int_rec.deduction_attribute_category;
181 l_pvt_claims_int_rec.deduction_attribute1 := l_claims_int_rec.deduction_attribute1;
182 l_pvt_claims_int_rec.deduction_attribute2 := l_claims_int_rec.deduction_attribute2;
183 l_pvt_claims_int_rec.deduction_attribute3 := l_claims_int_rec.deduction_attribute3;
184 l_pvt_claims_int_rec.deduction_attribute4 := l_claims_int_rec.deduction_attribute4;
185 l_pvt_claims_int_rec.deduction_attribute5 := l_claims_int_rec.deduction_attribute5;
186 l_pvt_claims_int_rec.deduction_attribute6 := l_claims_int_rec.deduction_attribute6;
187 l_pvt_claims_int_rec.deduction_attribute7 := l_claims_int_rec.deduction_attribute7;
188 l_pvt_claims_int_rec.deduction_attribute8 := l_claims_int_rec.deduction_attribute8;
189 l_pvt_claims_int_rec.deduction_attribute9 := l_claims_int_rec.deduction_attribute9;
190 l_pvt_claims_int_rec.deduction_attribute10 := l_claims_int_rec.deduction_attribute10;
191 l_pvt_claims_int_rec.deduction_attribute11 := l_claims_int_rec.deduction_attribute11;
192 l_pvt_claims_int_rec.deduction_attribute12 := l_claims_int_rec.deduction_attribute12;
193 l_pvt_claims_int_rec.deduction_attribute13 := l_claims_int_rec.deduction_attribute13;
194 l_pvt_claims_int_rec.deduction_attribute14 := l_claims_int_rec.deduction_attribute14;
195 l_pvt_claims_int_rec.deduction_attribute15 := l_claims_int_rec.deduction_attribute15;
196 l_pvt_claims_int_rec.org_id := l_claims_int_rec.org_id;
197 --
198 -- API body
199 --
200 -- Calling Private package: Create_Claims_Int
201 -- Hint: Primary key needs to be returned
202 OZF_Claims_Int_PVT.Create_Claims_Int(
203 p_api_version_number => 1.0,
204 p_init_msg_list => FND_API.G_FALSE,
205 p_commit => FND_API.G_FALSE,
206 p_validation_level => FND_API.G_VALID_LEVEL_FULL,
207 x_return_status => x_return_status,
208 x_msg_count => x_msg_count,
209 x_msg_data => x_msg_data,
210 p_claims_int_rec => l_pvt_claims_int_rec,
211 x_interface_claim_id => x_interface_claim_id);
212
213
214 -- Check return status from the above procedure call
215 IF x_return_status = FND_API.G_RET_STS_ERROR then
216 RAISE FND_API.G_EXC_ERROR;
217 elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
218 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
219 END IF;
220 --
221 -- End of API body.
222 --
223
224 -- Standard check for p_commit
225 IF FND_API.to_Boolean( p_commit )
226 THEN
227 COMMIT WORK;
228 END IF;
229
230
231 -- Debug Message
232 IF g_debug THEN
233 OZF_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'end');
234 END IF;
235
236 -- Standard call to get message count and if count is 1, get message info.
237 FND_MSG_PUB.Count_And_Get
238 (p_count => x_msg_count,
239 p_data => x_msg_data
240 );
241 EXCEPTION
242
243 WHEN OZF_Utility_PVT.resource_locked THEN
244 x_return_status := FND_API.g_ret_sts_error;
245 OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_API_RESOURCE_LOCKED');
246
247 WHEN FND_API.G_EXC_ERROR THEN
248 ROLLBACK TO CREATE_Claims_Int_PUB;
249 x_return_status := FND_API.G_RET_STS_ERROR;
250 -- Standard call to get message count and if count=1, get the message
251 FND_MSG_PUB.Count_And_Get (
252 p_encoded => FND_API.G_FALSE,
253 p_count => x_msg_count,
254 p_data => x_msg_data
255 );
256
257 WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
258 ROLLBACK TO CREATE_Claims_Int_PUB;
259 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
260 -- Standard call to get message count and if count=1, get the message
261 FND_MSG_PUB.Count_And_Get (
262 p_encoded => FND_API.G_FALSE,
263 p_count => x_msg_count,
264 p_data => x_msg_data
265 );
266
267 WHEN OTHERS THEN
268 ROLLBACK TO CREATE_Claims_Int_PUB;
269 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
270 IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
271 THEN
272 FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
273 END IF;
274 -- Standard call to get message count and if count=1, get the message
278 p_data => x_msg_data
275 FND_MSG_PUB.Count_And_Get (
276 p_encoded => FND_API.G_FALSE,
277 p_count => x_msg_count,
279 );
280 End Create_Claims_Int;
281
282
283 PROCEDURE Update_Claims_Int(
284 p_api_version_number IN NUMBER,
285 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
286 p_commit IN VARCHAR2 := FND_API.G_FALSE,
287
288 x_return_status OUT NOCOPY VARCHAR2,
289 x_msg_count OUT NOCOPY NUMBER,
290 x_msg_data OUT NOCOPY VARCHAR2,
291
292 p_claims_int_rec IN claims_int_rec_type,
293 x_object_version_number OUT NOCOPY NUMBER
294 )
295
296 IS
297 L_API_NAME CONSTANT VARCHAR2(30) := 'Update_Claims_Int';
298 L_API_VERSION_NUMBER CONSTANT NUMBER := 1.0;
299 l_object_version_number NUMBER;
300 l_pvt_claims_int_rec OZF_Claims_Int_PVT.claims_int_rec_type;
301 BEGIN
302 -- Standard Start of API savepoint
303 SAVEPOINT UPDATE_Claims_Int_PUB;
304
305 -- Standard call to check for call compatibility.
306 IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
307 p_api_version_number,
308 l_api_name,
309 G_PKG_NAME)
310 THEN
311 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
312 END IF;
313
314 -- Initialize message list if p_init_msg_list is set to TRUE.
315 IF FND_API.to_Boolean( p_init_msg_list )
316 THEN
317 FND_MSG_PUB.initialize;
318 END IF;
319
320 -- Debug Message
321 IF g_debug THEN
322 OZF_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
323 END IF;
324
325
326 -- Initialize API return status to SUCCESS
327 x_return_status := FND_API.G_RET_STS_SUCCESS;
328
329 --
330 -- API body
331 --
332 OZF_Claims_Int_PVT.Update_Claims_Int(
333 p_api_version_number => 1.0,
334 p_init_msg_list => FND_API.G_FALSE,
335 p_commit => p_commit,
336 p_validation_level => FND_API.G_VALID_LEVEL_FULL,
337 x_return_status => x_return_status,
338 x_msg_count => x_msg_count,
339 x_msg_data => x_msg_data,
340 p_claims_int_rec => l_pvt_claims_int_rec,
341 x_object_version_number => l_object_version_number );
342
343
344 -- Check return status from the above procedure call
345 IF x_return_status = FND_API.G_RET_STS_ERROR then
346 RAISE FND_API.G_EXC_ERROR;
347 elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
348 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
349 END IF;
350 --
351 -- End of API body
352 --
353
354 -- Standard check for p_commit
355 IF FND_API.to_Boolean( p_commit )
356 THEN
357 COMMIT WORK;
358 END IF;
359
360
361 -- Debug Message
362 IF g_debug THEN
363 OZF_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'end');
364 END IF;
365
366 -- Standard call to get message count and if count is 1, get message info.
367 FND_MSG_PUB.Count_And_Get
368 (p_count => x_msg_count,
369 p_data => x_msg_data
370 );
371 EXCEPTION
372
373 WHEN OZF_Utility_PVT.resource_locked THEN
374 x_return_status := FND_API.g_ret_sts_error;
375 OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_API_RESOURCE_LOCKED');
376
377 WHEN FND_API.G_EXC_ERROR THEN
378 ROLLBACK TO UPDATE_Claims_Int_PUB;
379 x_return_status := FND_API.G_RET_STS_ERROR;
380 -- Standard call to get message count and if count=1, get the message
381 FND_MSG_PUB.Count_And_Get (
382 p_encoded => FND_API.G_FALSE,
383 p_count => x_msg_count,
384 p_data => x_msg_data
385 );
386
387 WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
388 ROLLBACK TO UPDATE_Claims_Int_PUB;
389 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
390 -- Standard call to get message count and if count=1, get the message
391 FND_MSG_PUB.Count_And_Get (
392 p_encoded => FND_API.G_FALSE,
393 p_count => x_msg_count,
394 p_data => x_msg_data
395 );
396
397 WHEN OTHERS THEN
398 ROLLBACK TO UPDATE_Claims_Int_PUB;
399 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
400 IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
401 THEN
402 FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
403 END IF;
404 -- Standard call to get message count and if count=1, get the message
405 FND_MSG_PUB.Count_And_Get (
406 p_encoded => FND_API.G_FALSE,
407 p_count => x_msg_count,
408 p_data => x_msg_data
409 );
410 End Update_Claims_Int;
411
412
413 PROCEDURE Delete_Claims_Int(
414 p_api_version_number IN NUMBER,
415 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
416 p_commit IN VARCHAR2 := FND_API.G_FALSE,
417 x_return_status OUT NOCOPY VARCHAR2,
418 x_msg_count OUT NOCOPY NUMBER,
419 x_msg_data OUT NOCOPY VARCHAR2,
420 p_interface_claim_id IN NUMBER,
421 p_object_version_number IN NUMBER
422 )
423
424 IS
428 l_object_version_number NUMBER := p_object_version_number;
425 L_API_NAME CONSTANT VARCHAR2(30) := 'Delete_Claims_Int';
426 L_API_VERSION_NUMBER CONSTANT NUMBER := 1.0;
427 l_INTERFACE_CLAIM_ID NUMBER := p_INTERFACE_CLAIM_ID;
429 l_pvt_claims_int_rec OZF_Claims_Int_PVT.claims_int_rec_type;
430 BEGIN
431 -- Standard Start of API savepoint
432 SAVEPOINT DELETE_Claims_Int_PUB;
433
434 -- Standard call to check for call compatibility.
435 IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
436 p_api_version_number,
437 l_api_name,
438 G_PKG_NAME)
439 THEN
440 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
441 END IF;
442
443 -- Initialize message list if p_init_msg_list is set to TRUE.
444 IF FND_API.to_Boolean( p_init_msg_list )
445 THEN
446 FND_MSG_PUB.initialize;
447 END IF;
448
449 -- Debug Message
450 IF g_debug THEN
451 OZF_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
452 END IF;
453
454
455 -- Initialize API return status to SUCCESS
456 x_return_status := FND_API.G_RET_STS_SUCCESS;
457
458 --
459 -- API body
460 --
461 OZF_Claims_Int_PVT.Delete_Claims_Int(
462 p_api_version_number => 1.0,
463 p_init_msg_list => FND_API.G_FALSE,
464 p_commit => p_commit,
465 p_validation_level => FND_API.G_VALID_LEVEL_FULL,
466 x_return_status => x_return_status,
467 x_msg_count => x_msg_count,
468 x_msg_data => x_msg_data,
469 p_interface_claim_id => l_interface_claim_id,
470 p_object_version_number => l_object_version_number );
471
472
473 -- Check return status from the above procedure call
474 IF x_return_status = FND_API.G_RET_STS_ERROR then
475 RAISE FND_API.G_EXC_ERROR;
476 elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
477 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
478 END IF;
479 --
480 -- End of API body
481 --
482
483 -- Standard check for p_commit
484 IF FND_API.to_Boolean( p_commit )
485 THEN
486 COMMIT WORK;
487 END IF;
488
489
490 -- Debug Message
491 IF g_debug THEN
492 OZF_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'end');
493 END IF;
494
495 -- Standard call to get message count and if count is 1, get message info.
496 FND_MSG_PUB.Count_And_Get
497 (p_count => x_msg_count,
498 p_data => x_msg_data
499 );
500 EXCEPTION
501
502 WHEN OZF_Utility_PVT.resource_locked THEN
503 x_return_status := FND_API.g_ret_sts_error;
504 OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_API_RESOURCE_LOCKED');
505
506 WHEN FND_API.G_EXC_ERROR THEN
507 ROLLBACK TO DELETE_Claims_Int_PUB;
508 x_return_status := FND_API.G_RET_STS_ERROR;
509 -- Standard call to get message count and if count=1, get the message
510 FND_MSG_PUB.Count_And_Get (
511 p_encoded => FND_API.G_FALSE,
512 p_count => x_msg_count,
513 p_data => x_msg_data
514 );
515
516 WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
517 ROLLBACK TO DELETE_Claims_Int_PUB;
518 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
519 -- Standard call to get message count and if count=1, get the message
520 FND_MSG_PUB.Count_And_Get (
521 p_encoded => FND_API.G_FALSE,
522 p_count => x_msg_count,
523 p_data => x_msg_data
524 );
525
526 WHEN OTHERS THEN
527 ROLLBACK TO DELETE_Claims_Int_PUB;
528 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
529 IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
530 THEN
531 FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
532 END IF;
533 -- Standard call to get message count and if count=1, get the message
534 FND_MSG_PUB.Count_And_Get (
535 p_encoded => FND_API.G_FALSE,
536 p_count => x_msg_count,
537 p_data => x_msg_data
538 );
539 End Delete_Claims_Int;
540
541
542 PROCEDURE Lock_Claims_Int(
543 p_api_version_number IN NUMBER,
544 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
545 x_return_status OUT NOCOPY VARCHAR2,
546 x_msg_count OUT NOCOPY NUMBER,
547 x_msg_data OUT NOCOPY VARCHAR2,
548
549 p_interface_claim_id IN NUMBER,
550 p_object_version IN NUMBER
551 )
552
553 IS
554 L_API_NAME CONSTANT VARCHAR2(30) := 'Lock_Claims_Int';
555 L_API_VERSION_NUMBER CONSTANT NUMBER := 1.0;
556 l_pvt_claims_int_rec OZF_Claims_Int_PVT.claims_int_rec_type;
557 BEGIN
558
559 -- Standard call to check for call compatibility.
560 IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
561 p_api_version_number,
562 l_api_name,
563 G_PKG_NAME)
564 THEN
565 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
566 END IF;
567
568 -- Initialize message list if p_init_msg_list is set to TRUE.
569 IF FND_API.to_Boolean( p_init_msg_list )
570 THEN
574 -- Debug Message
571 FND_MSG_PUB.initialize;
572 END IF;
573
575 IF g_debug THEN
576 OZF_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'start');
577 END IF;
578
579
580 -- Initialize API return status to SUCCESS
581 x_return_status := FND_API.G_RET_STS_SUCCESS;
582
583 --
584 -- API body
585 --
586 -- Calling Private package: Create_Claims_Int
587 -- Hint: Primary key needs to be returned
588 OZF_Claims_Int_PVT.Lock_Claims_Int(
589 p_api_version_number => 1.0,
590 p_init_msg_list => FND_API.G_FALSE,
591 x_return_status => x_return_status,
592 x_msg_count => x_msg_count,
593 x_msg_data => x_msg_data,
594 p_interface_claim_id => p_interface_claim_id,
595 p_object_version => p_object_version);
596
597
598 -- Check return status from the above procedure call
599 IF x_return_status = FND_API.G_RET_STS_ERROR then
600 RAISE FND_API.G_EXC_ERROR;
601 elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
602 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
603 END IF;
604 --
605 -- End of API body.
606 --
607
608 -- Debug Message
609 IF g_debug THEN
610 OZF_UTILITY_PVT.debug_message('Public API: ' || l_api_name || 'end');
611 END IF;
612
613 EXCEPTION
614
615 WHEN OZF_Utility_PVT.resource_locked THEN
616 x_return_status := FND_API.g_ret_sts_error;
617 OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_API_RESOURCE_LOCKED');
618
619 WHEN FND_API.G_EXC_ERROR THEN
620 ROLLBACK TO LOCK_Claims_Int_PUB;
621 x_return_status := FND_API.G_RET_STS_ERROR;
622 -- Standard call to get message count and if count=1, get the message
623 FND_MSG_PUB.Count_And_Get (
624 p_encoded => FND_API.G_FALSE,
625 p_count => x_msg_count,
626 p_data => x_msg_data
627 );
628
629 WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
630 ROLLBACK TO LOCK_Claims_Int_PUB;
631 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
632 -- Standard call to get message count and if count=1, get the message
633 FND_MSG_PUB.Count_And_Get (
634 p_encoded => FND_API.G_FALSE,
635 p_count => x_msg_count,
636 p_data => x_msg_data
637 );
638
639 WHEN OTHERS THEN
640 ROLLBACK TO LOCK_Claims_Int_PUB;
641 x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
642 IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
643 THEN
644 FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
645 END IF;
646 -- Standard call to get message count and if count=1, get the message
647 FND_MSG_PUB.Count_And_Get (
648 p_encoded => FND_API.G_FALSE,
649 p_count => x_msg_count,
650 p_data => x_msg_data
651 );
652 End Lock_Claims_Int;
653
654
655 END OZF_Claims_Int_PUB;