DBA Data[Home] [Help]

PACKAGE BODY: APPS.OKL_ACCT_SOURCES_PUB

Source


1 Package BODY Okl_acct_sources_Pub AS
2 /* $Header: OKLPASEB.pls 120.2 2005/10/30 04:01:22 appldev noship $ */
3 
4 
5 /*============================================================================
6 |                                                                            |
7 |  Procedure    : update_acct_src_custom_status                              |
8 |  Description  : Procedure to update only the custom status. This will be   |
9 |                 updated once the accounting sources are processed by the   |
10 |                 customer. This will be used at customization.              |
11 |  Parameters   : p_account_source_id - ID of the account sources record     |
12 |		  which requires to be updated.				     |
13 |		  p_custom_status - New status to which the account sources  |
14 |		  record to be updated					     |
15 |  History      : 07-05-04 santonyr    -- Created                            |
16 |                                                                            |
17 *============================================================================*/
18 
19   PROCEDURE update_acct_src_custom_status(
20     p_api_version                  IN  NUMBER,
21     p_init_msg_list                IN  VARCHAR2 DEFAULT Okc_Api.G_FALSE,
22     x_return_status                OUT NOCOPY VARCHAR2,
23     x_msg_count                    OUT NOCOPY NUMBER,
24     x_msg_data                     OUT NOCOPY VARCHAR2,
25     p_account_source_id		   IN NUMBER,
26     p_custom_status		   IN VARCHAR2) IS
27 
28     l_asev_rec                        asev_rec_type;
29     x_asev_rec                        asev_rec_type;
30     l_data                            VARCHAR2(100);
31     l_count                           NUMBER ;
32     l_api_name                        CONSTANT VARCHAR2(30)  := 'update_acct_src_custom_status';
33     l_return_status                   VARCHAR2(1)    := FND_API.G_RET_STS_SUCCESS;
34   BEGIN
35     x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
36     SAVEPOINT update_acct_src_custom_status;
37 
38 -- Populate the l_asev_rec with the passed values.
39 
40     l_asev_rec.id := p_account_source_id;
41     l_asev_rec.custom_status := p_custom_status;
42 
43 -- Call Okl_acct_sources_Pvt.update_acct_src_custom_status to update
44 -- the account sources record.
45 
46     Okl_acct_sources_Pvt.update_acct_src_custom_status(
47                                p_api_version   => p_api_version
48                               ,p_init_msg_list => p_init_msg_list
49                               ,x_return_status => l_return_status
50                               ,x_msg_count     => x_msg_count
51                               ,x_msg_data      => x_msg_data
52                               ,p_asev_rec      => l_asev_rec
53                               ,x_asev_rec      => x_asev_rec
54                               );
55 
56      IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
57         RAISE Fnd_Api.G_EXC_ERROR;
58      ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
59         RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
60      END IF;
61 
62     /* re-assign local record structure using output record from pvt api */
63     l_asev_rec := x_asev_rec;
64 
65   EXCEPTION
66     WHEN Fnd_Api.G_EXC_ERROR THEN
67       ROLLBACK TO update_acct_src_custom_status;
68       x_return_status := Fnd_Api.G_RET_STS_ERROR;
69 
70       Fnd_Msg_Pub.Count_and_get(p_encoded => Okc_Api.G_FALSE
71                                ,p_count   => x_msg_count
72                                ,p_data    => x_msg_data);
73 
74     WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
75       ROLLBACK TO update_acct_src_custom_status;
76       x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
77       Fnd_Msg_Pub.Count_and_get(p_encoded => Okc_Api.G_FALSE
78                                ,p_count   => x_msg_count
79                                ,p_data    => x_msg_data);
80 
81     WHEN OTHERS THEN
82       Fnd_Msg_Pub.ADD_EXC_MSG('Okl_acct_sources_Pub','update_acct_src_custom_status');
83       -- store SQL error message on message stack for caller
84       Fnd_Msg_Pub.Count_and_get(p_encoded => Okc_Api.G_FALSE
85                                ,p_count   => x_msg_count
86                                ,p_data    => x_msg_data);
87       -- notify caller of an UNEXPECTED error
88       x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
89 
90   END   update_acct_src_custom_status;
91 
92 
93 END Okl_acct_sources_Pub;