[Home] [Help]
PACKAGE BODY: APPS.OKL_VAR_INT_PARAMS_PVT
Source
1 PACKAGE BODY OKL_VAR_INT_PARAMS_PVT AS
2 /* $Header: OKLRVIRB.pls 120.0 2005/09/28 10:16:02 dkagrawa noship $ */
3
4 -------------------------------------------------------------------------------
5 -- PROCEDURE create_var_int_params
6 -------------------------------------------------------------------------------
7 -- Start of comments
8 --
9 -- Procedure Name : create_var_int_params
10 -- Description : This procedure is a wrapper that creates interest rate parameters for
11 -- : variable rate interest
12 --
13 -- Business Rules : this procedure is used to create Variable rate Parameters
14 -- this procedure inserts records into the OKL_VAR_INT_PARAMS_V table
15 --
16 -- Parameters :
17 -- Version : 1.0
18 -- History : 29-JUL-2005 dkagrawa created
19 -- End of comments
20
21 PROCEDURE create_var_int_params(p_api_version IN NUMBER,
22 p_init_msg_list IN VARCHAR2,
23 x_return_status OUT NOCOPY VARCHAR2,
24 x_msg_count OUT NOCOPY NUMBER,
25 x_msg_data OUT NOCOPY VARCHAR2,
26 p_virv_rec IN virv_rec_type,
27 x_virv_rec OUT NOCOPY virv_rec_type)IS
28
29 -- Variables Declarations
30 l_api_version CONSTANT NUMBER DEFAULT 1.0;
31 l_api_name CONSTANT VARCHAR2(30) DEFAULT 'create_var_int_params';
32 l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
33
34 -- Record/Table Type Declarations
35 l_virv_rec virv_rec_type;
36
37 l_module CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_VAR_INT_PARAMS_PVT.create_var_int_params';
38 l_debug_enabled VARCHAR2(10);
39
40 BEGIN
41 x_return_status := OKL_API.G_RET_STS_SUCCESS;
42
43 -- check for logging on PROCEDURE level
44 l_debug_enabled := okl_debug_pub.check_log_enabled;
45
46 IF(NVL(l_debug_enabled,'N')='Y') THEN
47 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'begin debug OKLRVISB.pls call create_var_int_params for record');
48 END IF;
49
50 -- call START_ACTIVITY to create savepoint, check compatibility
51 -- and initialize message list
52 l_return_status := OKL_API.START_ACTIVITY( p_api_name => l_api_name
53 ,p_pkg_name => G_PKG_NAME
54 ,p_init_msg_list => p_init_msg_list
55 ,l_api_version => l_api_version
56 ,p_api_version => p_api_version
57 ,p_api_type => g_api_type
58 ,x_return_status => x_return_status);
59 -- check if activity started successfully
60 IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
61 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
62 ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
63 RAISE OKL_API.G_EXCEPTION_ERROR;
64 END IF;
65
66 l_virv_rec := p_virv_rec;
67
68 -- call the TAPI insert_row to create varaible rate parameters
69 OKL_VIR_PVT.insert_row(p_api_version => p_api_version
70 ,p_init_msg_list => p_init_msg_list
71 ,x_return_status => x_return_status
72 ,x_msg_count => x_msg_count
73 ,x_msg_data => x_msg_data
74 ,p_virv_rec => l_virv_rec
75 ,x_virv_rec => x_virv_rec);
76
77 -- write to log
78 IF(NVL(l_debug_enabled,'N')='Y') THEN
79 okl_debug_pub.log_debug(FND_LOG.LEVEL_STATEMENT,
80 l_module,
81 'okl_vir_pvt.insert_row returned with status '||x_return_status||' id '||x_virv_rec.id
82 );
83 END IF;
84
85 IF(x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR)THEN
86 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
87 ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR)THEN
88 RAISE OKL_API.G_EXCEPTION_ERROR;
89 END IF;
90
91 OKL_API.END_ACTIVITY(x_msg_count => x_msg_count
92 ,x_msg_data => x_msg_data
93 );
94
95 IF(NVL(l_debug_enabled,'N')='Y') THEN
96 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'end debug OKLRVISB.pls call create_var_int_params for record');
97 END IF;
98
99 EXCEPTION
100 WHEN OKL_API.G_EXCEPTION_ERROR THEN
101 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
102 p_api_name => l_api_name,
103 p_pkg_name => G_PKG_NAME,
104 p_exc_name => 'OKL_API.G_RET_STS_ERROR',
105 x_msg_count => x_msg_count,
106 x_msg_data => x_msg_data,
107 p_api_type => g_api_type);
108
109 WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
110 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
111 p_api_name => l_api_name,
112 p_pkg_name => G_PKG_NAME,
113 p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
114 x_msg_count => x_msg_count,
115 x_msg_data => x_msg_data,
116 p_api_type => g_api_type);
117
118 WHEN OTHERS THEN
119 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
120 p_api_name => l_api_name,
121 p_pkg_name => G_PKG_NAME,
122 p_exc_name => 'OTHERS',
123 x_msg_count => x_msg_count,
124 x_msg_data => x_msg_data,
125 p_api_type => g_api_type);
126 END create_var_int_params;
127
128
129 -------------------------------------------------------------------------------
130 -- PROCEDURE create_var_int_params
131 -------------------------------------------------------------------------------
132 -- Start of comments
133 --
134 -- Procedure Name : create_var_int_params
135 -- Description : This procedure is a wrapper that creates interest rate parameters for
136 -- : variable rate interest
137 --
138 -- Business Rules : this procedure is used to create Variable rate Parameters
139 -- this procedure inserts records into the OKL_VAR_INT_PARAMS_V table
140 --
141 -- Parameters :
142 -- Version : 1.0
143 -- History : 29-JUL-2005 dkagrawa created
144 -- End of comments
145
146 PROCEDURE create_var_int_params(p_api_version IN NUMBER,
147 p_init_msg_list IN VARCHAR2,
148 x_return_status OUT NOCOPY VARCHAR2,
149 x_msg_count OUT NOCOPY NUMBER,
150 x_msg_data OUT NOCOPY VARCHAR2,
151 p_virv_tbl IN virv_tbl_type,
152 x_virv_tbl OUT NOCOPY virv_tbl_type)IS
153
154 -- Variables Declarations
155 l_api_version CONSTANT NUMBER DEFAULT 1.0;
156 l_api_name CONSTANT VARCHAR2(30) DEFAULT 'create_var_int_params';
157 l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
158
159 -- Record/Table Type Declarations
160 l_virv_tbl virv_tbl_type;
161
162 l_module CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_VAR_INT_PARAMS_PVT.create_var_int_params';
163 l_debug_enabled VARCHAR2(10);
164 is_debug_procedure_on BOOLEAN;
165
166 BEGIN
167 x_return_status := OKL_API.G_RET_STS_SUCCESS;
168
169 -- check for logging on PROCEDURE level
170 l_debug_enabled := okl_debug_pub.check_log_enabled;
171
172 IF(NVL(l_debug_enabled,'N')='Y') THEN
173 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'begin debug OKLRVISB.pls call create_var_int_params for table');
174 END IF;
175
176 -- call START_ACTIVITY to create savepoint, check compatibility
177 -- and initialize message list
178 l_return_status := OKL_API.START_ACTIVITY( p_api_name => l_api_name
179 ,p_pkg_name => G_PKG_NAME
180 ,p_init_msg_list => p_init_msg_list
181 ,l_api_version => l_api_version
182 ,p_api_version => p_api_version
183 ,p_api_type => g_api_type
184 ,x_return_status => x_return_status);
185 -- check if activity started successfully
186 IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
187 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
188 ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
189 RAISE OKL_API.G_EXCEPTION_ERROR;
190 END IF;
191
192 l_virv_tbl := p_virv_tbl;
193
194 -- call the TAPI insert_row to create varaible rate parameters
195 OKL_VIR_PVT.insert_row(p_api_version => p_api_version
196 ,p_init_msg_list => p_init_msg_list
197 ,x_return_status => x_return_status
198 ,x_msg_count => x_msg_count
199 ,x_msg_data => x_msg_data
200 ,p_virv_tbl => l_virv_tbl
201 ,x_virv_tbl => x_virv_tbl);
202
203 -- write to log
204 IF(NVL(l_debug_enabled,'N')='Y') THEN
205 okl_debug_pub.log_debug(FND_LOG.LEVEL_STATEMENT,
206 l_module,
207 'okl_vir_pvt.insert_row returned with status '||x_return_status
208 );
209 END IF;
210
211 IF(x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR)THEN
212 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
213 ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR)THEN
214 RAISE OKL_API.G_EXCEPTION_ERROR;
215 END IF;
216
217 OKL_API.END_ACTIVITY(x_msg_count => x_msg_count
218 ,x_msg_data => x_msg_data
219 );
220
221 IF(NVL(l_debug_enabled,'N')='Y') THEN
222 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'end debug OKLRVISB.pls call create_var_int_params for table');
223 END IF;
224
225 EXCEPTION
226 WHEN OKL_API.G_EXCEPTION_ERROR THEN
227 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
228 p_api_name => l_api_name,
229 p_pkg_name => G_PKG_NAME,
230 p_exc_name => 'OKL_API.G_RET_STS_ERROR',
231 x_msg_count => x_msg_count,
232 x_msg_data => x_msg_data,
233 p_api_type => g_api_type);
234
235 WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
236 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
237 p_api_name => l_api_name,
238 p_pkg_name => G_PKG_NAME,
239 p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
240 x_msg_count => x_msg_count,
241 x_msg_data => x_msg_data,
242 p_api_type => g_api_type);
243
244 WHEN OTHERS THEN
245 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
246 p_api_name => l_api_name,
247 p_pkg_name => G_PKG_NAME,
248 p_exc_name => 'OTHERS',
249 x_msg_count => x_msg_count,
250 x_msg_data => x_msg_data,
251 p_api_type => g_api_type);
252 END create_var_int_params;
253
254 -------------------------------------------------------------------------------
255 -- PROCEDURE update_var_int_params
256 -------------------------------------------------------------------------------
257 -- Start of comments
258 --
259 -- Procedure Name : update_var_int_params
260 -- Description : This procedure is a wrapper that updates the Variable rate parameters
261 -- for a record
262 --
263 -- Business Rules : this procedure is used to update Variable rate Parameters
264 -- this procedure updates records of the OKL_VAR_INT_PARAMS_V table
265 --
266 -- Parameters :
267 -- Version : 1.0
268 -- History : 01-AUG-2005 dkagrawa created
269 -- End of comments
270
271 PROCEDURE update_var_int_params(p_api_version IN NUMBER,
272 p_init_msg_list IN VARCHAR2,
273 x_return_status OUT NOCOPY VARCHAR2,
274 x_msg_count OUT NOCOPY NUMBER,
275 x_msg_data OUT NOCOPY VARCHAR2,
276 p_virv_rec IN virv_rec_type,
277 x_virv_rec OUT NOCOPY virv_rec_type) IS
278
279 -- Variables Declarations
280 l_api_version CONSTANT NUMBER DEFAULT 1.0;
281 l_api_name CONSTANT VARCHAR2(30) DEFAULT 'update_var_int_params';
282 l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
283
284 -- Record/Table Type Declarations
285 l_virv_rec virv_rec_type;
286
287 l_module CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_VAR_INT_PARAMS_PVT.update_var_int_params';
288 l_debug_enabled VARCHAR2(10);
289
290 BEGIN
291 x_return_status := OKL_API.G_RET_STS_SUCCESS;
292
293 -- check for logging on PROCEDURE level
294 l_debug_enabled := okl_debug_pub.check_log_enabled;
295
296 IF(NVL(l_debug_enabled,'N')='Y') THEN
297 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'start debug OKLRVISB.pls call update_var_int_params for record');
298 END IF;
299
300 -- call START_ACTIVITY to create savepoint, check compatibility
301 -- and initialize message list
302 l_return_status := OKL_API.START_ACTIVITY( p_api_name => l_api_name
303 ,p_pkg_name => G_PKG_NAME
304 ,p_init_msg_list => p_init_msg_list
305 ,l_api_version => l_api_version
306 ,p_api_version => p_api_version
307 ,p_api_type => g_api_type
308 ,x_return_status => x_return_status);
309 -- check if activity started successfully
310 IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
311 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
312 ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
313 RAISE OKL_API.G_EXCEPTION_ERROR;
314 END IF;
315
316 l_virv_rec := p_virv_rec;
317
318 -- call the TAPI update_row to update variable rate parametrs
319 OKL_VIR_PVT.update_row(p_api_version => p_api_version
320 ,p_init_msg_list => p_init_msg_list
321 ,x_return_status => x_return_status
322 ,x_msg_count => x_msg_count
323 ,x_msg_data => x_msg_data
324 ,p_virv_rec => l_virv_rec
325 ,x_virv_rec => x_virv_rec);
326 IF(NVL(l_debug_enabled,'N')='Y') THEN
327 okl_debug_pub.log_debug(FND_LOG.LEVEL_STATEMENT,
328 l_module,'okl_vir_pvt.update_row returned with status '||x_return_status||' id '||x_virv_rec.id
329 );
330 END IF;
331 IF(x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR)THEN
332 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
333 ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR)THEN
334 RAISE OKL_API.G_EXCEPTION_ERROR;
335 END IF;
336
337
338 OKL_API.END_ACTIVITY(x_msg_count => x_msg_count
339 ,x_msg_data => x_msg_data
340 );
341
342 IF(NVL(l_debug_enabled,'N')='Y') THEN
343 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'ends debug OKLRVISB.pls call update_var_int_params for record');
344 END IF;
345
346 EXCEPTION
347 WHEN OKL_API.G_EXCEPTION_ERROR THEN
348 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
349 p_api_name => l_api_name,
350 p_pkg_name => G_PKG_NAME,
351 p_exc_name => 'OKL_API.G_RET_STS_ERROR',
352 x_msg_count => x_msg_count,
353 x_msg_data => x_msg_data,
354 p_api_type => g_api_type);
355
356 WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
357 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
358 p_api_name => l_api_name,
359 p_pkg_name => G_PKG_NAME,
360 p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
361 x_msg_count => x_msg_count,
362 x_msg_data => x_msg_data,
363 p_api_type => g_api_type);
364
365 WHEN OTHERS THEN
366 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
367 p_api_name => l_api_name,
368 p_pkg_name => G_PKG_NAME,
369 p_exc_name => 'OTHERS',
370 x_msg_count => x_msg_count,
371 x_msg_data => x_msg_data,
372 p_api_type => g_api_type);
373 END update_var_int_params;
374
375 -------------------------------------------------------------------------------
376 -- PROCEDURE update_var_int_params
377 -------------------------------------------------------------------------------
378 -- Start of comments
379 --
380 -- Procedure Name : update_var_int_params
381 -- Description : This procedure is a wrapper that updates the Variable rate parameters
382 -- for a table
383 --
384 -- Business Rules : this procedure is used to update Variable rate Parameters
385 -- this procedure updates records of the OKL_VAR_INT_PARAMS_V table
386 --
387 -- Parameters :
388 -- Version : 1.0
389 -- History : 01-AUG-2005 dkagrawa created
390 -- End of comments
391
392 PROCEDURE update_var_int_params(p_api_version IN NUMBER,
393 p_init_msg_list IN VARCHAR2,
394 x_return_status OUT NOCOPY VARCHAR2,
395 x_msg_count OUT NOCOPY NUMBER,
396 x_msg_data OUT NOCOPY VARCHAR2,
397 p_virv_tbl IN virv_tbl_type,
398 x_virv_tbl OUT NOCOPY virv_tbl_type) IS
399 -- Variables Declarations
400 l_api_version CONSTANT NUMBER DEFAULT 1.0;
401 l_api_name CONSTANT VARCHAR2(30) DEFAULT 'update_var_int_params';
402 l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
403
404 -- Record/Table Type Declarations
405 l_virv_tbl virv_tbl_type;
406
407 l_module CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_VAR_INT_PARAMS_PVT.update_var_int_params';
408 l_debug_enabled VARCHAR2(10);
409
410 BEGIN
411 x_return_status := OKL_API.G_RET_STS_SUCCESS;
412
413 -- check for logging on PROCEDURE level
414 l_debug_enabled := okl_debug_pub.check_log_enabled;
415
416 IF(NVL(l_debug_enabled,'N')='Y') THEN
417 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'start debug OKLRVISB.pls call update_var_int_params for table');
418 END IF;
419
420 -- call START_ACTIVITY to create savepoint, check compatibility
421 -- and initialize message list
422 l_return_status := OKL_API.START_ACTIVITY( p_api_name => l_api_name
423 ,p_pkg_name => G_PKG_NAME
424 ,p_init_msg_list => p_init_msg_list
425 ,l_api_version => l_api_version
426 ,p_api_version => p_api_version
427 ,p_api_type => g_api_type
428 ,x_return_status => x_return_status);
429 -- check if activity started successfully
430 IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
431 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
432 ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
433 RAISE OKL_API.G_EXCEPTION_ERROR;
434 END IF;
435
436 l_virv_tbl := p_virv_tbl;
437
438 -- call the TAPI update_row to update variable rate parametrs
439 OKL_VIR_PVT.update_row(p_api_version => p_api_version
440 ,p_init_msg_list => p_init_msg_list
441 ,x_return_status => x_return_status
442 ,x_msg_count => x_msg_count
443 ,x_msg_data => x_msg_data
444 ,p_virv_tbl => l_virv_tbl
445 ,x_virv_tbl => x_virv_tbl);
446 IF(NVL(l_debug_enabled,'N')='Y') THEN
447 okl_debug_pub.log_debug(FND_LOG.LEVEL_STATEMENT,
448 l_module,'okl_vir_pvt.update_row returned with status '||x_return_status
449 );
450 END IF;
451 IF(x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR)THEN
452 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
453 ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR)THEN
454 RAISE OKL_API.G_EXCEPTION_ERROR;
455 END IF;
456
457 OKL_API.END_ACTIVITY(x_msg_count => x_msg_count
458 ,x_msg_data => x_msg_data
459 );
460 IF(NVL(l_debug_enabled,'N')='Y') THEN
461 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'ends debug OKLRVISB.pls call update_var_int_params for table');
462 END IF;
463
464 EXCEPTION
465 WHEN OKL_API.G_EXCEPTION_ERROR THEN
466 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
467 p_api_name => l_api_name,
468 p_pkg_name => G_PKG_NAME,
469 p_exc_name => 'OKL_API.G_RET_STS_ERROR',
470 x_msg_count => x_msg_count,
471 x_msg_data => x_msg_data,
472 p_api_type => g_api_type);
473
474 WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
475 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
476 p_api_name => l_api_name,
477 p_pkg_name => G_PKG_NAME,
478 p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
479 x_msg_count => x_msg_count,
480 x_msg_data => x_msg_data,
481 p_api_type => g_api_type);
482
483 WHEN OTHERS THEN
484 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
485 p_api_name => l_api_name,
486 p_pkg_name => G_PKG_NAME,
487 p_exc_name => 'OTHERS',
488 x_msg_count => x_msg_count,
489 x_msg_data => x_msg_data,
490 p_api_type => g_api_type);
491 END update_var_int_params;
492
493 -------------------------------------------------------------------------------
494 -- PROCEDURE delete_var_int_params
495 -------------------------------------------------------------------------------
496 -- Start of comments
497 --
498 -- Procedure Name : delete_var_int_params
499 -- Description : This procedure is a wrapper that deletes the Variable rate parameters
500 -- for a table
501 --
502 -- Business Rules : this procedure is used to delete Variable rate Parameters
503 -- this procedure delete records of the OKL_VAR_INT_PARAMS_V table
504 --
505 -- Parameters :
506 -- Version : 1.0
507 -- History : 01-AUG-2005 dkagrawa created
508 -- End of comments
509
510 PROCEDURE delete_var_int_params(p_api_version IN NUMBER,
511 p_init_msg_list IN VARCHAR2,
512 x_return_status OUT NOCOPY VARCHAR2,
513 x_msg_count OUT NOCOPY NUMBER,
514 x_msg_data OUT NOCOPY VARCHAR2,
515 p_virv_tbl IN virv_tbl_type ) IS
516
517 -- Variables Declarations
518 l_api_version CONSTANT NUMBER DEFAULT 1.0;
519 l_api_name CONSTANT VARCHAR2(30) DEFAULT 'delete_var_int_params';
520 l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
521
522 -- Record/Table Type Declarations
523 l_virv_tbl virv_tbl_type;
524
525 l_module CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_VAR_INT_PARAMS_PVT.delete_var_int_params';
526 l_debug_enabled VARCHAR2(10);
527
528 BEGIN
529 x_return_status := OKL_API.G_RET_STS_SUCCESS;
530
531 -- check for logging on PROCEDURE level
532 l_debug_enabled := okl_debug_pub.check_log_enabled;
533
534 IF(NVL(l_debug_enabled,'N')='Y') THEN
535 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'start debug OKLRVISB.pls call delete_var_int_params for table');
536 END IF;
537
538 -- call START_ACTIVITY to create savepoint, check compatibility
539 -- and initialize message list
540 l_return_status := OKL_API.START_ACTIVITY( p_api_name => l_api_name
541 ,p_pkg_name => G_PKG_NAME
542 ,p_init_msg_list => p_init_msg_list
543 ,l_api_version => l_api_version
544 ,p_api_version => p_api_version
545 ,p_api_type => g_api_type
546 ,x_return_status => x_return_status);
547 -- check if activity started successfully
548 IF(l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) THEN
549 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
550 ELSIF (l_return_status = OKL_API.G_RET_STS_ERROR) THEN
551 RAISE OKL_API.G_EXCEPTION_ERROR;
552 END IF;
553
554 l_virv_tbl := p_virv_tbl;
555
556 -- call the TAPI delete_row to delete variable rate parametrs
557 OKL_VIR_PVT.delete_row(p_api_version => p_api_version
558 ,p_init_msg_list => p_init_msg_list
559 ,x_return_status => x_return_status
560 ,x_msg_count => x_msg_count
561 ,x_msg_data => x_msg_data
562 ,p_virv_tbl => l_virv_tbl
563 );
564 IF(NVL(l_debug_enabled,'N')='Y') THEN
565 okl_debug_pub.log_debug(FND_LOG.LEVEL_STATEMENT,
566 l_module,'okl_vir_pvt.delete_row returned with status '||x_return_status
567 );
568 END IF;
569 IF(x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR)THEN
570 RAISE OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
571 ELSIF (x_return_status = OKL_API.G_RET_STS_ERROR)THEN
572 RAISE OKL_API.G_EXCEPTION_ERROR;
573 END IF;
574
575 OKL_API.END_ACTIVITY(x_msg_count => x_msg_count
576 ,x_msg_data => x_msg_data
577 );
578 IF(NVL(l_debug_enabled,'N')='Y') THEN
579 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'ends debug OKLRVISB.pls call delete_var_int_params for a table');
580 END IF;
581
582 EXCEPTION
583 WHEN OKL_API.G_EXCEPTION_ERROR THEN
584 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
585 p_api_name => l_api_name,
586 p_pkg_name => G_PKG_NAME,
587 p_exc_name => 'OKL_API.G_RET_STS_ERROR',
588 x_msg_count => x_msg_count,
589 x_msg_data => x_msg_data,
590 p_api_type => g_api_type);
591
592 WHEN OKL_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
593 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
594 p_api_name => l_api_name,
595 p_pkg_name => G_PKG_NAME,
596 p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
597 x_msg_count => x_msg_count,
598 x_msg_data => x_msg_data,
599 p_api_type => g_api_type);
600
601 WHEN OTHERS THEN
602 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
603 p_api_name => l_api_name,
604 p_pkg_name => G_PKG_NAME,
605 p_exc_name => 'OTHERS',
606 x_msg_count => x_msg_count,
607 x_msg_data => x_msg_data,
608 p_api_type => g_api_type);
609 END delete_var_int_params;
610
611 -------------------------------------------------------------------------------
612 -- PROCEDURE validate_var_int_params
613 -------------------------------------------------------------------------------
614 -- Start of comments
615 --
616 -- Procedure Name : validate_var_int_params
617 -- Description : This procedure is a wrapper that validate the Variable rate parameters
618 -- for a record
619 --
620 -- Business Rules : this procedure is used to validate Variable rate Parameters
621 -- this procedure validate record of the OKL_VAR_INT_PARAMS_V table
622 --
623 -- Parameters :
624 -- Version : 1.0
625 -- History : 01-AUG-2005 dkagrawa created
626 -- End of comments
627
628 PROCEDURE validate_var_int_params(
629 p_api_version IN NUMBER,
630 p_init_msg_list IN VARCHAR2,
631 x_return_status OUT NOCOPY VARCHAR2,
632 x_msg_count OUT NOCOPY NUMBER,
633 x_msg_data OUT NOCOPY VARCHAR2,
634 p_virv_rec IN virv_rec_type) IS
635
636
637 l_api_name CONSTANT VARCHAR2(30) := 'validate_var_int_params';
638 l_api_version CONSTANT NUMBER := 1.0;
639 l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
640
641 l_virv_rec virv_rec_type;
642
643 l_module CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_VAR_INT_PARAMS_PVT.validate_var_int_params';
644 l_debug_enabled VARCHAR2(10);
645
646 Begin
647
648 x_return_status := OKL_API.G_RET_STS_SUCCESS;
649
650 -- check for logging on PROCEDURE level
651 l_debug_enabled := okl_debug_pub.check_log_enabled;
652
653 IF(NVL(l_debug_enabled,'N')='Y') THEN
654 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'start debug OKLRVISB.pls call validate_var_int_params for record');
655 END IF;
656
657 -- call START_ACTIVITY to create savepoint, check compatibility
658 -- and initialize message list
659
660 l_return_status := OKL_API.START_ACTIVITY(
661 p_api_name => l_api_name,
662 p_pkg_name => g_pkg_name,
663 p_init_msg_list => p_init_msg_list,
664 l_api_version => l_api_version,
665 p_api_version => p_api_version,
666 p_api_type => g_api_type,
667 x_return_status => x_return_status);
668
669 -- check if activity started successfully
670 If (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
671 raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
672 Elsif (l_return_status = OKL_API.G_RET_STS_ERROR) then
673 raise OKL_API.G_EXCEPTION_ERROR;
674 End If;
675
676 l_virv_rec := p_virv_rec;
677 --call the TAPI validate_row to validate the row.
678 okl_vir_pvt.validate_row(
679 p_api_version => p_api_version,
680 p_init_msg_list => p_init_msg_list,
681 x_return_status => x_return_status,
682 x_msg_count => x_msg_count,
683 x_msg_data => x_msg_data,
684 p_virv_rec => l_virv_rec);
685
686 IF(NVL(l_debug_enabled,'N')='Y') THEN
687 okl_debug_pub.log_debug(FND_LOG.LEVEL_STATEMENT,
688 l_module,'okl_vir_pvt.validate_row returned with status '||x_return_status
689 );
690 END IF;
691
692 -- check return status
693 If x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR Then
694 raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
695 Elsif x_return_status = OKL_API.G_RET_STS_ERROR Then
696 raise OKL_API.G_EXCEPTION_ERROR;
697 End If;
698
699 OKL_API.END_ACTIVITY(x_msg_count => x_msg_count,
700 x_msg_data => x_msg_data
701 );
702 IF(NVL(l_debug_enabled,'N')='Y') THEN
703 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'ends debug OKLRVISB.pls call validate_var_int_params for a record');
704 END IF;
705
706 EXCEPTION
707 when OKL_API.G_EXCEPTION_ERROR then
708 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
709 p_api_name => l_api_name,
710 p_pkg_name => g_pkg_name,
711 p_exc_name => 'OKL_API.G_RET_STS_ERROR',
712 x_msg_count => x_msg_count,
713 x_msg_data => x_msg_data,
714 p_api_type => g_api_type);
715
716 when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
717 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
718 p_api_name => l_api_name,
719 p_pkg_name => g_pkg_name,
720 p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
721 x_msg_count => x_msg_count,
722 x_msg_data => x_msg_data,
723 p_api_type => g_api_type);
724
725 when OTHERS then
726 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
727 p_api_name => l_api_name,
728 p_pkg_name => g_pkg_name,
729 p_exc_name => 'OTHERS',
730 x_msg_count => x_msg_count,
731 x_msg_data => x_msg_data,
732 p_api_type => g_api_type);
733 END validate_var_int_params;
734
735 -------------------------------------------------------------------------------
736 -- PROCEDURE validate_var_int_params
737 -------------------------------------------------------------------------------
738 -- Start of comments
739 --
740 -- Procedure Name : validate_var_int_params
741 -- Description : This procedure is a wrapper that validate the Variable rate parameters
742 -- for a table
743 --
744 -- Business Rules : this procedure is used to validate Variable rate Parameters
745 -- this procedure validate records of the OKL_VAR_INT_PARAMS_V table
746 --
747 -- Parameters :
748 -- Version : 1.0
749 -- History : 01-AUG-2005 dkagrawa created
750 -- End of comments
751
752 PROCEDURE validate_var_int_params(
753 p_api_version IN NUMBER,
754 p_init_msg_list IN VARCHAR2,
755 x_return_status OUT NOCOPY VARCHAR2,
756 x_msg_count OUT NOCOPY NUMBER,
757 x_msg_data OUT NOCOPY VARCHAR2,
758 p_virv_tbl IN virv_tbl_type) IS
759
760
761 l_api_name CONSTANT VARCHAR2(30) := 'validate_var_int_params';
762 l_api_version CONSTANT NUMBER := 1.0;
763 l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
764
765 l_virv_tbl virv_tbl_type;
766
767 l_module CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_VAR_INT_PARAMS_PVT.validate_var_int_params';
768 l_debug_enabled VARCHAR2(10);
769
770 Begin
771
772 x_return_status := OKL_API.G_RET_STS_SUCCESS;
773
774 -- check for logging on PROCEDURE level
775 l_debug_enabled := okl_debug_pub.check_log_enabled;
776
777 IF(NVL(l_debug_enabled,'N')='Y') THEN
778 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'start debug OKLRVISB.pls call validate_var_int_params for table');
779 END IF;
780
781 -- call START_ACTIVITY to create savepoint, check compatibility
782 -- and initialize message list
783
784 l_return_status := OKL_API.START_ACTIVITY(
785 p_api_name => l_api_name,
786 p_pkg_name => g_pkg_name,
787 p_init_msg_list => p_init_msg_list,
788 l_api_version => l_api_version,
789 p_api_version => p_api_version,
790 p_api_type => g_api_type,
791 x_return_status => x_return_status);
792
793 -- check if activity started successfully
794 If (l_return_status = OKL_API.G_RET_STS_UNEXP_ERROR) then
795 raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
796 Elsif (l_return_status = OKL_API.G_RET_STS_ERROR) then
797 raise OKL_API.G_EXCEPTION_ERROR;
798 End If;
799
800 l_virv_tbl := p_virv_tbl;
801 --call the TAPI validate_row to validate the row.
802 okl_vir_pvt.validate_row(
803 p_api_version => p_api_version,
804 p_init_msg_list => p_init_msg_list,
805 x_return_status => x_return_status,
806 x_msg_count => x_msg_count,
807 x_msg_data => x_msg_data,
808 p_virv_tbl => l_virv_tbl);
809
810 IF(NVL(l_debug_enabled,'N')='Y') THEN
811 okl_debug_pub.log_debug(FND_LOG.LEVEL_STATEMENT,
812 l_module,'okl_vir_pvt.validate_row returned with status '||x_return_status
813 );
814 END IF;
815
816 -- check return status
817 If x_return_status = OKL_API.G_RET_STS_UNEXP_ERROR Then
818 raise OKL_API.G_EXCEPTION_UNEXPECTED_ERROR;
819 Elsif x_return_status = OKL_API.G_RET_STS_ERROR Then
820 raise OKL_API.G_EXCEPTION_ERROR;
821 End If;
822
823 OKL_API.END_ACTIVITY(x_msg_count => x_msg_count,
824 x_msg_data => x_msg_data
825 );
826 IF(NVL(l_debug_enabled,'N')='Y') THEN
827 okl_debug_pub.log_debug(FND_LOG.LEVEL_PROCEDURE,l_module,'ends debug OKLRVISB.pls call validate_var_int_params for a table');
828 END IF;
829
830 EXCEPTION
831 when OKL_API.G_EXCEPTION_ERROR then
832 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
833 p_api_name => l_api_name,
834 p_pkg_name => g_pkg_name,
835 p_exc_name => 'OKL_API.G_RET_STS_ERROR',
836 x_msg_count => x_msg_count,
837 x_msg_data => x_msg_data,
838 p_api_type => g_api_type);
839
840 when OKL_API.G_EXCEPTION_UNEXPECTED_ERROR then
841 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
842 p_api_name => l_api_name,
843 p_pkg_name => g_pkg_name,
844 p_exc_name => 'OKL_API.G_RET_STS_UNEXP_ERROR',
845 x_msg_count => x_msg_count,
846 x_msg_data => x_msg_data,
847 p_api_type => g_api_type);
848
849 when OTHERS then
850 x_return_status := OKL_API.HANDLE_EXCEPTIONS(
851 p_api_name => l_api_name,
852 p_pkg_name => g_pkg_name,
853 p_exc_name => 'OTHERS',
854 x_msg_count => x_msg_count,
855 x_msg_data => x_msg_data,
856 p_api_type => g_api_type);
857 END validate_var_int_params;
858
859 END OKL_VAR_INT_PARAMS_PVT;