[Home] [Help]
PACKAGE BODY: APPS.OKC_DOCLIST_PUB
Source
1 PACKAGE BODY OKC_DOCLIST_PUB AS
2 /*$Header: OKCPUBLB.pls 120.0 2005/05/26 09:40:26 appldev noship $*/
3 l_debug VARCHAR2(1) := NVL(FND_PROFILE.VALUE('AFLOG_ENABLED'),'N');
4
5 --
6 -- TYPES
7 --===================
8 -- add your type declarations here if any
9 --
10
11
12 g_ubl_recin okc_ubl_pvt.ubnv_rec_type;
13
14 g_ubl_recout okc_ubl_pvt.ubnv_rec_type;
15
16
17 --===================
18 -- PACKAGE CONSTANTS
19 --===================
20 --
21 x_msg_count NUMBER;
22 x_msg_data VARCHAR2(2000);
23 x_return_status VARCHAR2(1);
24
25 --===================
26 -- LOCAL PROCEDURES AND FUNCTIONS
27 --===================
28 --
29
30 --===================
31 -- PACKAGE PROCEDURES AND FUNCTIONS
32 --===================
33 --
34
35 --
36 -- ---------------------------------------------------------------------------------
37 -- PROCEDURE: Add_Recent --
38 -- DESCRIPTION: Adds a recent document row (type R) to the okc_user_bins table --
39 -- using the record passed --
40 -- DEPENDENCIES: none --
41 -- CHANGE HISTORY: --
42 -- 19/aug/99 - created --
43 -- --
44 -- ---------------------------------------------------------------------------------
45 --
46 PROCEDURE add_recent (
47 p_contract_id IN OKC_K_HEADERS_B.id%TYPE
48 ,p_contract_number IN OKC_K_HEADERS_B.contract_number%TYPE
49 ,p_contract_type IN OKC_K_HEADERS_B.chr_type%TYPE
50 ,p_contract_modifier IN OKC_K_HEADERS_B.contract_number_modifier%TYPE
51 ,p_short_description IN OKC_K_HEADERS_TL.short_description%TYPE
52 ,p_program_name IN OKC_USER_BINS.program_name%TYPE
53 ,x_return_status OUT NOCOPY VARCHAR2
54 ,x_msg_count OUT NOCOPY NUMBER
55 ,x_msg_data OUT NOCOPY VARCHAR2 )
56 IS
57 PRAGMA AUTONOMOUS_TRANSACTION;
58
59 l_api_name VARCHAR2(20) := 'ADD_RECENT';
60
61 BEGIN
62 --
63 -- pass the input parms to the private procedure to process
64 --
65
66
67 okc_doclist_pvt.add_recent (
68 p_contract_id => p_contract_id
69 ,p_contract_number => p_contract_number
70 ,p_contract_type => p_contract_type
71 ,p_contract_modifier => p_contract_modifier
72 ,p_short_description => p_short_description
73 ,p_program_name => p_program_name
74 ,x_return_status => x_return_status
75 ,x_msg_count => x_msg_count
76 ,x_msg_data => x_msg_data );
77
78 IF (x_return_status = okc_api.g_ret_sts_unexp_error) THEN
79 RAISE okc_api.g_exception_unexpected_error;
80 ELSIF (x_return_status = okc_api.g_ret_sts_error) THEN
81 RAISE okc_api.g_exception_error;
82 END IF;
83
84 COMMIT;
85
86 EXCEPTION
87 WHEN okc_api.g_exception_error THEN
88 x_return_status := okc_api.handle_exceptions (
89 p_api_name => l_api_name
90 ,p_pkg_name => g_package_name
91 ,p_exc_name => 'OKC_API.g_ret_sts_error'
92 ,x_msg_count => x_msg_count
93 ,x_msg_data => x_msg_data
94 ,p_api_type => '_PUB' );
95
96 WHEN okc_api.g_exception_unexpected_error THEN
97 x_return_status := okc_api.handle_exceptions (
98 p_api_name => l_api_name
99 ,p_pkg_name => g_package_name
100 ,p_exc_name => 'OKC_API.g_ret_sts_unexp_error'
101 ,x_msg_count => x_msg_count
102 ,x_msg_data => x_msg_data
103 ,p_api_type => '_PUB' );
104 WHEN OTHERS THEN
105 x_return_status := okc_api.handle_exceptions (
106 p_api_name => l_api_name
107 ,p_pkg_name => g_package_name
108 ,p_exc_name => 'OTHERS'
109 ,x_msg_count => x_msg_count
110 ,x_msg_data => x_msg_data
111 ,p_api_type => '_PUB' );
112
113 END add_recent;
114
115
116
117 --
118 -- ---------------------------------------------------------------------------------
119 -- PROCEDURE: Add_Bookmark --
120 -- DESCRIPTION: Inserts a row for a bookmarked contract (Type B) into --
121 -- okc_user_bins using the row record passed --
122 -- DEPENDENCIES: none --
123 -- CHANGE HISTORY: --
124 -- 19/aug/99 - created --
125 -- --
126 -- ---------------------------------------------------------------------------------
127 --
128 PROCEDURE add_bookmark (
129 p_contract_id IN OKC_K_HEADERS_B.id%TYPE
130 ,p_contract_number IN OKC_K_HEADERS_B.contract_number%TYPE
131 ,p_contract_type IN OKC_K_HEADERS_B.chr_type%TYPE
132 ,p_contract_modifier IN OKC_K_HEADERS_B.contract_number_modifier%TYPE
133 ,p_short_description IN OKC_K_HEADERS_TL.short_description%TYPE
134 ,p_program_name IN VARCHAR2
135 ,x_return_status OUT NOCOPY VARCHAR2
136 ,x_msg_count OUT NOCOPY NUMBER
137 ,x_msg_data OUT NOCOPY VARCHAR2 )
138 IS
139 PRAGMA AUTONOMOUS_TRANSACTION;
140
141 l_api_name VARCHAR2(20) := 'ADD_BOOKMARK';
142
143 BEGIN
144 --
145 -- pass the parameters to the private procedure and process
146 --
147
148 okc_doclist_pvt.add_bookmark (
149 p_contract_id => p_contract_id
150 ,p_contract_number => p_contract_number
151 ,p_contract_type => p_contract_type
152 ,p_contract_modifier => p_contract_modifier
153 ,p_short_description => p_short_description
154 ,p_program_name => p_program_name
155 ,x_return_status => x_return_status
156 ,x_msg_count => x_msg_count
157 ,x_msg_data => x_msg_data );
158
159 IF (x_return_status = okc_api.g_ret_sts_unexp_error) THEN
160 RAISE okc_api.g_exception_unexpected_error;
161 ELSIF (x_return_status = okc_api.g_ret_sts_error) THEN
162 RAISE okc_api.g_exception_error;
163 END IF;
164
165 COMMIT;
166
167 EXCEPTION
168 WHEN okc_api.g_exception_error THEN
169 x_return_status := okc_api.handle_exceptions (
170 p_api_name => l_api_name
171 ,p_pkg_name => g_package_name
172 ,p_exc_name => 'OKC_API.g_ret_sts_error'
173 ,x_msg_count => x_msg_count
174 ,x_msg_data => x_msg_data
175 ,p_api_type => '_PUB' );
176
177 WHEN okc_api.g_exception_unexpected_error THEN
178 x_return_status := okc_api.handle_exceptions (
179 p_api_name => l_api_name
180 ,p_pkg_name => g_package_name
181 ,p_exc_name => 'OKC_API.g_ret_sts_unexp_error'
182 ,x_msg_count => x_msg_count
183 ,x_msg_data => x_msg_data
184 ,p_api_type => '_PUB' );
185 WHEN OTHERS THEN
186 x_return_status := okc_api.handle_exceptions (
187 p_api_name => l_api_name
188 ,p_pkg_name => g_package_name
189 ,p_exc_name => 'OTHERS'
190 ,x_msg_count => x_msg_count
191 ,x_msg_data => x_msg_data
192 ,p_api_type => '_PUB' );
193
194 END add_bookmark;
195
196
197 --
198 -- ---------------------------------------------------------------------------------
199 -- PROCEDURE: Delete_Entry --
200 -- DESCRIPTION: Deletes the row identified in the record passed --
201 -- --
202 -- DEPENDENCIES: none --
203 -- CHANGE HISTORY: --
204 -- 19/aug/99 - created --
205 -- --
206 -- ---------------------------------------------------------------------------------
207 --
208 PROCEDURE delete_entry (
209 x_ubl_id IN OKC_USER_BINS.id%TYPE
210 ,x_return_status OUT NOCOPY VARCHAR2
211 ,x_msg_count OUT NOCOPY NUMBER
212 ,x_msg_data OUT NOCOPY VARCHAR2 )
213 IS
214 PRAGMA AUTONOMOUS_TRANSACTION;
215
216 l_api_name VARCHAR2(30) := 'DELETE_ENTRY';
217 this_row NUMBER;
218
219 BEGIN
220 --
221 -- call the private API to delete the row passed
222 --
223 this_row := x_ubl_id;
224 okc_Doclist_pvt.delete_entry (
225 p_ubl_id => this_row
226 ,x_return_status => x_return_status
227 ,x_msg_count => x_msg_count
228 ,x_msg_data => x_msg_data);
229
230 IF (x_return_status = okc_api.g_ret_sts_unexp_error) THEN
231 RAISE okc_api.g_exception_unexpected_error;
232 ELSIF (x_return_status = okc_api.g_ret_sts_error) THEN
233 RAISE okc_api.g_exception_error;
234 END IF;
235
236 COMMIT;
237
238 EXCEPTION
239 WHEN okc_api.g_exception_error THEN
240 x_return_status := okc_api.handle_exceptions (
241 p_api_name => l_api_name
242 ,p_pkg_name => g_package_name
243 ,p_exc_name => 'OKC_API.g_ret_sts_error'
244 ,x_msg_count => x_msg_count
245 ,x_msg_data => x_msg_data
246 ,p_api_type => '_PVT' );
247
248 WHEN okc_api.g_exception_unexpected_error THEN
249 x_return_status := okc_api.handle_exceptions (
250 p_api_name => l_api_name
251 ,p_pkg_name => g_package_name
252 ,p_exc_name => 'OKC_API.g_ret_sts_unexp_error'
253 ,x_msg_count => x_msg_count
254 ,x_msg_data => x_msg_data
255 ,p_api_type => '_PVT' );
256 WHEN OTHERS THEN
257 x_return_status := okc_api.handle_exceptions (
258 p_api_name => l_api_name
259 ,p_pkg_name => g_package_name
260 ,p_exc_name => 'OTHERS'
261 ,x_msg_count => x_msg_count
262 ,x_msg_data => x_msg_data
263 ,p_api_type => '_PVT' );
264
265 END delete_entry;
266
267
268
269 END OKC_DOCLIST_PUB;