DBA Data[Home] [Help]

APPS.CN_PAYMENT_WORKSHEET_PVT dependencies on FND_FILE

Line 112: fnd_file.put_line(fnd_file.log, 'Conc_submit BatchId = ' || p_batch_id);

108: p_params IN conc_params,
109: x_request_id OUT NOCOPY NUMBER
110: ) IS
111: BEGIN
112: fnd_file.put_line(fnd_file.log, 'Conc_submit BatchId = ' || p_batch_id);
113:
114: x_request_id := fnd_request.submit_request(application => 'CN',
115: program => p_conc_program,
116: description => p_description,

Line 124: fnd_file.put_line(fnd_file.log, 'Failed to create concurrent request for (payrun_id,batch_id) = ' || p_payrun_id ||','|| p_batch_id);

120: argument4 => p_org_id
121: );
122: IF x_request_id = 0
123: THEN
124: fnd_file.put_line(fnd_file.log, 'Failed to create concurrent request for (payrun_id,batch_id) = ' || p_payrun_id ||','|| p_batch_id);
125: fnd_file.put_line(fnd_file.log, 'Conc_submit: ' || fnd_message.get);
126: raise fnd_api.G_EXC_ERROR;
127: ELSE
128: fnd_file.put_line(fnd_file.log, 'Concurrent request, ID = ' || x_request_id || ', for (payrun_id,batch_id) = ' || p_payrun_id ||','|| p_batch_id );

Line 125: fnd_file.put_line(fnd_file.log, 'Conc_submit: ' || fnd_message.get);

121: );
122: IF x_request_id = 0
123: THEN
124: fnd_file.put_line(fnd_file.log, 'Failed to create concurrent request for (payrun_id,batch_id) = ' || p_payrun_id ||','|| p_batch_id);
125: fnd_file.put_line(fnd_file.log, 'Conc_submit: ' || fnd_message.get);
126: raise fnd_api.G_EXC_ERROR;
127: ELSE
128: fnd_file.put_line(fnd_file.log, 'Concurrent request, ID = ' || x_request_id || ', for (payrun_id,batch_id) = ' || p_payrun_id ||','|| p_batch_id );
129: END IF;

Line 128: fnd_file.put_line(fnd_file.log, 'Concurrent request, ID = ' || x_request_id || ', for (payrun_id,batch_id) = ' || p_payrun_id ||','|| p_batch_id );

124: fnd_file.put_line(fnd_file.log, 'Failed to create concurrent request for (payrun_id,batch_id) = ' || p_payrun_id ||','|| p_batch_id);
125: fnd_file.put_line(fnd_file.log, 'Conc_submit: ' || fnd_message.get);
126: raise fnd_api.G_EXC_ERROR;
127: ELSE
128: fnd_file.put_line(fnd_file.log, 'Concurrent request, ID = ' || x_request_id || ', for (payrun_id,batch_id) = ' || p_payrun_id ||','|| p_batch_id );
129: END IF;
130:
131: EXCEPTION
132: WHEN OTHERS THEN

Line 133: fnd_file.put_line(fnd_file.log, 'Conc_submit err:' || SQLERRM);

129: END IF;
130:
131: EXCEPTION
132: WHEN OTHERS THEN
133: fnd_file.put_line(fnd_file.log, 'Conc_submit err:' || SQLERRM);
134: RAISE;
135: END conc_submit;
136:
137:

Line 2106: fnd_file.put_line(fnd_file.log, ' Input Parameters Payrun_id = ' || p_payrun_id);

2102: --
2103: -- API body
2104: --
2105: l_start_time := SYSDATE;
2106: fnd_file.put_line(fnd_file.log, ' Input Parameters Payrun_id = ' || p_payrun_id);
2107: fnd_file.put_line(fnd_file.log, ' Input Parameters Batch_id = ' || p_batch_id);
2108: fnd_file.put_line(fnd_file.log, ' Current time = ' || to_char(l_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS'));
2109:
2110: l_worksheet_rec.payrun_id := p_payrun_id;

Line 2107: fnd_file.put_line(fnd_file.log, ' Input Parameters Batch_id = ' || p_batch_id);

2103: -- API body
2104: --
2105: l_start_time := SYSDATE;
2106: fnd_file.put_line(fnd_file.log, ' Input Parameters Payrun_id = ' || p_payrun_id);
2107: fnd_file.put_line(fnd_file.log, ' Input Parameters Batch_id = ' || p_batch_id);
2108: fnd_file.put_line(fnd_file.log, ' Current time = ' || to_char(l_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS'));
2109:
2110: l_worksheet_rec.payrun_id := p_payrun_id;
2111: l_worksheet_rec.org_id := p_org_id;

Line 2108: fnd_file.put_line(fnd_file.log, ' Current time = ' || to_char(l_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS'));

2104: --
2105: l_start_time := SYSDATE;
2106: fnd_file.put_line(fnd_file.log, ' Input Parameters Payrun_id = ' || p_payrun_id);
2107: fnd_file.put_line(fnd_file.log, ' Input Parameters Batch_id = ' || p_batch_id);
2108: fnd_file.put_line(fnd_file.log, ' Current time = ' || to_char(l_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS'));
2109:
2110: l_worksheet_rec.payrun_id := p_payrun_id;
2111: l_worksheet_rec.org_id := p_org_id;
2112: l_worksheet_rec.call_from := cn_payment_worksheet_pvt.concurrent_program_call;

Line 2124: fnd_file.put_line(fnd_file.log, ' Create worksheet for = ' || l_worksheet_rec.salesrep_id || ' salesrepID');

2120: -- Run create worksheet for this salesrep.
2121: l_worksheet_rec.salesrep_id := emp.salesrep_id;
2122: l_worksheet_rec.call_from := cn_payment_worksheet_pvt.concurrent_program_call;
2123:
2124: fnd_file.put_line(fnd_file.log, ' Create worksheet for = ' || l_worksheet_rec.salesrep_id || ' salesrepID');
2125:
2126: cn_payment_worksheet_pvt.create_worksheet(p_api_version => 1.0,
2127: p_init_msg_list => 'T',
2128: p_commit => 'F',

Line 2141: fnd_file.put_line(fnd_file.log, 'Failed to create worksheet for ' || l_worksheet_rec.salesrep_id);

2137: IF x_return_status <> fnd_api.g_ret_sts_success
2138: THEN
2139: l_error_count := l_error_count + 1;
2140: cn_message_pkg.debug('Error when creating Worksheet for : ' || l_worksheet_rec.salesrep_id);
2141: fnd_file.put_line(fnd_file.log, 'Failed to create worksheet for ' || l_worksheet_rec.salesrep_id);
2142: FOR i IN 1 .. x_msg_count
2143: LOOP
2144: fnd_file.put_line(fnd_file.log, 'msg: ' || fnd_msg_pub.get(i, 'F'));
2145: END LOOP;

Line 2144: fnd_file.put_line(fnd_file.log, 'msg: ' || fnd_msg_pub.get(i, 'F'));

2140: cn_message_pkg.debug('Error when creating Worksheet for : ' || l_worksheet_rec.salesrep_id);
2141: fnd_file.put_line(fnd_file.log, 'Failed to create worksheet for ' || l_worksheet_rec.salesrep_id);
2142: FOR i IN 1 .. x_msg_count
2143: LOOP
2144: fnd_file.put_line(fnd_file.log, 'msg: ' || fnd_msg_pub.get(i, 'F'));
2145: END LOOP;
2146: fnd_file.put_line(fnd_file.log, '+------------------------------+');
2147: ROLLBACK;
2148: ELSE

Line 2146: fnd_file.put_line(fnd_file.log, '+------------------------------+');

2142: FOR i IN 1 .. x_msg_count
2143: LOOP
2144: fnd_file.put_line(fnd_file.log, 'msg: ' || fnd_msg_pub.get(i, 'F'));
2145: END LOOP;
2146: fnd_file.put_line(fnd_file.log, '+------------------------------+');
2147: ROLLBACK;
2148: ELSE
2149: COMMIT;
2150: END IF;

Line 2159: fnd_file.put_line(fnd_file.log,errbuf) ;

2155: IF l_error_count <> 0
2156: THEN
2157: retcode := 2;
2158: errbuf := ' Batch# '||p_batch_id||' : Creation of worksheets was not successful for some resources. Count = ' || to_char(l_error_count) ;
2159: fnd_file.put_line(fnd_file.log,errbuf) ;
2160: END IF;
2161:
2162: fnd_file.put_line(fnd_file.log, ' Finish time = ' || to_char(SYSDATE, 'Dy DD-Mon-YYYY HH24:MI:SS'));
2163: fnd_file.put_line(fnd_file.log, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');

Line 2162: fnd_file.put_line(fnd_file.log, ' Finish time = ' || to_char(SYSDATE, 'Dy DD-Mon-YYYY HH24:MI:SS'));

2158: errbuf := ' Batch# '||p_batch_id||' : Creation of worksheets was not successful for some resources. Count = ' || to_char(l_error_count) ;
2159: fnd_file.put_line(fnd_file.log,errbuf) ;
2160: END IF;
2161:
2162: fnd_file.put_line(fnd_file.log, ' Finish time = ' || to_char(SYSDATE, 'Dy DD-Mon-YYYY HH24:MI:SS'));
2163: fnd_file.put_line(fnd_file.log, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');
2164:
2165: EXCEPTION
2166: WHEN OTHERS THEN

Line 2163: fnd_file.put_line(fnd_file.log, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');

2159: fnd_file.put_line(fnd_file.log,errbuf) ;
2160: END IF;
2161:
2162: fnd_file.put_line(fnd_file.log, ' Finish time = ' || to_char(SYSDATE, 'Dy DD-Mon-YYYY HH24:MI:SS'));
2163: fnd_file.put_line(fnd_file.log, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');
2164:
2165: EXCEPTION
2166: WHEN OTHERS THEN
2167: fnd_file.put_line(fnd_file.log, 'Unexpected exception in processing the (payrun_id,batch) = ' || p_payrun_id || ',' || p_batch_id);

Line 2167: fnd_file.put_line(fnd_file.log, 'Unexpected exception in processing the (payrun_id,batch) = ' || p_payrun_id || ',' || p_batch_id);

2163: fnd_file.put_line(fnd_file.log, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');
2164:
2165: EXCEPTION
2166: WHEN OTHERS THEN
2167: fnd_file.put_line(fnd_file.log, 'Unexpected exception in processing the (payrun_id,batch) = ' || p_payrun_id || ',' || p_batch_id);
2168: fnd_file.put_line(fnd_file.log, SQLERRM);
2169: RAISE;
2170: END create_multiple_worksheets;
2171:

Line 2168: fnd_file.put_line(fnd_file.log, SQLERRM);

2164:
2165: EXCEPTION
2166: WHEN OTHERS THEN
2167: fnd_file.put_line(fnd_file.log, 'Unexpected exception in processing the (payrun_id,batch) = ' || p_payrun_id || ',' || p_batch_id);
2168: fnd_file.put_line(fnd_file.log, SQLERRM);
2169: RAISE;
2170: END create_multiple_worksheets;
2171:
2172:

Line 2209: fnd_file.put_line(fnd_file.log, 'Entering create_mult_worksheet_conc ');

2205: AND cp.org_id = c_org_id;
2206:
2207: l_has_access BOOLEAN;
2208: BEGIN
2209: fnd_file.put_line(fnd_file.log, 'Entering create_mult_worksheet_conc ');
2210: retcode := 0;
2211: --Added for R12 payment security check begin.
2212: l_has_access := cn_payment_security_pvt.get_security_access(cn_payment_security_pvt.g_type_wksht, cn_payment_security_pvt.g_access_wksht_create);
2213: --Get the salesrep batch size from profile option.

Line 2215: fnd_file.put_line(fnd_file.log,'Batch size : ' ||l_batch_sz);

2211: --Added for R12 payment security check begin.
2212: l_has_access := cn_payment_security_pvt.get_security_access(cn_payment_security_pvt.g_type_wksht, cn_payment_security_pvt.g_access_wksht_create);
2213: --Get the salesrep batch size from profile option.
2214: l_batch_sz := nvl(fnd_profile.value('CN_PMT_SRP_BATCH_SIZE'),251);
2215: fnd_file.put_line(fnd_file.log,'Batch size : ' ||l_batch_sz);
2216:
2217: IF l_batch_sz < 1
2218: THEN
2219: errmsg := 'The batch size should be greater than zero.';

Line 2220: fnd_file.put_line(fnd_file.log, errmsg);

2216:
2217: IF l_batch_sz < 1
2218: THEN
2219: errmsg := 'The batch size should be greater than zero.';
2220: fnd_file.put_line(fnd_file.log, errmsg);
2221: raise_application_error(-20000, errmsg);
2222: END IF;
2223:
2224: IF (l_has_access = FALSE) THEN

Line 2240: fnd_file.put_line(fnd_file.log, errmsg);

2236: CLOSE get_payrun_id_curs;
2237: IF l_status <> 'UNPAID'
2238: THEN
2239: errmsg := 'Worksheets can only be created for payruns in UNPAID status.';
2240: fnd_file.put_line(fnd_file.log, errmsg);
2241: raise_application_error(-20000, errmsg);
2242: END IF;
2243: cn_message_pkg.begin_batch(x_process_type => 'WKSHT',
2244: x_process_audit_id => l_proc_audit_id,

Line 2298: fnd_file.put_line(fnd_file.log, errmsg);

2294:
2295: EXCEPTION
2296: WHEN no_data_found THEN
2297: errmsg := 'No salesreps found that were eligible for worksheet creation in the payrun : ';
2298: fnd_file.put_line(fnd_file.log, errmsg);
2299: retcode := 2;
2300: errbuf := errmsg;
2301: RAISE ;
2302: WHEN OTHERS THEN

Line 2303: fnd_file.put_line(fnd_file.log, 'Unexpected exception in cn_payment_worksheet_pvt.create_mult_worksheet_conc');

2299: retcode := 2;
2300: errbuf := errmsg;
2301: RAISE ;
2302: WHEN OTHERS THEN
2303: fnd_file.put_line(fnd_file.log, 'Unexpected exception in cn_payment_worksheet_pvt.create_mult_worksheet_conc');
2304: fnd_file.put_line(fnd_file.log, errmsg);
2305: fnd_file.put_line(fnd_file.log, SQLERRM);
2306: RAISE;
2307: END;

Line 2304: fnd_file.put_line(fnd_file.log, errmsg);

2300: errbuf := errmsg;
2301: RAISE ;
2302: WHEN OTHERS THEN
2303: fnd_file.put_line(fnd_file.log, 'Unexpected exception in cn_payment_worksheet_pvt.create_mult_worksheet_conc');
2304: fnd_file.put_line(fnd_file.log, errmsg);
2305: fnd_file.put_line(fnd_file.log, SQLERRM);
2306: RAISE;
2307: END;
2308:

Line 2305: fnd_file.put_line(fnd_file.log, SQLERRM);

2301: RAISE ;
2302: WHEN OTHERS THEN
2303: fnd_file.put_line(fnd_file.log, 'Unexpected exception in cn_payment_worksheet_pvt.create_mult_worksheet_conc');
2304: fnd_file.put_line(fnd_file.log, errmsg);
2305: fnd_file.put_line(fnd_file.log, SQLERRM);
2306: RAISE;
2307: END;
2308:
2309:

Line 2310: fnd_file.put_line(fnd_file.log, errbuf);

2306: RAISE;
2307: END;
2308:
2309:
2310: fnd_file.put_line(fnd_file.log, errbuf);
2311: fnd_file.put_line(fnd_file.log, 'Count of worksheets to be created = ' || salesrep_t.COUNT);
2312: fnd_file.put_line(fnd_file.log, 'Completed create worksheet process....');
2313:
2314: IF l_return_status <> fnd_api.g_ret_sts_success

Line 2311: fnd_file.put_line(fnd_file.log, 'Count of worksheets to be created = ' || salesrep_t.COUNT);

2307: END;
2308:
2309:
2310: fnd_file.put_line(fnd_file.log, errbuf);
2311: fnd_file.put_line(fnd_file.log, 'Count of worksheets to be created = ' || salesrep_t.COUNT);
2312: fnd_file.put_line(fnd_file.log, 'Completed create worksheet process....');
2313:
2314: IF l_return_status <> fnd_api.g_ret_sts_success
2315: THEN

Line 2312: fnd_file.put_line(fnd_file.log, 'Completed create worksheet process....');

2308:
2309:
2310: fnd_file.put_line(fnd_file.log, errbuf);
2311: fnd_file.put_line(fnd_file.log, 'Count of worksheets to be created = ' || salesrep_t.COUNT);
2312: fnd_file.put_line(fnd_file.log, 'Completed create worksheet process....');
2313:
2314: IF l_return_status <> fnd_api.g_ret_sts_success
2315: THEN
2316: retcode := 2;

Line 4096: fnd_file.put_line(fnd_file.LOG,'Start the batching process for payrun_id = ' || p_payrun_id);

4092: BEGIN
4093: -- Standard Start of API savepoint
4094: SAVEPOINT generic_conc_processor;
4095: -- SUBMIT BATCHES
4096: fnd_file.put_line(fnd_file.LOG,'Start the batching process for payrun_id = ' || p_payrun_id);
4097: l_org_id := p_org_id;
4098: BEGIN
4099: -- lock payrun when when batching
4100: BEGIN

Line 4109: fnd_file.put_line(fnd_file.LOG,'Invalid payrun. Could not find payrun with ID = ' || l_payrun_id);

4105: FOR UPDATE NOWAIT;
4106:
4107: EXCEPTION
4108: WHEN NO_DATA_FOUND THEN
4109: fnd_file.put_line(fnd_file.LOG,'Invalid payrun. Could not find payrun with ID = ' || l_payrun_id);
4110: cn_message_pkg.debug('Invalid payrun. Could not find payrun with ID = ' || l_payrun_id);
4111: RAISE ;
4112: END;
4113:

Line 4121: fnd_file.put_line(fnd_file.LOG,'Logical Batch ID in cn_process_batches_all = ' || l_logical_batch_id);

4117: SELECT cn_process_batches_s2.NEXTVAL
4118: INTO l_logical_batch_id
4119: FROM sys.dual;
4120:
4121: fnd_file.put_line(fnd_file.LOG,'Logical Batch ID in cn_process_batches_all = ' || l_logical_batch_id);
4122:
4123: FOR currbatch IN 1 .. l_max_batch_id
4124: LOOP
4125:

Line 4184: fnd_file.put_line(fnd_file.LOG,' Now submit physical batch id ' || l_physical_batch_id);

4180: /***************** Launching Threads ***********************/
4181: l_job_count := l_job_count + 1;
4182:
4183: -- SUBMIT BATCHES
4184: fnd_file.put_line(fnd_file.LOG,' Now submit physical batch id ' || l_physical_batch_id);
4185:
4186: conc_submit(p_conc_program => p_params.conc_program_name,
4187: p_description => 'Runner physical batch ID ' || l_physical_batch_id,
4188: p_logical_batch_id => l_logical_batch_id,

Line 4194: fnd_file.put_line(fnd_file.LOG,' Created child concurrent request. ID = ' || l_request_id);

4190: p_org_id => l_org_id,
4191: p_payrun_id => l_payrun_id,
4192: x_request_id => l_request_id,
4193: p_params => p_params);
4194: fnd_file.put_line(fnd_file.LOG,' Created child concurrent request. ID = ' || l_request_id);
4195:
4196: END LOOP; --currbatch
4197:
4198: EXCEPTION

Line 4208: fnd_file.put_line(fnd_file.log, errmsg);

4204: err_num := SQLCODE;
4205: IF err_num = -54
4206: THEN
4207: errmsg := 'This payrun is already involved in another process. Please try again later.';
4208: fnd_file.put_line(fnd_file.log, errmsg);
4209: x_errbuf := errmsg ;
4210: raise_application_error(-20000, errmsg);
4211: ELSE
4212: RAISE;

Line 4240: fnd_file.put_line(fnd_file.log, 'ERRORED REQUESTS');

4236: LOOP
4237: l_error_count := l_error_count + 1;
4238: IF l_error_count = 1
4239: THEN
4240: fnd_file.put_line(fnd_file.log, 'ERRORED REQUESTS');
4241: fnd_file.put_line(fnd_file.log, '================');
4242: END IF;
4243: fnd_file.put_line(fnd_file.LOG,' ' || rs_errors.request_id || ' @ ' || rs_errors.actual_completion_date || ' due to ' || rs_errors.completion_text);
4244: END LOOP;

Line 4241: fnd_file.put_line(fnd_file.log, '================');

4237: l_error_count := l_error_count + 1;
4238: IF l_error_count = 1
4239: THEN
4240: fnd_file.put_line(fnd_file.log, 'ERRORED REQUESTS');
4241: fnd_file.put_line(fnd_file.log, '================');
4242: END IF;
4243: fnd_file.put_line(fnd_file.LOG,' ' || rs_errors.request_id || ' @ ' || rs_errors.actual_completion_date || ' due to ' || rs_errors.completion_text);
4244: END LOOP;
4245:

Line 4243: fnd_file.put_line(fnd_file.LOG,' ' || rs_errors.request_id || ' @ ' || rs_errors.actual_completion_date || ' due to ' || rs_errors.completion_text);

4239: THEN
4240: fnd_file.put_line(fnd_file.log, 'ERRORED REQUESTS');
4241: fnd_file.put_line(fnd_file.log, '================');
4242: END IF;
4243: fnd_file.put_line(fnd_file.LOG,' ' || rs_errors.request_id || ' @ ' || rs_errors.actual_completion_date || ' due to ' || rs_errors.completion_text);
4244: END LOOP;
4245:
4246: -- Count the warning batches
4247: l_warning_count := 0;

Line 4255: fnd_file.put_line(fnd_file.log, 'WARNING REQUESTS: ' || l_warning_count);

4251: FROM fnd_concurrent_requests fcr
4252: WHERE parent_request_id = l_conc_request_id
4253: AND upper(status_code) = 'G';
4254:
4255: fnd_file.put_line(fnd_file.log, 'WARNING REQUESTS: ' || l_warning_count);
4256: EXCEPTION
4257: WHEN no_data_found THEN
4258: NULL;
4259: WHEN OTHERS THEN

Line 4260: fnd_file.put_line(fnd_file.log, 'Error getting warnings: ' || SQLERRM);

4256: EXCEPTION
4257: WHEN no_data_found THEN
4258: NULL;
4259: WHEN OTHERS THEN
4260: fnd_file.put_line(fnd_file.log, 'Error getting warnings: ' || SQLERRM);
4261: END;
4262:
4263: duration := (SYSDATE - mysysdate) * 1440;
4264:

Line 4284: fnd_file.put_line(fnd_file.log, x_errbuf);

4280: EXCEPTION
4281: WHEN OTHERS THEN
4282: x_retcode := 2;
4283: x_errbuf := x_errbuf || '. Error processing payrun ID = ' || l_payrun_id ;
4284: fnd_file.put_line(fnd_file.log, x_errbuf);
4285: RAISE ;
4286: END generic_conc_processor;
4287:
4288: --============================================================================

Line 4322: fnd_file.put_line(fnd_file.log, 'Input Parameters Payrun_Name =' || p_name);

4318: FROM cn_payruns pr
4319: WHERE NAME = p_name
4320: AND org_id = mo_global.get_current_org_id;
4321: BEGIN
4322: fnd_file.put_line(fnd_file.log, 'Input Parameters Payrun_Name =' || p_name);
4323: l_has_access := cn_payment_security_pvt.get_security_access(cn_payment_security_pvt.g_type_wksht, cn_payment_security_pvt.g_access_payrun_refresh);
4324: --Get the salesrep batch size from profile option.
4325: l_batch_sz := nvl(fnd_profile.value('CN_PMT_SRP_BATCH_SIZE'),251);
4326: fnd_file.put_line(fnd_file.log, 'Batch Size =' || to_char(l_batch_sz));

Line 4326: fnd_file.put_line(fnd_file.log, 'Batch Size =' || to_char(l_batch_sz));

4322: fnd_file.put_line(fnd_file.log, 'Input Parameters Payrun_Name =' || p_name);
4323: l_has_access := cn_payment_security_pvt.get_security_access(cn_payment_security_pvt.g_type_wksht, cn_payment_security_pvt.g_access_payrun_refresh);
4324: --Get the salesrep batch size from profile option.
4325: l_batch_sz := nvl(fnd_profile.value('CN_PMT_SRP_BATCH_SIZE'),251);
4326: fnd_file.put_line(fnd_file.log, 'Batch Size =' || to_char(l_batch_sz));
4327:
4328: IF l_batch_sz < 1
4329: THEN
4330: errmsg := 'The batch size should be greater than zero.';

Line 4331: fnd_file.put_line(fnd_file.log, errmsg);

4327:
4328: IF l_batch_sz < 1
4329: THEN
4330: errmsg := 'The batch size should be greater than zero.';
4331: fnd_file.put_line(fnd_file.log, errmsg);
4332: raise_application_error(-20000, errmsg);
4333: END IF;
4334:
4335: -- TODO Handle error message

Line 4344: fnd_file.put_line(fnd_file.log, errmsg);

4340: CLOSE get_payrun_id_curs;
4341: EXCEPTION
4342: WHEN NO_DATA_FOUND THEN
4343: errmsg := 'Invalid payrun name. Could not find payrun with the name = ' || p_name;
4344: fnd_file.put_line(fnd_file.log, errmsg);
4345: raise_application_error(-20000, errmsg);
4346: END;
4347:
4348: IF l_status NOT IN ('UNPAID')

Line 4378: fnd_file.put_line(fnd_file.log, errmsg);

4374:
4375: EXCEPTION
4376: WHEN no_data_found THEN
4377: errmsg := 'No salesreps found that were eligible for worksheet creation in the payrun : ';
4378: fnd_file.put_line(fnd_file.log, errmsg);
4379: retcode := 2;
4380: errbuf := errmsg;
4381: RAISE ;
4382: END;

Line 4384: fnd_file.put_line(fnd_file.log, errbuf);

4380: errbuf := errmsg;
4381: RAISE ;
4382: END;
4383:
4384: fnd_file.put_line(fnd_file.log, errbuf);
4385: fnd_file.put_line(fnd_file.LOG,' Count of worksheets to be refreshed = ' || salesrep_t.COUNT);
4386: fnd_file.put_line(fnd_file.log,' Completed refresh worksheet process....');
4387:
4388: EXCEPTION

Line 4385: fnd_file.put_line(fnd_file.LOG,' Count of worksheets to be refreshed = ' || salesrep_t.COUNT);

4381: RAISE ;
4382: END;
4383:
4384: fnd_file.put_line(fnd_file.log, errbuf);
4385: fnd_file.put_line(fnd_file.LOG,' Count of worksheets to be refreshed = ' || salesrep_t.COUNT);
4386: fnd_file.put_line(fnd_file.log,' Completed refresh worksheet process....');
4387:
4388: EXCEPTION
4389: WHEN OTHERS THEN

Line 4386: fnd_file.put_line(fnd_file.log,' Completed refresh worksheet process....');

4382: END;
4383:
4384: fnd_file.put_line(fnd_file.log, errbuf);
4385: fnd_file.put_line(fnd_file.LOG,' Count of worksheets to be refreshed = ' || salesrep_t.COUNT);
4386: fnd_file.put_line(fnd_file.log,' Completed refresh worksheet process....');
4387:
4388: EXCEPTION
4389: WHEN OTHERS THEN
4390: fnd_file.put_line(fnd_file.LOG,'Unexpected exception in cn_payment_worksheet_pvt.refresh_worksheet_parent');

Line 4390: fnd_file.put_line(fnd_file.LOG,'Unexpected exception in cn_payment_worksheet_pvt.refresh_worksheet_parent');

4386: fnd_file.put_line(fnd_file.log,' Completed refresh worksheet process....');
4387:
4388: EXCEPTION
4389: WHEN OTHERS THEN
4390: fnd_file.put_line(fnd_file.LOG,'Unexpected exception in cn_payment_worksheet_pvt.refresh_worksheet_parent');
4391: fnd_file.put_line(fnd_file.log, errmsg);
4392: fnd_file.put_line(fnd_file.log, SQLERRM);
4393: RAISE;
4394: END refresh_worksheet_parent;

Line 4391: fnd_file.put_line(fnd_file.log, errmsg);

4387:
4388: EXCEPTION
4389: WHEN OTHERS THEN
4390: fnd_file.put_line(fnd_file.LOG,'Unexpected exception in cn_payment_worksheet_pvt.refresh_worksheet_parent');
4391: fnd_file.put_line(fnd_file.log, errmsg);
4392: fnd_file.put_line(fnd_file.log, SQLERRM);
4393: RAISE;
4394: END refresh_worksheet_parent;
4395:

Line 4392: fnd_file.put_line(fnd_file.log, SQLERRM);

4388: EXCEPTION
4389: WHEN OTHERS THEN
4390: fnd_file.put_line(fnd_file.LOG,'Unexpected exception in cn_payment_worksheet_pvt.refresh_worksheet_parent');
4391: fnd_file.put_line(fnd_file.log, errmsg);
4392: fnd_file.put_line(fnd_file.log, SQLERRM);
4393: RAISE;
4394: END refresh_worksheet_parent;
4395:
4396: --============================================================================

Line 4424: fnd_file.put_line(fnd_file.log, ' Input Parameters Payrun_id = ' || p_payrun_id);

4420: l_error_count NUMBER := 0;
4421: l_ovn cn_payment_worksheets.object_version_number%TYPE;
4422: BEGIN
4423: l_start_time := SYSDATE;
4424: fnd_file.put_line(fnd_file.log, ' Input Parameters Payrun_id = ' || p_payrun_id);
4425: fnd_file.put_line(fnd_file.log, ' Input Parameters Batch_id = ' || p_batch_id);
4426: fnd_file.put_line(fnd_file.log, ' Current time = ' || to_char(l_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS'));
4427:
4428: l_worksheet_rec.payrun_id := p_payrun_id;

Line 4425: fnd_file.put_line(fnd_file.log, ' Input Parameters Batch_id = ' || p_batch_id);

4421: l_ovn cn_payment_worksheets.object_version_number%TYPE;
4422: BEGIN
4423: l_start_time := SYSDATE;
4424: fnd_file.put_line(fnd_file.log, ' Input Parameters Payrun_id = ' || p_payrun_id);
4425: fnd_file.put_line(fnd_file.log, ' Input Parameters Batch_id = ' || p_batch_id);
4426: fnd_file.put_line(fnd_file.log, ' Current time = ' || to_char(l_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS'));
4427:
4428: l_worksheet_rec.payrun_id := p_payrun_id;
4429: l_worksheet_rec.org_id := p_org_id;

Line 4426: fnd_file.put_line(fnd_file.log, ' Current time = ' || to_char(l_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS'));

4422: BEGIN
4423: l_start_time := SYSDATE;
4424: fnd_file.put_line(fnd_file.log, ' Input Parameters Payrun_id = ' || p_payrun_id);
4425: fnd_file.put_line(fnd_file.log, ' Input Parameters Batch_id = ' || p_batch_id);
4426: fnd_file.put_line(fnd_file.log, ' Current time = ' || to_char(l_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS'));
4427:
4428: l_worksheet_rec.payrun_id := p_payrun_id;
4429: l_worksheet_rec.org_id := p_org_id;
4430:

Line 4447: fnd_file.put_line(fnd_file.log,'Refresh worksheet for = ' || l_worksheet_rec.salesrep_id || ' salesrepID');

4443: WHERE wk.payrun_id = l_worksheet_rec.payrun_id
4444: AND wk.salesrep_id = l_worksheet_rec.salesrep_id
4445: AND quota_id IS NULL;
4446:
4447: fnd_file.put_line(fnd_file.log,'Refresh worksheet for = ' || l_worksheet_rec.salesrep_id || ' salesrepID');
4448:
4449: cn_payment_worksheet_pvt.update_worksheet(p_api_version => 1.0,
4450: p_init_msg_list => 'T',
4451: p_commit => 'F',

Line 4471: fnd_file.put_line(fnd_file.log,'Failed to refresh worksheet for ' || l_worksheet_rec.salesrep_id);

4467: l_error_count := l_error_count + 1;
4468:
4469: --ROLLBACK TO create_single_worksheet;
4470: cn_message_pkg.debug('Error when refreshing Worksheet for : ' || l_worksheet_rec.salesrep_id);
4471: fnd_file.put_line(fnd_file.log,'Failed to refresh worksheet for ' || l_worksheet_rec.salesrep_id);
4472:
4473: FOR i IN 1 .. x_msg_count
4474: LOOP
4475: fnd_file.put_line(fnd_file.log, 'msg: ' || fnd_msg_pub.get(i, 'F'));

Line 4475: fnd_file.put_line(fnd_file.log, 'msg: ' || fnd_msg_pub.get(i, 'F'));

4471: fnd_file.put_line(fnd_file.log,'Failed to refresh worksheet for ' || l_worksheet_rec.salesrep_id);
4472:
4473: FOR i IN 1 .. x_msg_count
4474: LOOP
4475: fnd_file.put_line(fnd_file.log, 'msg: ' || fnd_msg_pub.get(i, 'F'));
4476: END LOOP;
4477: fnd_file.put_line(fnd_file.log, '+------------------------------+');
4478: ROLLBACK;
4479:

Line 4477: fnd_file.put_line(fnd_file.log, '+------------------------------+');

4473: FOR i IN 1 .. x_msg_count
4474: LOOP
4475: fnd_file.put_line(fnd_file.log, 'msg: ' || fnd_msg_pub.get(i, 'F'));
4476: END LOOP;
4477: fnd_file.put_line(fnd_file.log, '+------------------------------+');
4478: ROLLBACK;
4479:
4480: ELSE
4481:

Line 4489: fnd_file.put_line(fnd_file.log, errbuf);

4485: IF l_error_count <> 0
4486: THEN
4487: retcode := 2;
4488: errbuf := ' Batch# ' || p_batch_id || ' : Refresh of worksheets was not successful for some resources. Count = ' || to_char(l_error_count);
4489: fnd_file.put_line(fnd_file.log, errbuf);
4490: END IF;
4491:
4492: fnd_file.put_line(fnd_file.LOG,' Finish time = ' || to_char(SYSDATE, 'Dy DD-Mon-YYYY HH24:MI:SS'));
4493: fnd_file.put_line(fnd_file.LOG, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');

Line 4492: fnd_file.put_line(fnd_file.LOG,' Finish time = ' || to_char(SYSDATE, 'Dy DD-Mon-YYYY HH24:MI:SS'));

4488: errbuf := ' Batch# ' || p_batch_id || ' : Refresh of worksheets was not successful for some resources. Count = ' || to_char(l_error_count);
4489: fnd_file.put_line(fnd_file.log, errbuf);
4490: END IF;
4491:
4492: fnd_file.put_line(fnd_file.LOG,' Finish time = ' || to_char(SYSDATE, 'Dy DD-Mon-YYYY HH24:MI:SS'));
4493: fnd_file.put_line(fnd_file.LOG, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');
4494:
4495: EXCEPTION
4496: WHEN OTHERS THEN

Line 4493: fnd_file.put_line(fnd_file.LOG, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');

4489: fnd_file.put_line(fnd_file.log, errbuf);
4490: END IF;
4491:
4492: fnd_file.put_line(fnd_file.LOG,' Finish time = ' || to_char(SYSDATE, 'Dy DD-Mon-YYYY HH24:MI:SS'));
4493: fnd_file.put_line(fnd_file.LOG, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');
4494:
4495: EXCEPTION
4496: WHEN OTHERS THEN
4497: fnd_file.put_line(fnd_file.LOG,'Unexpected exception in processing the (payrun_id,batch) = ' ||p_payrun_id || ',' || p_batch_id);

Line 4497: fnd_file.put_line(fnd_file.LOG,'Unexpected exception in processing the (payrun_id,batch) = ' ||p_payrun_id || ',' || p_batch_id);

4493: fnd_file.put_line(fnd_file.LOG, ' Batch time = ' || (SYSDATE - l_start_time) * 1400 || ' minutes ');
4494:
4495: EXCEPTION
4496: WHEN OTHERS THEN
4497: fnd_file.put_line(fnd_file.LOG,'Unexpected exception in processing the (payrun_id,batch) = ' ||p_payrun_id || ',' || p_batch_id);
4498: fnd_file.put_line(fnd_file.log, SQLERRM);
4499: RAISE;
4500:
4501: END refresh_worksheet_child;

Line 4498: fnd_file.put_line(fnd_file.log, SQLERRM);

4494:
4495: EXCEPTION
4496: WHEN OTHERS THEN
4497: fnd_file.put_line(fnd_file.LOG,'Unexpected exception in processing the (payrun_id,batch) = ' ||p_payrun_id || ',' || p_batch_id);
4498: fnd_file.put_line(fnd_file.log, SQLERRM);
4499: RAISE;
4500:
4501: END refresh_worksheet_child;
4502: