DBA Data[Home] [Help]

PACKAGE: APPS.OZF_CLAIM_PUB

Source


1 PACKAGE OZF_Claim_PUB AUTHID CURRENT_USER AS
2 /* $Header: ozfpclas.pls 120.10.12020000.2 2012/08/08 09:14:12 ninarasi ship $ */
3 /*#
4 * This package can be used to
5 * 1. create, update, and delete claims and claim lines;
6 * 2. create claim with earnings associated
7 * 3. associate earnings to an existing claim or claim line
8 * 4. create claim with earnings associated and to settle the claim.
9 * 5. Create SLA event for Claim settlement.
10 * 6. Create Split Claims.
11 * @rep:scope public
12 * @rep:product OZF
13 * @rep:lifecycle active
14 * @rep:displayname Claim Public API
15 * @rep:compatibility S
16 * @rep:businessevent None
17 * @rep:category BUSINESS_ENTITY OZF_CLAIM
18 */
19 
20 
21 
22 -- Default number of records fetch per call
23 G_DEFAULT_NUM_REC_FETCH  NUMBER := 30;
24 
25 --   -------------------------------------------------------
26 --    Record name  claim_rec_type
27 --
28 --    Note: This is automatic generated record definition, it includes
29 --    all columns defined in the table, developer must manually add or
30 --    delete some of the attributes.
31 --   -------------------------------------------------------
32 TYPE claim_rec_type IS RECORD
33 (
34        claim_id                        NUMBER,
35        object_version_number           NUMBER,
36        last_update_date                DATE,
37        last_updated_by                 NUMBER,
38        creation_date                   DATE,
39        created_by                      NUMBER,
40        last_update_login               NUMBER,
41        request_id                      NUMBER,
42        program_application_id          NUMBER,
43        program_update_date             DATE,
44        program_id                      NUMBER,
45        created_from                    VARCHAR2(30),
46        batch_id                        NUMBER,
47        claim_number                    VARCHAR2(30),
48        claim_type_id                   NUMBER,
49        claim_line_id                   NUMBER,
50        claim_class                     VARCHAR2(30),
51        claim_date                      DATE,
52        due_date                        DATE,
53        owner_id                        NUMBER,
54        history_event                   VARCHAR2(30),
55        history_event_date              DATE,
56        history_event_description       VARCHAR2(2000),
57        split_from_claim_id             NUMBER,
58        duplicate_claim_id              NUMBER,
59        split_date                      DATE,
60        root_claim_id                   NUMBER,
61        amount                          NUMBER,
62        amount_adjusted                 NUMBER,
63        amount_remaining                NUMBER,
64        amount_settled                  NUMBER,
65        acctd_amount_settled            NUMBER,
66        acctd_amount_adjusted           NUMBER,
67        acctd_amount                    NUMBER,
68        acctd_amount_remaining          NUMBER,
69        tax_amount                      NUMBER,
70        tax_code                        VARCHAR2(50),
71        tax_calculation_flag            VARCHAR2(1),
72        currency_code                   VARCHAR2(15),
73        exchange_rate_type              VARCHAR2(30),
74        exchange_rate_date              DATE,
75        exchange_rate                   NUMBER,
76        set_of_books_id                 NUMBER,
77        original_claim_date             DATE,
78        source_object_id                NUMBER,
79        source_object_class             VARCHAR2(15),
80        source_object_type_id           NUMBER,
81        source_object_number            VARCHAR2(30),
82        cust_account_id                 NUMBER,
83        cust_billto_acct_site_id        NUMBER,
84        cust_shipto_acct_site_id        NUMBER,
85        location_id                     NUMBER,
86        pay_related_account_flag        VARCHAR2(1),
87        related_cust_account_id         NUMBER,
88        related_site_use_id             NUMBER,
89        relationship_type               VARCHAR2(30),
90        vendor_id                       NUMBER,
91        vendor_site_id                  NUMBER,
92        reason_type                     VARCHAR2(30),
93        reason_code_id                  NUMBER,
94        task_template_group_id          NUMBER,
95        status_code                     VARCHAR2(30),
96        user_status_id                  NUMBER,
97        sales_rep_id                    NUMBER,
98        collector_id                    NUMBER,
99        contact_id                      NUMBER,
100        broker_id                       NUMBER,
101        territory_id                    NUMBER,
102        customer_ref_date               DATE,
103        customer_ref_number             VARCHAR2(100),
104        assigned_to                     NUMBER,
105        receipt_id                      NUMBER,
106        receipt_number                  VARCHAR2(30),
107        doc_sequence_id                 NUMBER,
108        doc_sequence_value              NUMBER,
109        gl_date                         DATE,
110        payment_method                  VARCHAR2(30),
111        voucher_id                      NUMBER,
112        voucher_number                  VARCHAR2(30),
113        payment_reference_id            NUMBER,
114        payment_reference_number        VARCHAR2(15),
115        payment_reference_date          DATE,
116        payment_status                  VARCHAR2(10),
117        approved_flag                   VARCHAR2(1),
118        approved_date                   DATE,
119        approved_by                     NUMBER,
120        settled_date                    DATE,
121        settled_by                      NUMBER,
122        effective_date                  DATE,
123        custom_setup_id                 NUMBER,
124        task_id                         NUMBER,
125        country_id                      NUMBER,
126        order_type_id                   NUMBER,
127        comments                        VARCHAR2(2000),
128        activity_type                   VARCHAR2(30),
129        activity_id                     NUMBER,
130        earnings_associated_flag        VARCHAR2(1),
131        quantity                        NUMBER,
132        quantity_uom                    VARCHAR2(30),
133        rate                            NUMBER,
134        item_id                         NUMBER,
135        item_description                VARCHAR2(240),
136        performance_complete_flag       VARCHAR2(1),
137        performance_attached_flag       VARCHAR2(1),
138        utilization_id                  NUMBER,
139        plan_id                         NUMBER,
140        offer_id                        NUMBER,
141        valid_flag                      VARCHAR2(1),
142        claim_currency_amount           NUMBER,
143        split_from_claim_line_id        NUMBER,
144        line_number                     NUMBER,
145        attribute_category              VARCHAR2(30),
146        attribute1                      VARCHAR2(150),
147        attribute2                      VARCHAR2(150),
148        attribute3                      VARCHAR2(150),
149        attribute4                      VARCHAR2(150),
150        attribute5                      VARCHAR2(150),
151        attribute6                      VARCHAR2(150),
152        attribute7                      VARCHAR2(150),
153        attribute8                      VARCHAR2(150),
154        attribute9                      VARCHAR2(150),
155        attribute10                     VARCHAR2(150),
156        attribute11                     VARCHAR2(150),
157        attribute12                     VARCHAR2(150),
158        attribute13                     VARCHAR2(150),
159        attribute14                     VARCHAR2(150),
160        attribute15                     VARCHAR2(150),
161        deduction_attribute_category    VARCHAR2(30),
162        deduction_attribute1            VARCHAR2(150),
163        deduction_attribute2            VARCHAR2(150),
164        deduction_attribute3            VARCHAR2(150),
165        deduction_attribute4            VARCHAR2(150),
166        deduction_attribute5            VARCHAR2(150),
167        deduction_attribute6            VARCHAR2(150),
168        deduction_attribute7            VARCHAR2(150),
169        deduction_attribute8            VARCHAR2(150),
170        deduction_attribute9            VARCHAR2(150),
171        deduction_attribute10           VARCHAR2(150),
172        deduction_attribute11           VARCHAR2(150),
173        deduction_attribute12           VARCHAR2(150),
174        deduction_attribute13           VARCHAR2(150),
175        deduction_attribute14           VARCHAR2(150),
176        deduction_attribute15           VARCHAR2(150),
177        org_id                          NUMBER,
178        write_off_flag                  VARCHAR2(1),
179        write_off_threshold_amount      NUMBER,
180        under_write_off_threshold       VARCHAR2(5),
181        customer_reason                 VARCHAR2(30),
182        ship_to_cust_account_id         NUMBER,        -- added by uday
183        amount_applied                  NUMBER,        -- Subsequent Receipt application changes
184        applied_receipt_id              NUMBER,        -- Subsequent Receipt application changes
185        applied_receipt_number          VARCHAR2(30),   -- Subsequent Receipt application changes
186        wo_rec_trx_id                   NUMBER,
187        group_claim_id                  NUMBER,
188        appr_wf_item_key                VARCHAR2(240),
189        cstl_wf_item_key                VARCHAR2(240),
190        batch_type                      VARCHAR2(30)
191 
192   );
193 g_miss_claim_rec          claim_rec_type;
194 TYPE  claim_tbl_type      IS TABLE OF claim_rec_type INDEX BY BINARY_INTEGER;
195 
196 --   -------------------------------------------------------
197 --    Record name      claim_line_rec_type
198 --    Note: This is automatic generated record definition, it includes
199 --    all columns defined in the table, developer must manually add or
200 --    delete some of the attributes.
201 --   -------------------------------------------------------
202   TYPE claim_line_rec_type IS RECORD
203 (
204   claim_line_id              NUMBER  ,
205   object_version_number      NUMBER ,
206   last_update_date           DATE ,
207   last_updated_by            NUMBER,
208   creation_date              DATE,
209   created_by                 NUMBER,
210   last_update_login          NUMBER,
211   request_id                 NUMBER,
212   program_application_id     NUMBER,
213   program_update_date        DATE,
214   program_id                 NUMBER,
215   created_from               VARCHAR2(30),
216   claim_id                   NUMBER,
217   line_number                NUMBER,
218   split_from_claim_line_id   NUMBER,
219   amount                     NUMBER,
220   claim_currency_amount      NUMBER,
221   acctd_amount               NUMBER,
222   currency_code              VARCHAR2(15),
223   exchange_rate_type         VARCHAR2(30),
224   exchange_rate_date         DATE ,
225   exchange_rate              NUMBER,
226   set_of_books_id            NUMBER,
227   valid_flag                 VARCHAR2(1),
228   source_object_id           NUMBER,
229   source_object_class        VARCHAR2(15),
230   source_object_type_id      NUMBER,
231   source_object_line_id      NUMBER,
232   plan_id                    NUMBER,
233   offer_id                   NUMBER,
234   utilization_id             NUMBER,
235   payment_method             VARCHAR2(15),
236   payment_reference_id       NUMBER,
237   payment_reference_number   VARCHAR2(15),
238   payment_reference_date     DATE ,
239   voucher_id                 NUMBER,
240   voucher_number             VARCHAR2(30),
241   payment_status             VARCHAR2(30),
242   approved_flag              VARCHAR2(1),
243   approved_date              DATE ,
244   approved_by                NUMBER,
245   settled_date               DATE ,
246   settled_by                 NUMBER,
247   performance_complete_flag  VARCHAR2(1),
248   performance_attached_flag  VARCHAR2(1),
249   item_id                    NUMBER,
250   item_description           VARCHAR2(240),
251   quantity                   NUMBER,
252   quantity_uom               VARCHAR2(30),
253   rate                       NUMBER,
254   activity_type              VARCHAR2(30),
255   activity_id                NUMBER,
256   related_cust_account_id    NUMBER,
257   relationship_type          VARCHAR2(30),
258   earnings_associated_flag   VARCHAR2(1),
259   comments                   VARCHAR2(2000),
260   tax_code                   VARCHAR2(50),
261   attribute_category         VARCHAR2(30),
262   attribute1                 VARCHAR2(150),
263   attribute2                 VARCHAR2(150),
264   attribute3                 VARCHAR2(150),
265   attribute4                 VARCHAR2(150),
266   attribute5                 VARCHAR2(150),
267   attribute6                 VARCHAR2(150),
268   attribute7                 VARCHAR2(150),
269   attribute8                 VARCHAR2(150),
270   attribute9                 VARCHAR2(150),
271   attribute10                VARCHAR2(150),
272   attribute11                VARCHAR2(150),
273   attribute12                VARCHAR2(150),
274   attribute13                VARCHAR2(150),
275   attribute14                VARCHAR2(150),
276   attribute15                VARCHAR2(150),
277   org_id                     NUMBER,
278   update_from_tbl_flag       VARCHAR2(1)    := FND_API.g_false,
279   tax_action                 VARCHAR2(15),
280   sale_date                  DATE,
281   item_type                  VARCHAR2(30),
282   tax_amount                 NUMBER,
283   claim_curr_tax_amount      NUMBER,
284   activity_line_id           NUMBER,
285   offer_type                 VARCHAR2(30),
286   prorate_earnings_flag      VARCHAR2(1),
287   earnings_end_date          DATE,
288   --12.1 Enhancement : Price Protection
289   dpp_cust_account_id        VARCHAR2(20)
290 );
291 TYPE claim_line_tbl_type is TABLE OF claim_line_rec_type
292 INDEX BY BINARY_INTEGER;
293 
294 TYPE claim_sort_rec_type IS RECORD
295 (
296       -- Please define your own sort by record here.
297       object_version_number   NUMBER := NULL
298 );
299 
300 
301 --   -------------------------------------------------------
302 --    Record name      funds_util_flt_type
303 --   -------------------------------------------------------
304 TYPE funds_util_flt_type IS RECORD
305 (
306        fund_id                         NUMBER,
307        activity_type                   VARCHAR2(30),
308        activity_id                     NUMBER,
309        activity_product_id             NUMBER,
310        offer_type                      VARCHAR2(30),
311        document_class                  VARCHAR2(15),
312        document_id                     NUMBER,
313        product_level_type              VARCHAR2(30),
314        product_id                      NUMBER,
315        reference_type                  VARCHAR2(30),
316        reference_id                    NUMBER,
317        utilization_type                VARCHAR2(30),
318        cust_account_id                 NUMBER,
322        select_cust_children_flag       VARCHAR2(1),
319        relationship_type               VARCHAR2(30),
320        related_cust_account_id         NUMBER,
321        buy_group_cust_account_id       NUMBER,
323        pay_to_customer                 VARCHAR2(30),
324        prorate_earnings_flag           VARCHAR2(1),
325        end_date                        DATE,
326        total_amount                    NUMBER,
327        total_units                     NUMBER,
328        quantity                        NUMBER,
329        uom_code                        VARCHAR2(3),
330        utilization_id                  NUMBER -- Added For Bug 8402328
331 );
332 
333 --   ==============================================================================
334 --   API Name
335 --           Create_Claim
336 --   Type
337 --           Public
338 --   Pre-Req
339 --
340 --   Parameters
341 --
342 --   IN
343 --       p_api_version_number      IN   NUMBER     Required
344 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
345 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
346 --       p_claim_rec               IN   claim_rec_type  Required
347 --       p_claim_line_tbl          IN   claim_line_tbl_type Required
348 --   OUT
349 --       x_return_status           OUT  VARCHAR2
350 --       x_msg_count               OUT  NUMBER
351 --       x_msg_data                OUT  VARCHAR2
352 --   ==============================================================================
353 /*#
354 * This procedure creates a new claim.
355 * @param  p_api_version_number indicates the version of the API.
356 * @param p_init_msg_list indicates whether to initialize the message stack.
357 * @param p_commit indicates whether to commit within the program.
358 * @param p_validation_level indicates the level of the validation.
359 * @param x_return_status indicates the status of the program.
360 * @param x_msg_count provides the number of the messages returned by the program.
361 * @param x_msg_data returns messages by the program.
362 * @param p_claim_rec contains the claim details for the new claim to be created.
363 * @param p_claim_line_tbl is a table structure with the details of the claim lines to be created.
364 * @param x_claim_id returns the id of the new claim.
365 * @rep:scope public
366 * @rep:lifecycle active
367 * @rep:displayname Create Claim
368 * @rep:compatibility S
369 * @rep:businessevent None
370 */
371 
372 PROCEDURE Create_Claim(
373     p_api_version_number         IN   NUMBER,
374     p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
375     p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
376     p_validation_level           IN    NUMBER   := FND_API.g_valid_level_full,
377     x_return_status              OUT NOCOPY  VARCHAR2,
378     x_msg_count                  OUT NOCOPY  NUMBER,
379     x_msg_data                   OUT NOCOPY  VARCHAR2,
380     p_claim_rec                  IN   claim_rec_type := OZF_Claim_PUB.g_miss_claim_rec,
381     p_claim_line_tbl             IN   claim_line_tbl_type,
382     x_claim_id                   OUT NOCOPY  NUMBER
383 );
384 
385 
386 --   ==============================================================================
387 --   API Name
388 --           Update_Claim
389 --   Type
390 --           Public
391 --   Pre-Req
392 --
393 --   Parameters
394 --
395 --   IN
396 --       p_api_version_number      IN   NUMBER     Required
397 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
398 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
399 --       p_claim_rec               IN   claim_rec_type  Required
400 --       p_claim_line_tbl         IN    claim_line_tbl_type  Required
401 --
402 --   OUT
403 --       x_return_status           OUT  VARCHAR2
404 --       x_msg_count               OUT  NUMBER
405 --       x_msg_data                OUT  VARCHAR2
406 --   ==============================================================================
407 /*#
408 * This procedure updates an existing claim.
409 * @param p_api_version_number indicates the version of the API.
410 * @param p_init_msg_list indicates whether to initialize the message stack.
411 * @param p_commit indicates whether to commit within the program.
412 * @param p_validation_level indicates the level of the validation.
413 * @param x_return_status indicates the status of the program.
414 * @param x_msg_count provides the number of the messages returned by the program.
415 * @param x_msg_data returns messages by the program.
416 * @param p_claim_rec is to be populated with the claim header fields to be updated.
417 * @param p_claim_line_tbl is to be populated with the claim line fields to be updated.
418 * @param x_object_version_number returns the updated object version number.
419 * @rep:scope public
420 * @rep:lifecycle active
421 * @rep:displayname Update Claim
422 * @rep:compatibility S
423 * @rep:businessevent None
424 */
425 
426 PROCEDURE Update_Claim(
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_rec                  IN   claim_rec_type,
435     p_claim_line_tbl             IN   claim_line_tbl_type,
436     x_object_version_number      OUT NOCOPY  NUMBER
437  );
438 
439 
440 --   ==============================================================================
441 --   API Name
442 --           Delete_Claim
443 --   Type
447 --   Parameters
444 --           Public
445 --   Pre-Req
446 --
448 --
449 --   IN
450 --       p_api_version_number      IN   NUMBER     Required
451 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
452 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
453 --       p_CLAIM_ID                IN   NUMBER
454 --       p_object_version_number   IN   NUMBER     Optional  Default = NULL
455 --
456 --   OUT
457 --       x_return_status           OUT  VARCHAR2
458 --       x_msg_count               OUT  NUMBER
459 --       x_msg_data                OUT  VARCHAR2
460 --   ==============================================================================
461 /*#
462 * This procedure deletes an existing claim.
463 * @param p_api_version_number indicates the version of the API.
464 * @param p_init_msg_list indicates whether to initialize the message stack.
465 * @param p_commit indicates whether to commit within the program.
466 * @param p_validation_level indicates the level of the validation.
467 * @param x_return_status indicates the status of the program.
468 * @param x_msg_count provides the number of the messages returned by the program.
469 * @param x_msg_data returns messages by the program.
470 * @param p_claim_id is the id of the claim to be deleted.
471 * @param p_object_version_number is the object version number of the claim to be deleted.
472 * @rep:scope public
473 * @rep:lifecycle active
474 * @rep:displayname Delete Claim
475 * @rep:compatibility S
476 * @rep:businessevent None
477 */
478 PROCEDURE Delete_Claim(
479     p_api_version_number         IN   NUMBER,
480     p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
481     p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
482     p_validation_level           IN    NUMBER   := FND_API.g_valid_level_full,
483     x_return_status              OUT NOCOPY  VARCHAR2,
484     x_msg_count                  OUT NOCOPY  NUMBER,
485     x_msg_data                   OUT NOCOPY  VARCHAR2,
486     p_claim_id                   IN  NUMBER,
487     p_object_version_number      IN   NUMBER
488     );
489 
490 
491 --   ==============================================================================
492 --   API Name
493 --           Create_Claim_Line_Tbl
494 --   Type
495 --           Public
496 --   Pre-Req
497 --
498 --   Parameters
499 --
500 --   IN
501 --       p_api_version_number      IN   NUMBER     Required
502 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
503 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
504 --       p_validation_level        IN   Varchar2   Optional  Default = FND_API.g_valid_level_full
505 --       p_claim_line_tbl          IN   OZF_CLAIM_LINE_PVT.claim_line_tbl_type
506 --
507 --   OUT
508 --       x_error_index             OUT  VARCHAR2
509 --       x_msg_count               OUT  NUMBER
510 --       x_msg_data                OUT  VARCHAR2
511 --       x_return_status           OUT  VARCHAR2
512 --   ==============================================================================
513 /*#
514 * This procedure creates a claim line for an existing claim.
515 * @param p_api_version indicates the version of the API.
516 * @param p_init_msg_list indicates whether to initialize the message stack.
517 * @param p_commit indicates whether to commit within the program.
518 * @param p_validation_level indicates the level of the validation.
519 * @param x_return_status indicates the status of the program.
520 * @param x_msg_count provides the number of the messages returned by the program.
521 * @param x_msg_data returns messages by the program.
522 * @param p_claim_line_tbl is a table structure with the details of the claim lines to be created.
523 * @param x_error_index is the index of the line in the table at which the error occured.
524 * @rep:scope public
525 * @rep:lifecycle active
526 * @rep:displayname Create Claim Line
527 * @rep:compatibility S
528 * @rep:businessevent None
529 */
530 
531    PROCEDURE Create_Claim_Line_Tbl(
532     p_api_version            IN    NUMBER
533    ,p_init_msg_list          IN    VARCHAR2 := FND_API.g_false
534    ,p_commit                 IN    VARCHAR2 := FND_API.g_false
535    ,p_validation_level       IN    NUMBER   := FND_API.g_valid_level_full
536    ,x_return_status          OUT NOCOPY   VARCHAR2
537    ,x_msg_data               OUT NOCOPY   VARCHAR2
538    ,x_msg_count              OUT NOCOPY   NUMBER
539    ,p_claim_line_tbl         IN    claim_line_tbl_type
540    ,x_error_index            OUT NOCOPY   NUMBER);
541 
542 
543 --   ==============================================================================
544 --   API Name
545 --           Update_Claim_Line_Tbl
546 --   Type
547 --           Public
548 --   Pre-Req
549 --
550 --   Parameters
551 --
552 --   IN
553 --       p_api_version             IN   NUMBER     Required
554 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
555 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
556 --       p_validation_level        IN   Varchar2   Optional  Default = FND_API.g_valid_level_full
557 --       p_claim_line_tbl          IN   OZF_CLAIM_LINE_PVT.claim_line_tbl_type
558 --       p_change_object_version   IN   VARCHAR2 := FND_API.g_false;
559 --   OUT
560 --       x_error_index             OUT  VARCHAR2
561 --       x_msg_count               OUT  NUMBER
562 --       x_msg_data                OUT  VARCHAR2
563 --       x_return_status           OUT  VARCHAR2
564 --   ==============================================================================
565 /*#
566 * This procedure updates an existing claim line.
567 * @param p_api_version indicates the version of the API.
571 * @param x_return_status indicates the status of the program.
568 * @param p_init_msg_list indicates whether to initialize the message stack.
569 * @param p_commit indicates whether to commit within the program.
570 * @param p_validation_level indicates the level of the validation.
572 * @param x_msg_data returns messages by the program.
573 * @param x_msg_count provides the number of the messages returned by the program.
574 * @param p_claim_line_tbl is a table structure with the details of the claim lines to be updated.
575 * @param p_change_object_version indicates whether the object version number needs to be incremented.
576 * @param x_error_index is the index of the line in the table at which the error occured.
577 * @rep:scope public
578 * @rep:lifecycle active
579 * @rep:displayname Update Claim Line
580 * @rep:compatibility S
581 * @rep:businessevent None
582 */
583 
584   PROCEDURE Update_Claim_Line_Tbl(
585     p_api_version            IN    NUMBER
586    ,p_init_msg_list          IN    VARCHAR2 := FND_API.g_false
587    ,p_commit                 IN    VARCHAR2 := FND_API.g_false
588    ,p_validation_level       IN    NUMBER   := FND_API.g_valid_level_full
589    ,x_return_status          OUT NOCOPY   VARCHAR2
590    ,x_msg_data               OUT NOCOPY   VARCHAR2
591    ,x_msg_count              OUT NOCOPY   NUMBER
592    ,p_claim_line_tbl         IN    claim_line_tbl_type
593    ,p_change_object_version  IN    VARCHAR2 := FND_API.g_false
594    ,x_error_index            OUT NOCOPY   NUMBER);
595 
596 
597 --   ==============================================================================
598 --   API Name
599 --           Delete_Claim_Line_Tbl
600 --   Type
601 --           Public
602 --   Pre-Req
603 --
604 --   Parameters
605 --
606 --   IN
607 --       p_api_version_number      IN   NUMBER     Required
608 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
609 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
610 --       p_change_object_version   IN   VARCHAR2   Required  Default = FND_API.g_false
611 --       p_claim_line_Tbl          IN   VARCHAR2   Required
612 --
613 --   OUT
614 --       x_return_status           OUT  VARCHAR2
615 --       x_msg_count               OUT  NUMBER
616 --       x_msg_data                OUT  VARCHAR2
617 --       x_error_index             OUT  NUMBER
618 --   ==============================================================================
619 /*#
620 * This procedure deletes an existing claim line.
621 * @param p_api_version indicates the version of the API.
622 * @param p_init_msg_list indicates whether to initialize the message stack.
623 * @param p_commit indicates whether to commit within the program.
624 * @param p_validation_level indicates the level of the validation.
625 * @param x_return_status indicates the status of the program.
626 * @param x_msg_data returns messages by the program.
627 * @param x_msg_count provides the number of the messages returned by the program.
628 * @param p_claim_line_tbl is a table structure with the details of the claim lines to be deleted.
629 * @param p_change_object_version indicates whether the object version number needs to be incremented.
630 * @param x_error_index is the index of the line in the table at which the error occured.
631 * @rep:scope public
632 * @rep:lifecycle active
633 * @rep:displayname Delete Claim Line
634 * @rep:compatibility S
635 * @rep:businessevent None
636 */
637 
638 PROCEDURE Delete_Claim_Line_Tbl(
639    p_api_version            IN    NUMBER
640    ,p_init_msg_list          IN    VARCHAR2 := FND_API.g_false
641    ,p_commit                 IN    VARCHAR2 := FND_API.g_false
642    ,p_validation_level       IN    NUMBER   := FND_API.g_valid_level_full
643    ,x_return_status          OUT NOCOPY   VARCHAR2
644    ,x_msg_data               OUT NOCOPY   VARCHAR2
645    ,x_msg_count              OUT NOCOPY   NUMBER
646    ,p_claim_line_tbl         IN    claim_line_tbl_type
647    ,p_change_object_version  IN    VARCHAR2 := FND_API.g_false
648    ,x_error_index            OUT NOCOPY   NUMBER);
649 
650 
651 --   ==============================================================================
652 --   API Name
653 --           Asso_Accruals_To_Claim
654 --   Type
655 --           Public
656 --   Pre-Req
657 --
658 --   Parameters
659 --
660 --   IN
661 --       p_api_version             IN   NUMBER     Required
662 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
663 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
664 --       p_validation_level        IN   NUMBER     Optional  Default = FND_API.G_VALID_LEVEL_FULL
665 --       p_claim_id                IN   NUMBER     Required
666 --       p_funds_util_flt          IN   FUNDS_UTIL_FLT_TYPE Required
667 --
668 --   OUT
669 --       x_return_status           OUT  VARCHAR2
670 --       x_msg_count               OUT  NUMBER
671 --       x_msg_data                OUT  VARCHAR2
672 --   ==============================================================================
673 /*#
674 * This procedure Associates Earnings to an existing claim.
675 * @param p_api_version indicates the version of the API.
676 * @param p_init_msg_list indicates whether to initialize the message stack.
677 * @param p_commit indicates whether to commit within the program.
678 * @param p_validation_level indicates the level of the validation.
679 * @param x_return_status indicates the status of the program.
680 * @param x_msg_data returns messages by the program.
681 * @param x_msg_count provides the number of the messages returned by the program.
682 * @param p_claim_id is the id of claim to which earnings are to be associated.
683 * @param p_funds_util_flt is to be populated with the conditions for filtering the accruals for association.
684 * @rep:scope public
685 * @rep:lifecycle active
689 */
686 * @rep:displayname Associate Accruals to a Claim
687 * @rep:compatibility S
688 * @rep:businessevent None
690 
691 PROCEDURE Asso_Accruals_To_Claim(
692     p_api_version            IN    NUMBER
693    ,p_init_msg_list          IN    VARCHAR2 := FND_API.g_false
694    ,p_commit                 IN    VARCHAR2 := FND_API.g_false
695    ,p_validation_level       IN    NUMBER   := FND_API.g_valid_level_full
696    ,x_return_status          OUT NOCOPY   VARCHAR2
697    ,x_msg_data               OUT NOCOPY   VARCHAR2
698    ,x_msg_count              OUT NOCOPY   NUMBER
699    ,p_claim_id               IN    NUMBER
700    ,p_funds_util_flt         IN    funds_util_flt_type);
701 
702 
703 --   ==============================================================================
704 --   API Name
705 --           Asso_Accruals_To_Claim_Line
706 --   Type
707 --           Public
708 --   Pre-Req
709 --
710 --   Parameters
711 --
712 --   IN
713 --       p_api_version             IN   NUMBER     Required
714 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
715 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
716 --       p_validation_level        IN   NUMBER     Optional  Default = FND_API.G_VALID_LEVEL_FULL
717 --       p_claim_line_id           IN   NUMBER     Required
718 --
719 --   OUT
720 --       x_return_status           OUT  VARCHAR2
721 --       x_msg_count               OUT  NUMBER
722 --       x_msg_data                OUT  VARCHAR2
723 --   ==============================================================================
724 /*#
725 * This procedure associates earnings to an existing claim line.
726 * @param p_api_version indicates the version of the API.
727 * @param p_init_msg_list indicates whether to initialize the message stack.
728 * @param p_commit indicates whether to commit within the program.
729 * @param p_validation_level indicates the level of the validation.
730 * @param x_return_status indicates the status of the program.
731 * @param x_msg_data returns messages by the program.
732 * @param x_msg_count provides the number of the messages returned by the program.
733 * @param p_claim_line_id is the id of claim line to which earnings are to be associated.
734 * @rep:scope public
735 * @rep:lifecycle active
736 * @rep:displayname Associate Accruals to a Claim Line
737 * @rep:compatibility S
738 * @rep:businessevent None
739 */
740 
741 PROCEDURE Asso_Accruals_To_Claim_Line(
742     p_api_version            IN    NUMBER
743    ,p_init_msg_list          IN    VARCHAR2 := FND_API.g_false
744    ,p_commit                 IN    VARCHAR2 := FND_API.g_false
745    ,p_validation_level       IN    NUMBER   := FND_API.g_valid_level_full
746    ,x_return_status          OUT NOCOPY   VARCHAR2
747    ,x_msg_data               OUT NOCOPY   VARCHAR2
748    ,x_msg_count              OUT NOCOPY   NUMBER
749    ,p_claim_line_id          IN    NUMBER);
750 
751 
752 --   ==============================================================================
753 --   API Name
754 --           Create_Claim_For_Accruals
755 --   Type
756 --           Public
757 --   Pre-Req
758 --
759 --   Parameters
760 --
761 --   IN
762 --       p_api_version             IN   NUMBER     Required
763 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
764 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
765 --       p_validation_level        IN   NUMBER     Optional  Default = FND_API.G_VALID_LEVEL_FULL
766 --       p_claim_rec               IN   CLAIM_REC_TYPE      Required
767 --       p_funds_util_flt          IN   FUNDS_UTIL_FLT_TYPE Required
768 --
769 --   OUT
770 --       x_return_status           OUT  VARCHAR2
771 --       x_msg_count               OUT  NUMBER
772 --       x_msg_data                OUT  VARCHAR2
773 --       x_claim_id                OUT  NUMBER
774 --   ==============================================================================
775 /*#
776 * This procedure creates a claim with earnings associated.
777 * @param p_api_version indicates the version of the API.
778 * @param p_init_msg_list indicates whether to initialize the message stack.
779 * @param p_commit indicates whether to commit within the program.
780 * @param p_validation_level indicates the level of the validation.
781 * @param x_return_status indicates the status of the program.
782 * @param x_msg_data returns messages by the program.
783 * @param x_msg_count provides the number of the messages returned by the program.
784 * @param p_claim_rec is the record structure with the details of the claim to be created.
785 * @param p_funds_util_flt is to be populated with the conditions for filtering the accruals for association.
786 * @param x_claim_id is the id of the claim to be created.
787 * @rep:scope public
788 * @rep:lifecycle active
789 * @rep:displayname Create Claim For Accruals
790 * @rep:compatibility S
791 * @rep:businessevent None
792 */
793 
794 PROCEDURE Create_Claim_For_Accruals(
795     p_api_version            IN    NUMBER
796    ,p_init_msg_list          IN    VARCHAR2 := FND_API.g_false
797    ,p_commit                 IN    VARCHAR2 := FND_API.g_false
798    ,p_validation_level       IN    NUMBER   := FND_API.g_valid_level_full
799    ,x_return_status          OUT NOCOPY   VARCHAR2
800    ,x_msg_data               OUT NOCOPY   VARCHAR2
801    ,x_msg_count              OUT NOCOPY   NUMBER
802    ,p_claim_rec              IN    claim_rec_type
803    ,p_funds_util_flt         IN    funds_util_flt_type
804    ,x_claim_id               OUT NOCOPY   NUMBER);
805 
806 
807 --   ==============================================================================
808 --   API Name
809 --           Pay_Claim_For_Accruals
810 --   Type
811 --           Public
812 --   Pre-Req
816 --   IN
813 --
814 --   Parameters
815 --
817 --       p_api_version             IN   NUMBER     Required
818 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
819 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
820 --       p_validation_level        IN   NUMBER     Optional  Default = FND_API.G_VALID_LEVEL_FULL
821 --       p_claim_rec               IN   CLAIM_REC_TYPE      Required
822 --       p_funds_util_flt          IN   FUNDS_UTIL_FLT_TYPE Required
823 --
824 --   OUT
825 --       x_return_status           OUT  VARCHAR2
826 --       x_msg_count               OUT  NUMBER
827 --       x_msg_data                OUT  VARCHAR2
828 --       x_claim_id                OUT  NUMBER
829 --   ==============================================================================
830 /*#
831 * This procedure creates a claim with earnings associated and settles the claim.
832 * @param p_api_version indicates the version of the API.
833 * @param p_init_msg_list indicates whether to initialize the message stack.
834 * @param p_commit indicates whether to commit within the program.
835 * @param p_validation_level indicates the level of the validation.
836 * @param x_return_status indicates the status of the program.
837 * @param x_msg_data returns messages by the program.
838 * @param x_msg_count provides the number of the messages returned by the program.
839 * @param p_claim_rec is the record structure with the details of the claim to be created.
840 * @param p_funds_util_flt is to be populated with the conditions for filtering the accruals for association.
841 * @param x_claim_id is the id of the claim to be created.
842 * @rep:scope public
843 * @rep:lifecycle active
844 * @rep:displayname Create Claim For Accruals
845 * @rep:compatibility S
846 * @rep:businessevent None
847 */
848 PROCEDURE Pay_Claim_For_Accruals(
849     p_api_version            IN    NUMBER
850    ,p_init_msg_list          IN    VARCHAR2 := FND_API.g_false
851    ,p_commit                 IN    VARCHAR2 := FND_API.g_false
852    ,p_validation_level       IN    NUMBER   := FND_API.g_valid_level_full
853    ,x_return_status          OUT NOCOPY   VARCHAR2
854    ,x_msg_data               OUT NOCOPY   VARCHAR2
855    ,x_msg_count              OUT NOCOPY   NUMBER
856    ,p_claim_rec              IN    claim_rec_type
857    ,p_funds_util_flt         IN    funds_util_flt_type
858    ,x_claim_id               OUT NOCOPY   NUMBER);
859 
860 --//12985686 TPM Integration ER
861 
862 TYPE claim_line_id_rec IS RECORD (
863 	Claim_line_id	NUMBER);
864 
865 TYPE claim_line_id_tbl_type IS TABLE of claim_line_id_rec
866 INDEX BY BINARY_INTEGER;
867 
868 TYPE split_claim_type IS RECORD (
869      claim_type_id	NUMBER ,
870      reason_code_id	NUMBER ,
871      amount             NUMBER ,
872      claim_line_id_tbl	claim_line_id_tbl_type,
873      split_claim_id     NUMBER
874 );
875 
876 TYPE split_claim_tbl_type IS TABLE of split_claim_type
877 INDEX BY BINARY_INTEGER;
878 
879 
880 
881 --   ==============================================================================
882 --   API Name
883 --           Create_split_claims
884 --   Type
885 --           Public
886 -- PURPOSE
887 --    This procedure creates split claims for the given parent claim.
888 --
889 --   Parameters
890 --
891 --   IN
892 --       p_api_version             IN   NUMBER     Required
893 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
894 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
895 --       p_validation_level        IN   NUMBER     Optional  Default = FND_API.G_VALID_LEVEL_FULL
896 --
897 --   OUT
898 --       x_return_status           OUT  VARCHAR2
899 --       x_msg_count               OUT  NUMBER
900 --       x_msg_data                OUT  VARCHAR2
901 --   IN OUT
902 --       px_child_claim_tbl        IN OUT  NOCOPY child_claim_tbl_type
903 --   ==============================================================================
904 /*#
905 * This procedure creates split claims for the given parent claim.
906 * @param p_api_version indicates the version of the API.
907 * @param p_init_msg_list indicates whether to initialize the message stack.
908 * @param p_commit indicates whether to commit within the program.
909 * @param p_validation_level indicates the level of the validation.
910 * @param x_return_status indicates the status of the program.
911 * @param x_msg_data returns messages by the program.
912 * @param x_msg_count provides the number of the messages returned by the program.
913 * @param p_parent_claim_id Claim Identifier for which split claims needs to be created.
914 * @param px_child_claim_tbl Record table structure which contains parameters for split claim.
915 * <br>Parameters in px_child_claim_tbl are,
916 * <br>claim_type_id - Claim type id, If not provided default from Parent claim.
917 * <br>reason_code_id - Claim Reason code id, If not provided default from Parent claim.
918 * <br>amount - Split claim amount. Mandatory parameter.
919 * <br>claim_line_id_tbl - Table structure of claim line identifiers to create the split claim.
920 * <br>split_claim_id - Identifier of the new split claim created.
921 * @rep:scope public
922 * @rep:lifecycle active
923 * @rep:displayname Create Split Claims
924 * @rep:compatibility S
925 * @rep:businessevent None
926 */
927 PROCEDURE Create_split_claims(
928 	  p_api_version          IN    NUMBER
929 	, p_init_msg_list        IN    VARCHAR2 := FND_API.G_FALSE
930 	, p_commit               IN    VARCHAR2 := FND_API.G_FALSE
931 	, p_validation_level     IN    NUMBER   := FND_API.G_VALID_LEVEL_FULL
932 	, x_return_status        OUT   NOCOPY   VARCHAR2
933 	, x_msg_data             OUT   NOCOPY   VARCHAR2
934 	, x_msg_count            OUT   NOCOPY   NUMBER
935 	, p_parent_claim_id	 IN    NUMBER
936 	, px_child_claim_tbl     IN OUT NOCOPY split_claim_tbl_type
937 	);
938 
939 ---------------------------------------------------------------------
940 -- API Name
941 --     Create_event
942 --Type
943 --   Public
944 -- PURPOSE
945 --    This procedure will create SLA event for claim settlement
946 --
947 -- PARAMETERS
948 --  IN
949 --	p_api_version_number         IN   NUMBER
950 --	p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE
951 --	p_commit                     IN   VARCHAR2     := FND_API.G_FALSE
952 --	p_validation_level           IN   NUMBER      := FND_API.g_valid_level_full
953 --	p_claim_id	       	     IN   NUMBER
954 --	p_event_type_code	     IN   VARCHAR2
955 --	p_reversal_flag       	     IN   VARCHAR2 DEFAULT NULL
956 --  OUT
957 --	x_return_status              OUT  NOCOPY  VARCHAR2
958 --	x_msg_count                  OUT  NOCOPY  NUMBER
959 --	x_msg_data                   OUT  NOCOPY  VARCHAR2
960 --	x_event_id                   OUT  NOCOPY NUMBER
961 -- NOTES
962 /*#
963 * This Public API will create SLA event for claim settlement.
964 * @param p_api_version_number Version of the API.
965 * @param p_init_msg_list Whether to initialize the message stack.
966 * @param p_commit Indicates Whether to commit within the program.
967 * @param p_validation_level Indicates the level of the validation.
968 * @param x_return_status Indicates the status of the program.
969 * @param x_msg_count Provides the number of the messages returned by the program.
970 * @param x_msg_data Returns messages by the program.
971 * @param p_claim_id Claim Identifier for which SLA Event needs to be raised.
972 * @param p_event_type_code SLA event type code for Claim settlement.
973 * <br> Seeded values for Event Type Codes are:
974 * <br> SETTLE_BY_CREDIT_MEMO
975 * <br> SETTLE_BY_DEBIT_MEMO
976 * <br> SETTLE_BY_AP_INVOICE
977 * <br> SETTLE_BY_AP_DEBIT
978 * <br> SETTLE_INTERNAL_SHIP_DEBIT
979 * <br> SETTLE_BY_AR_AP_NETTING
980 * <br> SETTLE_BY_AR_CUSTOM
981 * <br> SETTLE_BY_AP_CUSTOM
982 * <br> CLAIM_SETTLEMENT_REVERSAL
983 * @param p_reversal_flag Reversal flag - This value should be Y in the case of Reversal event. Not mandatory in the case of Normal event.
984 * @param x_event_id Returns SLA Event Identifier.
985 * @rep:scope public
986 * @rep:lifecycle active
987 * @rep:displayname Create event
988 * @rep:compatibility S
989 * @rep:businessevent None
990 */
991 ---------------------------------------------------------------------
992 PROCEDURE Create_event(
993     p_api_version_number         IN   NUMBER,
994     p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
995     p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
996     p_validation_level           IN   NUMBER      := FND_API.g_valid_level_full,
997     x_return_status              OUT  NOCOPY  VARCHAR2,
998     x_msg_count                  OUT  NOCOPY  NUMBER,
999     x_msg_data                   OUT  NOCOPY  VARCHAR2,
1000     p_claim_id	       	         IN   NUMBER,
1001     p_event_type_code       	 IN   VARCHAR2,
1002     p_reversal_flag       	 IN   VARCHAR2 DEFAULT NULL,
1003     x_event_id                   OUT  NOCOPY NUMBER
1004 );
1005 
1006 END OZF_Claim_PUB;