50: , p_status_code IN VARCHAR2
51: , p_scs_code IN VARCHAr2
52: ) IS
53: SELECT rowid
54: FROM oki_renew_by_statuses rbs
55: WHERE rbs.period_set_name = p_period_set_name
56: AND rbs.period_name = p_period_name
57: AND rbs.authoring_org_id = p_authoring_org_id
58: AND rbs.status_code = p_status_code
59: AND rbs.scs_code = p_scs_code
60: ;
61:
62: --------------------------------------------------------------------------------
63: -- Procedure to insert records into the oki_renew_by_statuses table.
64:
65: --------------------------------------------------------------------------------
66: PROCEDURE ins_rnwl_by_stat
67: ( p_period_name IN VARCHAR2
85: l_sequence NUMBER := NULL ;
86:
87: -- Cursor declaration
88: CURSOR l_seq_num IS
89: SELECT oki_renew_by_statuses_s1.nextval seq
90: FROM dual ;
91: rec_l_seq_num l_seq_num%ROWTYPE ;
92:
93: BEGIN
103:
104: -- initialize return code to success
105: x_retcode := '0';
106:
107: INSERT INTO oki_renew_by_statuses
108: ( id
109: , period_set_name
110: , period_name
111: , period_type
146: fnd_message.set_name( application => 'OKI'
147: , name => 'OKI_TABLE_LOAD_FAILURE') ;
148:
149: fnd_message.set_token( token => 'TABLE_NAME'
150: , value => 'OKI_RENEW_BY_STATUSES' ) ;
151:
152: fnd_file.put_line( which => fnd_file.log
153: , buff => fnd_message.get) ;
154:
165: fnd_message.set_name( application => 'OKI'
166: , name => 'OKI_TABLE_LOAD_FAILURE') ;
167:
168: fnd_message.set_token( token => 'TABLE_NAME'
169: , value => 'OKI_RENEW_BY_STATUSES' ) ;
170:
171: fnd_file.put_line( which => fnd_file.log
172: , buff => fnd_message.get) ;
173:
176: END ins_rnwl_by_stat ;
177:
178:
179: --------------------------------------------------------------------------------
180: -- Procedure to update records in the oki_renew_by_statuses table.
181:
182: --------------------------------------------------------------------------------
183: PROCEDURE upd_rnwl_by_stat
184: ( p_base_amount IN NUMBER
198:
199: -- initialize return code to success
200: x_retcode := '0';
201:
202: UPDATE oki_renew_by_statuses SET
203: base_amount = p_base_amount
204: , contract_count = p_contract_count
205: , request_id = oki_load_rbs_pvt.g_request_id
206: , program_application_id = oki_load_rbs_pvt.g_program_application_id
263: -- Holds the calculated contract amount and counts
264: l_contract_count NUMBER ;
265: l_base_contract_amount NUMBER ;
266:
267: -- holds the rowid of the record in the oki_renew_by_statuses table
268: l_rbs_rowid ROWID := null ;
269:
270: -- Location within the program before the error was encountered.
271: l_loc VARCHAR2(100) ;
724: -- Holds the contract amount and counts
725: l_contract_count NUMBER ;
726: l_base_contract_amount NUMBER ;
727:
728: -- holds the rowid of the record in the oki_renew_by_statuses table
729: l_rbs_rowid ROWID := null ;
730:
731: -- Location within the program before the error was encountered.
732: l_loc VARCHAR2(100) ;
1174: -- Holds the contract amount and counts
1175: l_contract_count NUMBER ;
1176: l_base_contract_amount NUMBER ;
1177:
1178: -- holds the rowid of the record in the oki_renew_by_statuses table
1179: l_rbs_rowid ROWID := null ;
1180:
1181: -- Location within the program before the error was encountered.
1182: l_loc VARCHAR2(100) ;
1571:
1572: -- Constant declaration
1573:
1574: -- Name of the table for which data is being inserted
1575: l_table_name CONSTANT VARCHAR2(30) := 'OKI_RENEW_BY_STATUSES' ;
1576:
1577:
1578: -- Local variable declaration
1579: