DBA Data[Home] [Help]

APPS.LNS_DISTRIBUTIONS_PUB dependencies on FND_LOG

Line 22: IF log_level >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN

18: is
19:
20: begin
21: dbms_output.put_line(message);
22: IF log_level >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
23: FND_LOG.STRING(log_level, module, message);
24: if FND_GLOBAL.Conc_Request_Id is not null then
25: fnd_file.put_line(FND_FILE.LOG, message);
26: end if;

Line 23: FND_LOG.STRING(log_level, module, message);

19:
20: begin
21: dbms_output.put_line(message);
22: IF log_level >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
23: FND_LOG.STRING(log_level, module, message);
24: if FND_GLOBAL.Conc_Request_Id is not null then
25: fnd_file.put_line(FND_FILE.LOG, message);
26: end if;
27: END IF;

Line 89: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

85: begin
86:
87: SAVEPOINT cancel_disbursements;
88: l_api_name := 'cancel_disbursements';
89: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
90: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id ' || p_loan_id);
91:
92: -- Initialize message list IF p_init_msg_list is set to TRUE.
93: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 90: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id ' || p_loan_id);

86:
87: SAVEPOINT cancel_disbursements;
88: l_api_name := 'cancel_disbursements';
89: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
90: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id ' || p_loan_id);
91:
92: -- Initialize message list IF p_init_msg_list is set to TRUE.
93: IF FND_API.to_Boolean( p_init_msg_list ) THEN
94: FND_MSG_PUB.initialize;

Line 101: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_distributions_pub.onlineAccounting...');

97: -- Initialize API return status to SUCCESS
98: x_return_status := FND_API.G_RET_STS_SUCCESS;
99:
100: -- first complete accounting for any unprocessed events / documents for the loan transaction
101: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_distributions_pub.onlineAccounting...');
102: lns_distributions_pub.onlineAccounting(p_loan_id => p_loan_id
103: ,p_init_msg_list => fnd_api.g_false
104: ,p_accounting_mode => 'F'
105: ,p_transfer_flag => 'Y'

Line 111: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);

107: ,p_gl_posting_flag => 'N'
108: ,x_return_status => l_return_status
109: ,x_msg_count => l_msg_count
110: ,x_msg_data => l_msg_data);
111: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);
112: if l_return_status <> 'S' then
113: RAISE FND_API.G_EXC_ERROR;
114: end if;
115:

Line 116: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fetching l_disbusement_id ');

112: if l_return_status <> 'S' then
113: RAISE FND_API.G_EXC_ERROR;
114: end if;
115:
116: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fetching l_disbusement_id ');
117: open c_disbursements(p_loan_id);
118: fetch c_disbursements into l_disbursement_id;
119: close c_disbursements;
120: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_disbusement_id ' || l_disbursement_id);

Line 120: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_disbusement_id ' || l_disbursement_id);

116: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fetching l_disbusement_id ');
117: open c_disbursements(p_loan_id);
118: fetch c_disbursements into l_disbursement_id;
119: close c_disbursements;
120: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_disbusement_id ' || l_disbursement_id);
121:
122: if (lns_utility_pub.IS_FED_FIN_ENABLED = 'Y') then
123:
124: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'federal enabled');

Line 124: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'federal enabled');

120: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_disbusement_id ' || l_disbursement_id);
121:
122: if (lns_utility_pub.IS_FED_FIN_ENABLED = 'Y') then
123:
124: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'federal enabled');
125: open c_budget_req(p_loan_id);
126: fetch c_budget_req into l_budget_req_approval, l_funds_reserved_flag, l_gl_date;
127: close c_budget_req;
128: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_budget_req_approval ' || l_budget_req_approval);

Line 128: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_budget_req_approval ' || l_budget_req_approval);

124: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'federal enabled');
125: open c_budget_req(p_loan_id);
126: fetch c_budget_req into l_budget_req_approval, l_funds_reserved_flag, l_gl_date;
127: close c_budget_req;
128: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_budget_req_approval ' || l_budget_req_approval);
129: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funds_reserved_flag ' || l_funds_reserved_flag);
130:
131: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');
132:

Line 129: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funds_reserved_flag ' || l_funds_reserved_flag);

125: open c_budget_req(p_loan_id);
126: fetch c_budget_req into l_budget_req_approval, l_funds_reserved_flag, l_gl_date;
127: close c_budget_req;
128: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_budget_req_approval ' || l_budget_req_approval);
129: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funds_reserved_flag ' || l_funds_reserved_flag);
130:
131: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');
132:
133: LNS_XLA_EVENTS.create_event(p_loan_id => p_loan_id

Line 131: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');

127: close c_budget_req;
128: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_budget_req_approval ' || l_budget_req_approval);
129: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funds_reserved_flag ' || l_funds_reserved_flag);
130:
131: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');
132:
133: LNS_XLA_EVENTS.create_event(p_loan_id => p_loan_id
134: ,p_disb_header_id => l_disbursement_id
135: ,p_event_type_code => 'FUTURE_DISBURSEMENT_CANCELLED'

Line 145: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);

141: ,x_event_id => l_event_id
142: ,x_return_status => l_return_status
143: ,x_msg_count => l_msg_count
144: ,x_msg_data => l_msg_data);
145: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);
146: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
147:
148: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
149: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');

Line 146: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);

142: ,x_return_status => l_return_status
143: ,x_msg_count => l_msg_count
144: ,x_msg_data => l_msg_data);
145: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);
146: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
147:
148: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
149: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');
150: FND_MSG_PUB.ADD;

Line 151: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

147:
148: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
149: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');
150: FND_MSG_PUB.ADD;
151: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
152: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
153: END IF;
154:
155: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'stamping new event_id on distributions');

Line 155: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'stamping new event_id on distributions');

151: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
152: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
153: END IF;
154:
155: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'stamping new event_id on distributions');
156: update lns_distributions
157: set event_id = l_event_id
158: ,last_update_date = sysdate
159: where distribution_type = 'ORIGINATION'

Line 163: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');

159: where distribution_type = 'ORIGINATION'
160: and loan_id = p_loan_id
161: and event_id is not null
162: and disb_header_id is null;
163: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');
164:
165: if l_funds_reserved_flag = 'Y' then
166:
167: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into PSA_BC_XLA_EVENTS_GT - event => ' || l_event_id);

Line 167: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into PSA_BC_XLA_EVENTS_GT - event => ' || l_event_id);

163: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');
164:
165: if l_funds_reserved_flag = 'Y' then
166:
167: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into PSA_BC_XLA_EVENTS_GT - event => ' || l_event_id);
168: insert into PSA_BC_XLA_EVENTS_GT (event_id, result_code)
169: values (l_event_id, 'FAIL');
170:
171: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling PSA_BC_XLA_PUB.Budgetary_Control ' || l_event_id);

Line 171: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling PSA_BC_XLA_PUB.Budgetary_Control ' || l_event_id);

167: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into PSA_BC_XLA_EVENTS_GT - event => ' || l_event_id);
168: insert into PSA_BC_XLA_EVENTS_GT (event_id, result_code)
169: values (l_event_id, 'FAIL');
170:
171: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling PSA_BC_XLA_PUB.Budgetary_Control ' || l_event_id);
172: -- always pass P_BC_MODE = reserve as per shaniqua williams
173: PSA_BC_XLA_PUB.Budgetary_Control(p_api_version => 1.0
174: ,p_init_msg_list => FND_API.G_FALSE
175: ,x_return_status => l_return_status

Line 186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'BC status is = ' || l_return_status);

182: ,p_user_resp_id => null
183: ,x_status_code => l_status_code
184: ,x_packet_ID => l_packet_id);
185:
186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'BC status is = ' || l_return_status);
187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_status_code = ' || l_status_code);
188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_packet_id = ' || l_packet_id);
189:
190: -- we want to commit ONLY in the case of SUCCESS or ADVISORY

Line 187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_status_code = ' || l_status_code);

183: ,x_status_code => l_status_code
184: ,x_packet_ID => l_packet_id);
185:
186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'BC status is = ' || l_return_status);
187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_status_code = ' || l_status_code);
188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_packet_id = ' || l_packet_id);
189:
190: -- we want to commit ONLY in the case of SUCCESS or ADVISORY
191: if (l_return_status <> 'S') then

Line 188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_packet_id = ' || l_packet_id);

184: ,x_packet_ID => l_packet_id);
185:
186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'BC status is = ' || l_return_status);
187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_status_code = ' || l_status_code);
188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_packet_id = ' || l_packet_id);
189:
190: -- we want to commit ONLY in the case of SUCCESS or ADVISORY
191: if (l_return_status <> 'S') then
192:

Line 197: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

193: x_return_status := FND_API.G_RET_STS_ERROR;
194: FND_MESSAGE.SET_NAME('LNS', 'LNS_API_OTHERS_EXCEP');
195: FND_MESSAGE.SET_TOKEN('ERROR' ,'Call to PSA_BC_XLA_PUB.Budgetary_Control failed with Status Code = ' || l_status_code);
196: FND_MSG_PUB.ADD;
197: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
198: RAISE FND_API.G_EXC_ERROR;
199:
200: else
201: -- caller handle success status

Line 216: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

212: THEN
213: COMMIT WORK;
214: END IF;
215:
216: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
217:
218: EXCEPTION
219:
220: WHEN FND_API.G_EXC_ERROR THEN

Line 223: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

219:
220: WHEN FND_API.G_EXC_ERROR THEN
221: ROLLBACK TO cancel_disbursements;
222: x_return_status := FND_API.G_RET_STS_ERROR;
223: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
224: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
225:
226: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
227: ROLLBACK TO cancel_disbursements;

Line 229: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

225:
226: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
227: ROLLBACK TO cancel_disbursements;
228: x_return_status := FND_API.G_RET_STS_ERROR;
229: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
230: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
231:
232: WHEN OTHERS THEN
233: ROLLBACK TO cancel_disbursements;

Line 235: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

231:
232: WHEN OTHERS THEN
233: ROLLBACK TO cancel_disbursements;
234: x_return_status := FND_API.G_RET_STS_ERROR;
235: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
236: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
237:
238: end cancel_disbursements;
239:

Line 294: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

290: l_application_id := 206;
291: l_event_flag := 'E';
292: l_api_name := 'generate_bc_report';
293:
294: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
295: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id ' || p_loan_id);
296:
297: -- steps 1. delete from PSA_BC_REPORT_EVENTS_GT
298: -- 2. insert into PSA_BC_REPORT_EVENTS_GT

Line 295: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id ' || p_loan_id);

291: l_event_flag := 'E';
292: l_api_name := 'generate_bc_report';
293:
294: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
295: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id ' || p_loan_id);
296:
297: -- steps 1. delete from PSA_BC_REPORT_EVENTS_GT
298: -- 2. insert into PSA_BC_REPORT_EVENTS_GT
299: -- 3. generate sequence

Line 301: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'deleting from PSA_BC_REPORT_EVENTS_GT');

297: -- steps 1. delete from PSA_BC_REPORT_EVENTS_GT
298: -- 2. insert into PSA_BC_REPORT_EVENTS_GT
299: -- 3. generate sequence
300: -- 4. call Create_BC_Transaction_report API
301: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'deleting from PSA_BC_REPORT_EVENTS_GT');
302: DELETE FROM PSA_BC_REPORT_EVENTS_GT;
303:
304: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_event...');
305: open c_event(p_loan_id);

Line 304: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_event...');

300: -- 4. call Create_BC_Transaction_report API
301: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'deleting from PSA_BC_REPORT_EVENTS_GT');
302: DELETE FROM PSA_BC_REPORT_EVENTS_GT;
303:
304: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_event...');
305: open c_event(p_loan_id);
306: LOOP
307: fetch c_event into
308: l_event_id

Line 313: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);

309: ,l_distribution_id
310: ,l_ledger_id;
311: EXIT WHEN c_event%NOTFOUND;
312:
313: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
314: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
315: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_ledger_id = ' || l_ledger_id);
316: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into psa table...');
317: INSERT INTO PSA_BC_REPORT_EVENTS_GT

Line 314: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);

310: ,l_ledger_id;
311: EXIT WHEN c_event%NOTFOUND;
312:
313: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
314: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
315: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_ledger_id = ' || l_ledger_id);
316: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into psa table...');
317: INSERT INTO PSA_BC_REPORT_EVENTS_GT
318: (event_id

Line 315: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_ledger_id = ' || l_ledger_id);

311: EXIT WHEN c_event%NOTFOUND;
312:
313: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
314: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
315: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_ledger_id = ' || l_ledger_id);
316: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into psa table...');
317: INSERT INTO PSA_BC_REPORT_EVENTS_GT
318: (event_id
319: ,SOURCE_DISTRIBUTION_ID_NUM_1

Line 316: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into psa table...');

312:
313: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
314: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
315: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_ledger_id = ' || l_ledger_id);
316: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into psa table...');
317: INSERT INTO PSA_BC_REPORT_EVENTS_GT
318: (event_id
319: ,SOURCE_DISTRIBUTION_ID_NUM_1
320: ,SOURCE_DISTRIBUTION_ID_NUM_2)

Line 324: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');

320: ,SOURCE_DISTRIBUTION_ID_NUM_2)
321: values(l_event_id
322: ,l_distribution_id
323: ,null);
324: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');
325: end loop;
326: close c_event;
327:
328: select PSA_BC_XML_REPORT_S.nextval

Line 334: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'rows found ' || l_count);

330: from dual;
331:
332: SELECT count(*) INTO l_count
333: FROM PSA_BC_REPORT_EVENTS_GT;
334: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'rows found ' || l_count);
335:
336: IF l_count > 0 then
337:
338: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'calling PSA_BC_XML_REPORT_PUB.Create_BC_Transaction_Report...');

Line 338: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'calling PSA_BC_XML_REPORT_PUB.Create_BC_Transaction_Report...');

334: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'rows found ' || l_count);
335:
336: IF l_count > 0 then
337:
338: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'calling PSA_BC_XML_REPORT_PUB.Create_BC_Transaction_Report...');
339: -- Call the XML Genertion Procedure
340: PSA_BC_XML_REPORT_PUB.Create_BC_Transaction_Report(l_errbuf
341: ,l_retcode
342: ,l_ledger_id

Line 346: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_errbuf = ' || l_errbuf);

342: ,l_ledger_id
343: ,l_application_id
344: ,l_event_flag
345: ,l_sequence_id);
346: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_errbuf = ' || l_errbuf);
347: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_retcode = ' || l_retcode);
348: END IF;
349:
350: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_sequence_id = ' || l_sequence_id);

Line 347: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_retcode = ' || l_retcode);

343: ,l_application_id
344: ,l_event_flag
345: ,l_sequence_id);
346: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_errbuf = ' || l_errbuf);
347: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_retcode = ' || l_retcode);
348: END IF;
349:
350: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_sequence_id = ' || l_sequence_id);
351: return l_sequence_id;

Line 350: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_sequence_id = ' || l_sequence_id);

346: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_errbuf = ' || l_errbuf);
347: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_retcode = ' || l_retcode);
348: END IF;
349:
350: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_sequence_id = ' || l_sequence_id);
351: return l_sequence_id;
352:
353: END GENERATE_BC_REPORT;
354:

Line 451: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

447: begin
448:
449: SAVEPOINT budgetary_control_pvt;
450: l_api_name := 'budgetary_control';
451: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
452: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
453: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_budgetary_control_mode = ' || p_budgetary_control_mode);
454:
455: -- Initialize message list IF p_init_msg_list is set to TRUE.

Line 452: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);

448:
449: SAVEPOINT budgetary_control_pvt;
450: l_api_name := 'budgetary_control';
451: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
452: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
453: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_budgetary_control_mode = ' || p_budgetary_control_mode);
454:
455: -- Initialize message list IF p_init_msg_list is set to TRUE.
456: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 453: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_budgetary_control_mode = ' || p_budgetary_control_mode);

449: SAVEPOINT budgetary_control_pvt;
450: l_api_name := 'budgetary_control';
451: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
452: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
453: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_budgetary_control_mode = ' || p_budgetary_control_mode);
454:
455: -- Initialize message list IF p_init_msg_list is set to TRUE.
456: IF FND_API.to_Boolean( p_init_msg_list ) THEN
457: FND_MSG_PUB.initialize;

Line 463: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fetching l_disbusement_id ');

459:
460: -- Initialize API return status to SUCCESS
461: x_return_status := FND_API.G_RET_STS_SUCCESS;
462:
463: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fetching l_disbusement_id ');
464: open c_disbursements(p_loan_id);
465: fetch c_disbursements into l_disbursement_id;
466: close c_disbursements;
467: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_disbusement_id = ' || l_disbursement_id);

Line 467: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_disbusement_id = ' || l_disbursement_id);

463: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fetching l_disbusement_id ');
464: open c_disbursements(p_loan_id);
465: fetch c_disbursements into l_disbursement_id;
466: close c_disbursements;
467: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_disbusement_id = ' || l_disbursement_id);
468:
469: -- Bug#6711479 We can't check funds without valid disbursement
470: IF (l_disbursement_id IS NULL) THEN
471: FND_MESSAGE.SET_NAME('LNS', 'LNS_CHK_FUND_DISB_INVALID');

Line 473: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

469: -- Bug#6711479 We can't check funds without valid disbursement
470: IF (l_disbursement_id IS NULL) THEN
471: FND_MESSAGE.SET_NAME('LNS', 'LNS_CHK_FUND_DISB_INVALID');
472: FND_MSG_PUB.ADD;
473: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
474: FND_MESSAGE.SET_NAME('LNS', 'LNS_CREATE_DISB_SCHED');
475: FND_MSG_PUB.ADD;
476: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
477: RAISE FND_API.G_EXC_ERROR;

Line 476: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

472: FND_MSG_PUB.ADD;
473: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
474: FND_MESSAGE.SET_NAME('LNS', 'LNS_CREATE_DISB_SCHED');
475: FND_MSG_PUB.ADD;
476: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
477: RAISE FND_API.G_EXC_ERROR;
478: END IF;
479:
480: if (lns_utility_pub.IS_FED_FIN_ENABLED = 'Y' AND l_disbursement_id IS NOT NULL) then

Line 487: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_budget_event_exists = ' || l_budget_event_exists);

483: -- find if budgetary event already exists, if not, create the event
484: open c_budget_event(p_loan_id, l_disbursement_id);
485: fetch c_budget_event into l_budget_event_exists;
486: close c_budget_event;
487: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_budget_event_exists = ' || l_budget_event_exists);
488:
489: open c_budget_req(p_loan_id);
490: fetch c_budget_req into l_budget_req_approval, l_funds_reserved_flag, l_gl_date;
491: close c_budget_req;

Line 492: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_budget_req_approval = ' || l_budget_req_approval);

488:
489: open c_budget_req(p_loan_id);
490: fetch c_budget_req into l_budget_req_approval, l_funds_reserved_flag, l_gl_date;
491: close c_budget_req;
492: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_budget_req_approval = ' || l_budget_req_approval);
493: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funds_reserved_flag = ' || l_funds_reserved_flag);
494:
495: if l_budget_event_exists = 0 then
496: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');

Line 493: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funds_reserved_flag = ' || l_funds_reserved_flag);

489: open c_budget_req(p_loan_id);
490: fetch c_budget_req into l_budget_req_approval, l_funds_reserved_flag, l_gl_date;
491: close c_budget_req;
492: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_budget_req_approval = ' || l_budget_req_approval);
493: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funds_reserved_flag = ' || l_funds_reserved_flag);
494:
495: if l_budget_event_exists = 0 then
496: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');
497:

Line 496: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');

492: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_budget_req_approval = ' || l_budget_req_approval);
493: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funds_reserved_flag = ' || l_funds_reserved_flag);
494:
495: if l_budget_event_exists = 0 then
496: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');
497:
498: LNS_XLA_EVENTS.create_event(p_loan_id => p_loan_id
499: ,p_disb_header_id => l_disbursement_id
500: ,p_event_type_code => 'DIRECT_LOAN_APPROVED'

Line 510: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'x_return_status = ' || x_return_status);

506: ,x_event_id => x_event_id
507: ,x_return_status => x_return_status
508: ,x_msg_count => x_msg_count
509: ,x_msg_data => x_msg_data);
510: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'x_return_status = ' || x_return_status);
511: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'x_event_id ' || x_event_id);
512:
513: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
514: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');

Line 511: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'x_event_id ' || x_event_id);

507: ,x_return_status => x_return_status
508: ,x_msg_count => x_msg_count
509: ,x_msg_data => x_msg_data);
510: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'x_return_status = ' || x_return_status);
511: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'x_event_id ' || x_event_id);
512:
513: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
514: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');
515: FND_MSG_PUB.ADD;

Line 516: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

512:
513: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
514: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');
515: FND_MSG_PUB.ADD;
516: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
517: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
518: END IF;
519:
520: -- stamp the eventID onto the lns_distributions table

Line 521: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'stamping eventID on lns_distributions');

517: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
518: END IF;
519:
520: -- stamp the eventID onto the lns_distributions table
521: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'stamping eventID on lns_distributions');
522: update lns_distributions
523: set event_id = x_event_id
524: ,last_update_date = sysdate
525: where distribution_type = 'ORIGINATION'

Line 527: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');

523: set event_id = x_event_id
524: ,last_update_date = sysdate
525: where distribution_type = 'ORIGINATION'
526: and loan_id = p_loan_id;
527: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');
528:
529: end if; -- budget event already created
530:
531: -- now process the event

Line 534: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting events');

530:
531: -- now process the event
532: if l_funds_reserved_flag <> 'Y' then
533: --and p_budgetary_control_mode = 'R' then
534: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting events');
535:
536: open c_events(p_loan_id);
537: LOOP
538: fetch c_events into l_event_id;

Line 541: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);

537: LOOP
538: fetch c_events into l_event_id;
539: EXIT WHEN c_events%NOTFOUND;
540:
541: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
542: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into PSA_BC_XLA_EVENTS_GT ');
543: insert
544: into PSA_BC_XLA_EVENTS_GT (event_id, result_code)
545: values (l_event_id, 'FAIL');

Line 542: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into PSA_BC_XLA_EVENTS_GT ');

538: fetch c_events into l_event_id;
539: EXIT WHEN c_events%NOTFOUND;
540:
541: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
542: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserting into PSA_BC_XLA_EVENTS_GT ');
543: insert
544: into PSA_BC_XLA_EVENTS_GT (event_id, result_code)
545: values (l_event_id, 'FAIL');
546:

Line 547: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling PSA_BC_XLA_PUB.Budgetary_Control ' || l_event_id);

543: insert
544: into PSA_BC_XLA_EVENTS_GT (event_id, result_code)
545: values (l_event_id, 'FAIL');
546:
547: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling PSA_BC_XLA_PUB.Budgetary_Control ' || l_event_id);
548: PSA_BC_XLA_PUB.Budgetary_Control(p_api_version => 1.0
549: ,p_init_msg_list => FND_API.G_FALSE
550: ,x_return_status => l_return_status
551: ,x_msg_count => l_msg_count

Line 563: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'BC status is = ' || l_return_status);

559: ,x_packet_ID => l_packet_id);
560: end loop;
561: close c_events;
562:
563: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'BC status is = ' || l_return_status);
564: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_status_code = ' || l_status_code);
565: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_packet_id = ' || l_packet_id);
566:
567: -- we want to commit ONLY in the case of SUCCESS or ADVISORY

Line 564: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_status_code = ' || l_status_code);

560: end loop;
561: close c_events;
562:
563: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'BC status is = ' || l_return_status);
564: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_status_code = ' || l_status_code);
565: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_packet_id = ' || l_packet_id);
566:
567: -- we want to commit ONLY in the case of SUCCESS or ADVISORY
568: if (l_return_status <> 'S' ) then

Line 565: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_packet_id = ' || l_packet_id);

561: close c_events;
562:
563: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'BC status is = ' || l_return_status);
564: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_status_code = ' || l_status_code);
565: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'l_packet_id = ' || l_packet_id);
566:
567: -- we want to commit ONLY in the case of SUCCESS or ADVISORY
568: if (l_return_status <> 'S' ) then
569:

Line 574: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

570: l_return_status := FND_API.G_RET_STS_ERROR;
571: FND_MESSAGE.SET_NAME('LNS', 'LNS_API_OTHERS_EXCEP');
572: FND_MESSAGE.SET_TOKEN('ERROR' ,'Call to PSA_BC_XLA_PUB.Budgetary_Control failed with Status Code = ' || l_status_code);
573: FND_MSG_PUB.ADD;
574: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
575: RAISE FND_API.G_EXC_ERROR;
576:
577: else
578: if l_status_code NOT IN ('SUCCESS','ADVISORY') then

Line 582: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

578: if l_status_code NOT IN ('SUCCESS','ADVISORY') then
579: IF (l_status_code = 'PARTIAL') THEN
580: FND_MESSAGE.SET_NAME('LNS', 'LNS_FUND_CHK_PARTIAL');
581: FND_MSG_PUB.ADD;
582: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
583: RAISE FND_API.G_EXC_ERROR;
584: ELSE
585: FND_MESSAGE.SET_NAME('LNS', 'LNS_API_OTHERS_EXCEP');
586: FND_MESSAGE.SET_TOKEN('ERROR' ,'Call to PSA_BC_XLA_PUB.Budgetary_Control failed with Status Code = ' || l_status_code);

Line 588: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

584: ELSE
585: FND_MESSAGE.SET_NAME('LNS', 'LNS_API_OTHERS_EXCEP');
586: FND_MESSAGE.SET_TOKEN('ERROR' ,'Call to PSA_BC_XLA_PUB.Budgetary_Control failed with Status Code = ' || l_status_code);
587: FND_MSG_PUB.ADD;
588: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
589: RAISE FND_API.G_EXC_ERROR;
590: END IF;
591: end if;
592:

Line 603: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'updating loan');

599: end if;
600:
601: l_loan_header_rec.loan_id := p_loan_id;
602: l_loan_header_rec.FUNDS_CHECK_DATE := sysdate;
603: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || 'updating loan');
604: LNS_LOAN_HEADER_PUB.UPDATE_LOAN(P_OBJECT_VERSION_NUMBER => l_version
605: ,P_LOAN_HEADER_REC => l_loan_header_rec
606: ,P_INIT_MSG_LIST => FND_API.G_FALSE
607: ,X_RETURN_STATUS => l_return_status

Line 610: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'update loan status = ' || l_return_status);

606: ,P_INIT_MSG_LIST => FND_API.G_FALSE
607: ,X_RETURN_STATUS => l_return_status
608: ,X_MSG_COUNT => l_msg_count
609: ,X_MSG_DATA => l_msg_data);
610: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'update loan status = ' || l_return_status);
611:
612: if l_return_status <> 'S' then
613: FND_MESSAGE.SET_NAME('LNS', 'LNS_UPD_LOAN_FAIL');
614: FND_MSG_PUB.ADD;

Line 615: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

611:
612: if l_return_status <> 'S' then
613: FND_MESSAGE.SET_NAME('LNS', 'LNS_UPD_LOAN_FAIL');
614: FND_MSG_PUB.ADD;
615: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
616: RAISE FND_API.G_EXC_ERROR;
617: end if;
618:
619: end if; -- BC_API.RETURN_STATUS

Line 632: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

628: END IF;
629:
630: end if; -- no budgetary control-- end if (lns_utility_pub.IS_FED_FIN_ENABLED = 'Y' AND l_disbursement_id IS NOT NULL) then
631:
632: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
633:
634: EXCEPTION
635:
636: WHEN FND_API.G_EXC_ERROR THEN

Line 639: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

635:
636: WHEN FND_API.G_EXC_ERROR THEN
637: ROLLBACK TO budgetary_control_pvt;
638: x_return_status := FND_API.G_RET_STS_ERROR;
639: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
640: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
641:
642: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
643: ROLLBACK TO budgetary_control_pvt;

Line 645: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

641:
642: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
643: ROLLBACK TO budgetary_control_pvt;
644: x_return_status := FND_API.G_RET_STS_ERROR;
645: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
646: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
647:
648: WHEN OTHERS THEN
649: ROLLBACK TO budgetary_control_pvt;

Line 651: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

647:
648: WHEN OTHERS THEN
649: ROLLBACK TO budgetary_control_pvt;
650: x_return_status := FND_API.G_RET_STS_ERROR;
651: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
652: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
653:
654: end budgetary_control;
655:

Line 688: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

684: l_api_name varchar2(25);
685: begin
686: l_api_name := 'do_insert_distributions';
687:
688: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
689: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'rows received = ' || p_distributions_tbl.count);
690:
691: l_total_distributions := p_distributions_tbl.count;
692:

Line 689: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'rows received = ' || p_distributions_tbl.count);

685: begin
686: l_api_name := 'do_insert_distributions';
687:
688: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
689: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'rows received = ' || p_distributions_tbl.count);
690:
691: l_total_distributions := p_distributions_tbl.count;
692:
693: if l_total_distributions > 0 then

Line 697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Inserting row : ' || k);

693: if l_total_distributions > 0 then
694:
695: for k in 1..l_total_distributions
696: loop
697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Inserting row : ' || k);
698: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LINE_TYPE = ' || p_distributions_tbl(k).line_type);
699: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_NAME = ' || p_distributions_tbl(k).account_name);
700: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CC_ID = ' || p_distributions_tbl(k).code_combination_id);
701: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_TYPE = ' || p_distributions_tbl(k).account_type);

Line 698: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LINE_TYPE = ' || p_distributions_tbl(k).line_type);

694:
695: for k in 1..l_total_distributions
696: loop
697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Inserting row : ' || k);
698: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LINE_TYPE = ' || p_distributions_tbl(k).line_type);
699: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_NAME = ' || p_distributions_tbl(k).account_name);
700: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CC_ID = ' || p_distributions_tbl(k).code_combination_id);
701: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_TYPE = ' || p_distributions_tbl(k).account_type);
702: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'PERCENT = ' || p_distributions_tbl(k).distribution_percent);

Line 699: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_NAME = ' || p_distributions_tbl(k).account_name);

695: for k in 1..l_total_distributions
696: loop
697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Inserting row : ' || k);
698: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LINE_TYPE = ' || p_distributions_tbl(k).line_type);
699: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_NAME = ' || p_distributions_tbl(k).account_name);
700: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CC_ID = ' || p_distributions_tbl(k).code_combination_id);
701: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_TYPE = ' || p_distributions_tbl(k).account_type);
702: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'PERCENT = ' || p_distributions_tbl(k).distribution_percent);
703: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'AMOUNT = ' || p_distributions_tbl(k).distribution_amount);

Line 700: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CC_ID = ' || p_distributions_tbl(k).code_combination_id);

696: loop
697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Inserting row : ' || k);
698: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LINE_TYPE = ' || p_distributions_tbl(k).line_type);
699: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_NAME = ' || p_distributions_tbl(k).account_name);
700: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CC_ID = ' || p_distributions_tbl(k).code_combination_id);
701: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_TYPE = ' || p_distributions_tbl(k).account_type);
702: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'PERCENT = ' || p_distributions_tbl(k).distribution_percent);
703: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'AMOUNT = ' || p_distributions_tbl(k).distribution_amount);
704: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_TYPE = ' || p_distributions_tbl(k).distribution_type);

Line 701: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_TYPE = ' || p_distributions_tbl(k).account_type);

697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Inserting row : ' || k);
698: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LINE_TYPE = ' || p_distributions_tbl(k).line_type);
699: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_NAME = ' || p_distributions_tbl(k).account_name);
700: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CC_ID = ' || p_distributions_tbl(k).code_combination_id);
701: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_TYPE = ' || p_distributions_tbl(k).account_type);
702: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'PERCENT = ' || p_distributions_tbl(k).distribution_percent);
703: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'AMOUNT = ' || p_distributions_tbl(k).distribution_amount);
704: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_TYPE = ' || p_distributions_tbl(k).distribution_type);
705:

Line 702: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'PERCENT = ' || p_distributions_tbl(k).distribution_percent);

698: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LINE_TYPE = ' || p_distributions_tbl(k).line_type);
699: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_NAME = ' || p_distributions_tbl(k).account_name);
700: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CC_ID = ' || p_distributions_tbl(k).code_combination_id);
701: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_TYPE = ' || p_distributions_tbl(k).account_type);
702: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'PERCENT = ' || p_distributions_tbl(k).distribution_percent);
703: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'AMOUNT = ' || p_distributions_tbl(k).distribution_amount);
704: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_TYPE = ' || p_distributions_tbl(k).distribution_type);
705:
706: Insert into lns_distributions

Line 703: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'AMOUNT = ' || p_distributions_tbl(k).distribution_amount);

699: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_NAME = ' || p_distributions_tbl(k).account_name);
700: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CC_ID = ' || p_distributions_tbl(k).code_combination_id);
701: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_TYPE = ' || p_distributions_tbl(k).account_type);
702: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'PERCENT = ' || p_distributions_tbl(k).distribution_percent);
703: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'AMOUNT = ' || p_distributions_tbl(k).distribution_amount);
704: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_TYPE = ' || p_distributions_tbl(k).distribution_type);
705:
706: Insert into lns_distributions
707: (DISTRIBUTION_ID

Line 704: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_TYPE = ' || p_distributions_tbl(k).distribution_type);

700: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CC_ID = ' || p_distributions_tbl(k).code_combination_id);
701: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ACC_TYPE = ' || p_distributions_tbl(k).account_type);
702: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'PERCENT = ' || p_distributions_tbl(k).distribution_percent);
703: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'AMOUNT = ' || p_distributions_tbl(k).distribution_amount);
704: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_TYPE = ' || p_distributions_tbl(k).distribution_type);
705:
706: Insert into lns_distributions
707: (DISTRIBUTION_ID
708: ,LOAN_ID

Line 741: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, '****************************************** ');

737: ,lns_utility_pub.last_updated_by
738: ,1
739: ,p_distributions_tbl(k).disb_header_id);
740:
741: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, '****************************************** ');
742: end loop;
743:
744: else
745:

Line 748: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

744: else
745:
746: FND_MESSAGE.SET_NAME('LNS', 'LNS_DEFAULT_DIST_NOT_FOUND');
747: FND_MSG_PUB.ADD;
748: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
749: RAISE FND_API.G_EXC_ERROR;
750:
751: end if;
752: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

Line 752: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

748: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
749: RAISE FND_API.G_EXC_ERROR;
750:
751: end if;
752: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
753:
754: end do_insert_distributions;
755:
756: /*=========================================================================

Line 885: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

881:
882: begin
883: SAVEPOINT defaultDistributionsCatch;
884: l_api_name := 'defaultDistributionsCatch';
885: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
886:
887: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
888: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
889: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_include_loan_receivables = ' || p_include_loan_receivables);

Line 887: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);

883: SAVEPOINT defaultDistributionsCatch;
884: l_api_name := 'defaultDistributionsCatch';
885: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
886:
887: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
888: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
889: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_include_loan_receivables = ' || p_include_loan_receivables);
890: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);
891:

Line 888: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);

884: l_api_name := 'defaultDistributionsCatch';
885: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
886:
887: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
888: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
889: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_include_loan_receivables = ' || p_include_loan_receivables);
890: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);
891:
892: -- Initialize message list IF p_init_msg_list is set to TRUE.

Line 889: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_include_loan_receivables = ' || p_include_loan_receivables);

885: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
886:
887: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
888: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
889: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_include_loan_receivables = ' || p_include_loan_receivables);
890: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);
891:
892: -- Initialize message list IF p_init_msg_list is set to TRUE.
893: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 890: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);

886:
887: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
888: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
889: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_include_loan_receivables = ' || p_include_loan_receivables);
890: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);
891:
892: -- Initialize message list IF p_init_msg_list is set to TRUE.
893: IF FND_API.to_Boolean( p_init_msg_list ) THEN
894: FND_MSG_PUB.initialize;

Line 920: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_class = ' || l_class);

916: OPEN c_loan_info2(p_loan_id, p_disb_header_id);
917: FETCH c_loan_info2 INTO l_class, l_loan_type_id, l_funded_amount;
918: close c_loan_info2;
919: end if;
920: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_class = ' || l_class);
921: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
922: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
923:
924: open c_num_receivables(l_class, l_loan_type_id);

Line 921: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);

917: FETCH c_loan_info2 INTO l_class, l_loan_type_id, l_funded_amount;
918: close c_loan_info2;
919: end if;
920: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_class = ' || l_class);
921: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
922: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
923:
924: open c_num_receivables(l_class, l_loan_type_id);
925: fetch c_num_receivables into l_loan_receivables_count;

Line 922: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);

918: close c_loan_info2;
919: end if;
920: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_class = ' || l_class);
921: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
922: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
923:
924: open c_num_receivables(l_class, l_loan_type_id);
925: fetch c_num_receivables into l_loan_receivables_count;
926: close c_num_receivables;

Line 927: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_receivables_count = ' || l_loan_receivables_count);

923:
924: open c_num_receivables(l_class, l_loan_type_id);
925: fetch c_num_receivables into l_loan_receivables_count;
926: close c_num_receivables;
927: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_receivables_count = ' || l_loan_receivables_count);
928:
929: open c_num_payables(l_class, l_loan_type_id);
930: fetch c_num_payables into l_loan_payables_count;
931: close c_num_payables;

Line 933: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_payables_count = ' || l_loan_payables_count);

929: open c_num_payables(l_class, l_loan_type_id);
930: fetch c_num_payables into l_loan_payables_count;
931: close c_num_payables;
932:
933: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_payables_count = ' || l_loan_payables_count);
934:
935: -- now see if any default distributions exist for this loan
936: -- 2-24-2005 raverma -- add loan_payable IF loan_class = DIRECT OR
937: -- loan is not MFAR

Line 954: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'include receivabvles ' || p_include_loan_receivables);

950: 'FROM lns_default_distribs d ' ||
951: 'WHERE ((d.loan_class = :p_loan_class_code AND d.loan_type_id = :p_loan_type_id) ) ' ||
952: ' AND account_name IN (''PRINCIPAL_RECEIVABLE'', ''INTEREST_RECEIVABLE'', ''INTEREST_INCOME'' ';
953:
954: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'include receivabvles ' || p_include_loan_receivables);
955: -- these are only appropriate for class=DIRECT or loan <> MFAR
956: if p_include_loan_receivables = 'Y' then
957: vPLSQL := vPLSQL || ' ,''LOAN_RECEIVABLE'', ''LOAN_CLEARING'', ''LOAN_PAYABLE'')';
958: else

Line 966: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'sql: ' || vPLSQL);

962: if p_distribution_type is not null then
963: vPLSQL := vPLSQL || ' AND d.distribution_type = ' || '''' || p_distribution_type || '''';
964: end if;
965:
966: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'sql: ' || vPLSQL);
967:
968: open sql_cur for
969: vPLSQL
970: using l_class, l_loan_type_id;

Line 982: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || i);

978: exit when sql_cur%NOTFOUND;
979:
980: i := i + 1;
981:
982: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || i);
983: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
984: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
985: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
986: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_type = ' || l_account_type);

Line 983: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);

979:
980: i := i + 1;
981:
982: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || i);
983: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
984: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
985: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
986: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_type = ' || l_account_type);
987: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);

Line 984: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);

980: i := i + 1;
981:
982: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || i);
983: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
984: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
985: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
986: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_type = ' || l_account_type);
987: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
988: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);

Line 985: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);

981:
982: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || i);
983: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
984: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
985: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
986: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_type = ' || l_account_type);
987: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
988: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
989:

Line 986: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_type = ' || l_account_type);

982: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || i);
983: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
984: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
985: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
986: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_type = ' || l_account_type);
987: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
988: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
989:
990: l_distributions(i).line_type := l_line_type;

Line 987: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);

983: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
984: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
985: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
986: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_type = ' || l_account_type);
987: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
988: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
989:
990: l_distributions(i).line_type := l_line_type;
991: l_distributions(i).account_name := l_account_name;

Line 988: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);

984: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
985: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
986: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_type = ' || l_account_type);
987: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
988: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
989:
990: l_distributions(i).line_type := l_line_type;
991: l_distributions(i).account_name := l_account_name;
992: l_distributions(i).code_combination_id := l_code_combination_id;

Line 1000: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan receivables line ' || k);

996:
997: if l_account_name = 'LOAN_RECEIVABLE' and l_distribution_type = 'ORIGINATION' then
998:
999: k := k + 1;
1000: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan receivables line ' || k);
1001:
1002: if k <> l_loan_receivables_count then
1003: l_distributions(i).distribution_amount := round(l_distribution_percent * l_funded_amount, l_ledger_details.currency_precision) / 100;
1004: l_running_amount1 := l_running_amount1 + l_distributions(i).distribution_amount;

Line 1009: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distributions(i).distribution_amount = ' || l_distributions(i).distribution_amount);

1005: else
1006: l_distributions(i).distribution_amount := l_funded_amount - l_running_amount1;
1007: end if;
1008:
1009: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distributions(i).distribution_amount = ' || l_distributions(i).distribution_amount);
1010: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_running_amount1 = ' || l_running_amount1);
1011:
1012: end if;
1013:

Line 1010: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_running_amount1 = ' || l_running_amount1);

1006: l_distributions(i).distribution_amount := l_funded_amount - l_running_amount1;
1007: end if;
1008:
1009: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distributions(i).distribution_amount = ' || l_distributions(i).distribution_amount);
1010: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_running_amount1 = ' || l_running_amount1);
1011:
1012: end if;
1013:
1014: if (l_account_name = 'LOAN_CLEARING' or l_account_name = 'LOAN_PAYABLE') and l_distribution_type = 'ORIGINATION' then

Line 1017: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan clearing line ' || n);

1013:
1014: if (l_account_name = 'LOAN_CLEARING' or l_account_name = 'LOAN_PAYABLE') and l_distribution_type = 'ORIGINATION' then
1015:
1016: n := n + 1;
1017: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan clearing line ' || n);
1018:
1019: if n <> l_loan_receivables_count then
1020: l_distributions(i).distribution_amount := round(l_distribution_percent * l_funded_amount, l_ledger_details.currency_precision) / 100;
1021: l_running_amount2 := l_running_amount2 + l_distributions(i).distribution_amount;

Line 1026: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distributions(i).distribution_amount = ' || l_distributions(i).distribution_amount);

1022: else
1023: l_distributions(i).distribution_amount := l_funded_amount - l_running_amount2;
1024: end if;
1025:
1026: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distributions(i).distribution_amount = ' || l_distributions(i).distribution_amount);
1027: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_running_amount2 = ' || l_running_amount2);
1028:
1029: end if;
1030:

Line 1027: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_running_amount2 = ' || l_running_amount2);

1023: l_distributions(i).distribution_amount := l_funded_amount - l_running_amount2;
1024: end if;
1025:
1026: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distributions(i).distribution_amount = ' || l_distributions(i).distribution_amount);
1027: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_running_amount2 = ' || l_running_amount2);
1028:
1029: end if;
1030:
1031: end loop;

Line 1038: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

1034: exception
1035: when no_data_found then
1036: FND_MESSAGE.SET_NAME('LNS', 'LNS_DEFAULT_DIST_NOT_FOUND');
1037: FND_MSG_PUB.ADD;
1038: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1039: RAISE FND_API.G_EXC_ERROR;
1040: End; -- c_default_info cursor
1041:
1042: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribs2 count is ' || l_distributions.count);

Line 1042: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribs2 count is ' || l_distributions.count);

1038: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1039: RAISE FND_API.G_EXC_ERROR;
1040: End; -- c_default_info cursor
1041:
1042: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribs2 count is ' || l_distributions.count);
1043: x_distribution_tbl := l_distributions;
1044:
1045: IF FND_API.to_Boolean(p_commit)
1046: THEN

Line 1052: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

1048: END IF;
1049:
1050: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
1051:
1052: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1053:
1054: EXCEPTION
1055: WHEN FND_API.G_EXC_ERROR THEN
1056: ROLLBACK TO defaultDistributionsCatch;

Line 1058: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

1054: EXCEPTION
1055: WHEN FND_API.G_EXC_ERROR THEN
1056: ROLLBACK TO defaultDistributionsCatch;
1057: x_return_status := FND_API.G_RET_STS_ERROR;
1058: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
1059: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
1060:
1061: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1062: ROLLBACK TO defaultDistributionsCatch;

Line 1064: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

1060:
1061: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1062: ROLLBACK TO defaultDistributionsCatch;
1063: x_return_status := FND_API.G_RET_STS_ERROR;
1064: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
1065: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
1066:
1067: WHEN OTHERS THEN
1068: ROLLBACK TO defaultDistributionsCatch;

Line 1070: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

1066:
1067: WHEN OTHERS THEN
1068: ROLLBACK TO defaultDistributionsCatch;
1069: x_return_status := FND_API.G_RET_STS_ERROR;
1070: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
1071: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
1072:
1073: end defaultDistributionsCatch;
1074:

Line 1131: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

1127: where h.loan_id = p_loan_id;
1128:
1129: begin
1130: l_api_name := 'create_event';
1131: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1132: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_acc_event_tbl count = ' || p_acc_event_tbl.count);
1133:
1134: -- Standard Start of API savepoint
1135: SAVEPOINT create_event;

Line 1132: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_acc_event_tbl count = ' || p_acc_event_tbl.count);

1128:
1129: begin
1130: l_api_name := 'create_event';
1131: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1132: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_acc_event_tbl count = ' || p_acc_event_tbl.count);
1133:
1134: -- Standard Start of API savepoint
1135: SAVEPOINT create_event;
1136:

Line 1150: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || p_acc_event_tbl(k).loan_id);

1146: -- Api body
1147: -- ---------------------------------------------------------------------
1148: for k in 1..p_acc_event_tbl.count loop
1149:
1150: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || p_acc_event_tbl(k).loan_id);
1151: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_type_code = ' || p_acc_event_tbl(k).event_type_code);
1152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_date = ' || p_acc_event_tbl(k).event_date);
1153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_status = ' || p_acc_event_tbl(k).event_status);
1154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_bc_flag = ' || p_acc_event_tbl(k).budgetary_control_flag);

Line 1151: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_type_code = ' || p_acc_event_tbl(k).event_type_code);

1147: -- ---------------------------------------------------------------------
1148: for k in 1..p_acc_event_tbl.count loop
1149:
1150: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || p_acc_event_tbl(k).loan_id);
1151: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_type_code = ' || p_acc_event_tbl(k).event_type_code);
1152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_date = ' || p_acc_event_tbl(k).event_date);
1153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_status = ' || p_acc_event_tbl(k).event_status);
1154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_bc_flag = ' || p_acc_event_tbl(k).budgetary_control_flag);
1155:

Line 1152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_date = ' || p_acc_event_tbl(k).event_date);

1148: for k in 1..p_acc_event_tbl.count loop
1149:
1150: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || p_acc_event_tbl(k).loan_id);
1151: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_type_code = ' || p_acc_event_tbl(k).event_type_code);
1152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_date = ' || p_acc_event_tbl(k).event_date);
1153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_status = ' || p_acc_event_tbl(k).event_status);
1154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_bc_flag = ' || p_acc_event_tbl(k).budgetary_control_flag);
1155:
1156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');

Line 1153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_status = ' || p_acc_event_tbl(k).event_status);

1149:
1150: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || p_acc_event_tbl(k).loan_id);
1151: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_type_code = ' || p_acc_event_tbl(k).event_type_code);
1152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_date = ' || p_acc_event_tbl(k).event_date);
1153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_status = ' || p_acc_event_tbl(k).event_status);
1154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_bc_flag = ' || p_acc_event_tbl(k).budgetary_control_flag);
1155:
1156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');
1157: LNS_XLA_EVENTS.create_event(p_loan_id => p_acc_event_tbl(k).loan_id

Line 1154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_bc_flag = ' || p_acc_event_tbl(k).budgetary_control_flag);

1150: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || p_acc_event_tbl(k).loan_id);
1151: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_type_code = ' || p_acc_event_tbl(k).event_type_code);
1152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_date = ' || p_acc_event_tbl(k).event_date);
1153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_status = ' || p_acc_event_tbl(k).event_status);
1154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_bc_flag = ' || p_acc_event_tbl(k).budgetary_control_flag);
1155:
1156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');
1157: LNS_XLA_EVENTS.create_event(p_loan_id => p_acc_event_tbl(k).loan_id
1158: ,p_disb_header_id => p_acc_event_tbl(k).disb_header_id

Line 1156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');

1152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_date = ' || p_acc_event_tbl(k).event_date);
1153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_event_status = ' || p_acc_event_tbl(k).event_status);
1154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_bc_flag = ' || p_acc_event_tbl(k).budgetary_control_flag);
1155:
1156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');
1157: LNS_XLA_EVENTS.create_event(p_loan_id => p_acc_event_tbl(k).loan_id
1158: ,p_disb_header_id => p_acc_event_tbl(k).disb_header_id
1159: ,p_event_type_code => p_acc_event_tbl(k).event_type_code
1160: ,p_event_date => p_acc_event_tbl(k).event_date

Line 1169: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);

1165: ,x_event_id => l_event_id
1166: ,x_return_status => x_return_status
1167: ,x_msg_count => x_msg_count
1168: ,x_msg_data => x_msg_data);
1169: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
1170: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'x_return_status = ' || x_return_status);
1171:
1172: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1173: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');

Line 1170: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'x_return_status = ' || x_return_status);

1166: ,x_return_status => x_return_status
1167: ,x_msg_count => x_msg_count
1168: ,x_msg_data => x_msg_data);
1169: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
1170: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'x_return_status = ' || x_return_status);
1171:
1172: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1173: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');
1174: FND_MSG_PUB.ADD;

Line 1175: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

1171:
1172: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1173: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');
1174: FND_MSG_PUB.ADD;
1175: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1176: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1177: ELSE
1178: -- update the distributions table with proper event_id for valid disb_header_id
1179: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Updating lns_distributions...');

Line 1179: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Updating lns_distributions...');

1175: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1176: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1177: ELSE
1178: -- update the distributions table with proper event_id for valid disb_header_id
1179: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Updating lns_distributions...');
1180: update lns_distributions
1181: set event_id = l_event_id
1182: ,last_update_date = sysdate
1183: where disb_header_id = p_acc_event_tbl(k).disb_header_id

Line 1185: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');

1181: set event_id = l_event_id
1182: ,last_update_date = sysdate
1183: where disb_header_id = p_acc_event_tbl(k).disb_header_id
1184: and loan_id = p_acc_event_tbl(k).loan_id;
1185: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');
1186:
1187: end if;
1188:
1189: end loop;

Line 1195: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

1191: -- End of API body
1192: -- ---------------------------------------------------------------------
1193: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
1194:
1195: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1196:
1197: EXCEPTION
1198: WHEN FND_API.G_EXC_ERROR THEN
1199: ROLLBACK TO create_event;

Line 1204: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

1200: x_return_status := FND_API.G_RET_STS_ERROR;
1201: x_msg_count := l_msg_count;
1202: x_msg_data := l_msg_data;
1203: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
1204: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
1205:
1206: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1207: ROLLBACK TO create_event;
1208: x_return_status := FND_API.G_RET_STS_ERROR;

Line 1212: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

1208: x_return_status := FND_API.G_RET_STS_ERROR;
1209: x_msg_count := l_msg_count;
1210: x_msg_data := l_msg_data;
1211: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
1212: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
1213:
1214: WHEN OTHERS THEN
1215: ROLLBACK TO create_event;
1216: x_return_status := FND_API.G_RET_STS_ERROR;

Line 1220: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

1216: x_return_status := FND_API.G_RET_STS_ERROR;
1217: x_msg_count := l_msg_count;
1218: x_msg_data := l_msg_data;
1219: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
1220: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
1221:
1222: end create_event;
1223:
1224:

Line 1269: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Opening c_mfar_nat_acct...');

1265: l_segment_value varchar2(60);
1266:
1267: begin
1268:
1269: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Opening c_mfar_nat_acct...');
1270: open c_mfar_nat_acct(p_loan_id);
1271: fetch c_mfar_nat_acct into l_segment_value;
1272: close c_mfar_nat_acct;
1273: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');

Line 1273: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');

1269: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Opening c_mfar_nat_acct...');
1270: open c_mfar_nat_acct(p_loan_id);
1271: fetch c_mfar_nat_acct into l_segment_value;
1272: close c_mfar_nat_acct;
1273: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');
1274: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_segment_value = ' || l_segment_value);
1275:
1276: return l_segment_value;
1277:

Line 1274: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_segment_value = ' || l_segment_value);

1270: open c_mfar_nat_acct(p_loan_id);
1271: fetch c_mfar_nat_acct into l_segment_value;
1272: close c_mfar_nat_acct;
1273: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');
1274: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_segment_value = ' || l_segment_value);
1275:
1276: return l_segment_value;
1277:
1278: Exception

Line 1280: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'failed to retrieve replacement natural account');

1276: return l_segment_value;
1277:
1278: Exception
1279: When others then
1280: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'failed to retrieve replacement natural account');
1281: FND_MESSAGE.SET_NAME('LNS', 'LNS_MFAR_CONFIGURATION_ERROR');
1282: FND_MSG_PUB.ADD;
1283: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1284: RAISE FND_API.G_EXC_ERROR;

Line 1283: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

1279: When others then
1280: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'failed to retrieve replacement natural account');
1281: FND_MESSAGE.SET_NAME('LNS', 'LNS_MFAR_CONFIGURATION_ERROR');
1282: FND_MSG_PUB.ADD;
1283: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1284: RAISE FND_API.G_EXC_ERROR;
1285:
1286: end getNaturalSwapAccount;
1287:

Line 1333: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

1329: begin
1330: l_api_name := 'swap_code_combination';
1331: l_new_cc_id := -1;
1332:
1333: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1334: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_chart_of_accounts_id = ' || p_chart_of_accounts_id);
1335: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_original_cc_id = ' || p_original_cc_id);
1336: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_number = ' || p_swap_segment_number);
1337: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_value = ' || p_swap_segment_value);

Line 1334: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_chart_of_accounts_id = ' || p_chart_of_accounts_id);

1330: l_api_name := 'swap_code_combination';
1331: l_new_cc_id := -1;
1332:
1333: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1334: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_chart_of_accounts_id = ' || p_chart_of_accounts_id);
1335: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_original_cc_id = ' || p_original_cc_id);
1336: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_number = ' || p_swap_segment_number);
1337: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_value = ' || p_swap_segment_value);
1338:

Line 1335: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_original_cc_id = ' || p_original_cc_id);

1331: l_new_cc_id := -1;
1332:
1333: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1334: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_chart_of_accounts_id = ' || p_chart_of_accounts_id);
1335: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_original_cc_id = ' || p_original_cc_id);
1336: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_number = ' || p_swap_segment_number);
1337: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_value = ' || p_swap_segment_value);
1338:
1339: -- build the original code combination segments into array

Line 1336: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_number = ' || p_swap_segment_number);

1332:
1333: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1334: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_chart_of_accounts_id = ' || p_chart_of_accounts_id);
1335: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_original_cc_id = ' || p_original_cc_id);
1336: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_number = ' || p_swap_segment_number);
1337: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_value = ' || p_swap_segment_value);
1338:
1339: -- build the original code combination segments into array
1340: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_EXT.GET_SEGMENTS...');

Line 1337: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_value = ' || p_swap_segment_value);

1333: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1334: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_chart_of_accounts_id = ' || p_chart_of_accounts_id);
1335: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_original_cc_id = ' || p_original_cc_id);
1336: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_number = ' || p_swap_segment_number);
1337: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_value = ' || p_swap_segment_value);
1338:
1339: -- build the original code combination segments into array
1340: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_EXT.GET_SEGMENTS...');
1341: IF (NOT FND_FLEX_EXT.GET_SEGMENTS('SQLGL'

Line 1340: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_EXT.GET_SEGMENTS...');

1336: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_number = ' || p_swap_segment_number);
1337: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_swap_segment_value = ' || p_swap_segment_value);
1338:
1339: -- build the original code combination segments into array
1340: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_EXT.GET_SEGMENTS...');
1341: IF (NOT FND_FLEX_EXT.GET_SEGMENTS('SQLGL'
1342: ,'GL#'
1343: ,p_chart_of_accounts_id
1344: ,p_original_cc_id

Line 1350: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

1346: ,l_original_segments))
1347: Then
1348: FND_MESSAGE.SET_NAME('LNS', 'LNS_ERR_BUILDING_SEGMENTS');
1349: FND_MSG_PUB.ADD;
1350: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1351: RAISE FND_API.G_EXC_ERROR;
1352: END IF;
1353:
1354: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Original segments:');

Line 1354: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Original segments:');

1350: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1351: RAISE FND_API.G_EXC_ERROR;
1352: END IF;
1353:
1354: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Original segments:');
1355: for n in 1..l_num_segments loop
1356: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'seg#' || n || ' = ' || l_original_segments(n));
1357: end loop;
1358:

Line 1356: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'seg#' || n || ' = ' || l_original_segments(n));

1352: END IF;
1353:
1354: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Original segments:');
1355: for n in 1..l_num_segments loop
1356: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'seg#' || n || ' = ' || l_original_segments(n));
1357: end loop;
1358:
1359: -- get the replacement accounts from lns_default_distribs
1360: FOR n IN 1..l_num_segments LOOP

Line 1362: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found the account to swap = ' || l_original_segments(n));

1358:
1359: -- get the replacement accounts from lns_default_distribs
1360: FOR n IN 1..l_num_segments LOOP
1361: IF (n = p_swap_segment_number) THEN
1362: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found the account to swap = ' || l_original_segments(n));
1363: l_new_segments(n) := p_swap_segment_value;
1364: else
1365: l_new_segments(n) := l_original_segments(n);
1366: END IF;

Line 1369: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'New segments:');

1365: l_new_segments(n) := l_original_segments(n);
1366: END IF;
1367: END LOOP;
1368:
1369: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'New segments:');
1370: for n in 1..l_num_segments loop
1371: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'seg#' || n || ' = ' || l_new_segments(n));
1372: end loop;
1373:

Line 1371: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'seg#' || n || ' = ' || l_new_segments(n));

1367: END LOOP;
1368:
1369: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'New segments:');
1370: for n in 1..l_num_segments loop
1371: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'seg#' || n || ' = ' || l_new_segments(n));
1372: end loop;
1373:
1374: -------------------------- Get new ccid -------------------------------
1375: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_EXT.GET_COMBINATION_ID...');

Line 1375: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_EXT.GET_COMBINATION_ID...');

1371: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'seg#' || n || ' = ' || l_new_segments(n));
1372: end loop;
1373:
1374: -------------------------- Get new ccid -------------------------------
1375: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_EXT.GET_COMBINATION_ID...');
1376: iF (NOT FND_FLEX_EXT.GET_COMBINATION_ID(
1377: 'SQLGL',
1378: 'GL#',
1379: p_chart_of_accounts_id,

Line 1387: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

1383: l_new_cc_id))
1384: Then
1385: FND_MESSAGE.SET_NAME('LNS', 'LNS_CODE_COMBINATION_ERROR');
1386: FND_MSG_PUB.ADD;
1387: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1388: RAISE FND_API.G_EXC_ERROR;
1389:
1390: END IF;
1391: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'new cc_id = ' || l_new_cc_id);

Line 1391: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'new cc_id = ' || l_new_cc_id);

1387: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1388: RAISE FND_API.G_EXC_ERROR;
1389:
1390: END IF;
1391: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'new cc_id = ' || l_new_cc_id);
1392: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1393:
1394: return l_new_cc_id;
1395:

Line 1392: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

1388: RAISE FND_API.G_EXC_ERROR;
1389:
1390: END IF;
1391: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'new cc_id = ' || l_new_cc_id);
1392: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1393:
1394: return l_new_cc_id;
1395:
1396: exception

Line 1398: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'failed to create new code combination');

1394: return l_new_cc_id;
1395:
1396: exception
1397: when others then
1398: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'failed to create new code combination');
1399: RAISE FND_API.G_EXC_ERROR;
1400: end swap_code_combination;
1401:
1402:

Line 1467: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

1463: Exception
1464: When others then
1465: FND_MESSAGE.SET_NAME('LNS', 'LNS_MFAR_CONFIGURATION_ERROR');
1466: FND_MSG_PUB.ADD;
1467: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1468: RAISE FND_API.G_EXC_ERROR;
1469: End;
1470: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'swap natural account with ' || l_natural_account_rec);
1471: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'COA ' || l_ledger_details.chart_of_accounts_id);

Line 1470: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'swap natural account with ' || l_natural_account_rec);

1466: FND_MSG_PUB.ADD;
1467: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1468: RAISE FND_API.G_EXC_ERROR;
1469: End;
1470: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'swap natural account with ' || l_natural_account_rec);
1471: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'COA ' || l_ledger_details.chart_of_accounts_id);
1472:
1473: -- Get natural account segment number to swap
1474: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_APIS.GET_QUALIFIER_SEGNUM...');

Line 1471: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'COA ' || l_ledger_details.chart_of_accounts_id);

1467: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1468: RAISE FND_API.G_EXC_ERROR;
1469: End;
1470: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'swap natural account with ' || l_natural_account_rec);
1471: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'COA ' || l_ledger_details.chart_of_accounts_id);
1472:
1473: -- Get natural account segment number to swap
1474: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_APIS.GET_QUALIFIER_SEGNUM...');
1475: IF (NOT FND_FLEX_APIS.GET_QUALIFIER_SEGNUM(appl_id => 101

Line 1474: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_APIS.GET_QUALIFIER_SEGNUM...');

1470: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'swap natural account with ' || l_natural_account_rec);
1471: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'COA ' || l_ledger_details.chart_of_accounts_id);
1472:
1473: -- Get natural account segment number to swap
1474: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling FND_FLEX_APIS.GET_QUALIFIER_SEGNUM...');
1475: IF (NOT FND_FLEX_APIS.GET_QUALIFIER_SEGNUM(appl_id => 101
1476: ,key_flex_code => 'GL#'
1477: ,structure_number=> l_ledger_details.chart_of_accounts_id
1478: ,flex_qual_name => 'GL_ACCOUNT'

Line 1483: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

1479: ,segment_number => l_nat_acct_seg_number))
1480: THEN
1481: FND_MESSAGE.SET_NAME('LNS', 'LNS_NO_NATURAL_ACCOUNT_SEGMENT');
1482: FND_MSG_PUB.ADD;
1483: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1484: RAISE FND_API.G_EXC_ERROR;
1485:
1486: END IF;
1487: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'natural acct segment is ' || l_nat_acct_seg_number);

Line 1487: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'natural acct segment is ' || l_nat_acct_seg_number);

1483: logMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1484: RAISE FND_API.G_EXC_ERROR;
1485:
1486: END IF;
1487: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'natural acct segment is ' || l_nat_acct_seg_number);
1488:
1489: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling swap_code_combination...');
1490: l_new_cc_id := swap_code_combination(p_chart_of_accounts_id => l_ledger_details.chart_of_accounts_id
1491: ,p_original_cc_id => p_distribution_id

Line 1489: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling swap_code_combination...');

1485:
1486: END IF;
1487: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'natural acct segment is ' || l_nat_acct_seg_number);
1488:
1489: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling swap_code_combination...');
1490: l_new_cc_id := swap_code_combination(p_chart_of_accounts_id => l_ledger_details.chart_of_accounts_id
1491: ,p_original_cc_id => p_distribution_id
1492: ,p_swap_segment_number => l_nat_acct_seg_number
1493: ,p_swap_segment_value => l_natural_account_rec);

Line 1500: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_new_cc_id = ' || l_new_cc_id);

1496: -- get adjustment cc_id
1497: l_new_cc_id := 123;
1498: end if;
1499:
1500: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_new_cc_id = ' || l_new_cc_id);
1501: return l_new_cc_id;
1502:
1503: end transformDistribution;
1504:

Line 1593: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

1589:
1590: begin
1591:
1592: l_api_name := 'getDefaultDistributions';
1593: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1594: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_class = ' || p_loan_class);
1595: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan typeID = ' || p_loan_type_id);
1596: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account type = ' || p_account_type);
1597: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account name = ' || p_account_name);

Line 1594: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_class = ' || p_loan_class);

1590: begin
1591:
1592: l_api_name := 'getDefaultDistributions';
1593: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1594: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_class = ' || p_loan_class);
1595: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan typeID = ' || p_loan_type_id);
1596: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account type = ' || p_account_type);
1597: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account name = ' || p_account_name);
1598: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line tpye = ' || p_line_type);

Line 1595: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan typeID = ' || p_loan_type_id);

1591:
1592: l_api_name := 'getDefaultDistributions';
1593: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1594: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_class = ' || p_loan_class);
1595: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan typeID = ' || p_loan_type_id);
1596: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account type = ' || p_account_type);
1597: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account name = ' || p_account_name);
1598: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line tpye = ' || p_line_type);
1599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution type = ' || p_distribution_type);

Line 1596: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account type = ' || p_account_type);

1592: l_api_name := 'getDefaultDistributions';
1593: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1594: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_class = ' || p_loan_class);
1595: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan typeID = ' || p_loan_type_id);
1596: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account type = ' || p_account_type);
1597: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account name = ' || p_account_name);
1598: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line tpye = ' || p_line_type);
1599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution type = ' || p_distribution_type);
1600:

Line 1597: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account name = ' || p_account_name);

1593: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1594: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_class = ' || p_loan_class);
1595: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan typeID = ' || p_loan_type_id);
1596: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account type = ' || p_account_type);
1597: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account name = ' || p_account_name);
1598: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line tpye = ' || p_line_type);
1599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution type = ' || p_distribution_type);
1600:
1601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_get_distribution...');

Line 1598: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line tpye = ' || p_line_type);

1594: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_class = ' || p_loan_class);
1595: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan typeID = ' || p_loan_type_id);
1596: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account type = ' || p_account_type);
1597: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account name = ' || p_account_name);
1598: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line tpye = ' || p_line_type);
1599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution type = ' || p_distribution_type);
1600:
1601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_get_distribution...');
1602: OPEN c_get_distribution (p_loan_class

Line 1599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution type = ' || p_distribution_type);

1595: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan typeID = ' || p_loan_type_id);
1596: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account type = ' || p_account_type);
1597: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account name = ' || p_account_name);
1598: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line tpye = ' || p_line_type);
1599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution type = ' || p_distribution_type);
1600:
1601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_get_distribution...');
1602: OPEN c_get_distribution (p_loan_class
1603: ,p_loan_type_id

Line 1601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_get_distribution...');

1597: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account name = ' || p_account_name);
1598: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line tpye = ' || p_line_type);
1599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution type = ' || p_distribution_type);
1600:
1601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_get_distribution...');
1602: OPEN c_get_distribution (p_loan_class
1603: ,p_loan_type_id
1604: ,p_account_type
1605: ,p_account_name

Line 1622: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);

1618: ,l_org_id
1619: ,l_mfar_natural_account_rec;
1620: EXIT WHEN C_Get_Distribution%NOTFOUND;
1621:
1622: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1623: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
1624: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
1625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);

Line 1623: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);

1619: ,l_mfar_natural_account_rec;
1620: EXIT WHEN C_Get_Distribution%NOTFOUND;
1621:
1622: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1623: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
1624: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
1625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);

Line 1624: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);

1620: EXIT WHEN C_Get_Distribution%NOTFOUND;
1621:
1622: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1623: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
1624: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
1625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);

Line 1625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);

1621:
1622: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1623: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
1624: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
1625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1629: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);

Line 1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);

1622: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1623: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
1624: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
1625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1629: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1630: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_fee_id = ' || l_fee_id);

Line 1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);

1623: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
1624: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
1625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1629: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1630: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_fee_id = ' || l_fee_id);
1631: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);

Line 1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);

1624: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
1625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1629: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1630: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_fee_id = ' || l_fee_id);
1631: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
1632: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_mfar_natural_account_rec = ' || l_mfar_natural_account_rec);

Line 1629: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);

1625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1629: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1630: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_fee_id = ' || l_fee_id);
1631: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
1632: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_mfar_natural_account_rec = ' || l_mfar_natural_account_rec);
1633:

Line 1630: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_fee_id = ' || l_fee_id);

1626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1629: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1630: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_fee_id = ' || l_fee_id);
1631: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
1632: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_mfar_natural_account_rec = ' || l_mfar_natural_account_rec);
1633:
1634: x_distribution_tbl(l_index).line_type := l_line_type;

Line 1631: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);

1627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1629: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1630: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_fee_id = ' || l_fee_id);
1631: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
1632: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_mfar_natural_account_rec = ' || l_mfar_natural_account_rec);
1633:
1634: x_distribution_tbl(l_index).line_type := l_line_type;
1635: x_distribution_tbl(l_index).account_name := l_account_name;

Line 1632: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_mfar_natural_account_rec = ' || l_mfar_natural_account_rec);

1628: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1629: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1630: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_fee_id = ' || l_fee_id);
1631: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
1632: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_mfar_natural_account_rec = ' || l_mfar_natural_account_rec);
1633:
1634: x_distribution_tbl(l_index).line_type := l_line_type;
1635: x_distribution_tbl(l_index).account_name := l_account_name;
1636: x_distribution_tbl(l_index).code_combination_id := l_code_combination_id;

Line 1657: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found: ' || x_distribution_tbl.count || ' distributions');

1653: END LOOP;
1654:
1655: CLOSE C_Get_Distribution;
1656:
1657: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found: ' || x_distribution_tbl.count || ' distributions');
1658: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1659: return x_distribution_tbl;
1660:
1661: end getDefaultDistributions;

Line 1658: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

1654:
1655: CLOSE C_Get_Distribution;
1656:
1657: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found: ' || x_distribution_tbl.count || ' distributions');
1658: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1659: return x_distribution_tbl;
1660:
1661: end getDefaultDistributions;
1662:

Line 1745: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

1741:
1742: l_api_name := 'getDistributions';
1743: l_index := 0;
1744:
1745: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1746: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
1747: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_type = ' || p_account_type);
1748: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_name = ' || p_account_name);
1749: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_line_type = ' || p_line_type);

Line 1746: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);

1742: l_api_name := 'getDistributions';
1743: l_index := 0;
1744:
1745: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1746: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
1747: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_type = ' || p_account_type);
1748: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_name = ' || p_account_name);
1749: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_line_type = ' || p_line_type);
1750: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);

Line 1747: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_type = ' || p_account_type);

1743: l_index := 0;
1744:
1745: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1746: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
1747: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_type = ' || p_account_type);
1748: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_name = ' || p_account_name);
1749: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_line_type = ' || p_line_type);
1750: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);
1751: x_distribution_tbl.delete;

Line 1748: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_name = ' || p_account_name);

1744:
1745: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1746: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
1747: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_type = ' || p_account_type);
1748: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_name = ' || p_account_name);
1749: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_line_type = ' || p_line_type);
1750: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);
1751: x_distribution_tbl.delete;
1752:

Line 1749: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_line_type = ' || p_line_type);

1745: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1746: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
1747: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_type = ' || p_account_type);
1748: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_name = ' || p_account_name);
1749: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_line_type = ' || p_line_type);
1750: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);
1751: x_distribution_tbl.delete;
1752:
1753: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_get_distribution...');

Line 1750: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);

1746: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
1747: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_type = ' || p_account_type);
1748: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_account_name = ' || p_account_name);
1749: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_line_type = ' || p_line_type);
1750: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);
1751: x_distribution_tbl.delete;
1752:
1753: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_get_distribution...');
1754: OPEN c_get_distribution (p_loan_id

Line 1753: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_get_distribution...');

1749: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_line_type = ' || p_line_type);
1750: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_distribution_type = ' || p_distribution_type);
1751: x_distribution_tbl.delete;
1752:
1753: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'opening c_get_distribution...');
1754: OPEN c_get_distribution (p_loan_id
1755: ,p_account_type
1756: ,p_account_name
1757: ,p_line_type

Line 1773: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);

1769: ,l_event_id;
1770: EXIT WHEN C_Get_Distribution%NOTFOUND;
1771: l_index := l_index + 1;
1772:
1773: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1774: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
1775: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_id = ' || l_loan_id);
1776: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);

Line 1774: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);

1770: EXIT WHEN C_Get_Distribution%NOTFOUND;
1771: l_index := l_index + 1;
1772:
1773: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1774: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
1775: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_id = ' || l_loan_id);
1776: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);

Line 1775: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_id = ' || l_loan_id);

1771: l_index := l_index + 1;
1772:
1773: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1774: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
1775: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_id = ' || l_loan_id);
1776: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1779: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);

Line 1776: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);

1772:
1773: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1774: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
1775: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_id = ' || l_loan_id);
1776: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1779: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1780: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' || l_distribution_amount);

Line 1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);

1773: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Record ' || l_index);
1774: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
1775: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_id = ' || l_loan_id);
1776: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1779: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1780: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' || l_distribution_amount);
1781: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);

Line 1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);

1774: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_id = ' || l_distribution_id);
1775: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_id = ' || l_loan_id);
1776: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1779: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1780: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' || l_distribution_amount);
1781: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1782: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);

Line 1779: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);

1775: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_id = ' || l_loan_id);
1776: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1779: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1780: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' || l_distribution_amount);
1781: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1782: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
1783:

Line 1780: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' || l_distribution_amount);

1776: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_line_type = ' || l_line_type);
1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1779: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1780: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' || l_distribution_amount);
1781: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1782: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
1783:
1784: x_distribution_tbl(l_index).distribution_id := l_distribution_id;

Line 1781: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);

1777: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_account_name = ' || l_account_name);
1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1779: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1780: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' || l_distribution_amount);
1781: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1782: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
1783:
1784: x_distribution_tbl(l_index).distribution_id := l_distribution_id;
1785: x_distribution_tbl(l_index).loan_id := l_loan_id;

Line 1782: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);

1778: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
1779: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_percent = ' || l_distribution_percent);
1780: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' || l_distribution_amount);
1781: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_type = ' || l_distribution_type);
1782: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_event_id = ' || l_event_id);
1783:
1784: x_distribution_tbl(l_index).distribution_id := l_distribution_id;
1785: x_distribution_tbl(l_index).loan_id := l_loan_id;
1786: x_distribution_tbl(l_index).line_type := l_line_type;

Line 1807: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found: ' || x_distribution_tbl.count || ' distributions');

1803: END LOOP;
1804:
1805: CLOSE C_Get_Distribution;
1806:
1807: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found: ' || x_distribution_tbl.count || ' distributions');
1808: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1809: return x_distribution_tbl;
1810:
1811: end getDistributions;

Line 1808: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

1804:
1805: CLOSE C_Get_Distribution;
1806:
1807: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found: ' || x_distribution_tbl.count || ' distributions');
1808: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1809: return x_distribution_tbl;
1810:
1811: end getDistributions;
1812:

Line 1839: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

1835:
1836: begin
1837: l_api_name := 'getDistributions';
1838:
1839: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
1840: OPEN c_get_distribution (p_distribution_id);
1841: FETCH C_Get_Distribution into
1842: x_distribution_rec.distribution_id
1843: ,x_distribution_rec.loan_id

Line 1855: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_id = ' || x_distribution_rec.distribution_id);

1851: ,x_distribution_rec.account_name
1852: ,x_distribution_rec.event_id;
1853: CLOSE C_Get_Distribution;
1854:
1855: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_id = ' || x_distribution_rec.distribution_id);
1856: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || x_distribution_rec.loan_id);
1857: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line_type = ' || x_distribution_rec.line_type);
1858: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);

Line 1856: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || x_distribution_rec.loan_id);

1852: ,x_distribution_rec.event_id;
1853: CLOSE C_Get_Distribution;
1854:
1855: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_id = ' || x_distribution_rec.distribution_id);
1856: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || x_distribution_rec.loan_id);
1857: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line_type = ' || x_distribution_rec.line_type);
1858: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);
1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);

Line 1857: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line_type = ' || x_distribution_rec.line_type);

1853: CLOSE C_Get_Distribution;
1854:
1855: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_id = ' || x_distribution_rec.distribution_id);
1856: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || x_distribution_rec.loan_id);
1857: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line_type = ' || x_distribution_rec.line_type);
1858: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);
1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);
1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);

Line 1858: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);

1854:
1855: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_id = ' || x_distribution_rec.distribution_id);
1856: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || x_distribution_rec.loan_id);
1857: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line_type = ' || x_distribution_rec.line_type);
1858: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);
1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);
1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);
1862: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_type = ' || x_distribution_rec.distribution_type);

Line 1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);

1855: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_id = ' || x_distribution_rec.distribution_id);
1856: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || x_distribution_rec.loan_id);
1857: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line_type = ' || x_distribution_rec.line_type);
1858: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);
1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);
1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);
1862: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_type = ' || x_distribution_rec.distribution_type);
1863: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || x_distribution_rec.account_type);

Line 1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);

1856: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_id = ' || x_distribution_rec.loan_id);
1857: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line_type = ' || x_distribution_rec.line_type);
1858: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);
1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);
1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);
1862: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_type = ' || x_distribution_rec.distribution_type);
1863: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || x_distribution_rec.account_type);
1864: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);

Line 1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);

1857: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'line_type = ' || x_distribution_rec.line_type);
1858: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);
1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);
1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);
1862: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_type = ' || x_distribution_rec.distribution_type);
1863: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || x_distribution_rec.account_type);
1864: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1865: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_distribution_rec.event_id);

Line 1862: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_type = ' || x_distribution_rec.distribution_type);

1858: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);
1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);
1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);
1862: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_type = ' || x_distribution_rec.distribution_type);
1863: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || x_distribution_rec.account_type);
1864: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1865: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_distribution_rec.event_id);
1866:

Line 1863: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || x_distribution_rec.account_type);

1859: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'code_combination_id = ' || x_distribution_rec.code_combination_id);
1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);
1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);
1862: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_type = ' || x_distribution_rec.distribution_type);
1863: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || x_distribution_rec.account_type);
1864: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1865: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_distribution_rec.event_id);
1866:
1867: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

Line 1864: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);

1860: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_percent = ' || x_distribution_rec.distribution_percent);
1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);
1862: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_type = ' || x_distribution_rec.distribution_type);
1863: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || x_distribution_rec.account_type);
1864: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1865: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_distribution_rec.event_id);
1866:
1867: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1868: return x_distribution_rec;

Line 1865: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_distribution_rec.event_id);

1861: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_amount = ' || x_distribution_rec.distribution_amount);
1862: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'distribution_type = ' || x_distribution_rec.distribution_type);
1863: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || x_distribution_rec.account_type);
1864: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1865: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_distribution_rec.event_id);
1866:
1867: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1868: return x_distribution_rec;
1869:

Line 1867: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

1863: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || x_distribution_rec.account_type);
1864: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || x_distribution_rec.account_name);
1865: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_distribution_rec.event_id);
1866:
1867: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
1868: return x_distribution_rec;
1869:
1870: end getDistributions;
1871:

Line 1937: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Ledger details:');

1933: ,l_ledger_details.currency_code
1934: ,l_ledger_details.currency_precision;
1935: close c_ledger;
1936:
1937: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Ledger details:');
1938: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'set_of_books_id = ' || l_ledger_details.set_of_books_id);
1939: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'name = ' || l_ledger_details.name);
1940: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'short_name = ' || l_ledger_details.short_name);
1941: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);

Line 1938: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'set_of_books_id = ' || l_ledger_details.set_of_books_id);

1934: ,l_ledger_details.currency_precision;
1935: close c_ledger;
1936:
1937: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Ledger details:');
1938: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'set_of_books_id = ' || l_ledger_details.set_of_books_id);
1939: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'name = ' || l_ledger_details.name);
1940: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'short_name = ' || l_ledger_details.short_name);
1941: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);
1942: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'period_set_name = ' || l_ledger_details.period_set_name);

Line 1939: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'name = ' || l_ledger_details.name);

1935: close c_ledger;
1936:
1937: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Ledger details:');
1938: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'set_of_books_id = ' || l_ledger_details.set_of_books_id);
1939: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'name = ' || l_ledger_details.name);
1940: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'short_name = ' || l_ledger_details.short_name);
1941: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);
1942: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'period_set_name = ' || l_ledger_details.period_set_name);
1943: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_code = ' || l_ledger_details.currency_code);

Line 1940: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'short_name = ' || l_ledger_details.short_name);

1936:
1937: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Ledger details:');
1938: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'set_of_books_id = ' || l_ledger_details.set_of_books_id);
1939: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'name = ' || l_ledger_details.name);
1940: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'short_name = ' || l_ledger_details.short_name);
1941: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);
1942: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'period_set_name = ' || l_ledger_details.period_set_name);
1943: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_code = ' || l_ledger_details.currency_code);
1944: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_precision = ' || l_ledger_details.currency_precision);

Line 1941: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);

1937: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Ledger details:');
1938: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'set_of_books_id = ' || l_ledger_details.set_of_books_id);
1939: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'name = ' || l_ledger_details.name);
1940: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'short_name = ' || l_ledger_details.short_name);
1941: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);
1942: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'period_set_name = ' || l_ledger_details.period_set_name);
1943: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_code = ' || l_ledger_details.currency_code);
1944: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_precision = ' || l_ledger_details.currency_precision);
1945:

Line 1942: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'period_set_name = ' || l_ledger_details.period_set_name);

1938: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'set_of_books_id = ' || l_ledger_details.set_of_books_id);
1939: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'name = ' || l_ledger_details.name);
1940: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'short_name = ' || l_ledger_details.short_name);
1941: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);
1942: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'period_set_name = ' || l_ledger_details.period_set_name);
1943: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_code = ' || l_ledger_details.currency_code);
1944: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_precision = ' || l_ledger_details.currency_precision);
1945:
1946: return l_ledger_details;

Line 1943: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_code = ' || l_ledger_details.currency_code);

1939: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'name = ' || l_ledger_details.name);
1940: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'short_name = ' || l_ledger_details.short_name);
1941: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);
1942: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'period_set_name = ' || l_ledger_details.period_set_name);
1943: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_code = ' || l_ledger_details.currency_code);
1944: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_precision = ' || l_ledger_details.currency_precision);
1945:
1946: return l_ledger_details;
1947:

Line 1944: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_precision = ' || l_ledger_details.currency_precision);

1940: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'short_name = ' || l_ledger_details.short_name);
1941: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);
1942: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'period_set_name = ' || l_ledger_details.period_set_name);
1943: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_code = ' || l_ledger_details.currency_code);
1944: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency_precision = ' || l_ledger_details.currency_precision);
1945:
1946: return l_ledger_details;
1947:
1948: exception

Line 1952: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

1948: exception
1949: when others then
1950: FND_MESSAGE.SET_NAME('LNS', 'LNS_LEDGER_DETAILS_FAIL');
1951: FND_MSG_PUB.ADD;
1952: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
1953: RAISE FND_API.G_EXC_ERROR;
1954: end;
1955:
1956: end getLedgerDetails;

Line 2043: --logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

2039:
2040: begin
2041:
2042: l_api_name := 'calculateDistributionAmount';
2043: --logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
2044: l_ledger_details := lns_distributions_pub.getLedgerDetails;
2045: l_distribution_rec := lns_distributions_pub.getDistributions(p_distribution_id);
2046:
2047: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);

Line 2047: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);

2043: --logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
2044: l_ledger_details := lns_distributions_pub.getLedgerDetails;
2045: l_distribution_rec := lns_distributions_pub.getDistributions(p_distribution_id);
2046:
2047: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2048: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2049: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2050: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2051:

Line 2048: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);

2044: l_ledger_details := lns_distributions_pub.getLedgerDetails;
2045: l_distribution_rec := lns_distributions_pub.getDistributions(p_distribution_id);
2046:
2047: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2048: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2049: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2050: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2051:
2052: if l_distribution_rec.distribution_amount is null then

Line 2049: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);

2045: l_distribution_rec := lns_distributions_pub.getDistributions(p_distribution_id);
2046:
2047: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2048: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2049: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2050: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2051:
2052: if l_distribution_rec.distribution_amount is null then
2053: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_distributions_pub.getDistributions...');

Line 2050: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);

2046:
2047: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2048: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2049: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2050: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2051:
2052: if l_distribution_rec.distribution_amount is null then
2053: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_distributions_pub.getDistributions...');
2054: l_distribution_tbl := lns_distributions_pub.getDistributions(p_loan_id => l_distribution_rec.loan_id

Line 2053: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_distributions_pub.getDistributions...');

2049: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2050: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2051:
2052: if l_distribution_rec.distribution_amount is null then
2053: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_distributions_pub.getDistributions...');
2054: l_distribution_tbl := lns_distributions_pub.getDistributions(p_loan_id => l_distribution_rec.loan_id
2055: ,p_account_type => l_distribution_rec.account_type
2056: ,p_account_name => l_distribution_rec.account_name
2057: ,p_line_type => l_distribution_rec.line_type

Line 2065: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_max_distribution_id = ' ||l_max_distribution_id);

2061: ,l_distribution_rec.account_type);
2062: fetch c_max_dist into l_max_distribution_id;
2063: close c_max_dist;
2064:
2065: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_max_distribution_id = ' ||l_max_distribution_id);
2066:
2067: -- check to see if this is the last distribution
2068: if l_max_distribution_id = p_distribution_id and l_distribution_tbl.count > 1 then
2069: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'last distribution');

Line 2069: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'last distribution');

2065: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_max_distribution_id = ' ||l_max_distribution_id);
2066:
2067: -- check to see if this is the last distribution
2068: if l_max_distribution_id = p_distribution_id and l_distribution_tbl.count > 1 then
2069: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'last distribution');
2070: open c_last_distribution(l_distribution_rec.loan_id
2071: ,l_distribution_rec.distribution_id
2072: ,l_distribution_rec.distribution_type
2073: ,l_distribution_rec.account_type);

Line 2077: --logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

2073: ,l_distribution_rec.account_type);
2074: fetch c_last_distribution into l_distribution_amount;
2075: close c_last_distribution;
2076: else
2077: --logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
2078: open c_get_distribution(p_distribution_id);
2079: fetch c_get_distribution into l_distribution_amount;
2080: close c_get_distribution;
2081:

Line 2087: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' ||l_distribution_amount);

2083: else
2084: l_distribution_amount := l_distribution_rec.distribution_amount;
2085: end if;
2086:
2087: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' ||l_distribution_amount);
2088: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
2089: return l_distribution_amount;
2090:
2091: end calculateDistributionAmount;

Line 2088: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

2084: l_distribution_amount := l_distribution_rec.distribution_amount;
2085: end if;
2086:
2087: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distribution_amount = ' ||l_distribution_amount);
2088: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
2089: return l_distribution_amount;
2090:
2091: end calculateDistributionAmount;
2092:

Line 2183: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

2179: begin
2180:
2181: l_api_name := 'calculateDistributionAmount';
2182:
2183: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
2184: l_ledger_details := lns_distributions_pub.getLedgerDetails;
2185: l_distribution_rec := lns_distributions_pub.getDistributions(p_distribution_id);
2186:
2187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);

Line 2187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);

2183: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
2184: l_ledger_details := lns_distributions_pub.getLedgerDetails;
2185: l_distribution_rec := lns_distributions_pub.getDistributions(p_distribution_id);
2186:
2187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2189: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2190: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2191: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted flag = ' || p_accounted_flag);

Line 2188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);

2184: l_ledger_details := lns_distributions_pub.getLedgerDetails;
2185: l_distribution_rec := lns_distributions_pub.getDistributions(p_distribution_id);
2186:
2187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2189: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2190: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2191: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted flag = ' || p_accounted_flag);
2192:

Line 2189: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);

2185: l_distribution_rec := lns_distributions_pub.getDistributions(p_distribution_id);
2186:
2187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2189: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2190: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2191: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted flag = ' || p_accounted_flag);
2192:
2193: if p_accounted_flag = 'Y' then

Line 2190: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);

2186:
2187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2189: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2190: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2191: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted flag = ' || p_accounted_flag);
2192:
2193: if p_accounted_flag = 'Y' then
2194:

Line 2191: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted flag = ' || p_accounted_flag);

2187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2189: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'disttype = ' || l_distribution_rec.distribution_type);
2190: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounttype = ' || l_distribution_rec.account_type);
2191: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted flag = ' || p_accounted_flag);
2192:
2193: if p_accounted_flag = 'Y' then
2194:
2195: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);

Line 2195: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);

2191: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted flag = ' || p_accounted_flag);
2192:
2193: if p_accounted_flag = 'Y' then
2194:
2195: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loanID = ' || l_distribution_rec.loan_id);
2196: open c_exchange_info(l_distribution_rec.loan_id);
2197: fetch c_exchange_info into
2198: l_exchange_rate_type
2199: ,l_exchange_rate

Line 2203: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate type = ' || l_exchange_rate_type);

2199: ,l_exchange_rate
2200: ,l_exchange_date
2201: ,l_currency_code;
2202: close c_exchange_info;
2203: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate type = ' || l_exchange_rate_type);
2204: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate = ' || l_exchange_rate);
2205: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange date = ' || l_exchange_date);
2206: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency = ' || l_currency_code);
2207: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency2 = ' || l_ledger_details.CURRENCY_CODE);

Line 2204: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate = ' || l_exchange_rate);

2200: ,l_exchange_date
2201: ,l_currency_code;
2202: close c_exchange_info;
2203: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate type = ' || l_exchange_rate_type);
2204: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate = ' || l_exchange_rate);
2205: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange date = ' || l_exchange_date);
2206: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency = ' || l_currency_code);
2207: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency2 = ' || l_ledger_details.CURRENCY_CODE);
2208: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'amount = ' || l_distribution_rec.distribution_amount);

Line 2205: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange date = ' || l_exchange_date);

2201: ,l_currency_code;
2202: close c_exchange_info;
2203: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate type = ' || l_exchange_rate_type);
2204: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate = ' || l_exchange_rate);
2205: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange date = ' || l_exchange_date);
2206: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency = ' || l_currency_code);
2207: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency2 = ' || l_ledger_details.CURRENCY_CODE);
2208: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'amount = ' || l_distribution_rec.distribution_amount);
2209:

Line 2206: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency = ' || l_currency_code);

2202: close c_exchange_info;
2203: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate type = ' || l_exchange_rate_type);
2204: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate = ' || l_exchange_rate);
2205: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange date = ' || l_exchange_date);
2206: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency = ' || l_currency_code);
2207: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency2 = ' || l_ledger_details.CURRENCY_CODE);
2208: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'amount = ' || l_distribution_rec.distribution_amount);
2209:
2210: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_utility_pub.convertAmount...');

Line 2207: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency2 = ' || l_ledger_details.CURRENCY_CODE);

2203: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate type = ' || l_exchange_rate_type);
2204: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate = ' || l_exchange_rate);
2205: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange date = ' || l_exchange_date);
2206: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency = ' || l_currency_code);
2207: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency2 = ' || l_ledger_details.CURRENCY_CODE);
2208: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'amount = ' || l_distribution_rec.distribution_amount);
2209:
2210: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_utility_pub.convertAmount...');
2211: l_return := lns_utility_pub.convertAmount(p_from_amount => l_distribution_rec.distribution_amount

Line 2208: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'amount = ' || l_distribution_rec.distribution_amount);

2204: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange rate = ' || l_exchange_rate);
2205: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'exchange date = ' || l_exchange_date);
2206: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency = ' || l_currency_code);
2207: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency2 = ' || l_ledger_details.CURRENCY_CODE);
2208: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'amount = ' || l_distribution_rec.distribution_amount);
2209:
2210: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_utility_pub.convertAmount...');
2211: l_return := lns_utility_pub.convertAmount(p_from_amount => l_distribution_rec.distribution_amount
2212: ,p_from_currency => l_currency_code -- loan currency

Line 2210: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_utility_pub.convertAmount...');

2206: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency = ' || l_currency_code);
2207: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'currency2 = ' || l_ledger_details.CURRENCY_CODE);
2208: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'amount = ' || l_distribution_rec.distribution_amount);
2209:
2210: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling lns_utility_pub.convertAmount...');
2211: l_return := lns_utility_pub.convertAmount(p_from_amount => l_distribution_rec.distribution_amount
2212: ,p_from_currency => l_currency_code -- loan currency
2213: ,p_to_currency => l_ledger_details.CURRENCY_CODE -- set of books currency
2214: ,p_exchange_type => l_exchange_rate_type

Line 2221: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted amount = ' || l_return);

2217: else
2218: l_return := l_distribution_rec.distribution_amount;
2219: end if;
2220:
2221: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted amount = ' || l_return);
2222: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
2223:
2224: return l_return;
2225:

Line 2222: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

2218: l_return := l_distribution_rec.distribution_amount;
2219: end if;
2220:
2221: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'accounted amount = ' || l_return);
2222: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
2223:
2224: return l_return;
2225:
2226: end calculateDistributionAmount;

Line 2254: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

2250: WHERE sb.set_of_books_id = so.set_of_books_id;
2251:
2252: begin
2253: l_api_name := 'calculateDistAmount';
2254: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
2255: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2256:
2257: if p_accounted_flag = 'Y' then
2258: open c_currency2;

Line 2255: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);

2251:
2252: begin
2253: l_api_name := 'calculateDistAmount';
2254: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
2255: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIST_ID = ' || p_distribution_id);
2256:
2257: if p_accounted_flag = 'Y' then
2258: open c_currency2;
2259: fetch c_currency2 into l_currency;

Line 2272: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'returned amount = ' || l_return);

2268: ,p_accounted_flag => p_accounted_flag);
2269: l_char := to_char(l_amount, fnd_currency.safe_get_format_mask(l_currency,25));
2270:
2271: l_return := l_char || ' ' || l_currency;
2272: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'returned amount = ' || l_return);
2273: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
2274:
2275: return l_return;
2276: end;

Line 2273: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

2269: l_char := to_char(l_amount, fnd_currency.safe_get_format_mask(l_currency,25));
2270:
2271: l_return := l_char || ' ' || l_currency;
2272: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'returned amount = ' || l_return);
2273: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
2274:
2275: return l_return;
2276: end;
2277:

Line 2344: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_flex_seg_num = ' || l_flex_seg_num);

2340:
2341: open c_segmentNumber(p_flex_code , p_application_id , p_segment_attribute_type );
2342: fetch c_segmentNumber into l_flex_seg_num;
2343: close c_segmentNumber;
2344: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_flex_seg_num = ' || l_flex_seg_num);
2345:
2346: return l_flex_seg_num;
2347:
2348: end getFlexSegmentNumber;

Line 2410: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_value_set_id = ' || l_value_set_id);

2406: begin
2407: open c_valueSetID(p_segment_attribute_type);
2408: fetch c_valueSetID into l_value_set_id;
2409: close c_valueSetID;
2410: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_value_set_id = ' || l_value_set_id);
2411:
2412: return l_value_set_id;
2413:
2414: end getValueSetID;

Line 2479: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

2475:
2476: begin
2477:
2478: l_api_name := 'validateAccounting1';
2479: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
2480:
2481: -- Initialize message list IF p_init_msg_list is set to TRUE.
2482: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2483: FND_MSG_PUB.initialize;

Line 2498: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_class = ' || l_loan_class);

2494: open c_loan_class(p_loan_id);
2495: fetch c_loan_class into l_loan_class;
2496: close c_loan_class;
2497:
2498: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan_class = ' || l_loan_class);
2499: -- get the distributions details
2500: /*
2501: l_loan_liability_fund := LNS_DISTRIBUTIONS_PUB.getDistributions(p_loan_id => p_loan_id
2502: ,p_account_type => 'DR'

Line 2509: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 1...');

2505: ,p_distribution_type => 'FUNDING');
2506: */
2507: if l_loan_class = 'ERS' then
2508:
2509: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 1...');
2510: l_loan_clearing_orig := LNS_DISTRIBUTIONS_PUB.getDistributions(p_loan_id => p_loan_id
2511: ,p_account_type => 'CR'
2512: ,p_account_name => 'LOAN_CLEARING'
2513: ,p_line_type => 'CLEAR'

Line 2517: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 2...');

2513: ,p_line_type => 'CLEAR'
2514: ,p_distribution_type => 'ORIGINATION');
2515: elsif l_loan_class = 'DIRECT' then
2516:
2517: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 2...');
2518: l_loan_clearing_orig := LNS_DISTRIBUTIONS_PUB.getDistributions(p_loan_id => p_loan_id
2519: ,p_account_type => 'CR'
2520: ,p_account_name => 'LOAN_PAYABLE'
2521: ,p_line_type => 'CLEAR'

Line 2525: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 3...');

2521: ,p_line_type => 'CLEAR'
2522: ,p_distribution_type => 'ORIGINATION');
2523: end if;
2524:
2525: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 3...');
2526: l_loan_receivables_orig := LNS_DISTRIBUTIONS_PUB.getDistributions(p_loan_id => p_loan_id
2527: ,p_account_type => 'DR'
2528: ,p_account_name => 'LOAN_RECEIVABLE'
2529: ,p_line_type => 'ORIG'

Line 2532: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 4...');

2528: ,p_account_name => 'LOAN_RECEIVABLE'
2529: ,p_line_type => 'ORIG'
2530: ,p_distribution_type => 'ORIGINATION');
2531:
2532: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 4...');
2533: l_loan_receivables_bill := LNS_DISTRIBUTIONS_PUB.getDistributions(p_loan_id => p_loan_id
2534: ,p_account_type => 'CR'
2535: ,p_account_name => 'LOAN_RECEIVABLE'
2536: ,p_line_type => 'PRIN'

Line 2539: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 5...');

2535: ,p_account_name => 'LOAN_RECEIVABLE'
2536: ,p_line_type => 'PRIN'
2537: ,p_distribution_type => 'BILLING');
2538:
2539: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 5...');
2540: l_prin_receivables_bill := LNS_DISTRIBUTIONS_PUB.getDistributions(p_loan_id => p_loan_id
2541: ,p_account_type => 'DR'
2542: ,p_account_name => 'PRINCIPAL_RECEIVABLE'
2543: ,p_line_type => 'PRIN'

Line 2546: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 6...');

2542: ,p_account_name => 'PRINCIPAL_RECEIVABLE'
2543: ,p_line_type => 'PRIN'
2544: ,p_distribution_type => 'BILLING');
2545:
2546: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 6...');
2547: l_int_receivables_bill := LNS_DISTRIBUTIONS_PUB.getDistributions(p_loan_id => p_loan_id
2548: ,p_account_type => 'DR'
2549: ,p_account_name => 'INTEREST_RECEIVABLE'
2550: ,p_line_type => 'INT'

Line 2553: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 7...');

2549: ,p_account_name => 'INTEREST_RECEIVABLE'
2550: ,p_line_type => 'INT'
2551: ,p_distribution_type => 'BILLING');
2552:
2553: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_DISTRIBUTIONS_PUB.getDistributions 7...');
2554: l_int_income_bill := LNS_DISTRIBUTIONS_PUB.getDistributions(p_loan_id => p_loan_id
2555: ,p_account_type => 'CR'
2556: ,p_account_name => 'INTEREST_INCOME'
2557: ,p_line_type => 'INT'

Line 2562: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ERS VALIDATION');

2558: ,p_distribution_type => 'BILLING');
2559:
2560: if l_loan_class = 'ERS' then
2561:
2562: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ERS VALIDATION');
2563:
2564: /*
2565: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting number of receivables on ers loan');
2566: open c_num_receivables_ers(p_loan_id);

Line 2565: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting number of receivables on ers loan');

2561:
2562: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ERS VALIDATION');
2563:
2564: /*
2565: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting number of receivables on ers loan');
2566: open c_num_receivables_ers(p_loan_id);
2567: fetch c_num_receivables_ers into l_num_receivables_ers;
2568: close c_num_receivables_ers;
2569: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'num is: ' || l_num_receivables_ers);

Line 2569: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'num is: ' || l_num_receivables_ers);

2565: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting number of receivables on ers loan');
2566: open c_num_receivables_ers(p_loan_id);
2567: fetch c_num_receivables_ers into l_num_receivables_ers;
2568: close c_num_receivables_ers;
2569: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'num is: ' || l_num_receivables_ers);
2570:
2571: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting number of receivables ACCOUNTED');
2572: open c_num_receivables_acc(p_loan_id);
2573: fetch c_num_receivables_acc into l_num_receivables_acc;

Line 2571: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting number of receivables ACCOUNTED');

2567: fetch c_num_receivables_ers into l_num_receivables_ers;
2568: close c_num_receivables_ers;
2569: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'num is: ' || l_num_receivables_ers);
2570:
2571: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting number of receivables ACCOUNTED');
2572: open c_num_receivables_acc(p_loan_id);
2573: fetch c_num_receivables_acc into l_num_receivables_acc;
2574: close c_num_receivables_acc;
2575: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'num is: ' || l_num_receivables_acc);

Line 2575: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'num is: ' || l_num_receivables_acc);

2571: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting number of receivables ACCOUNTED');
2572: open c_num_receivables_acc(p_loan_id);
2573: fetch c_num_receivables_acc into l_num_receivables_acc;
2574: close c_num_receivables_acc;
2575: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'num is: ' || l_num_receivables_acc);
2576:
2577: if l_num_receivables_acc <> l_num_receivables_ers then
2578: FND_MESSAGE.Set_Name('LNS', 'LNS_AR_RECEIVABLES_UNACC');
2579: FND_MSG_PUB.Add;

Line 2584: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables count');

2580: RAISE FND_API.G_EXC_ERROR;
2581: end if;
2582: */
2583:
2584: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables count');
2585: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination Count = ' || l_loan_receivables_orig.count );
2586: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing Count = ' || l_loan_receivables_bill.count);
2587: if l_loan_receivables_orig.count <> l_loan_receivables_bill.count then
2588: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_INVALID_RECEIVABLES');

Line 2585: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination Count = ' || l_loan_receivables_orig.count );

2581: end if;
2582: */
2583:
2584: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables count');
2585: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination Count = ' || l_loan_receivables_orig.count );
2586: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing Count = ' || l_loan_receivables_bill.count);
2587: if l_loan_receivables_orig.count <> l_loan_receivables_bill.count then
2588: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_INVALID_RECEIVABLES');
2589: FND_MSG_PUB.Add;

Line 2586: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing Count = ' || l_loan_receivables_bill.count);

2582: */
2583:
2584: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables count');
2585: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination Count = ' || l_loan_receivables_orig.count );
2586: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing Count = ' || l_loan_receivables_bill.count);
2587: if l_loan_receivables_orig.count <> l_loan_receivables_bill.count then
2588: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_INVALID_RECEIVABLES');
2589: FND_MSG_PUB.Add;
2590: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 2590: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

2586: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing Count = ' || l_loan_receivables_bill.count);
2587: if l_loan_receivables_orig.count <> l_loan_receivables_bill.count then
2588: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_INVALID_RECEIVABLES');
2589: FND_MSG_PUB.Add;
2590: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2591: RAISE FND_API.G_EXC_ERROR;
2592: end if;
2593:
2594: -- B. The account code combinations for the Loans Receivable accounts within

Line 2599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables cc_ids');

2595: -- Origination must be the same as the account code combinations for the Loans
2596: -- Receivable accounts within Billing
2597: for j in 1..l_loan_receivables_orig.count loop
2598:
2599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables cc_ids');
2600: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination cc_id = ' || l_loan_receivables_orig(j).code_combination_id );
2601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing cc_id = ' || l_loan_receivables_bill(j).code_combination_id);
2602: if l_loan_receivables_orig(j).code_combination_id <> l_loan_receivables_bill(j).code_combination_id then
2603: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_LOAN_REC_CCIDS_UNMATCH');

Line 2600: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination cc_id = ' || l_loan_receivables_orig(j).code_combination_id );

2596: -- Receivable accounts within Billing
2597: for j in 1..l_loan_receivables_orig.count loop
2598:
2599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables cc_ids');
2600: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination cc_id = ' || l_loan_receivables_orig(j).code_combination_id );
2601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing cc_id = ' || l_loan_receivables_bill(j).code_combination_id);
2602: if l_loan_receivables_orig(j).code_combination_id <> l_loan_receivables_bill(j).code_combination_id then
2603: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_LOAN_REC_CCIDS_UNMATCH');
2604: FND_MSG_PUB.Add;

Line 2601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing cc_id = ' || l_loan_receivables_bill(j).code_combination_id);

2597: for j in 1..l_loan_receivables_orig.count loop
2598:
2599: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables cc_ids');
2600: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination cc_id = ' || l_loan_receivables_orig(j).code_combination_id );
2601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing cc_id = ' || l_loan_receivables_bill(j).code_combination_id);
2602: if l_loan_receivables_orig(j).code_combination_id <> l_loan_receivables_bill(j).code_combination_id then
2603: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_LOAN_REC_CCIDS_UNMATCH');
2604: FND_MSG_PUB.Add;
2605: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 2605: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

2601: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing cc_id = ' || l_loan_receivables_bill(j).code_combination_id);
2602: if l_loan_receivables_orig(j).code_combination_id <> l_loan_receivables_bill(j).code_combination_id then
2603: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_LOAN_REC_CCIDS_UNMATCH');
2604: FND_MSG_PUB.Add;
2605: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2606: RAISE FND_API.G_EXC_ERROR;
2607: end if;
2608:
2609: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking for duplicate IDs');

Line 2609: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking for duplicate IDs');

2605: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2606: RAISE FND_API.G_EXC_ERROR;
2607: end if;
2608:
2609: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking for duplicate IDs');
2610: if j < l_loan_receivables_orig.count then
2611: if (l_loan_receivables_orig(j).code_combination_id = l_loan_receivables_orig(j+1).code_combination_id) OR
2612: (l_loan_clearing_orig(j).code_combination_id = l_loan_clearing_orig(j+1).code_combination_id)
2613: then

Line 2614: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found duplicate IDs');

2610: if j < l_loan_receivables_orig.count then
2611: if (l_loan_receivables_orig(j).code_combination_id = l_loan_receivables_orig(j+1).code_combination_id) OR
2612: (l_loan_clearing_orig(j).code_combination_id = l_loan_clearing_orig(j+1).code_combination_id)
2613: then
2614: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found duplicate IDs');
2615: FND_MESSAGE.Set_Name('LNS', 'LNS_UNIQUE_CC_IDS');
2616: FND_MSG_PUB.Add;
2617: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2618: RAISE FND_API.G_EXC_ERROR;

Line 2617: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

2613: then
2614: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'found duplicate IDs');
2615: FND_MESSAGE.Set_Name('LNS', 'LNS_UNIQUE_CC_IDS');
2616: FND_MSG_PUB.Add;
2617: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2618: RAISE FND_API.G_EXC_ERROR;
2619: end if;
2620: end if;
2621:

Line 2625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables percentages');

2621:
2622: -- F. The code combinations distribution percentages for each Loans Receivable
2623: -- within Origination must equal the distribution percentage for each Loans
2624: -- Receivable within Billing
2625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables percentages');
2626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination percent = ' || l_loan_receivables_orig(j).distribution_percent );
2627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing percent = ' || l_loan_receivables_bill(j).distribution_percent);
2628: if l_loan_receivables_orig(j).distribution_percent <> l_loan_receivables_bill(j).distribution_percent then
2629: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_LOAN_REC_PER_UNMATCH');

Line 2626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination percent = ' || l_loan_receivables_orig(j).distribution_percent );

2622: -- F. The code combinations distribution percentages for each Loans Receivable
2623: -- within Origination must equal the distribution percentage for each Loans
2624: -- Receivable within Billing
2625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables percentages');
2626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination percent = ' || l_loan_receivables_orig(j).distribution_percent );
2627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing percent = ' || l_loan_receivables_bill(j).distribution_percent);
2628: if l_loan_receivables_orig(j).distribution_percent <> l_loan_receivables_bill(j).distribution_percent then
2629: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_LOAN_REC_PER_UNMATCH');
2630: FND_MSG_PUB.Add;

Line 2627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing percent = ' || l_loan_receivables_bill(j).distribution_percent);

2623: -- within Origination must equal the distribution percentage for each Loans
2624: -- Receivable within Billing
2625: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'comparing origination receivables to billing receivables percentages');
2626: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables origination percent = ' || l_loan_receivables_orig(j).distribution_percent );
2627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing percent = ' || l_loan_receivables_bill(j).distribution_percent);
2628: if l_loan_receivables_orig(j).distribution_percent <> l_loan_receivables_bill(j).distribution_percent then
2629: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_LOAN_REC_PER_UNMATCH');
2630: FND_MSG_PUB.Add;
2631: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 2631: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

2627: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables billing percent = ' || l_loan_receivables_bill(j).distribution_percent);
2628: if l_loan_receivables_orig(j).distribution_percent <> l_loan_receivables_bill(j).distribution_percent then
2629: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_LOAN_REC_PER_UNMATCH');
2630: FND_MSG_PUB.Add;
2631: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2632: RAISE FND_API.G_EXC_ERROR;
2633: end if;
2634:
2635: l_dist_percent_rec_orig := l_dist_percent_rec_orig + l_loan_receivables_orig(j).distribution_percent;

Line 2644: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking origination receivables total percentages');

2640:
2641: -- C. The distribution percentage for the Loans Receivable accounts in both
2642: -- Origination and Billing must add to 100%
2643: -- D. The distribution percentage for the Loans Clearing accounts in Origination must add to 100%
2644: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking origination receivables total percentages');
2645: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables total percent = ' || l_dist_percent_rec_orig);
2646: if l_dist_percent_rec_orig <> 100 then
2647: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_ORIG_REC_PER_INVALID');
2648: FND_MSG_PUB.Add;

Line 2645: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables total percent = ' || l_dist_percent_rec_orig);

2641: -- C. The distribution percentage for the Loans Receivable accounts in both
2642: -- Origination and Billing must add to 100%
2643: -- D. The distribution percentage for the Loans Clearing accounts in Origination must add to 100%
2644: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking origination receivables total percentages');
2645: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables total percent = ' || l_dist_percent_rec_orig);
2646: if l_dist_percent_rec_orig <> 100 then
2647: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_ORIG_REC_PER_INVALID');
2648: FND_MSG_PUB.Add;
2649: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 2649: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

2645: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables total percent = ' || l_dist_percent_rec_orig);
2646: if l_dist_percent_rec_orig <> 100 then
2647: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_ORIG_REC_PER_INVALID');
2648: FND_MSG_PUB.Add;
2649: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2650: RAISE FND_API.G_EXC_ERROR;
2651: end if;
2652: end if;
2653:

Line 2655: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking billing receivables total percentages');

2651: end if;
2652: end if;
2653:
2654: /*
2655: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking billing receivables total percentages');
2656: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables total percent: ' || l_dist_percent_rec_bill);
2657: if l_dist_percent_rec_bill <> 100 then
2658: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_BILL_REC_PER_INVALID');
2659: FND_MSG_PUB.Add;

Line 2656: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables total percent: ' || l_dist_percent_rec_bill);

2652: end if;
2653:
2654: /*
2655: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking billing receivables total percentages');
2656: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan recivables total percent: ' || l_dist_percent_rec_bill);
2657: if l_dist_percent_rec_bill <> 100 then
2658: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_BILL_REC_PER_INVALID');
2659: FND_MSG_PUB.Add;
2660: RAISE FND_API.G_EXC_ERROR;

Line 2664: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking origination clearing total percentages');

2660: RAISE FND_API.G_EXC_ERROR;
2661: end if;
2662: */
2663:
2664: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking origination clearing total percentages');
2665: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan clearing total percent = ' || l_dist_percent_clear_orig);
2666: /*
2667: if l_dist_percent_clear_orig <> 100 then
2668: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_ORIG_CLR_PER_INVALID');

Line 2665: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan clearing total percent = ' || l_dist_percent_clear_orig);

2661: end if;
2662: */
2663:
2664: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking origination clearing total percentages');
2665: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'loan clearing total percent = ' || l_dist_percent_clear_orig);
2666: /*
2667: if l_dist_percent_clear_orig <> 100 then
2668: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_ORIG_CLR_PER_INVALID');
2669: FND_MSG_PUB.Add;

Line 2675: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking principal receivables count');

2671: end if;
2672: */
2673: -- G. In the current release of 11i, there must be only one Principal Receivable
2674: -- account
2675: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking principal receivables count');
2676: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'principal receivables count = ' || l_prin_receivables_bill.count);
2677: if l_prin_receivables_bill.count <> 1 then
2678: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_MULT_PRIN_RECEIVABLE');
2679: FND_MSG_PUB.Add;

Line 2676: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'principal receivables count = ' || l_prin_receivables_bill.count);

2672: */
2673: -- G. In the current release of 11i, there must be only one Principal Receivable
2674: -- account
2675: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking principal receivables count');
2676: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'principal receivables count = ' || l_prin_receivables_bill.count);
2677: if l_prin_receivables_bill.count <> 1 then
2678: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_MULT_PRIN_RECEIVABLE');
2679: FND_MSG_PUB.Add;
2680: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 2680: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

2676: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'principal receivables count = ' || l_prin_receivables_bill.count);
2677: if l_prin_receivables_bill.count <> 1 then
2678: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_MULT_PRIN_RECEIVABLE');
2679: FND_MSG_PUB.Add;
2680: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2681: RAISE FND_API.G_EXC_ERROR;
2682: end if;
2683:
2684: -- H. In the current release of 11i, there must be only one Interest Receivable

Line 2686: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking Interest receivables count');

2682: end if;
2683:
2684: -- H. In the current release of 11i, there must be only one Interest Receivable
2685: -- account
2686: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking Interest receivables count');
2687: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest receivables count = ' || l_int_receivables_bill.count);
2688: if l_int_receivables_bill.count <> 1 then
2689: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_MULT_INT_RECEIVABLE');
2690: FND_MSG_PUB.Add;

Line 2687: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest receivables count = ' || l_int_receivables_bill.count);

2683:
2684: -- H. In the current release of 11i, there must be only one Interest Receivable
2685: -- account
2686: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking Interest receivables count');
2687: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest receivables count = ' || l_int_receivables_bill.count);
2688: if l_int_receivables_bill.count <> 1 then
2689: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_MULT_INT_RECEIVABLE');
2690: FND_MSG_PUB.Add;
2691: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 2691: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

2687: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest receivables count = ' || l_int_receivables_bill.count);
2688: if l_int_receivables_bill.count <> 1 then
2689: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_MULT_INT_RECEIVABLE');
2690: FND_MSG_PUB.Add;
2691: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2692: RAISE FND_API.G_EXC_ERROR;
2693: end if;
2694:
2695: -- I. There may be multiple Interest Income accounts

Line 2696: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking Interest Income count');

2692: RAISE FND_API.G_EXC_ERROR;
2693: end if;
2694:
2695: -- I. There may be multiple Interest Income accounts
2696: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking Interest Income count');
2697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest Income count = ' || l_int_income_bill.count);
2698: if l_int_income_bill.count < 1 then
2699: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_NO_INTEREST_INCOME');
2700: FND_MSG_PUB.Add;

Line 2697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest Income count = ' || l_int_income_bill.count);

2693: end if;
2694:
2695: -- I. There may be multiple Interest Income accounts
2696: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking Interest Income count');
2697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest Income count = ' || l_int_income_bill.count);
2698: if l_int_income_bill.count < 1 then
2699: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_NO_INTEREST_INCOME');
2700: FND_MSG_PUB.Add;
2701: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 2701: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

2697: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest Income count = ' || l_int_income_bill.count);
2698: if l_int_income_bill.count < 1 then
2699: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_NO_INTEREST_INCOME');
2700: FND_MSG_PUB.Add;
2701: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2702: RAISE FND_API.G_EXC_ERROR;
2703: end if;
2704:
2705: -- J. The distribution percentages for Interest Income must add to 100%

Line 2710: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking Interest Income percentage');

2706: for j in 1..l_int_income_bill.count loop
2707: l_dist_percent_int_income := l_dist_percent_int_income + l_int_income_bill(j).distribution_percent;
2708: end loop;
2709:
2710: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking Interest Income percentage');
2711: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest Income percentage = ' || l_dist_percent_int_income);
2712: if l_dist_percent_int_income <> 100 then
2713: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_INT_INCOME_PER_INVALID');
2714: FND_MSG_PUB.Add;

Line 2711: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest Income percentage = ' || l_dist_percent_int_income);

2707: l_dist_percent_int_income := l_dist_percent_int_income + l_int_income_bill(j).distribution_percent;
2708: end loop;
2709:
2710: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking Interest Income percentage');
2711: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest Income percentage = ' || l_dist_percent_int_income);
2712: if l_dist_percent_int_income <> 100 then
2713: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_INT_INCOME_PER_INVALID');
2714: FND_MSG_PUB.Add;
2715: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 2715: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

2711: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Interest Income percentage = ' || l_dist_percent_int_income);
2712: if l_dist_percent_int_income <> 100 then
2713: FND_MESSAGE.Set_Name('LNS', 'LNS_ACC_INT_INCOME_PER_INVALID');
2714: FND_MSG_PUB.Add;
2715: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
2716: RAISE FND_API.G_EXC_ERROR;
2717: end if;
2718:
2719: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count

Line 2722: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

2718:
2719: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
2720: ,p_data => x_msg_data);
2721:
2722: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
2723:
2724: Exception
2725: WHEN FND_API.G_EXC_ERROR THEN
2726: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2729: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

2725: WHEN FND_API.G_EXC_ERROR THEN
2726: x_return_status := FND_API.G_RET_STS_ERROR;
2727: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
2728: ,p_data => x_msg_data);
2729: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
2730:
2731: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2732: x_return_status := FND_API.G_RET_STS_ERROR;
2733: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count

Line 2735: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

2731: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2732: x_return_status := FND_API.G_RET_STS_ERROR;
2733: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
2734: ,p_data => x_msg_data);
2735: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
2736:
2737: WHEN OTHERS THEN
2738: x_return_status := FND_API.G_RET_STS_ERROR;
2739: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count

Line 2741: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

2737: WHEN OTHERS THEN
2738: x_return_status := FND_API.G_RET_STS_ERROR;
2739: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count
2740: ,p_data => x_msg_data);
2741: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
2742:
2743: end validateAccounting;
2744:
2745:

Line 2875: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

2871:
2872: begin
2873:
2874: l_api_name := 'validateLoanLines';
2875: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
2876:
2877: -- Standard Start of API savepoint
2878: SAVEPOINT validateLoanLines;
2879:

Line 2898: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'lines count is ' || l_lines_count);

2894: open c_loan_lines(p_loan_id);
2895: fetch c_loan_lines into l_lines_count;
2896: close c_loan_lines;
2897:
2898: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'lines count is ' || l_lines_count);
2899: -- check if ALL are MFAR or all are NOT MFAR only if there is more
2900: -- than 1 line on the loan
2901: if l_lines_count > 1 then
2902:

Line 2907: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'processing ' || i || ' loan line');

2903: open c_validate_MFAR(p_loan_id);
2904: LOOP
2905:
2906: i := i + 1;
2907: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'processing ' || i || ' loan line');
2908: fetch c_validate_MFAR
2909: into l_trx_type_id
2910: ,l_psa_trx_type_id;
2911:

Line 2912: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'trx type ' || l_trx_type_id);

2908: fetch c_validate_MFAR
2909: into l_trx_type_id
2910: ,l_psa_trx_type_id;
2911:
2912: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'trx type ' || l_trx_type_id);
2913: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'psa trx type '|| l_psa_trx_type_id);
2914:
2915: exit when c_validate_MFAR%NOTFOUND;
2916:

Line 2913: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'psa trx type '|| l_psa_trx_type_id);

2909: into l_trx_type_id
2910: ,l_psa_trx_type_id;
2911:
2912: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'trx type ' || l_trx_type_id);
2913: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'psa trx type '|| l_psa_trx_type_id);
2914:
2915: exit when c_validate_MFAR%NOTFOUND;
2916:
2917: if i <> 1 then

Line 2932: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'NON-MFAR');

2928: if l_psa_trx_type_id = -1 then
2929: -- the first line on the loan is NOT MFAR
2930: -- all subsequent lines SHOULD be MFAR
2931: l_mfar := false;
2932: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'NON-MFAR');
2933: else
2934: l_mfar := true;
2935: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'MFAR');
2936: end if;

Line 2935: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'MFAR');

2931: l_mfar := false;
2932: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'NON-MFAR');
2933: else
2934: l_mfar := true;
2935: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'MFAR');
2936: end if;
2937:
2938: end if;
2939: end loop;

Line 2945: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking for MFAR');

2941: else
2942: -- we only have 1 line on the loan...verify is it is MFAR or not
2943: -- check to see if trx_type is refered to in psa_trx_type
2944: -- if so this is a multi-fund receivable
2945: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking for MFAR');
2946: begin
2947:
2948: open c_multiFundTrx(p_loan_id) ;
2949: fetch c_multiFundTrx into l_multifund;

Line 2954: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'no rows found');

2950: close c_multiFundTrx;
2951:
2952: exception
2953: when others then
2954: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'no rows found');
2955: l_multifund := 0;
2956: end;
2957:
2958: if l_multifund = 1 then

Line 2968: --logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, 'sql ' || vPLSQL);

2964: end if;
2965:
2966: -- this will be needed by defaultDistributions
2967: x_mfar := l_mfar;
2968: --logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, 'sql ' || vPLSQL);
2969:
2970: -- ---------------------------------------------------------------------
2971: -- End of API body
2972: -- ---------------------------------------------------------------------

Line 2976: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

2972: -- ---------------------------------------------------------------------
2973:
2974: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
2975:
2976: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
2977:
2978: EXCEPTION
2979: WHEN FND_API.G_EXC_ERROR THEN
2980: ROLLBACK TO validateLoanLines;

Line 2985: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

2981: x_return_status := FND_API.G_RET_STS_ERROR;
2982: x_msg_count := l_msg_count;
2983: x_msg_data := l_msg_data;
2984: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
2985: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
2986:
2987: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2988: ROLLBACK TO validateLoanLines;
2989: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2993: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

2989: x_return_status := FND_API.G_RET_STS_ERROR;
2990: x_msg_count := l_msg_count;
2991: x_msg_data := l_msg_data;
2992: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
2993: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
2994:
2995: WHEN OTHERS THEN
2996: ROLLBACK TO validateLoanLines;
2997: x_return_status := FND_API.G_RET_STS_ERROR;

Line 3001: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

2997: x_return_status := FND_API.G_RET_STS_ERROR;
2998: x_msg_count := l_msg_count;
2999: x_msg_data := l_msg_data;
3000: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3001: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
3002:
3003: end validateLoanLines;
3004:
3005:

Line 3063: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || ' - BEGIN');

3059:
3060: begin
3061:
3062: l_api_name := 'create_DisbursementDistribs';
3063: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || ' - BEGIN');
3064:
3065: SAVEPOINT create_DisbursementDistribs;
3066:
3067: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'BEGIN2');

Line 3067: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'BEGIN2');

3063: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || ' - BEGIN');
3064:
3065: SAVEPOINT create_DisbursementDistribs;
3066:
3067: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'BEGIN2');
3068: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
3069: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
3070:
3071: -- Initialize message list IF p_init_msg_list is set to TRUE.

Line 3068: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);

3064:
3065: SAVEPOINT create_DisbursementDistribs;
3066:
3067: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'BEGIN2');
3068: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
3069: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
3070:
3071: -- Initialize message list IF p_init_msg_list is set to TRUE.
3072: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 3069: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);

3065: SAVEPOINT create_DisbursementDistribs;
3066:
3067: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'BEGIN2');
3068: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
3069: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
3070:
3071: -- Initialize message list IF p_init_msg_list is set to TRUE.
3072: IF FND_API.to_Boolean( p_init_msg_list ) THEN
3073: FND_MSG_PUB.initialize;

Line 3080: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);

3076: -- Initialize API return status to SUCCESS
3077: x_return_status := FND_API.G_RET_STS_SUCCESS;
3078:
3079: if p_disb_header_id is not null then
3080: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
3081: l_disb_header_id := p_disb_header_id;
3082: else
3083: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'finding first disbursement');
3084: open c_first_disb(p_loan_id);

Line 3083: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'finding first disbursement');

3079: if p_disb_header_id is not null then
3080: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_disb_header_id = ' || p_disb_header_id);
3081: l_disb_header_id := p_disb_header_id;
3082: else
3083: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'finding first disbursement');
3084: open c_first_disb(p_loan_id);
3085: fetch c_first_disb into l_disb_header_id;
3086: close c_first_disb;
3087: end if;

Line 3089: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting subsidy_rate ');

3085: fetch c_first_disb into l_disb_header_id;
3086: close c_first_disb;
3087: end if;
3088:
3089: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting subsidy_rate ');
3090: open c_subsidy_rate(p_loan_id);
3091: fetch c_subsidy_rate into l_subsidy_rate;
3092: close c_subsidy_rate;
3093: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_subsidy_rate = ' || l_subsidy_rate);

Line 3093: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_subsidy_rate = ' || l_subsidy_rate);

3089: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'getting subsidy_rate ');
3090: open c_subsidy_rate(p_loan_id);
3091: fetch c_subsidy_rate into l_subsidy_rate;
3092: close c_subsidy_rate;
3093: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_subsidy_rate = ' || l_subsidy_rate);
3094:
3095: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_disb_header_id = ' || l_disb_header_id);
3096: open c_distribsExist(p_loan_id, l_disb_header_id);
3097: fetch c_distribsExist into l_exists;

Line 3095: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_disb_header_id = ' || l_disb_header_id);

3091: fetch c_subsidy_rate into l_subsidy_rate;
3092: close c_subsidy_rate;
3093: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_subsidy_rate = ' || l_subsidy_rate);
3094:
3095: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_disb_header_id = ' || l_disb_header_id);
3096: open c_distribsExist(p_loan_id, l_disb_header_id);
3097: fetch c_distribsExist into l_exists;
3098: close c_distribsExist;
3099:

Line 3104: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling defaultDistributionsCatch...');

3100: if l_exists = 0 then
3101: -- get the cc_ids and percentages for the each loan_class_code and loan_type_id
3102: --break up the distribution amounts for the disbursement
3103: -- insert into the distributions table
3104: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling defaultDistributionsCatch...');
3105: defaultDistributionsCatch(p_api_version => 1.0
3106: ,p_init_msg_list => FND_API.G_TRUE
3107: ,p_commit => p_commit
3108: ,p_loan_id => p_loan_id

Line 3121: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distributionsCatch.count = ' || l_distributions.count);

3117: if l_return_status <> 'S' then
3118: RAISE FND_API.G_EXC_ERROR;
3119: end if;
3120:
3121: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distributionsCatch.count = ' || l_distributions.count);
3122: for j in 1..l_distributions.count loop
3123: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'adding disb_header_id ' || j);
3124: -- l_distributions(j).event_id := l_event_id;
3125: l_distributions(j).disb_header_id := p_disb_header_id;

Line 3123: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'adding disb_header_id ' || j);

3119: end if;
3120:
3121: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_distributionsCatch.count = ' || l_distributions.count);
3122: for j in 1..l_distributions.count loop
3123: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'adding disb_header_id ' || j);
3124: -- l_distributions(j).event_id := l_event_id;
3125: l_distributions(j).disb_header_id := p_disb_header_id;
3126: end loop;
3127:

Line 3133: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking for existing subsidy rows');

3129: i := l_distributions.count;
3130:
3131: if lns_utility_pub.IS_FED_FIN_ENABLED = 'Y' then
3132:
3133: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'checking for existing subsidy rows');
3134: open c_subsidy_rows_exist(p_loan_id);
3135: fetch c_subsidy_rows_exist into l_subsidy_exists;
3136: close c_subsidy_rows_exist;
3137:

Line 3138: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_subsidy_exists = ' || l_subsidy_exists);

3134: open c_subsidy_rows_exist(p_loan_id);
3135: fetch c_subsidy_rows_exist into l_subsidy_exists;
3136: close c_subsidy_rows_exist;
3137:
3138: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_subsidy_exists = ' || l_subsidy_exists);
3139: if l_subsidy_exists = 0 then
3140:
3141: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fed enabled adding subsidy rows ');
3142: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'subsidy rows do not exist ');

Line 3141: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fed enabled adding subsidy rows ');

3137:
3138: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_subsidy_exists = ' || l_subsidy_exists);
3139: if l_subsidy_exists = 0 then
3140:
3141: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fed enabled adding subsidy rows ');
3142: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'subsidy rows do not exist ');
3143: for j in 1..l_distributions_count loop
3144:
3145: -- if (l_distributions(j).ACCOUNT_TYPE = 'ORIGINATION' AND

Line 3142: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'subsidy rows do not exist ');

3138: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_subsidy_exists = ' || l_subsidy_exists);
3139: if l_subsidy_exists = 0 then
3140:
3141: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'fed enabled adding subsidy rows ');
3142: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'subsidy rows do not exist ');
3143: for j in 1..l_distributions_count loop
3144:
3145: -- if (l_distributions(j).ACCOUNT_TYPE = 'ORIGINATION' AND
3146: -- (l_distributions(j).ACCOUNT_NAME = 'LOAN_RECEIVABLE' OR

Line 3148: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'adding subsidy row # ' || j);

3144:
3145: -- if (l_distributions(j).ACCOUNT_TYPE = 'ORIGINATION' AND
3146: -- (l_distributions(j).ACCOUNT_NAME = 'LOAN_RECEIVABLE' OR
3147: -- l_distributions(j).ACCOUNT_NAME = 'LOAN_PAYABLE' )) then
3148: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'adding subsidy row # ' || j);
3149: i := i + 1;
3150: -- add rows for subsidy cost
3151:
3152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || l_distributions(j).account_name);

Line 3152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || l_distributions(j).account_name);

3148: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'adding subsidy row # ' || j);
3149: i := i + 1;
3150: -- add rows for subsidy cost
3151:
3152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || l_distributions(j).account_name);
3153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CODE_COMBINATION_ID = ' || l_distributions(j).CODE_COMBINATION_ID);
3154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || l_distributions(j).account_type);
3155: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_PERCENT = ' || l_distributions(j).DISTRIBUTION_PERCENT);
3156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_TYPE = ' || l_distributions(j).DISTRIBUTION_TYPE);

Line 3153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CODE_COMBINATION_ID = ' || l_distributions(j).CODE_COMBINATION_ID);

3149: i := i + 1;
3150: -- add rows for subsidy cost
3151:
3152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || l_distributions(j).account_name);
3153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CODE_COMBINATION_ID = ' || l_distributions(j).CODE_COMBINATION_ID);
3154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || l_distributions(j).account_type);
3155: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_PERCENT = ' || l_distributions(j).DISTRIBUTION_PERCENT);
3156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_TYPE = ' || l_distributions(j).DISTRIBUTION_TYPE);
3157: l_distributions(i).LOAN_ID := p_loan_id;

Line 3154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || l_distributions(j).account_type);

3150: -- add rows for subsidy cost
3151:
3152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || l_distributions(j).account_name);
3153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CODE_COMBINATION_ID = ' || l_distributions(j).CODE_COMBINATION_ID);
3154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || l_distributions(j).account_type);
3155: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_PERCENT = ' || l_distributions(j).DISTRIBUTION_PERCENT);
3156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_TYPE = ' || l_distributions(j).DISTRIBUTION_TYPE);
3157: l_distributions(i).LOAN_ID := p_loan_id;
3158: l_distributions(i).LINE_TYPE := 'SUBSIDY';

Line 3155: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_PERCENT = ' || l_distributions(j).DISTRIBUTION_PERCENT);

3151:
3152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || l_distributions(j).account_name);
3153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CODE_COMBINATION_ID = ' || l_distributions(j).CODE_COMBINATION_ID);
3154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || l_distributions(j).account_type);
3155: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_PERCENT = ' || l_distributions(j).DISTRIBUTION_PERCENT);
3156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_TYPE = ' || l_distributions(j).DISTRIBUTION_TYPE);
3157: l_distributions(i).LOAN_ID := p_loan_id;
3158: l_distributions(i).LINE_TYPE := 'SUBSIDY';
3159: l_distributions(i).ACCOUNT_NAME := l_distributions(j).account_name;

Line 3156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_TYPE = ' || l_distributions(j).DISTRIBUTION_TYPE);

3152: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_name = ' || l_distributions(j).account_name);
3153: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'CODE_COMBINATION_ID = ' || l_distributions(j).CODE_COMBINATION_ID);
3154: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'account_type = ' || l_distributions(j).account_type);
3155: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_PERCENT = ' || l_distributions(j).DISTRIBUTION_PERCENT);
3156: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DISTRIBUTION_TYPE = ' || l_distributions(j).DISTRIBUTION_TYPE);
3157: l_distributions(i).LOAN_ID := p_loan_id;
3158: l_distributions(i).LINE_TYPE := 'SUBSIDY';
3159: l_distributions(i).ACCOUNT_NAME := l_distributions(j).account_name;
3160: l_distributions(i).CODE_COMBINATION_ID := l_distributions(j).CODE_COMBINATION_ID;

Line 3167: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'running count = ' || l_distributions.count);

3163: l_distributions(i).distribution_amount := l_distributions(j).DISTRIBUTION_AMOUNT * l_subsidy_Rate;
3164: l_distributions(i).DISTRIBUTION_TYPE := l_distributions(j).DISTRIBUTION_TYPE;
3165: l_distributions(i).EVENT_ID := null;
3166:
3167: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'running count = ' || l_distributions.count);
3168: -- end if;
3169: end loop;
3170:
3171: end if; -- l_subsidy_exists

Line 3174: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'total distributions adding = ' || l_distributions.count);

3170:
3171: end if; -- l_subsidy_exists
3172:
3173: end if;
3174: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'total distributions adding = ' || l_distributions.count);
3175:
3176: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling do_insert_distributions...');
3177: do_insert_distributions(l_distributions, p_loan_id);
3178:

Line 3176: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling do_insert_distributions...');

3172:
3173: end if;
3174: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'total distributions adding = ' || l_distributions.count);
3175:
3176: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling do_insert_distributions...');
3177: do_insert_distributions(l_distributions, p_loan_id);
3178:
3179: end if;
3180:

Line 3187: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

3183: COMMIT WORK;
3184: END IF;
3185:
3186: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3187: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
3188:
3189: EXCEPTION
3190:
3191: WHEN FND_API.G_EXC_ERROR THEN

Line 3194: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

3190:
3191: WHEN FND_API.G_EXC_ERROR THEN
3192: ROLLBACK TO create_DisbursementDistribs;
3193: x_return_status := FND_API.G_RET_STS_ERROR;
3194: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
3195: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3196:
3197: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3198: ROLLBACK TO create_DisbursementDistribs;

Line 3200: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

3196:
3197: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3198: ROLLBACK TO create_DisbursementDistribs;
3199: x_return_status := FND_API.G_RET_STS_ERROR;
3200: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
3201: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3202:
3203: WHEN OTHERS THEN
3204: ROLLBACK TO create_DisbursementDistribs;

Line 3206: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

3202:
3203: WHEN OTHERS THEN
3204: ROLLBACK TO create_DisbursementDistribs;
3205: x_return_status := FND_API.G_RET_STS_ERROR;
3206: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
3207: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
3208:
3209: end create_DisbursementDistribs;
3210:

Line 3471: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

3467: begin
3468:
3469: SAVEPOINT defaultDistributions;
3470: l_api_name := 'defaultDistributions';
3471: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
3472: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
3473: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'p_loan_class_code = ' || p_loan_class_code);
3474:
3475: -- Initialize message list IF p_init_msg_list is set to TRUE.

Line 3472: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);

3468:
3469: SAVEPOINT defaultDistributions;
3470: l_api_name := 'defaultDistributions';
3471: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
3472: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
3473: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'p_loan_class_code = ' || p_loan_class_code);
3474:
3475: -- Initialize message list IF p_init_msg_list is set to TRUE.
3476: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 3473: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'p_loan_class_code = ' || p_loan_class_code);

3469: SAVEPOINT defaultDistributions;
3470: l_api_name := 'defaultDistributions';
3471: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
3472: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
3473: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'p_loan_class_code = ' || p_loan_class_code);
3474:
3475: -- Initialize message list IF p_init_msg_list is set to TRUE.
3476: IF FND_API.to_Boolean( p_init_msg_list ) THEN
3477: FND_MSG_PUB.initialize;

Line 3508: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Opening cursor c_loan_class...');

3504: l_subsidy_rate := 0;
3505: l_receivable_total_amount_due := 0;
3506: l_clearing_total_amount_due := 0;
3507:
3508: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Opening cursor c_loan_class...');
3509: open c_loan_class(p_loan_id);
3510: fetch c_loan_class
3511: into l_loan_class
3512: ,l_loan_type_id

Line 3517: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);

3513: ,l_funded_amount
3514: ,l_legal_entity_id;
3515: close c_loan_class;
3516:
3517: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
3518: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
3519: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3520: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_legal_entity_id = ' || l_legal_entity_id);
3521:

Line 3518: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);

3514: ,l_legal_entity_id;
3515: close c_loan_class;
3516:
3517: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
3518: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
3519: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3520: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_legal_entity_id = ' || l_legal_entity_id);
3521:
3522: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling lns_distributions_pub.validateDefaultAccounting...');

Line 3519: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);

3515: close c_loan_class;
3516:
3517: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
3518: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
3519: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3520: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_legal_entity_id = ' || l_legal_entity_id);
3521:
3522: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling lns_distributions_pub.validateDefaultAccounting...');
3523: lns_distributions_pub.validateDefaultAccounting(p_loan_class => l_loan_class

Line 3520: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_legal_entity_id = ' || l_legal_entity_id);

3516:
3517: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_class = ' || l_loan_class);
3518: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
3519: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3520: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_legal_entity_id = ' || l_legal_entity_id);
3521:
3522: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling lns_distributions_pub.validateDefaultAccounting...');
3523: lns_distributions_pub.validateDefaultAccounting(p_loan_class => l_loan_class
3524: ,p_loan_type_id => l_loan_type_id

Line 3522: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling lns_distributions_pub.validateDefaultAccounting...');

3518: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_loan_type_id = ' || l_loan_type_id);
3519: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3520: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_legal_entity_id = ' || l_legal_entity_id);
3521:
3522: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling lns_distributions_pub.validateDefaultAccounting...');
3523: lns_distributions_pub.validateDefaultAccounting(p_loan_class => l_loan_class
3524: ,p_loan_type_id => l_loan_type_id
3525: ,p_init_msg_list => p_init_msg_list
3526: ,x_return_status => l_return_status

Line 3530: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);

3526: ,x_return_status => l_return_status
3527: ,x_msg_count => l_msg_count
3528: ,x_msg_data => l_msg_data);
3529:
3530: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
3531: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
3532: FND_MESSAGE.SET_NAME('LNS', 'LNS_DEFAULT_DIST_NOT_FOUND');
3533: FND_MSG_PUB.ADD;
3534: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 3534: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

3530: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
3531: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
3532: FND_MESSAGE.SET_NAME('LNS', 'LNS_DEFAULT_DIST_NOT_FOUND');
3533: FND_MSG_PUB.ADD;
3534: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3535: RAISE FND_API.G_EXC_ERROR;
3536: end if;
3537:
3538: /* delete any rows for this loan before inheritance do not delete FEE_RECEIVABLE or FEE_INCOME rows*/

Line 3539: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Deleting any existing accounting rows except FEE_RECEIVABLE or FEE_INCOME...');

3535: RAISE FND_API.G_EXC_ERROR;
3536: end if;
3537:
3538: /* delete any rows for this loan before inheritance do not delete FEE_RECEIVABLE or FEE_INCOME rows*/
3539: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Deleting any existing accounting rows except FEE_RECEIVABLE or FEE_INCOME...');
3540: delete from lns_distributions
3541: where loan_id = p_loan_id
3542: and account_name in ('PRINCIPAL_RECEIVABLE', 'INTEREST_RECEIVABLE', 'INTEREST_INCOME', 'LOAN_RECEIVABLE', 'LOAN_CLEARING', 'LOAN_LIABILITY', 'LOAN_PAYABLE')
3543: and event_id is null;

Line 3544: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Done');

3540: delete from lns_distributions
3541: where loan_id = p_loan_id
3542: and account_name in ('PRINCIPAL_RECEIVABLE', 'INTEREST_RECEIVABLE', 'INTEREST_INCOME', 'LOAN_RECEIVABLE', 'LOAN_CLEARING', 'LOAN_LIABILITY', 'LOAN_PAYABLE')
3543: and event_id is null;
3544: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Done');
3545:
3546: -- first check if we are creating accounting for an ERS or DIRECT loan
3547: if p_loan_class_code = 'DIRECT' then
3548:

Line 3555: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' fetching subsidy rate');

3551: -- Bug#6711399 Subsidy_rate defaulted from loanProduct to loan at the time of loanCreation
3552: -- in API LNS_LOAN_HEADER_PUB.do_create_loan.
3553:
3554: -- we are creating accounting for DIRECT loan class
3555: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' fetching subsidy rate');
3556: begin
3557: open c_subsidy_rate(p_loan_id);
3558: fetch c_subsidy_rate into l_subsidy_rate;
3559: close c_subsidy_rate;

Line 3567: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' l_subsidy_rate ' || l_subsidy_rate );

3563: FND_MSG_PUB.ADD;
3564: RAISE FND_API.G_EXC_ERROR;
3565: end;
3566:
3567: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' l_subsidy_rate ' || l_subsidy_rate );
3568:
3569: open c_obj_vers(p_loan_id);
3570: fetch c_obj_vers into l_version;
3571: close c_obj_vers;

Line 3575: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || 'updating loan');

3571: close c_obj_vers;
3572:
3573: l_loan_header_rec.subsidy_rate := l_subsidy_rate;
3574: l_loan_header_rec.loan_id := p_loan_id;
3575: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || 'updating loan');
3576: LNS_LOAN_HEADER_PUB.UPDATE_LOAN(P_OBJECT_VERSION_NUMBER => l_version
3577: ,P_LOAN_HEADER_REC => l_loan_header_rec
3578: ,P_INIT_MSG_LIST => p_init_msg_list
3579: ,X_RETURN_STATUS => l_return_status

Line 3582: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' update loan status = ' || l_return_status);

3578: ,P_INIT_MSG_LIST => p_init_msg_list
3579: ,X_RETURN_STATUS => l_return_status
3580: ,X_MSG_COUNT => l_msg_count
3581: ,X_MSG_DATA => l_msg_data);
3582: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' update loan status = ' || l_return_status);
3583: if l_return_status <> 'S' then
3584: FND_MESSAGE.SET_NAME('LNS', 'LNS_UPD_LOAN_FAIL');
3585: FND_MSG_PUB.ADD;
3586: RAISE FND_API.G_EXC_ERROR;

Line 3589: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'DIRECT LOAN INHERITANCE');

3585: FND_MSG_PUB.ADD;
3586: RAISE FND_API.G_EXC_ERROR;
3587: end if;
3588: */
3589: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'DIRECT LOAN INHERITANCE');
3590:
3591: -- we establish BILING only for this procedure
3592: -- inherit based on loan class + type ONLY
3593: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling defaultDistributionsCatch...');

Line 3593: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling defaultDistributionsCatch...');

3589: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'DIRECT LOAN INHERITANCE');
3590:
3591: -- we establish BILING only for this procedure
3592: -- inherit based on loan class + type ONLY
3593: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling defaultDistributionsCatch...');
3594: defaultDistributionsCatch(p_api_version => 1.0
3595: ,p_init_msg_list => p_init_msg_list
3596: ,p_commit => FND_API.G_FALSE
3597: ,p_loan_id => p_loan_id

Line 3605: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);

3601: ,x_distribution_tbl => l_distributionsCatch
3602: ,x_return_status => l_return_status
3603: ,x_msg_count => l_msg_count
3604: ,x_msg_data => l_msg_data);
3605: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
3606: if l_return_status <> 'S' then
3607: RAISE FND_API.G_EXC_ERROR;
3608: end if;
3609:

Line 3613: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling create_DisbursementDistribs...');

3609:
3610: -- we establish the distributions for the first DISBURSEMENT only
3611: -- in order to process Budgetary Control Information
3612: -- in SLA Transaction Line Object
3613: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling create_DisbursementDistribs...');
3614: create_DisbursementDistribs(p_api_version => 1.0
3615: ,p_init_msg_list => p_init_msg_list
3616: ,p_commit => FND_API.G_FALSE
3617: ,p_loan_id => p_loan_id

Line 3622: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);

3618: ,p_disb_header_id => null
3619: ,x_return_status => l_return_status
3620: ,x_msg_count => l_msg_count
3621: ,x_msg_data => l_msg_data);
3622: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
3623: if l_return_status <> 'S' then
3624: RAISE FND_API.G_EXC_ERROR;
3625: end if;
3626:

Line 3629: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'ERS LOAN INHERITANCE');

3625: end if;
3626:
3627: elsif p_loan_class_code = 'ERS' then
3628:
3629: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'ERS LOAN INHERITANCE');
3630:
3631: -- this switch is for the CatchAll Procedure
3632: l_include_receivables := 'N';
3633: l_ledger_details := lns_distributions_pub.getLedgerDetails;

Line 3634: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);

3630:
3631: -- this switch is for the CatchAll Procedure
3632: l_include_receivables := 'N';
3633: l_ledger_details := lns_distributions_pub.getLedgerDetails;
3634: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);
3635:
3636: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Fetching documents to account...');
3637: open c_get_loan_documents(p_loan_id);
3638: loop

Line 3636: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Fetching documents to account...');

3632: l_include_receivables := 'N';
3633: l_ledger_details := lns_distributions_pub.getLedgerDetails;
3634: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'chart_of_accounts_id = ' || l_ledger_details.chart_of_accounts_id);
3635:
3636: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Fetching documents to account...');
3637: open c_get_loan_documents(p_loan_id);
3638: loop
3639: fetch c_get_loan_documents into l_source_id_int_1, l_trx_number;
3640: exit when c_get_loan_documents%notfound;

Line 3642: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);

3638: loop
3639: fetch c_get_loan_documents into l_source_id_int_1, l_trx_number;
3640: exit when c_get_loan_documents%notfound;
3641:
3642: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);
3643: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_trx_number = ' || l_trx_number);
3644:
3645: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling arp_acct_event_pkg.upgrade_status_per_doc...');
3646: -- check for upgrade status bug#4872154

Line 3643: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_trx_number = ' || l_trx_number);

3639: fetch c_get_loan_documents into l_source_id_int_1, l_trx_number;
3640: exit when c_get_loan_documents%notfound;
3641:
3642: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);
3643: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_trx_number = ' || l_trx_number);
3644:
3645: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling arp_acct_event_pkg.upgrade_status_per_doc...');
3646: -- check for upgrade status bug#4872154
3647: arp_acct_event_pkg.upgrade_status_per_doc(p_init_msg_list => p_init_msg_list

Line 3645: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling arp_acct_event_pkg.upgrade_status_per_doc...');

3641:
3642: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);
3643: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_trx_number = ' || l_trx_number);
3644:
3645: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling arp_acct_event_pkg.upgrade_status_per_doc...');
3646: -- check for upgrade status bug#4872154
3647: arp_acct_event_pkg.upgrade_status_per_doc(p_init_msg_list => p_init_msg_list
3648: ,p_entity_code => l_entity_code
3649: ,p_source_int_id => l_source_id_int_1

Line 3654: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);

3650: ,x_upgrade_status => l_upgrade_status
3651: ,x_return_status => l_return_status
3652: ,x_msg_count => l_msg_count
3653: ,x_msg_data => l_msg_data);
3654: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
3655: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_upgrade_status = ' || l_upgrade_status);
3656:
3657: if l_return_status <> 'S' then
3658: FND_MESSAGE.SET_NAME('LNS', 'LNS_CHK_UPG_FAIL');

Line 3655: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_upgrade_status = ' || l_upgrade_status);

3651: ,x_return_status => l_return_status
3652: ,x_msg_count => l_msg_count
3653: ,x_msg_data => l_msg_data);
3654: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
3655: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_upgrade_status = ' || l_upgrade_status);
3656:
3657: if l_return_status <> 'S' then
3658: FND_MESSAGE.SET_NAME('LNS', 'LNS_CHK_UPG_FAIL');
3659: FND_MESSAGE.SET_TOKEN('DOC_NUM', l_trx_number);

Line 3661: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

3657: if l_return_status <> 'S' then
3658: FND_MESSAGE.SET_NAME('LNS', 'LNS_CHK_UPG_FAIL');
3659: FND_MESSAGE.SET_TOKEN('DOC_NUM', l_trx_number);
3660: FND_MSG_PUB.ADD;
3661: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3662: RAISE FND_API.G_EXC_ERROR;
3663: else
3664: if l_upgrade_status <> 'Y' then
3665: FND_MESSAGE.SET_NAME('LNS', 'LNS_INVALID_TRX');

Line 3668: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

3664: if l_upgrade_status <> 'Y' then
3665: FND_MESSAGE.SET_NAME('LNS', 'LNS_INVALID_TRX');
3666: FND_MESSAGE.SET_TOKEN('DOC_NUM', l_trx_number);
3667: FND_MSG_PUB.ADD;
3668: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3669: RAISE FND_API.G_EXC_ERROR;
3670: end if;
3671: end if;
3672:

Line 3676: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Fetching entities xla_transaction_entities...');

3672:
3673: end loop;
3674: close c_get_loan_documents;
3675:
3676: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Fetching entities xla_transaction_entities...');
3677: l_transactions_count := 0;
3678: open c_entities(p_loan_id);
3679: loop
3680: fetch c_entities into l_entity_id, l_entity_code, l_source_id_int_1, l_transaction_number;

Line 3684: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Entity ' || l_transactions_count);

3680: fetch c_entities into l_entity_id, l_entity_code, l_source_id_int_1, l_transaction_number;
3681: exit when c_entities%notfound;
3682:
3683: l_transactions_count := l_transactions_count + 1;
3684: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Entity ' || l_transactions_count);
3685: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_id = ' || l_entity_id);
3686: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_code = ' || l_entity_code);
3687: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);
3688: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_transaction_number = ' || l_transaction_number);

Line 3685: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_id = ' || l_entity_id);

3681: exit when c_entities%notfound;
3682:
3683: l_transactions_count := l_transactions_count + 1;
3684: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Entity ' || l_transactions_count);
3685: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_id = ' || l_entity_id);
3686: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_code = ' || l_entity_code);
3687: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);
3688: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_transaction_number = ' || l_transaction_number);
3689:

Line 3686: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_code = ' || l_entity_code);

3682:
3683: l_transactions_count := l_transactions_count + 1;
3684: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Entity ' || l_transactions_count);
3685: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_id = ' || l_entity_id);
3686: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_code = ' || l_entity_code);
3687: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);
3688: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_transaction_number = ' || l_transaction_number);
3689:
3690: insert into XLA_ACCT_PROG_DOCS_GT (entity_id) VALUES (l_entity_id);

Line 3687: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);

3683: l_transactions_count := l_transactions_count + 1;
3684: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Entity ' || l_transactions_count);
3685: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_id = ' || l_entity_id);
3686: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_code = ' || l_entity_code);
3687: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);
3688: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_transaction_number = ' || l_transaction_number);
3689:
3690: insert into XLA_ACCT_PROG_DOCS_GT (entity_id) VALUES (l_entity_id);
3691: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Inserted into XLA_ACCT_PROG_DOCS_GT');

Line 3688: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_transaction_number = ' || l_transaction_number);

3684: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Entity ' || l_transactions_count);
3685: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_id = ' || l_entity_id);
3686: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_entity_code = ' || l_entity_code);
3687: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);
3688: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_transaction_number = ' || l_transaction_number);
3689:
3690: insert into XLA_ACCT_PROG_DOCS_GT (entity_id) VALUES (l_entity_id);
3691: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Inserted into XLA_ACCT_PROG_DOCS_GT');
3692:

Line 3691: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Inserted into XLA_ACCT_PROG_DOCS_GT');

3687: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_source_id_int_1 = ' || l_source_id_int_1);
3688: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_transaction_number = ' || l_transaction_number);
3689:
3690: insert into XLA_ACCT_PROG_DOCS_GT (entity_id) VALUES (l_entity_id);
3691: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Inserted into XLA_ACCT_PROG_DOCS_GT');
3692:
3693: end loop;
3694: close c_entities ;
3695:

Line 3698: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Inserted transaction_entities = ' || l_transactions_count);

3694: close c_entities ;
3695:
3696: select count(1) into l_transactions_count
3697: from XLA_ACCT_PROG_DOCS_GT;
3698: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Inserted transaction_entities = ' || l_transactions_count);
3699:
3700: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch...');
3701: XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch(p_application_id => 222
3702: ,p_accounting_mode => 'F'

Line 3700: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch...');

3696: select count(1) into l_transactions_count
3697: from XLA_ACCT_PROG_DOCS_GT;
3698: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Inserted transaction_entities = ' || l_transactions_count);
3699:
3700: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch...');
3701: XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch(p_application_id => 222
3702: ,p_accounting_mode => 'F'
3703: ,p_gl_posting_flag => 'N'
3704: ,p_accounting_batch_id => l_accounting_batch_id

Line 3707: logMessage(FND_LOG.level_statement, G_PKG_NAME, ' l_retcode = ' || l_retcode);

3703: ,p_gl_posting_flag => 'N'
3704: ,p_accounting_batch_id => l_accounting_batch_id
3705: ,p_errbuf => l_errbuf
3706: ,p_retcode => l_retcode);
3707: logMessage(FND_LOG.level_statement, G_PKG_NAME, ' l_retcode = ' || l_retcode);
3708: logMessage(FND_LOG.level_statement, G_PKG_NAME, ' l_accounting_batch_id = ' || l_accounting_batch_id);
3709:
3710: if l_retcode <> 0 then
3711:

Line 3708: logMessage(FND_LOG.level_statement, G_PKG_NAME, ' l_accounting_batch_id = ' || l_accounting_batch_id);

3704: ,p_accounting_batch_id => l_accounting_batch_id
3705: ,p_errbuf => l_errbuf
3706: ,p_retcode => l_retcode);
3707: logMessage(FND_LOG.level_statement, G_PKG_NAME, ' l_retcode = ' || l_retcode);
3708: logMessage(FND_LOG.level_statement, G_PKG_NAME, ' l_accounting_batch_id = ' || l_accounting_batch_id);
3709:
3710: if l_retcode <> 0 then
3711:
3712: logMessage(FND_LOG.level_unexpected, G_PKG_NAME, 'Online accounting failed with error: ' || l_errbuf);

Line 3712: logMessage(FND_LOG.level_unexpected, G_PKG_NAME, 'Online accounting failed with error: ' || l_errbuf);

3708: logMessage(FND_LOG.level_statement, G_PKG_NAME, ' l_accounting_batch_id = ' || l_accounting_batch_id);
3709:
3710: if l_retcode <> 0 then
3711:
3712: logMessage(FND_LOG.level_unexpected, G_PKG_NAME, 'Online accounting failed with error: ' || l_errbuf);
3713:
3714: /* query XLA_ACCOUNTING_ERRORS */
3715: l_error_counter := 0;
3716: open c_acc_errors(p_loan_id, l_accounting_batch_id);

Line 3731: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

3727:
3728: if l_error_counter = 1 then
3729: FND_MESSAGE.SET_NAME('LNS', 'LNS_ONLINE_ACCOUNTING_FAILED');
3730: FND_MSG_PUB.Add;
3731: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3732: end if;
3733:
3734: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACC_DOC_FAIL');
3735: FND_MESSAGE.SET_TOKEN('DOC_NUM', l_invoice_number);

Line 3739: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

3735: FND_MESSAGE.SET_TOKEN('DOC_NUM', l_invoice_number);
3736: FND_MESSAGE.SET_TOKEN('DOC_TYPE', l_entity_code);
3737: FND_MESSAGE.SET_TOKEN('ACC_ERR', l_error_message);
3738: FND_MSG_PUB.Add;
3739: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3740:
3741: END LOOP;
3742:
3743: close c_acc_errors;

Line 3747: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Online accounting SUCCESS! ');

3743: close c_acc_errors;
3744:
3745: RAISE FND_API.G_EXC_ERROR;
3746: else
3747: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Online accounting SUCCESS! ');
3748: end if;
3749:
3750: -- get the swap segment value
3751: l_natural_account_rec := getNaturalSwapAccount(p_loan_id);

Line 3752: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Swap natural account with ' || l_natural_account_rec);

3748: end if;
3749:
3750: -- get the swap segment value
3751: l_natural_account_rec := getNaturalSwapAccount(p_loan_id);
3752: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Swap natural account with ' || l_natural_account_rec);
3753:
3754: -- Get natural account segment number
3755: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling FND_FLEX_APIS.GET_QUALIFIER_SEGNUM...');
3756: IF (NOT FND_FLEX_APIS.GET_QUALIFIER_SEGNUM(appl_id => 101

Line 3755: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling FND_FLEX_APIS.GET_QUALIFIER_SEGNUM...');

3751: l_natural_account_rec := getNaturalSwapAccount(p_loan_id);
3752: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Swap natural account with ' || l_natural_account_rec);
3753:
3754: -- Get natural account segment number
3755: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling FND_FLEX_APIS.GET_QUALIFIER_SEGNUM...');
3756: IF (NOT FND_FLEX_APIS.GET_QUALIFIER_SEGNUM(appl_id => 101
3757: ,key_flex_code => 'GL#'
3758: ,structure_number=> l_ledger_details.chart_of_accounts_id
3759: ,flex_qual_name => 'GL_ACCOUNT'

Line 3764: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

3760: ,segment_number => l_nat_acct_seg_number))
3761: THEN
3762: FND_MESSAGE.SET_NAME('LNS', 'LNS_NO_NATURAL_ACCOUNT_SEGMENT');
3763: FND_MSG_PUB.ADD;
3764: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3765: RAISE FND_API.G_EXC_ERROR;
3766: END IF;
3767: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Natural acct segment = ' || l_nat_acct_seg_number);
3768:

Line 3767: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Natural acct segment = ' || l_nat_acct_seg_number);

3763: FND_MSG_PUB.ADD;
3764: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3765: RAISE FND_API.G_EXC_ERROR;
3766: END IF;
3767: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Natural acct segment = ' || l_nat_acct_seg_number);
3768:
3769: -- here we establish the loan clearing first
3770: -- if adjustment activity is found in XLA then we take amounts, cc_ids from XLA tables for both CLEARING and RECEIVABLES
3771: Begin

Line 3772: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Opening cursor C_ERS_LOAN_CLEARING...');

3768:
3769: -- here we establish the loan clearing first
3770: -- if adjustment activity is found in XLA then we take amounts, cc_ids from XLA tables for both CLEARING and RECEIVABLES
3771: Begin
3772: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Opening cursor C_ERS_LOAN_CLEARING...');
3773: i := 0;
3774: open C_ERS_LOAN_CLEARING(p_loan_id);
3775: Loop
3776: -- reintialize these

Line 3789: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Loan Clearing Record ' || i);

3785: -- bug #4313925 --
3786: l_adjustment_exists := true;
3787: i := i + 1;
3788:
3789: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Loan Clearing Record ' || i);
3790: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);
3791: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
3792: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_clearing_total_amount_due = ' || l_clearing_total_amount_due);
3793:

Line 3790: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);

3786: l_adjustment_exists := true;
3787: i := i + 1;
3788:
3789: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Loan Clearing Record ' || i);
3790: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);
3791: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
3792: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_clearing_total_amount_due = ' || l_clearing_total_amount_due);
3793:
3794: l_distributionsCLEAR_ORIG(i).line_type := 'CLEAR';

Line 3791: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);

3787: i := i + 1;
3788:
3789: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Loan Clearing Record ' || i);
3790: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);
3791: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
3792: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_clearing_total_amount_due = ' || l_clearing_total_amount_due);
3793:
3794: l_distributionsCLEAR_ORIG(i).line_type := 'CLEAR';
3795: l_distributionsCLEAR_ORIG(i).account_name := 'LOAN_CLEARING';

Line 3792: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_clearing_total_amount_due = ' || l_clearing_total_amount_due);

3788:
3789: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Loan Clearing Record ' || i);
3790: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);
3791: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
3792: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_clearing_total_amount_due = ' || l_clearing_total_amount_due);
3793:
3794: l_distributionsCLEAR_ORIG(i).line_type := 'CLEAR';
3795: l_distributionsCLEAR_ORIG(i).account_name := 'LOAN_CLEARING';
3796: l_distributionsCLEAR_ORIG(i).code_combination_id := l_code_combination_id;

Line 3805: --logMessage(FND_LOG.LEVEL_UNEX, G_PKG_NAME, 'Failed to inherit receivables distributions');

3801:
3802: end loop; -- loan clearing loop
3803: exception
3804: when others then
3805: --logMessage(FND_LOG.LEVEL_UNEX, G_PKG_NAME, 'Failed to inherit receivables distributions');
3806: FND_MESSAGE.SET_NAME('LNS', 'LNS_INHERIT_DIST_NOT_FOUND');
3807: FND_MSG_PUB.ADD;
3808: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3809: RAISE FND_API.G_EXC_ERROR;

Line 3808: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

3804: when others then
3805: --logMessage(FND_LOG.LEVEL_UNEX, G_PKG_NAME, 'Failed to inherit receivables distributions');
3806: FND_MESSAGE.SET_NAME('LNS', 'LNS_INHERIT_DIST_NOT_FOUND');
3807: FND_MSG_PUB.ADD;
3808: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3809: RAISE FND_API.G_EXC_ERROR;
3810: end;
3811:
3812: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'After loan clearing lines calculated. total amount due = ' || l_total_amount_due);

Line 3812: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'After loan clearing lines calculated. total amount due = ' || l_total_amount_due);

3808: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3809: RAISE FND_API.G_EXC_ERROR;
3810: end;
3811:
3812: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'After loan clearing lines calculated. total amount due = ' || l_total_amount_due);
3813:
3814: -- if the adjustment exists in PSA table it means loan is approved and adjustment was created for receivables
3815: i := 0;
3816: if l_adjustment_exists then

Line 3817: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'ACCOUNTED ADJUSTMENT EXISTS');

3813:
3814: -- if the adjustment exists in PSA table it means loan is approved and adjustment was created for receivables
3815: i := 0;
3816: if l_adjustment_exists then
3817: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'ACCOUNTED ADJUSTMENT EXISTS');
3818: Begin
3819: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Opening cursor C_ERS_LOAN_RECEIVABLE...');
3820: open C_ERS_LOAN_RECEIVABLE(p_loan_id);
3821: Loop

Line 3819: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Opening cursor C_ERS_LOAN_RECEIVABLE...');

3815: i := 0;
3816: if l_adjustment_exists then
3817: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'ACCOUNTED ADJUSTMENT EXISTS');
3818: Begin
3819: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Opening cursor C_ERS_LOAN_RECEIVABLE...');
3820: open C_ERS_LOAN_RECEIVABLE(p_loan_id);
3821: Loop
3822: -- reintialize these
3823: l_code_combination_id := null;

Line 3832: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Record:');

3828: EXIT WHEN C_ERS_LOAN_RECEIVABLE%NOTFOUND;
3829:
3830: l_receivable_total_amount_due := l_receivable_total_amount_due + l_ers_distribution_amount;
3831:
3832: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Record:');
3833: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);
3834: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
3835: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_receivable_total_amount_due = ' || l_receivable_total_amount_due);
3836:

Line 3833: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);

3829:
3830: l_receivable_total_amount_due := l_receivable_total_amount_due + l_ers_distribution_amount;
3831:
3832: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Record:');
3833: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);
3834: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
3835: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_receivable_total_amount_due = ' || l_receivable_total_amount_due);
3836:
3837: -- here we need to rebuild the code_Combination_id as per swapping rules

Line 3834: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);

3830: l_receivable_total_amount_due := l_receivable_total_amount_due + l_ers_distribution_amount;
3831:
3832: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Record:');
3833: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);
3834: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
3835: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_receivable_total_amount_due = ' || l_receivable_total_amount_due);
3836:
3837: -- here we need to rebuild the code_Combination_id as per swapping rules
3838: -- replace the natual account segement with the natural account segment found in the set-up/configuration

Line 3835: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_receivable_total_amount_due = ' || l_receivable_total_amount_due);

3831:
3832: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Record:');
3833: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_ers_distribution_amount = ' || l_ers_distribution_amount);
3834: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id = ' || l_code_combination_id);
3835: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_receivable_total_amount_due = ' || l_receivable_total_amount_due);
3836:
3837: -- here we need to rebuild the code_Combination_id as per swapping rules
3838: -- replace the natual account segement with the natural account segment found in the set-up/configuration
3839: if l_ers_distribution_amount > 0 then

Line 3840: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling swap_code_combination...');

3836:
3837: -- here we need to rebuild the code_Combination_id as per swapping rules
3838: -- replace the natual account segement with the natural account segment found in the set-up/configuration
3839: if l_ers_distribution_amount > 0 then
3840: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling swap_code_combination...');
3841: l_code_combination_id_new_rec :=
3842: swap_code_combination(p_chart_of_accounts_id => l_ledger_details.chart_of_accounts_id
3843: ,p_original_cc_id => l_code_combination_id
3844: ,p_swap_segment_number => l_nat_acct_seg_number

Line 3847: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id_new_rec = ' || l_code_combination_id_new_Rec);

3843: ,p_original_cc_id => l_code_combination_id
3844: ,p_swap_segment_number => l_nat_acct_seg_number
3845: ,p_swap_segment_value => l_natural_account_rec);
3846:
3847: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id_new_rec = ' || l_code_combination_id_new_Rec);
3848:
3849: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Assigning distributions...');
3850:
3851: -- we need 2 records PER receivable account distribution

Line 3849: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Assigning distributions...');

3845: ,p_swap_segment_value => l_natural_account_rec);
3846:
3847: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_code_combination_id_new_rec = ' || l_code_combination_id_new_Rec);
3848:
3849: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Assigning distributions...');
3850:
3851: -- we need 2 records PER receivable account distribution
3852: i := i + 1;
3853: l_distributionsREC_ORIG(i).line_type := 'ORIG';

Line 3860: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Added LOAN_RECEIVABLE FOR ORIGINATION ' || l_code_combination_id_new_rec);

3856: l_distributionsREC_ORIG(i).account_type := 'DR';
3857: l_distributionsREC_ORIG(i).distribution_amount := l_ers_distribution_amount;
3858: l_distributionsREC_ORIG(i).distribution_type := 'ORIGINATION';
3859:
3860: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Added LOAN_RECEIVABLE FOR ORIGINATION ' || l_code_combination_id_new_rec);
3861: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);
3862:
3863: l_distributionsREC_BILL(i).line_type := 'PRIN';
3864: l_distributionsREC_BILL(i).account_name := 'LOAN_RECEIVABLE';

Line 3861: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);

3857: l_distributionsREC_ORIG(i).distribution_amount := l_ers_distribution_amount;
3858: l_distributionsREC_ORIG(i).distribution_type := 'ORIGINATION';
3859:
3860: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Added LOAN_RECEIVABLE FOR ORIGINATION ' || l_code_combination_id_new_rec);
3861: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);
3862:
3863: l_distributionsREC_BILL(i).line_type := 'PRIN';
3864: l_distributionsREC_BILL(i).account_name := 'LOAN_RECEIVABLE';
3865: l_distributionsREC_BILL(i).code_combination_id := l_code_combination_id_new_rec;

Line 3870: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Added LOAN_RECEIVABLE FOR BILLING ' || l_code_combination_id_new_rec);

3866: l_distributionsREC_BILL(i).account_type := 'CR';
3867: l_distributionsREC_BILL(i).distribution_amount := null;
3868: l_distributionsREC_BILL(i).distribution_type := 'BILLING';
3869:
3870: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Added LOAN_RECEIVABLE FOR BILLING ' || l_code_combination_id_new_rec);
3871: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);
3872:
3873: l_sum := l_sum + l_ers_distribution_amount;
3874: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_sum = ' || l_sum);

Line 3871: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);

3867: l_distributionsREC_BILL(i).distribution_amount := null;
3868: l_distributionsREC_BILL(i).distribution_type := 'BILLING';
3869:
3870: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Added LOAN_RECEIVABLE FOR BILLING ' || l_code_combination_id_new_rec);
3871: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);
3872:
3873: l_sum := l_sum + l_ers_distribution_amount;
3874: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_sum = ' || l_sum);
3875: end if;

Line 3874: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_sum = ' || l_sum);

3870: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Added LOAN_RECEIVABLE FOR BILLING ' || l_code_combination_id_new_rec);
3871: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);
3872:
3873: l_sum := l_sum + l_ers_distribution_amount;
3874: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_sum = ' || l_sum);
3875: end if;
3876:
3877: end loop;
3878:

Line 3883: -- logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, 'failed to inherit receivables distributions');

3879: close C_ERS_LOAN_RECEIVABLE;
3880:
3881: exception
3882: when others then
3883: -- logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, 'failed to inherit receivables distributions');
3884: FND_MESSAGE.SET_NAME('LNS', 'LNS_INHERIT_DIST_NOT_FOUND');
3885: FND_MSG_PUB.ADD;
3886: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3887: RAISE FND_API.G_EXC_ERROR;

Line 3886: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

3882: when others then
3883: -- logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, 'failed to inherit receivables distributions');
3884: FND_MESSAGE.SET_NAME('LNS', 'LNS_INHERIT_DIST_NOT_FOUND');
3885: FND_MSG_PUB.ADD;
3886: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
3887: RAISE FND_API.G_EXC_ERROR;
3888: end;
3889:
3890: else

Line 3891: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'NO ACCOUNTED ADJUSTMENT EXISTS');

3887: RAISE FND_API.G_EXC_ERROR;
3888: end;
3889:
3890: else
3891: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'NO ACCOUNTED ADJUSTMENT EXISTS');
3892: end if;
3893:
3894: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);
3895: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);

Line 3894: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);

3890: else
3891: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'NO ACCOUNTED ADJUSTMENT EXISTS');
3892: end if;
3893:
3894: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);
3895: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);
3896: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCLEAR_ORIG.count = ' || l_distributionsCLEAR_ORIG.count);
3897: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'TOTAL AMOUNT DUE = ' || l_total_amount_due);
3898: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);

Line 3895: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);

3891: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'NO ACCOUNTED ADJUSTMENT EXISTS');
3892: end if;
3893:
3894: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);
3895: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);
3896: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCLEAR_ORIG.count = ' || l_distributionsCLEAR_ORIG.count);
3897: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'TOTAL AMOUNT DUE = ' || l_total_amount_due);
3898: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3899:

Line 3896: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCLEAR_ORIG.count = ' || l_distributionsCLEAR_ORIG.count);

3892: end if;
3893:
3894: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);
3895: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);
3896: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCLEAR_ORIG.count = ' || l_distributionsCLEAR_ORIG.count);
3897: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'TOTAL AMOUNT DUE = ' || l_total_amount_due);
3898: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3899:
3900: -- this logic is copied from PSA 04-19-2005

Line 3897: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'TOTAL AMOUNT DUE = ' || l_total_amount_due);

3893:
3894: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);
3895: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);
3896: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCLEAR_ORIG.count = ' || l_distributionsCLEAR_ORIG.count);
3897: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'TOTAL AMOUNT DUE = ' || l_total_amount_due);
3898: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3899:
3900: -- this logic is copied from PSA 04-19-2005
3901: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'CALCULATING %AGES FOR LOANS RECEIVABLE...');

Line 3898: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);

3894: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_BILL.count = ' || l_distributionsREC_BILL.count);
3895: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsREC_ORIG.count = ' || l_distributionsREC_ORIG.count);
3896: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCLEAR_ORIG.count = ' || l_distributionsCLEAR_ORIG.count);
3897: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'TOTAL AMOUNT DUE = ' || l_total_amount_due);
3898: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3899:
3900: -- this logic is copied from PSA 04-19-2005
3901: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'CALCULATING %AGES FOR LOANS RECEIVABLE...');
3902:

Line 3901: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'CALCULATING %AGES FOR LOANS RECEIVABLE...');

3897: --logMessage(FND_LOG.level_statement, G_PKG_NAME, 'TOTAL AMOUNT DUE = ' || l_total_amount_due);
3898: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_funded_amount = ' || l_funded_amount);
3899:
3900: -- this logic is copied from PSA 04-19-2005
3901: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'CALCULATING %AGES FOR LOANS RECEIVABLE...');
3902:
3903: for k in 1..l_distributionsREC_ORIG.count loop
3904:
3905: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Iteration ' || k);

Line 3905: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Iteration ' || k);

3901: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'CALCULATING %AGES FOR LOANS RECEIVABLE...');
3902:
3903: for k in 1..l_distributionsREC_ORIG.count loop
3904:
3905: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Iteration ' || k);
3906: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calculating %ages for a loan with ERS Adjustments...');
3907:
3908: if k <> l_distributionsREC_ORIG.count then
3909: -- use the adjustment amounts to calculate percentages -- this ensures percents but not cc_ids

Line 3906: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calculating %ages for a loan with ERS Adjustments...');

3902:
3903: for k in 1..l_distributionsREC_ORIG.count loop
3904:
3905: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Iteration ' || k);
3906: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calculating %ages for a loan with ERS Adjustments...');
3907:
3908: if k <> l_distributionsREC_ORIG.count then
3909: -- use the adjustment amounts to calculate percentages -- this ensures percents but not cc_ids
3910: -- this may or may not be an offending line karamach

Line 3930: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsREC_ORIG(k).distribution_percent);

3926:
3927: l_percent := 0;
3928: l_amount := 0;
3929:
3930: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsREC_ORIG(k).distribution_percent);
3931: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsREC_ORIG(k).distribution_amount);
3932: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);
3933: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);
3934:

Line 3931: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsREC_ORIG(k).distribution_amount);

3927: l_percent := 0;
3928: l_amount := 0;
3929:
3930: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsREC_ORIG(k).distribution_percent);
3931: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsREC_ORIG(k).distribution_amount);
3932: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);
3933: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);
3934:
3935: end loop;

Line 3932: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);

3928: l_amount := 0;
3929:
3930: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsREC_ORIG(k).distribution_percent);
3931: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsREC_ORIG(k).distribution_amount);
3932: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);
3933: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);
3934:
3935: end loop;
3936:

Line 3933: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);

3929:
3930: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsREC_ORIG(k).distribution_percent);
3931: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsREC_ORIG(k).distribution_amount);
3932: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);
3933: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);
3934:
3935: end loop;
3936:
3937: l_running_percent := 0;

Line 3941: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'CALCULATING %AGES FOR LOANS CLEARING...');

3937: l_running_percent := 0;
3938: l_running_amount := 0;
3939:
3940: -- this logic is copied from PSA 04-19-2005
3941: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'CALCULATING %AGES FOR LOANS CLEARING...');
3942:
3943: for k in 1..l_distributionsCLEAR_ORIG.count loop
3944:
3945: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'iteration ' || k);

Line 3945: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'iteration ' || k);

3941: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'CALCULATING %AGES FOR LOANS CLEARING...');
3942:
3943: for k in 1..l_distributionsCLEAR_ORIG.count loop
3944:
3945: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'iteration ' || k);
3946:
3947: if k <> l_distributionsCLEAR_ORIG.count then
3948: l_percent := round(l_distributionsCLEAR_ORIG(k).distribution_amount / l_clearing_total_amount_due * 100,4);
3949: l_distributionsCLEAR_ORIG(k).distribution_percent := l_percent;

Line 3963: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsCLEAR_ORIG(k).distribution_percent);

3959:
3960: l_percent := 0;
3961: l_amount := 0;
3962:
3963: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsCLEAR_ORIG(k).distribution_percent);
3964: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsCLEAR_ORIG(k).distribution_amount);
3965: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);
3966: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);
3967:

Line 3964: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsCLEAR_ORIG(k).distribution_amount);

3960: l_percent := 0;
3961: l_amount := 0;
3962:
3963: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsCLEAR_ORIG(k).distribution_percent);
3964: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsCLEAR_ORIG(k).distribution_amount);
3965: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);
3966: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);
3967:
3968: end loop;

Line 3965: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);

3961: l_amount := 0;
3962:
3963: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsCLEAR_ORIG(k).distribution_percent);
3964: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsCLEAR_ORIG(k).distribution_amount);
3965: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);
3966: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);
3967:
3968: end loop;
3969:

Line 3966: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);

3962:
3963: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_percent = ' || l_distributionsCLEAR_ORIG(k).distribution_percent);
3964: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'distribution_amount = ' || l_distributionsCLEAR_ORIG(k).distribution_amount);
3965: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_percent = ' || l_running_percent);
3966: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_running_amount = ' || l_running_amount);
3967:
3968: end loop;
3969:
3970: -- inherit remaining account_names based on loan class + type for

Line 3972: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling defaultDistributionsCatch...');

3968: end loop;
3969:
3970: -- inherit remaining account_names based on loan class + type for
3971: -- principal / interest receivable, interest income
3972: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling defaultDistributionsCatch...');
3973: defaultDistributionsCatch(p_api_version => 1.0
3974: ,p_init_msg_list => FND_API.G_FALSE
3975: ,p_commit => FND_API.G_FALSE
3976: ,p_loan_id => p_loan_id

Line 3984: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);

3980: ,x_distribution_tbl => l_distributionsCatch
3981: ,x_return_status => l_return_status
3982: ,x_msg_count => l_msg_count
3983: ,x_msg_data => l_msg_data);
3984: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
3985: if l_return_status <> 'S' then
3986: RAISE FND_API.G_EXC_ERROR;
3987: end if;
3988:

Line 3992: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCatch_count = ' || l_distributionsCatch_count);

3988:
3989: End if; --loan class
3990:
3991: l_distributionsCatch_count := l_distributionsCatch.count;
3992: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCatch_count = ' || l_distributionsCatch_count);
3993:
3994: l_total_distributions := l_distributions_count + l_distributionsCatch_count;
3995:
3996: n := 0;

Line 3997: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsREC_ORIG to l_distributionsALL...');

3993:
3994: l_total_distributions := l_distributions_count + l_distributionsCatch_count;
3995:
3996: n := 0;
3997: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsREC_ORIG to l_distributionsALL...');
3998: for j in 1..l_distributionsREC_ORIG.count loop
3999: n := n + 1;
4000: l_distributionsALL(n) := l_distributionsREC_ORIG(j);
4001: end loop;

Line 4002: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);

3998: for j in 1..l_distributionsREC_ORIG.count loop
3999: n := n + 1;
4000: l_distributionsALL(n) := l_distributionsREC_ORIG(j);
4001: end loop;
4002: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);
4003:
4004: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsCLEAR_ORIG to l_distributionsALL...');
4005: for j in 1..l_distributionsCLEAR_ORIG.count loop
4006: n := n + 1;

Line 4004: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsCLEAR_ORIG to l_distributionsALL...');

4000: l_distributionsALL(n) := l_distributionsREC_ORIG(j);
4001: end loop;
4002: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);
4003:
4004: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsCLEAR_ORIG to l_distributionsALL...');
4005: for j in 1..l_distributionsCLEAR_ORIG.count loop
4006: n := n + 1;
4007: l_distributionsALL(n) := l_distributionsCLEAR_ORIG(j);
4008: end loop;

Line 4009: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);

4005: for j in 1..l_distributionsCLEAR_ORIG.count loop
4006: n := n + 1;
4007: l_distributionsALL(n) := l_distributionsCLEAR_ORIG(j);
4008: end loop;
4009: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);
4010:
4011: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsREC_BILL to l_distributionsALL...');
4012: for j in 1..l_distributionsREC_BILL.count loop
4013: n := n + 1;

Line 4011: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsREC_BILL to l_distributionsALL...');

4007: l_distributionsALL(n) := l_distributionsCLEAR_ORIG(j);
4008: end loop;
4009: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);
4010:
4011: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsREC_BILL to l_distributionsALL...');
4012: for j in 1..l_distributionsREC_BILL.count loop
4013: n := n + 1;
4014: l_distributionsALL(n) := l_distributionsREC_BILL(j);
4015: end loop;

Line 4016: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);

4012: for j in 1..l_distributionsREC_BILL.count loop
4013: n := n + 1;
4014: l_distributionsALL(n) := l_distributionsREC_BILL(j);
4015: end loop;
4016: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);
4017:
4018: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsCatch to l_distributionsALL...');
4019: for j in 1..l_distributionsCatch.count
4020: loop

Line 4018: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsCatch to l_distributionsALL...');

4014: l_distributionsALL(n) := l_distributionsREC_BILL(j);
4015: end loop;
4016: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);
4017:
4018: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Copying l_distributionsCatch to l_distributionsALL...');
4019: for j in 1..l_distributionsCatch.count
4020: loop
4021: n := n + 1;
4022: l_distributionsALL(n) := l_distributionsCatch(j);

Line 4024: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);

4020: loop
4021: n := n + 1;
4022: l_distributionsALL(n) := l_distributionsCatch(j);
4023: end loop;
4024: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);
4025:
4026: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling do_insert_distributions...');
4027: do_insert_distributions(p_distributions_tbl => l_distributionsALL
4028: ,p_loan_id => p_loan_id);

Line 4026: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling do_insert_distributions...');

4022: l_distributionsALL(n) := l_distributionsCatch(j);
4023: end loop;
4024: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsALL.count = ' || l_distributionsALL.count);
4025:
4026: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling do_insert_distributions...');
4027: do_insert_distributions(p_distributions_tbl => l_distributionsALL
4028: ,p_loan_id => p_loan_id);
4029:
4030: -- validate the accounting rows here

Line 4031: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling lns_distributions_pub.validateAccounting...');

4027: do_insert_distributions(p_distributions_tbl => l_distributionsALL
4028: ,p_loan_id => p_loan_id);
4029:
4030: -- validate the accounting rows here
4031: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling lns_distributions_pub.validateAccounting...');
4032: lns_distributions_pub.validateAccounting(p_loan_id => p_loan_id
4033: ,p_init_msg_list => p_init_msg_list
4034: ,x_return_status => l_return_status
4035: ,x_msg_count => l_msg_count

Line 4038: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);

4034: ,x_return_status => l_return_status
4035: ,x_msg_count => l_msg_count
4036: ,x_msg_data => l_msg_data);
4037:
4038: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4039: if l_return_status <> 'S' then
4040: FND_MESSAGE.SET_NAME('LNS', 'LNS_DEFAULT_DIST_NOT_FOUND');
4041: FND_MSG_PUB.ADD;
4042: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 4042: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

4038: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4039: if l_return_status <> 'S' then
4040: FND_MESSAGE.SET_NAME('LNS', 'LNS_DEFAULT_DIST_NOT_FOUND');
4041: FND_MSG_PUB.ADD;
4042: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
4043: RAISE FND_API.G_EXC_ERROR;
4044: end if;
4045:
4046: IF FND_API.to_Boolean(p_commit) THEN

Line 4051: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

4047: COMMIT WORK;
4048: END IF;
4049:
4050: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
4051: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
4052:
4053: EXCEPTION
4054:
4055: WHEN FND_API.G_EXC_ERROR THEN

Line 4059: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

4055: WHEN FND_API.G_EXC_ERROR THEN
4056: ROLLBACK TO defaultDistributions;
4057: x_return_status := FND_API.G_RET_STS_ERROR;
4058: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
4059: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
4060:
4061: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4062: ROLLBACK TO defaultDistributions;
4063: x_return_status := FND_API.G_RET_STS_ERROR;

Line 4065: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

4061: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4062: ROLLBACK TO defaultDistributions;
4063: x_return_status := FND_API.G_RET_STS_ERROR;
4064: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
4065: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
4066:
4067: WHEN OTHERS THEN
4068: ROLLBACK TO defaultDistributions;
4069: x_return_status := FND_API.G_RET_STS_ERROR;

Line 4071: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

4067: WHEN OTHERS THEN
4068: ROLLBACK TO defaultDistributions;
4069: x_return_status := FND_API.G_RET_STS_ERROR;
4070: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
4071: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
4072:
4073: end defaultDistributions;
4074:
4075: /*=========================================================================

Line 4172: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');

4168:
4169: SAVEPOINT onlineAccounting;
4170: l_api_name := 'onlineAccounting';
4171:
4172: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
4173: -- Initialize API return status to SUCCESS
4174: x_return_status := FND_API.G_RET_STS_SUCCESS;
4175: -- Initialize message list IF p_init_msg_list is set to TRUE.
4176: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 4184: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'running on-line accounting for loan_id = ' || p_loan_id);

4180: open c_loan_info(p_loan_id);
4181: fetch c_loan_info into l_legal_entity_id, l_loan_class;
4182: close c_loan_info;
4183:
4184: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'running on-line accounting for loan_id = ' || p_loan_id);
4185: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_accounting_mode = ' || p_accounting_mode);
4186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_transfer_flag = ' || p_transfer_flag);
4187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_gl_posting_flag = ' || p_gl_posting_flag);
4188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_offline_flag = ' || p_offline_flag);

Line 4185: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_accounting_mode = ' || p_accounting_mode);

4181: fetch c_loan_info into l_legal_entity_id, l_loan_class;
4182: close c_loan_info;
4183:
4184: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'running on-line accounting for loan_id = ' || p_loan_id);
4185: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_accounting_mode = ' || p_accounting_mode);
4186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_transfer_flag = ' || p_transfer_flag);
4187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_gl_posting_flag = ' || p_gl_posting_flag);
4188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_offline_flag = ' || p_offline_flag);
4189:

Line 4186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_transfer_flag = ' || p_transfer_flag);

4182: close c_loan_info;
4183:
4184: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'running on-line accounting for loan_id = ' || p_loan_id);
4185: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_accounting_mode = ' || p_accounting_mode);
4186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_transfer_flag = ' || p_transfer_flag);
4187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_gl_posting_flag = ' || p_gl_posting_flag);
4188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_offline_flag = ' || p_offline_flag);
4189:
4190: if l_loan_class = 'ERS' then

Line 4187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_gl_posting_flag = ' || p_gl_posting_flag);

4183:
4184: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'running on-line accounting for loan_id = ' || p_loan_id);
4185: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_accounting_mode = ' || p_accounting_mode);
4186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_transfer_flag = ' || p_transfer_flag);
4187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_gl_posting_flag = ' || p_gl_posting_flag);
4188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_offline_flag = ' || p_offline_flag);
4189:
4190: if l_loan_class = 'ERS' then
4191:

Line 4188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_offline_flag = ' || p_offline_flag);

4184: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'running on-line accounting for loan_id = ' || p_loan_id);
4185: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_accounting_mode = ' || p_accounting_mode);
4186: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_transfer_flag = ' || p_transfer_flag);
4187: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_gl_posting_flag = ' || p_gl_posting_flag);
4188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_offline_flag = ' || p_offline_flag);
4189:
4190: if l_loan_class = 'ERS' then
4191:
4192: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ERS loan accounting');

Line 4192: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ERS loan accounting');

4188: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_offline_flag = ' || p_offline_flag);
4189:
4190: if l_loan_class = 'ERS' then
4191:
4192: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'ERS loan accounting');
4193: -- at this point in time, the INVOICES and ADJUSTMENTS MUST have already been accounted for
4194: insert into XLA_ACCT_PROG_DOCS_GT
4195: (entity_id)
4196: select entity_id from xla_transaction_entities

Line 4204: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIRECT loan accounting');

4200: and source_id_int_2 = -1;
4201:
4202: else
4203:
4204: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'DIRECT loan accounting');
4205:
4206: -- can we make join thru lns_distributions
4207: insert into XLA_ACCT_PROG_DOCS_GT
4208: (entity_id)

Line 4238: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserted transaction_entities ' || l_transactions_count);

4234: end if;
4235:
4236: select count(1) into l_transactions_count
4237: from XLA_ACCT_PROG_DOCS_GT;
4238: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserted transaction_entities ' || l_transactions_count);
4239: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'calling XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch ');
4240: XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch(p_application_id => 206
4241: ,p_accounting_mode => p_accounting_mode
4242: ,p_gl_posting_flag => p_gl_posting_flag

Line 4239: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'calling XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch ');

4235:
4236: select count(1) into l_transactions_count
4237: from XLA_ACCT_PROG_DOCS_GT;
4238: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'inserted transaction_entities ' || l_transactions_count);
4239: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'calling XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch ');
4240: XLA_ACCOUNTING_PUB_PKG.accounting_program_doc_batch(p_application_id => 206
4241: ,p_accounting_mode => p_accounting_mode
4242: ,p_gl_posting_flag => p_gl_posting_flag
4243: ,p_accounting_batch_id => l_accounting_batch_id

Line 4246: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_retcode = ' || l_retcode);

4242: ,p_gl_posting_flag => p_gl_posting_flag
4243: ,p_accounting_batch_id => l_accounting_batch_id
4244: ,p_errbuf => l_errbuf
4245: ,p_retcode => l_retcode);
4246: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_retcode = ' || l_retcode);
4247: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_accounting_batch_id = ' || l_accounting_batch_id);
4248:
4249: if l_retcode = 0 then
4250:

Line 4247: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_accounting_batch_id = ' || l_accounting_batch_id);

4243: ,p_accounting_batch_id => l_accounting_batch_id
4244: ,p_errbuf => l_errbuf
4245: ,p_retcode => l_retcode);
4246: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_retcode = ' || l_retcode);
4247: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_accounting_batch_id = ' || l_accounting_batch_id);
4248:
4249: if l_retcode = 0 then
4250:
4251: --FND_MESSAGE.SET_NAME('XLA', 'XLA_ONLINE_ACCT_SUCCESS');

Line 4253: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'online accounting SUCCESS! ');

4249: if l_retcode = 0 then
4250:
4251: --FND_MESSAGE.SET_NAME('XLA', 'XLA_ONLINE_ACCT_SUCCESS');
4252: --FND_MSG_PUB.Add;
4253: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'online accounting SUCCESS! ');
4254:
4255: elsif l_retcode = 2 then
4256:
4257: FND_MESSAGE.SET_NAME('XLA', 'XLA_ONLINE_ACCTG_ERROR');

Line 4259: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

4255: elsif l_retcode = 2 then
4256:
4257: FND_MESSAGE.SET_NAME('XLA', 'XLA_ONLINE_ACCTG_ERROR');
4258: FND_MSG_PUB.Add;
4259: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
4260: RAISE FND_API.G_EXC_ERROR;
4261:
4262: elsif l_retcode = 1 then
4263:

Line 4264: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'online accounting failed ' || l_errbuf);

4260: RAISE FND_API.G_EXC_ERROR;
4261:
4262: elsif l_retcode = 1 then
4263:
4264: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'online accounting failed ' || l_errbuf);
4265: /* query XLA_ACCOUNTING_ERRORS */
4266: l_error_counter := 0;
4267: open c_acc_errors(p_loan_id, l_accounting_batch_id);
4268:

Line 4282: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

4278:
4279: if l_error_counter = 1 then
4280: FND_MESSAGE.SET_NAME('XLA', 'XLA_ONLINE_ACCT_WARNING');
4281: FND_MSG_PUB.Add;
4282: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
4283: end if;
4284:
4285: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACC_DOC_FAIL');
4286: FND_MESSAGE.SET_TOKEN('DOC_NUM', l_invoice_number);

Line 4290: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

4286: FND_MESSAGE.SET_TOKEN('DOC_NUM', l_invoice_number);
4287: FND_MESSAGE.SET_TOKEN('DOC_TYPE', l_entity_code);
4288: FND_MESSAGE.SET_TOKEN('ACC_ERR', l_error_message);
4289: FND_MSG_PUB.Add;
4290: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
4291:
4292: END LOOP;
4293:
4294: close c_acc_errors;

Line 4301: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');

4297: end if;
4298:
4299: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
4300: commit;
4301: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - END');
4302:
4303: EXCEPTION
4304:
4305: WHEN FND_API.G_EXC_ERROR THEN

Line 4308: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

4304:
4305: WHEN FND_API.G_EXC_ERROR THEN
4306: ROLLBACK TO onlineAccounting;
4307: x_return_status := FND_API.G_RET_STS_ERROR;
4308: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
4309: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
4310:
4311: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4312: ROLLBACK TO onlineAccounting;

Line 4314: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

4310:
4311: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4312: ROLLBACK TO onlineAccounting;
4313: x_return_status := FND_API.G_RET_STS_ERROR;
4314: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
4315: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
4316:
4317: WHEN OTHERS THEN
4318: ROLLBACK TO onlineAccounting;

Line 4320: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);

4316:
4317: WHEN OTHERS THEN
4318: ROLLBACK TO onlineAccounting;
4319: x_return_status := FND_API.G_RET_STS_ERROR;
4320: logMessage(FND_LOG.LEVEL_ERROR, G_PKG_NAME, sqlerrm);
4321: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
4322:
4323: end onlineAccounting;
4324:

Line 4397: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has started');

4393: begin
4394:
4395: l_api_name := 'LNS_ACCOUNTING_CONCUR';
4396:
4397: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has started');
4398:
4399: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LOAN_ID = ' || P_LOAN_ID);
4400: if P_LOAN_ID is null then
4401:

Line 4399: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LOAN_ID = ' || P_LOAN_ID);

4395: l_api_name := 'LNS_ACCOUNTING_CONCUR';
4396:
4397: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has started');
4398:
4399: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LOAN_ID = ' || P_LOAN_ID);
4400: if P_LOAN_ID is null then
4401:
4402: -- LogMessage(FND_LOG.LEVEL_UNEXPECTED, 'ERROR: Loan must be set.');
4403: FND_MESSAGE.SET_NAME('LNS', 'LNS_NO_LOAN');

Line 4402: -- LogMessage(FND_LOG.LEVEL_UNEXPECTED, 'ERROR: Loan must be set.');

4398:
4399: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'LOAN_ID = ' || P_LOAN_ID);
4400: if P_LOAN_ID is null then
4401:
4402: -- LogMessage(FND_LOG.LEVEL_UNEXPECTED, 'ERROR: Loan must be set.');
4403: FND_MESSAGE.SET_NAME('LNS', 'LNS_NO_LOAN');
4404: FND_MSG_PUB.Add;
4405: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
4406: RAISE FND_API.G_EXC_ERROR;

Line 4405: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

4401:
4402: -- LogMessage(FND_LOG.LEVEL_UNEXPECTED, 'ERROR: Loan must be set.');
4403: FND_MESSAGE.SET_NAME('LNS', 'LNS_NO_LOAN');
4404: FND_MSG_PUB.Add;
4405: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
4406: RAISE FND_API.G_EXC_ERROR;
4407:
4408: end if;
4409:

Line 4413: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class_code = ' || l_loan_class_code);

4409:
4410: open c_loan_info(P_LOAN_ID);
4411: fetch c_loan_info into l_loan_class_code, l_gl_date, l_object_version_number, l_org_id;
4412: close c_loan_info;
4413: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class_code = ' || l_loan_class_code);
4414: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_gl_date = ' || l_gl_date);
4415: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_object_version_number = ' || l_object_version_number);
4416: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
4417:

Line 4414: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_gl_date = ' || l_gl_date);

4410: open c_loan_info(P_LOAN_ID);
4411: fetch c_loan_info into l_loan_class_code, l_gl_date, l_object_version_number, l_org_id;
4412: close c_loan_info;
4413: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class_code = ' || l_loan_class_code);
4414: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_gl_date = ' || l_gl_date);
4415: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_object_version_number = ' || l_object_version_number);
4416: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
4417:
4418:

Line 4415: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_object_version_number = ' || l_object_version_number);

4411: fetch c_loan_info into l_loan_class_code, l_gl_date, l_object_version_number, l_org_id;
4412: close c_loan_info;
4413: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class_code = ' || l_loan_class_code);
4414: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_gl_date = ' || l_gl_date);
4415: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_object_version_number = ' || l_object_version_number);
4416: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
4417:
4418:
4419: IF ((l_loan_class_code IS NULL) OR (l_loan_class_code <> 'ERS')) THEN

Line 4416: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);

4412: close c_loan_info;
4413: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_loan_class_code = ' || l_loan_class_code);
4414: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_gl_date = ' || l_gl_date);
4415: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_object_version_number = ' || l_object_version_number);
4416: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
4417:
4418:
4419: IF ((l_loan_class_code IS NULL) OR (l_loan_class_code <> 'ERS')) THEN
4420: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || ' - Only works for ERS loans.');

Line 4420: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || ' - Only works for ERS loans.');

4416: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_org_id = ' || l_org_id);
4417:
4418:
4419: IF ((l_loan_class_code IS NULL) OR (l_loan_class_code <> 'ERS')) THEN
4420: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || ' - Only works for ERS loans.');
4421: return;
4422: END IF;
4423:
4424: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');

Line 4424: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');

4420: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, l_api_name || ' - Only works for ERS loans.');
4421: return;
4422: END IF;
4423:
4424: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling LNS_XLA_EVENTS.create_event...');
4425: LNS_XLA_EVENTS.create_event(p_loan_id => P_LOAN_ID
4426: ,p_disb_header_id => -1
4427: ,p_event_type_code => 'APPROVED'
4428: ,p_event_date => l_gl_date

Line 4437: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_event_id);

4433: ,x_event_id => x_event_id
4434: ,x_return_status => l_return_status
4435: ,x_msg_count => l_msg_count
4436: ,x_msg_data => l_msg_data);
4437: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_event_id);
4438: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4439:
4440: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4441: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');

Line 4438: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);

4434: ,x_return_status => l_return_status
4435: ,x_msg_count => l_msg_count
4436: ,x_msg_data => l_msg_data);
4437: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'event_id = ' || x_event_id);
4438: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4439:
4440: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4441: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');
4442: FND_MSG_PUB.ADD;

Line 4444: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

4440: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4441: FND_MESSAGE.SET_NAME('LNS', 'LNS_ACCOUNTING_EVENT_ERROR');
4442: FND_MSG_PUB.ADD;
4443: --l_last_api_called := 'LNS_XLA_EVENTS.create_event';
4444: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
4445: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4446: END IF;
4447:
4448:

Line 4451: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling Lns_distributions_pub.defaultDistributions...');

4447:
4448:
4449:
4450: -- we should do online accounting in batch mode here
4451: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Calling Lns_distributions_pub.defaultDistributions...');
4452: Lns_distributions_pub.defaultDistributions(p_api_version => 1.0
4453: ,p_init_msg_list => FND_API.G_TRUE
4454: ,p_commit => FND_API.G_FALSE
4455: ,p_loan_id => P_LOAN_ID

Line 4460: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);

4456: ,p_loan_class_code => l_loan_class_code
4457: ,x_return_status => l_return_status
4458: ,x_msg_count => l_msg_count
4459: ,x_msg_data => l_msg_data);
4460: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4461:
4462: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4463: -- logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Call to Lns_distributions_pub.defaultDistributions failed with status ' || l_return_status);
4464: -- fnd_file.put_line(FND_FILE.LOG, 'FAILED TO INHERIT DISTRIBUTIONS');

Line 4463: -- logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Call to Lns_distributions_pub.defaultDistributions failed with status ' || l_return_status);

4459: ,x_msg_data => l_msg_data);
4460: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4461:
4462: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4463: -- logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Call to Lns_distributions_pub.defaultDistributions failed with status ' || l_return_status);
4464: -- fnd_file.put_line(FND_FILE.LOG, 'FAILED TO INHERIT DISTRIBUTIONS');
4465: --l_last_api_called := 'Lns_distributions_pub.defaultDistributions';
4466: RAISE FND_API.G_EXC_ERROR;
4467: ELSE

Line 4470: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Updating lns_distributions...');

4466: RAISE FND_API.G_EXC_ERROR;
4467: ELSE
4468:
4469: if x_event_id is not null then
4470: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Updating lns_distributions...');
4471: update lns_distributions
4472: set event_id = x_event_id
4473: where loan_id = P_LOAN_ID
4474: and account_name in ('LOAN_RECEIVABLE', 'LOAN_CLEARING')

Line 4476: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');

4472: set event_id = x_event_id
4473: where loan_id = P_LOAN_ID
4474: and account_name in ('LOAN_RECEIVABLE', 'LOAN_CLEARING')
4475: and distribution_type = 'ORIGINATION';
4476: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Done');
4477: end if;
4478:
4479: -- finally update the loan header
4480: l_loan_header_rec.loan_id := P_LOAN_ID;

Line 4483: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Before call to LNS_LOAN_HEADER_PUB.update_loan');

4479: -- finally update the loan header
4480: l_loan_header_rec.loan_id := P_LOAN_ID;
4481: l_loan_header_rec.loan_status := 'ACTIVE';
4482: l_loan_header_rec.secondary_status := FND_API.G_MISS_CHAR;
4483: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Before call to LNS_LOAN_HEADER_PUB.update_loan');
4484: LNS_LOAN_HEADER_PUB.update_loan(p_init_msg_list => FND_API.G_FALSE
4485: ,p_loan_header_rec => l_loan_header_rec
4486: ,p_object_version_number => l_object_version_number
4487: ,x_return_status => l_return_status

Line 4490: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);

4486: ,p_object_version_number => l_object_version_number
4487: ,x_return_status => l_return_status
4488: ,x_msg_count => l_msg_count
4489: ,x_msg_data => l_msg_data);
4490: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4491: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_msg_data = ' || l_msg_data);
4492:
4493: END IF;
4494:

Line 4491: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_msg_data = ' || l_msg_data);

4487: ,x_return_status => l_return_status
4488: ,x_msg_count => l_msg_count
4489: ,x_msg_data => l_msg_data);
4490: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4491: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_msg_data = ' || l_msg_data);
4492:
4493: END IF;
4494:
4495: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 4504: LogMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_do_billing = ' || l_do_billing);

4500: /* check to start billing for 0-th installment */
4501: open do_billing_cur(l_loan_header_rec.loan_id);
4502: fetch do_billing_cur into l_do_billing;
4503: close do_billing_cur;
4504: LogMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_do_billing = ' || l_do_billing);
4505:
4506: if l_do_billing > 0 then
4507:
4508: LogMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Billing Concurrent Program to bill 0-th installment...');

Line 4508: LogMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Billing Concurrent Program to bill 0-th installment...');

4504: LogMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'l_do_billing = ' || l_do_billing);
4505:
4506: if l_do_billing > 0 then
4507:
4508: LogMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Billing Concurrent Program to bill 0-th installment...');
4509: FND_REQUEST.SET_ORG_ID(l_org_id);
4510:
4511: -- Bug#6313716 : Invoke the function add_layout to specify the template type,code etc., before submitting request
4512: SELECT

Line 4546: LogMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Successfully submited Billing Concurrent Program to bill 0-th installment. Request id = ' || l_request_id);

4542: FND_MSG_PUB.Add;
4543: l_last_api_called := 'FND_REQUEST.SUBMIT_REQUEST for 0th installment billing';
4544: RAISE FND_API.G_EXC_ERROR;
4545: else
4546: LogMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Successfully submited Billing Concurrent Program to bill 0-th installment. Request id = ' || l_request_id);
4547: end if;
4548:
4549: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'After call to submit request');
4550:

Line 4549: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'After call to submit request');

4545: else
4546: LogMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'Successfully submited Billing Concurrent Program to bill 0-th installment. Request id = ' || l_request_id);
4547: end if;
4548:
4549: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'After call to submit request');
4550:
4551: end if;
4552:
4553: end if;

Line 4555: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, ' ');

4551: end if;
4552:
4553: end if;
4554:
4555: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, ' ');
4556: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, '-------------------');
4557: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has succeeded!');
4558:
4559: EXCEPTION

Line 4556: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, '-------------------');

4552:
4553: end if;
4554:
4555: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, ' ');
4556: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, '-------------------');
4557: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has succeeded!');
4558:
4559: EXCEPTION
4560: WHEN others THEN

Line 4557: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has succeeded!');

4553: end if;
4554:
4555: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, ' ');
4556: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, '-------------------');
4557: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has succeeded!');
4558:
4559: EXCEPTION
4560: WHEN others THEN
4561: l_return := FND_CONCURRENT.SET_COMPLETION_STATUS(

Line 4566: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, ' ');

4562: status => 'ERROR',
4563: message => 'Generate Distributions process has failed. Please review log file.');
4564: RETCODE := FND_API.G_RET_STS_ERROR;
4565: fnd_msg_pub.count_and_get(p_count => l_msg_count, p_data => ERRBUF);
4566: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, ' ');
4567: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, '-------------------');
4568: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has failed!');
4569:
4570: end LNS_ACCOUNTING_CONCUR;

Line 4567: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, '-------------------');

4563: message => 'Generate Distributions process has failed. Please review log file.');
4564: RETCODE := FND_API.G_RET_STS_ERROR;
4565: fnd_msg_pub.count_and_get(p_count => l_msg_count, p_data => ERRBUF);
4566: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, ' ');
4567: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, '-------------------');
4568: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has failed!');
4569:
4570: end LNS_ACCOUNTING_CONCUR;
4571:

Line 4568: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has failed!');

4564: RETCODE := FND_API.G_RET_STS_ERROR;
4565: fnd_msg_pub.count_and_get(p_count => l_msg_count, p_data => ERRBUF);
4566: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, ' ');
4567: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, '-------------------');
4568: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, 'Generate Distributions process has failed!');
4569:
4570: end LNS_ACCOUNTING_CONCUR;
4571:
4572:

Line 4591: logmessage(fnd_log.level_procedure, G_PKG_NAME, g_pkg_name || '.' || l_api_name || ' +');

4587: l_distributionsCatch lns_distributions_pub.distribution_tbl;
4588:
4589: BEGIN
4590:
4591: logmessage(fnd_log.level_procedure, G_PKG_NAME, g_pkg_name || '.' || l_api_name || ' +');
4592: logmessage(fnd_log.level_statement, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
4593: logmessage(fnd_log.level_statement, G_PKG_NAME, 'p_loan_class_code = ' || p_loan_class_code);
4594:
4595: -- Initialize message list IF p_init_msg_list is set to TRUE.

Line 4592: logmessage(fnd_log.level_statement, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);

4588:
4589: BEGIN
4590:
4591: logmessage(fnd_log.level_procedure, G_PKG_NAME, g_pkg_name || '.' || l_api_name || ' +');
4592: logmessage(fnd_log.level_statement, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
4593: logmessage(fnd_log.level_statement, G_PKG_NAME, 'p_loan_class_code = ' || p_loan_class_code);
4594:
4595: -- Initialize message list IF p_init_msg_list is set to TRUE.
4596: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 4593: logmessage(fnd_log.level_statement, G_PKG_NAME, 'p_loan_class_code = ' || p_loan_class_code);

4589: BEGIN
4590:
4591: logmessage(fnd_log.level_procedure, G_PKG_NAME, g_pkg_name || '.' || l_api_name || ' +');
4592: logmessage(fnd_log.level_statement, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);
4593: logmessage(fnd_log.level_statement, G_PKG_NAME, 'p_loan_class_code = ' || p_loan_class_code);
4594:
4595: -- Initialize message list IF p_init_msg_list is set to TRUE.
4596: IF FND_API.to_Boolean( p_init_msg_list ) THEN
4597: FND_MSG_PUB.initialize;

Line 4600: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling defaultDistributionsCatch...');

4596: IF FND_API.to_Boolean( p_init_msg_list ) THEN
4597: FND_MSG_PUB.initialize;
4598: END IF;
4599:
4600: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling defaultDistributionsCatch...');
4601: LNS_DISTRIBUTIONS_PUB.defaultDistributionsCatch(
4602: p_api_version => 1.0
4603: ,p_init_msg_list => FND_API.G_TRUE
4604: ,p_commit => FND_API.G_FALSE

Line 4613: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);

4609: ,x_distribution_tbl => l_distributionsCatch
4610: ,x_return_status => l_return_status
4611: ,x_msg_count => l_msg_count
4612: ,x_msg_data => l_msg_data);
4613: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4614: if l_return_status <> 'S' then
4615: RAISE FND_API.G_EXC_ERROR;
4616: end if;
4617:

Line 4618: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCatch.count = ' || l_distributionsCatch.count);

4614: if l_return_status <> 'S' then
4615: RAISE FND_API.G_EXC_ERROR;
4616: end if;
4617:
4618: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCatch.count = ' || l_distributionsCatch.count);
4619:
4620: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling do_insert_distributions...');
4621: lns_distributions_pub.do_insert_distributions(
4622: p_distributions_tbl => l_distributionsCatch

Line 4620: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling do_insert_distributions...');

4616: end if;
4617:
4618: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_distributionsCatch.count = ' || l_distributionsCatch.count);
4619:
4620: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling do_insert_distributions...');
4621: lns_distributions_pub.do_insert_distributions(
4622: p_distributions_tbl => l_distributionsCatch
4623: ,p_loan_id => p_loan_id);
4624: if l_return_status <> 'S' then

Line 4629: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling validateAccounting...');

4625: RAISE FND_API.G_EXC_ERROR;
4626: end if;
4627:
4628: -- validate the accounting rows here
4629: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'Calling validateAccounting...');
4630: lns_distributions_pub.validateAccounting(p_loan_id => p_loan_id
4631: ,p_init_msg_list => FND_API.G_TRUE
4632: ,x_return_status => l_return_status
4633: ,x_msg_count => l_msg_count

Line 4636: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);

4632: ,x_return_status => l_return_status
4633: ,x_msg_count => l_msg_count
4634: ,x_msg_data => l_msg_data);
4635:
4636: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4637: if l_return_status <> 'S' then
4638: FND_MESSAGE.SET_NAME('LNS', 'LNS_DEFAULT_DIST_NOT_FOUND');
4639: FND_MSG_PUB.ADD;
4640: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

Line 4640: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));

4636: logMessage(FND_LOG.level_statement, G_PKG_NAME, 'l_return_status = ' || l_return_status);
4637: if l_return_status <> 'S' then
4638: FND_MESSAGE.SET_NAME('LNS', 'LNS_DEFAULT_DIST_NOT_FOUND');
4639: FND_MSG_PUB.ADD;
4640: LogMessage(FND_LOG.LEVEL_UNEXPECTED, G_PKG_NAME, FND_MSG_PUB.Get(p_encoded => 'F'));
4641: RAISE FND_API.G_EXC_ERROR;
4642: end if;
4643:
4644: x_return_status := fnd_api.g_ret_sts_success;

Line 4645: logmessage(fnd_log.level_procedure, G_PKG_NAME, g_pkg_name || '.' || l_api_name || ' -');

4641: RAISE FND_API.G_EXC_ERROR;
4642: end if;
4643:
4644: x_return_status := fnd_api.g_ret_sts_success;
4645: logmessage(fnd_log.level_procedure, G_PKG_NAME, g_pkg_name || '.' || l_api_name || ' -');
4646:
4647: EXCEPTION
4648: WHEN others THEN
4649: x_return_status := fnd_api.g_ret_sts_unexp_error;