[Home] [Help]
PACKAGE: APPS.OZF_CLAIMS_HISTORY_PVT
Source
1 PACKAGE OZF_claims_history_PVT AUTHID CURRENT_USER as
2 /* $Header: ozfvchis.pls 115.5 2003/11/18 10:31:08 upoluri ship $ */
3 -- Start of Comments
4 -- Package name : OZF_claims_history_PVT
5 -- Purpose :
6 -- History :
7 -- NOTE :
8 -- End of Comments
9
10
11 -- Default number of records fetch per call
12 -- Default number of records fetch per call
13 G_DEFAULT_NUM_REC_FETCH NUMBER := 30;
14 --===================================================================
15 -- Start of Comments
16 -- -------------------------------------------------------
17 -- Record name
18 -- claims_history_rec_type
19 -- -------------------------------------------------------
20 -- Parameters:
21 -- claim_history_id
22 -- object_version_number
23 -- last_update_date
24 -- last_updated_by
25 -- creation_date
26 -- created_by
27 -- last_update_login
28 -- request_id
29 -- program_application_id
30 -- program_update_date
31 -- program_id
32 -- created_from
33 -- batch_id
34 -- claim_id
35 -- claim_number
36 -- claim_type_id
37 -- claim_class
38 -- claim_date
39 -- due_date
40 -- owner_id
41 -- history_event
42 -- history_event_date
43 -- history_event_description
44 -- split_from_claim_id
45 -- duplicate_claim_id
46 -- split_date
47 -- root_claim_id
48 -- amount
49 -- amount_adjusted
50 -- amount_remaining
51 -- amount_settled
52 -- acctd_amount
53 -- acctd_amount_remaining
54 -- acctd_amount_adjusted
55 -- acctd_amount_settled
56 -- tax_amount
57 -- tax_code
58 -- tax_calculation_flag
59 -- currency_code
60 -- exchange_rate_type
61 -- exchange_rate_date
62 -- exchange_rate
63 -- set_of_books_id
64 -- original_claim_date
65 -- source_object_id
66 -- source_object_class
67 -- source_object_type_id
68 -- source_object_number
69 -- cust_account_id
70 -- cust_billto_acct_site_id
71 -- cust_shipto_acct_site_id
72 -- location_id
73 -- pay_related_account_flag
74 -- related_cust_account_id
75 -- related_site_use_id
76 -- relationship_type
77 -- vendor_id
78 -- vendor_site_id
79 -- reason_type
80 -- reason_code_id
81 -- task_template_group_id
82 -- status_code
83 -- user_status_id
84 -- sales_rep_id
85 -- collector_id
86 -- contact_id
87 -- broker_id
88 -- territory_id
89 -- customer_ref_date
90 -- customer_ref_number
91 -- assigned_to
92 -- receipt_id
93 -- receipt_number
94 -- doc_sequence_id
95 -- doc_sequence_value
96 -- gl_date
97 -- payment_method
98 -- voucher_id
99 -- voucher_number
100 -- payment_reference_id
101 -- payment_reference_number
102 -- payment_reference_date
103 -- payment_status
104 -- approved_flag
105 -- approved_date
106 -- approved_by
107 -- settled_date
108 -- settled_by
109 -- effective_date
110 -- custom_setup_id
111 -- task_id
112 -- country_id
113 -- order_type_id
114 -- comments
115 -- letter_id
116 -- letter_date
117 -- task_source_object_id
118 -- task_source_object_type_code
119 -- attribute_category
120 -- attribute1
121 -- attribute2
122 -- attribute3
123 -- attribute4
124 -- attribute5
125 -- attribute6
126 -- attribute7
127 -- attribute8
128 -- attribute9
129 -- attribute10
130 -- attribute11
131 -- attribute12
132 -- attribute13
133 -- attribute14
134 -- attribute15
135 -- deduction_attribute_category
136 -- deduction_attribute1
137 -- deduction_attribute2
138 -- deduction_attribute3
139 -- deduction_attribute4
140 -- deduction_attribute5
141 -- deduction_attribute6
142 -- deduction_attribute7
143 -- deduction_attribute8
144 -- deduction_attribute9
145 -- deduction_attribute10
146 -- deduction_attribute11
147 -- deduction_attribute12
148 -- deduction_attribute13
149 -- deduction_attribute14
150 -- deduction_attribute15
151 -- org_id
152 -- write_off_flag
153 -- write_off_threshold_amount
154 -- under_write_off_threshold
155 -- customer_reason
156 -- ship_to_cust_account_id
157 -- AMOUNT_APPLIED --Bug:2781186
158 -- APPLIED_RECEIPT_ID --Bug:2781186
159 -- APPLIED_RECEIPT_NUMBER --Bug:2781186
160 -- wo_rec_trx_id
161 --
162 -- Required
163 --
164 -- Defaults
165 --
166 -- Note: This is automatic generated record definition, it includes all columns
167 -- defined in the table, developer must manually add or delete some of the attributes.
168 --
169 -- End of Comments
170
171 --===================================================================
172 TYPE claims_history_rec_type IS RECORD
173 (
174 claim_history_id NUMBER,
175 object_version_number NUMBER,
176 last_update_date DATE,
177 last_updated_by NUMBER,
178 creation_date DATE,
179 created_by NUMBER,
180 last_update_login NUMBER,
181 request_id NUMBER,
182 program_application_id NUMBER,
183 program_update_date DATE,
184 program_id NUMBER,
185 created_from VARCHAR2(30),
186 batch_id NUMBER,
187 claim_id NUMBER,
188 claim_number VARCHAR2(30),
189 claim_type_id NUMBER,
190 claim_class VARCHAR2(30),
191 claim_date DATE,
192 due_date DATE,
193 owner_id NUMBER,
194 history_event VARCHAR2(30),
195 history_event_date DATE,
196 history_event_description VARCHAR2(2000),
197 split_from_claim_id NUMBER,
198 duplicate_claim_id NUMBER,
199 split_date DATE,
200 root_claim_id NUMBER,
201 amount NUMBER,
202 amount_adjusted NUMBER,
203 amount_remaining NUMBER,
204 amount_settled NUMBER,
205 acctd_amount NUMBER,
206 acctd_amount_remaining NUMBER,
207 acctd_amount_adjusted NUMBER,
208 acctd_amount_settled NUMBER,
209 tax_amount NUMBER,
210 tax_code VARCHAR2(50),
211 tax_calculation_flag VARCHAR2(1),
212 currency_code VARCHAR2(15),
213 exchange_rate_type VARCHAR2(30),
214 exchange_rate_date DATE,
215 exchange_rate NUMBER,
216 set_of_books_id NUMBER,
217 original_claim_date DATE,
218 source_object_id NUMBER,
219 source_object_class VARCHAR2(15),
220 source_object_type_id NUMBER,
221 source_object_number VARCHAR2(30),
222 cust_account_id NUMBER,
223 cust_billto_acct_site_id NUMBER,
224 cust_shipto_acct_site_id NUMBER,
225 location_id NUMBER,
226 pay_related_account_flag VARCHAR2(1),
227 related_cust_account_id NUMBER,
228 related_site_use_id NUMBER,
229 relationship_type VARCHAR2(30),
230 vendor_id NUMBER,
231 vendor_site_id NUMBER,
232 reason_type VARCHAR2(30),
233 reason_code_id NUMBER,
234 task_template_group_id NUMBER,
235 status_code VARCHAR2(30),
236 user_status_id NUMBER,
237 sales_rep_id NUMBER,
238 collector_id NUMBER,
239 contact_id NUMBER,
240 broker_id NUMBER,
241 territory_id NUMBER,
242 customer_ref_date DATE,
243 customer_ref_number VARCHAR2(30),
244 assigned_to NUMBER,
245 receipt_id NUMBER,
246 receipt_number VARCHAR2(30),
247 doc_sequence_id NUMBER,
248 doc_sequence_value NUMBER,
249 gl_date DATE,
250 payment_method VARCHAR2(30),
251 voucher_id NUMBER,
252 voucher_number VARCHAR2(30),
253 payment_reference_id NUMBER,
254 payment_reference_number VARCHAR2(30),
255 payment_reference_date DATE,
256 payment_status VARCHAR2(30),
257 approved_flag VARCHAR2(1),
258 approved_date DATE,
259 approved_by NUMBER,
260 settled_date DATE,
261 settled_by NUMBER,
262 effective_date DATE,
263 custom_setup_id NUMBER,
264 task_id NUMBER,
265 country_id NUMBER,
266 order_type_id NUMBER,
267 comments VARCHAR2(2000),
268 letter_id NUMBER,
269 letter_date DATE,
270 task_source_object_id NUMBER,
271 task_source_object_type_code VARCHAR2(30),
272 attribute_category VARCHAR2(30),
273 attribute1 VARCHAR2(150),
274 attribute2 VARCHAR2(150),
275 attribute3 VARCHAR2(150),
276 attribute4 VARCHAR2(150),
277 attribute5 VARCHAR2(150),
278 attribute6 VARCHAR2(150),
279 attribute7 VARCHAR2(150),
280 attribute8 VARCHAR2(150),
281 attribute9 VARCHAR2(150),
282 attribute10 VARCHAR2(150),
283 attribute11 VARCHAR2(150),
284 attribute12 VARCHAR2(150),
285 attribute13 VARCHAR2(150),
286 attribute14 VARCHAR2(150),
287 attribute15 VARCHAR2(150),
288 deduction_attribute_category VARCHAR2(30),
289 deduction_attribute1 VARCHAR2(150),
290 deduction_attribute2 VARCHAR2(150),
291 deduction_attribute3 VARCHAR2(150),
292 deduction_attribute4 VARCHAR2(150),
293 deduction_attribute5 VARCHAR2(150),
294 deduction_attribute6 VARCHAR2(150),
295 deduction_attribute7 VARCHAR2(150),
296 deduction_attribute8 VARCHAR2(150),
297 deduction_attribute9 VARCHAR2(150),
298 deduction_attribute10 VARCHAR2(150),
299 deduction_attribute11 VARCHAR2(150),
300 deduction_attribute12 VARCHAR2(150),
301 deduction_attribute13 VARCHAR2(150),
302 deduction_attribute14 VARCHAR2(150),
303 deduction_attribute15 VARCHAR2(150),
304 org_id NUMBER,
305 write_off_flag VARCHAR2(1),
306 write_off_threshold_amount NUMBER,
307 under_write_off_threshold VARCHAR2(5),
308 customer_reason VARCHAR2(30),
309 ship_to_cust_account_id NUMBER,
310 amount_applied NUMBER , --Bug:2781186
311 applied_receipt_id NUMBER , --Bug:2781186
312 applied_receipt_number VARCHAR2(30), --Bug:2781186
313 wo_rec_trx_id NUMBER,
314 group_claim_id NUMBER,
315 appr_wf_item_key VARCHAR2(240),
316 cstl_wf_item_key VARCHAR2(240),
317 batch_type VARCHAR2(30)
318
319 );
320
321 g_miss_claims_history_rec claims_history_rec_type;
322 TYPE claims_history_tbl_type IS TABLE OF claims_history_rec_type INDEX BY BINARY_INTEGER;
323 g_miss_claims_history_tbl claims_history_tbl_type;
324
325 -- *******************************************************
326 -- Start of Comments
327 -- *******************************************************
328 -- API Name: Create_claims_history
329 -- Type : Private
330 -- Pre-Req :
331 -- Parameters:
332 -- IN
333 -- p_api_version_number IN NUMBER Required
334 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API_G_FALSE
335 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
336 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
337 -- P_CLAIMS_HISTORY_Rec IN CLAIMS_HISTORY_Rec_Type Required
338 --
339 -- OUT:
340 -- x_return_status OUT VARCHAR2
341 -- x_msg_count OUT NUMBER
342 -- x_msg_data OUT VARCHAR2
343 -- Version : Current version 1.0
344 -- Note: This automatic generated procedure definition, it includes standard IN/OUT parameters
345 -- and basic operation, developer must manually add parameters and business logic as necessary.
346 --
347 -- End of Comments
348 --
349 PROCEDURE Create_Claims_History(
350 P_Api_Version_Number IN NUMBER,
351 P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
352 P_Commit IN VARCHAR2 := FND_API.G_FALSE,
353 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
354
355 X_Return_Status OUT NOCOPY VARCHAR2,
356 X_Msg_Count OUT NOCOPY NUMBER,
357 X_Msg_Data OUT NOCOPY VARCHAR2,
358
359 P_CLAIMS_HISTORY_Rec IN CLAIMS_HISTORY_Rec_Type := G_MISS_CLAIMS_HISTORY_REC,
360 X_CLAIM_HISTORY_ID OUT NOCOPY NUMBER
361 );
362
363 -- *******************************************************
364 -- Start of Comments
365 -- *******************************************************
366 -- API Name: Update_claims_history
367 -- Type : Private
368 -- Pre-Req :
369 -- Parameters:
370 -- IN
371 -- p_api_version_number IN NUMBER Required
372 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API_G_FALSE
373 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
374 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
375 -- P_CLAIMS_HISTORY_Rec IN CLAIMS_HISTORY_Rec_Type Required
376 --
377 -- OUT:
378 -- x_return_status OUT VARCHAR2
379 -- x_msg_count OUT NUMBER
380 -- x_msg_data OUT VARCHAR2
381 -- Version : Current version 1.0
382 -- Note: This automatic generated procedure definition, it includes standard IN/OUT parameters
386 --
383 -- and basic operation, developer must manually add parameters and business logic as necessary.
384 --
385 -- End of Comments
387 PROCEDURE Update_claims_history(
388 P_Api_Version_Number IN NUMBER,
389 P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
390 P_Commit IN VARCHAR2 := FND_API.G_FALSE,
391 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
392
393 X_Return_Status OUT NOCOPY VARCHAR2,
394 X_Msg_Count OUT NOCOPY NUMBER,
395 X_Msg_Data OUT NOCOPY VARCHAR2,
396
397 P_CLAIMS_HISTORY_Rec IN CLAIMS_HISTORY_Rec_Type,
398 X_Object_Version_Number OUT NOCOPY NUMBER
399 );
400
401 -- *******************************************************
402 -- Start of Comments
403 -- *******************************************************
404 -- API Name: Delete_claims_history
405 -- Type : Private
406 -- Pre-Req :
407 -- Parameters:
408 -- IN
409 -- p_api_version_number IN NUMBER Required
410 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API_G_FALSE
411 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
412 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
413 -- p_CLAIM_HISTORY_ID IN NUMBER
414 -- p_object_version_number IN NUMBER Optional Default = NULL
415 --
416 -- OUT:
417 -- x_return_status OUT VARCHAR2
418 -- x_msg_count OUT NUMBER
419 -- x_msg_data OUT VARCHAR2
420 -- Version : Current version 1.0
421 -- Note: This automatic generated procedure definition, it includes standard IN/OUT parameters
422 -- and basic operation, developer must manually add parameters and business logic as necessary.
423 --
424 -- End of Comments
425 --
426 PROCEDURE Delete_claims_history(
427 P_Api_Version_Number IN NUMBER,
428 P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
429 P_Commit IN VARCHAR2 := FND_API.G_FALSE,
430 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
431 X_Return_Status OUT NOCOPY VARCHAR2,
432 X_Msg_Count OUT NOCOPY NUMBER,
433 X_Msg_Data OUT NOCOPY VARCHAR2,
434 P_CLAIM_HISTORY_ID IN NUMBER,
435 P_Object_Version_Number IN NUMBER
436 );
437
438
442 --
439 -- *******************************************************
440 -- Start of Comments
441 -- *******************************************************
443 -- validation procedures
444 --
445 -- p_validation_mode is a constant defined in OZF_UTILITY_PVT package
446 -- For create: G_CREATE, for update: G_UPDATE
447 -- Note: 1. This is automated generated item level validation procedure.
448 -- The actual validation detail is needed to be added.
449 -- 2. We can also validate table instead of record. There will be an option for user to choose.
450 -- End of Comments
451
452 PROCEDURE Validate_claims_history(
453 P_Api_Version_Number IN NUMBER,
454 P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
455 P_Validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
456 P_CLAIMS_HISTORY_Rec IN CLAIMS_HISTORY_Rec_Type,
457 X_Return_Status OUT NOCOPY VARCHAR2,
458 X_Msg_Count OUT NOCOPY NUMBER,
459 X_Msg_Data OUT NOCOPY VARCHAR2
460 );
461
462 -- *******************************************************
463 -- Start of Comments
464 -- *******************************************************
465 -- API Name: Create_History
466 -- Type : Public
467 -- Pre-Req :
468 -- Parameters:
469 -- IN
470 -- p_claim_id IN NUMBER
471 --
472 -- OUT:
473 -- x_claim_history_id OUT NUMBER
474 -- x_return_status OUT VARCHAR2
475 -- Version : Current version 1.0
476 --
477 -- Note: This procedure insert a history record of a claim in the
478 -- ozf_claims_history_all table.
479 --
480 -- End of Comments
481 --
482 PROCEDURE Create_History(p_claim_id IN NUMBER,
483 p_history_event IN VARCHAR2,
484 p_history_event_description IN VARCHAR2,
485 x_claim_history_id OUT NOCOPY NUMBER,
486 x_return_status OUT NOCOPY VARCHAR2
487 );
488
489 -- *******************************************************
490 -- Start of Comments
491 -- *******************************************************
492 -- API Name: Check_Create_History
493 -- Type : Public
494 -- Pre-Req :
495 -- Parameters:
496 -- IN
497 -- p_claim IN OZF_CLAIM_PVT.claim_rec_type
498 -- p_event IN VARCHAR2
499 --
500 -- OUT:
501 -- x_history_event OUT VARCHAR2,
502 -- x_history_event_description OUT VARCHAR2,
503 -- x_needed_to_create OUT VARCHAR2
504 --
505 -- Version : Current version 1.0
506 --
507 -- Note: This procedure checke whether there is a need to create
508 -- history record for a claim.
509 --
510 -- End of Comments
511 --
512 PROCEDURE Check_Create_History(p_claim IN OZF_CLAIM_PVT.claim_rec_type,
513 p_event IN VARCHAR2,
514 x_history_event OUT NOCOPY VARCHAR2,
515 x_history_event_description OUT NOCOPY VARCHAR2,
516 x_needed_to_create OUT NOCOPY VARCHAR2,
517 x_return_status OUT NOCOPY VARCHAR2
518 );
519
520 End OZF_claims_history_PVT;