[Home] [Help]
PACKAGE BODY: APPS.OKI_LOAD_TNK_PVT
Source
1 PACKAGE BODY oki_load_tnk_pvt AS
2 /* $Header: OKIRTNKB.pls 115.1 2002/07/05 18:02:32 appldev noship $ */
3
4 --------------------------------------------------------------------------------
5 -- Modification History
6 -- 10-Apr-2002 mezra Initial version.
7 -- Create stub in order to branch.
8 --
9 --------------------------------------------------------------------------------
10
11 --------------------------------------------------------------------------------
12 -- Procedure to insert records into the oki_top_x_k table.
13 --
14 --------------------------------------------------------------------------------
15 PROCEDURE crt_top_n_k
16 ( p_start_summary_build_date IN DATE DEFAULT SYSDATE
17 , p_end_summary_build_date IN DATE DEFAULT SYSDATE
18 , x_errbuf OUT VARCHAR2
19 , x_retcode OUT VARCHAR2
20 ) IS
21
22 -- Local variable declaration
23
24 -- For capturing the return code, 0 = success, 1 = warning, 2 = error
25 l_retcode VARCHAR2(1) := NULL ;
26 -- For error handling
27 l_sqlcode VARCHAR2(100) ;
28 l_sqlerrm VARCHAR2(1000) ;
29
30 BEGIN
31 -- initialize return code to success
32 l_retcode := '0' ;
33 x_retcode := '0' ;
34
35 EXCEPTION
36
37 WHEN OTHERS THEN
38
39 l_sqlcode := SQLCODE ;
40 l_sqlerrm := SQLERRM ;
41
42 -- Set return code TO error
43 x_retcode := '2' ;
44
45 -- ROLLBACK all transactions
46 ROLLBACK TO oki_etr_exp_to_rnwl ;
47
48
49 fnd_message.set_name( application => 'OKI'
50 , name => 'OKI_UNEXPECTED_FAILURE' ) ;
51
52 fnd_message.set_token( token => 'OBJECT_NAME'
53 , value => 'OKI_LOAD_TNK_PVT.CRT_TOP_N_K' ) ;
54
55 fnd_file.put_line( which => fnd_file.log
56 , buff => fnd_message.get ) ;
57
58 fnd_file.put_line( which => fnd_file.log
59 , buff => l_sqlcode||' '||l_sqlerrm ) ;
60 END crt_top_n_k ;
61
62 BEGIN
63 -- Initialize the global variables used to log this job run
64 -- FROM concurrent manager
65 g_request_id := fnd_global.conc_request_id ;
66 g_program_application_id := fnd_global.prog_appl_id ;
67 g_program_id := fnd_global.conc_program_id ;
68 g_program_update_date := SYSDATE ;
69
70 END oki_load_tnk_pvt ;