DBA Data[Home] [Help]

PACKAGE BODY: APPS.OKL_CPY_PDT_RULS_PUB

Source


1 PACKAGE BODY OKL_CPY_PDT_RULS_PUB AS
2 /* $Header: OKLPPCOB.pls 115.2 2004/04/13 10:55:09 rnaik noship $ */
3 --start of comments
4 --API Name      : Copy Product rules
5 --Description   : This Api will take the product option rules from
6 --                selected options and will copy them on to the contract
7 --                at header or line level as per the setup
8 -- Parameters   : IN parameter - p_khr_id contract header id of the contract
9 --end of comments
10 Procedure Copy_Product_Rules(p_api_version     IN  NUMBER,
11 	                         p_init_msg_list   IN  VARCHAR2 DEFAULT OKL_API.G_FALSE,
12 	                         x_return_status   OUT NOCOPY VARCHAR2,
13 	                         x_msg_count       OUT NOCOPY NUMBER,
14                              x_msg_data        OUT NOCOPY VARCHAR2,
15                              p_khr_id          IN  NUMBER,
16                              p_pov_id          IN  NUMBER) is
17 
18   l_return_status     VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
19   l_api_name          CONSTANT VARCHAR2(30) := 'COPY_PRODUCT_RULES';
20   l_api_version	      CONSTANT NUMBER	:= 1.0;
21 
22 BEGIN
23      --call start activity to set savepoint
24      l_return_status := OKL_API.START_ACTIVITY( substr(l_api_name,1,26),
25 	                                               p_init_msg_list,
26                                                    '_PVT',
27                                          	       x_return_status);
28      IF (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
29       		RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
30      ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
31       		RAISE OKL_API.G_EXCEPTION_ERROR;
32      END IF;
33      --Customer pre-processing Section
34      --Vertical Industry pre-processing Section
35      -- call pvt api to copy option rules
36      OKL_CPY_PDT_RULS_PVT.Copy_Product_Rules
37                           (p_api_version   => p_api_version,
38 	                       p_init_msg_list => p_init_msg_list,
39 	                       x_return_status => x_return_status,
40 	                       x_msg_count     => x_msg_count,
41                            x_msg_data      => x_msg_data,
42                            p_khr_id        => p_khr_id,
43                            p_pov_id        => p_pov_id);
44 
45      IF (x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
46       		RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
47      ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR) THEN
48       		RAISE OKL_API.G_EXCEPTION_ERROR;
49      END IF;
50 
51     --Vertical post-processing Section
52     --Customer post-processing Section
53      --Call end Activity
54     OKL_API.END_ACTIVITY(x_msg_count, x_msg_data);
55 
56     EXCEPTION
57     When OKL_API.G_EXCEPTION_ERROR Then
58         x_return_status :=OKL_API.HANDLE_EXCEPTIONS
59         (
60         l_api_name,
61         G_PKG_NAME,
62         'OKL_API.G_RET_STS_ERROR',
63         x_msg_count,
64         x_msg_data,
65         '_PVT'
66         );
67     WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
68         x_return_status :=OKL_API.HANDLE_EXCEPTIONS
69         (
70         l_api_name,
71         G_PKG_NAME,
72         'OKL_API.G_RET_STS_UNEXP_ERROR',
73         x_msg_count,
74         x_msg_data,
75         '_PVT'
76         );
77     WHEN OTHERS THEN
78         x_return_status :=OKL_API.HANDLE_EXCEPTIONS
79        (
80         l_api_name,
81         G_PKG_NAME,
82         'OTHERS',
83         x_msg_count,
84         x_msg_data,
85         '_PVT'
86       );
87 End Copy_Product_Rules;
88 END OKL_CPY_PDT_RULS_PUB;