124:
125: BEGIN
126:
127: IF PG_DEBUG in ('Y', 'C') THEN
128: arp_util.debug('ARP_PROCESS_BR_REMIT.create_remit_batch (+)');
129: END IF;
130:
131: SAVEPOINT create_remit_batch_PVT;
132:
259: l_batch_id,
260: l_batch_name,
261: l_batch_applied_status);
262: IF PG_DEBUG in ('Y', 'C') THEN
263: arp_util.debug('create_remit_batch: ' || 'Commit -- Insertion du Batch '||l_batch_id||' status '||l_batch_applied_status);
264: arp_util.debug('create_remit_batch: ' || 'NB selected BR :'|| TOTAL_COUNT);
265: arp_util.debug('create_remit_batch: ' || 'Remittance total amount :'|| TOTAL_AMOUNT);
266: END IF;
267: ELSE
260: l_batch_name,
261: l_batch_applied_status);
262: IF PG_DEBUG in ('Y', 'C') THEN
263: arp_util.debug('create_remit_batch: ' || 'Commit -- Insertion du Batch '||l_batch_id||' status '||l_batch_applied_status);
264: arp_util.debug('create_remit_batch: ' || 'NB selected BR :'|| TOTAL_COUNT);
265: arp_util.debug('create_remit_batch: ' || 'Remittance total amount :'|| TOTAL_AMOUNT);
266: END IF;
267: ELSE
268: -- NO BR have been selected -> the remittance batch row isn't inserted in the table AR_BATCHES
261: l_batch_applied_status);
262: IF PG_DEBUG in ('Y', 'C') THEN
263: arp_util.debug('create_remit_batch: ' || 'Commit -- Insertion du Batch '||l_batch_id||' status '||l_batch_applied_status);
264: arp_util.debug('create_remit_batch: ' || 'NB selected BR :'|| TOTAL_COUNT);
265: arp_util.debug('create_remit_batch: ' || 'Remittance total amount :'|| TOTAL_AMOUNT);
266: END IF;
267: ELSE
268: -- NO BR have been selected -> the remittance batch row isn't inserted in the table AR_BATCHES
269: FND_MESSAGE.set_name('AR','AR_BR_CANNOT_CREATE_REMIT');
278:
279: COMMIT;
280:
281: IF PG_DEBUG in ('Y', 'C') THEN
282: arp_util.debug('ARP_PROCESS_BR_REMIT.create_remit_batch (-)');
283: END IF;
284:
285:
286: EXCEPTION
286: EXCEPTION
287:
288: WHEN FND_API.G_EXC_ERROR THEN
289: IF PG_DEBUG in ('Y', 'C') THEN
290: arp_util.debug('EXCEPTION FND_API.G_EXC_ERROR: ARP_PROCESS_BR_REMIT.create_remit_batch');
291: END IF;
292: ROLLBACK TO create_remit_batch_PVT;
293:
294: IF CUR_BR%ISOPEN THEN
298: x_return_status := FND_API.G_RET_STS_ERROR;
299:
300: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
301: IF PG_DEBUG in ('Y', 'C') THEN
302: arp_util.debug('EXCEPTION FND_API.G_EXC_UNEXPECTED_ERROR: ARP_PROCESS_BR_REMIT.create_remit_batch');
303: END IF;
304: ROLLBACK TO create_remit_batch_PVT;
305:
306: IF CUR_BR%ISOPEN THEN
310: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
311:
312: WHEN OTHERS THEN
313: IF PG_DEBUG in ('Y', 'C') THEN
314: arp_util.debug('EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.create_remit_batch');
315: arp_util.debug('create_remit_batch: ' || SQLERRM);
316: END IF;
317: ROLLBACK TO create_remit_batch_PVT;
318:
311:
312: WHEN OTHERS THEN
313: IF PG_DEBUG in ('Y', 'C') THEN
314: arp_util.debug('EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.create_remit_batch');
315: arp_util.debug('create_remit_batch: ' || SQLERRM);
316: END IF;
317: ROLLBACK TO create_remit_batch_PVT;
318:
319: IF CUR_BR%ISOPEN THEN
410:
411: BEGIN
412:
413: IF PG_DEBUG in ('Y', 'C') THEN
414: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.select_and_assign_br_to_remit (+)');
415: END IF;
416:
417: SAVEPOINT select_and_assign_PVT;
418:
518: p_control_count := l_batch_rec.control_count;
519: p_control_amount := l_batch_rec.control_amount;
520:
521: IF PG_DEBUG in ('Y', 'C') THEN
522: arp_util.debug('create_remit_batch: ' || 'BR Remittance number :'||l_batch_rec.name);
523: arp_util.debug('create_remit_batch: ' || 'Count :'||l_control_count);
524: arp_util.debug('create_remit_batch: ' || 'Amount :'||l_control_amount);
525: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.select_and_assign_br_to_remit (+)');
526: END IF;
519: p_control_amount := l_batch_rec.control_amount;
520:
521: IF PG_DEBUG in ('Y', 'C') THEN
522: arp_util.debug('create_remit_batch: ' || 'BR Remittance number :'||l_batch_rec.name);
523: arp_util.debug('create_remit_batch: ' || 'Count :'||l_control_count);
524: arp_util.debug('create_remit_batch: ' || 'Amount :'||l_control_amount);
525: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.select_and_assign_br_to_remit (+)');
526: END IF;
527:
520:
521: IF PG_DEBUG in ('Y', 'C') THEN
522: arp_util.debug('create_remit_batch: ' || 'BR Remittance number :'||l_batch_rec.name);
523: arp_util.debug('create_remit_batch: ' || 'Count :'||l_control_count);
524: arp_util.debug('create_remit_batch: ' || 'Amount :'||l_control_amount);
525: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.select_and_assign_br_to_remit (+)');
526: END IF;
527:
528: EXCEPTION
521: IF PG_DEBUG in ('Y', 'C') THEN
522: arp_util.debug('create_remit_batch: ' || 'BR Remittance number :'||l_batch_rec.name);
523: arp_util.debug('create_remit_batch: ' || 'Count :'||l_control_count);
524: arp_util.debug('create_remit_batch: ' || 'Amount :'||l_control_amount);
525: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.select_and_assign_br_to_remit (+)');
526: END IF;
527:
528: EXCEPTION
529: WHEN OTHERS THEN
527:
528: EXCEPTION
529: WHEN OTHERS THEN
530: IF PG_DEBUG in ('Y', 'C') THEN
531: arp_util.debug('create_remit_batch: ' || 'EXCEPTION : ARP_PROGRAM_BR_REMIT.select_and_assign_br_to_remit - ROLLBACK');
532: END IF;
533: FND_FILE.PUT_LINE(FND_FILE.LOG,SQLERRM);
534: ROLLBACK TO select_and_assign_PVT;
535: RAISE;
594:
595: BEGIN
596:
597: IF PG_DEBUG in ('Y', 'C') THEN
598: arp_util.debug('create_remit_batch: ' || '-----------ARP_PROCESS_BR_REMIT.construct_select_br_for_remit (+)-------------');
599: END IF;
600:
601: /*-------------------------------------------------------------------------------------*/
602: /* clause Where set up */
710: ''''||p_drawee_class3_code||''') ';
711: END IF;
712:
713: IF PG_DEBUG in ('Y', 'C') THEN
714: arp_util.debug('create_remit_batch: ' || 'Where clause completed.');
715: END IF;
716:
717:
718: /*-------------------------------------------------------------------------------------*/
728: l_order_clause := l_order_clause || ',' || p_drawee_sort_criteria || ' ' || p_drawee_order;
729: END IF;
730:
731: IF PG_DEBUG in ('Y', 'C') THEN
732: arp_util.debug('create_remit_batch: ' || 'Order by clause completed.');
733: END IF;
734:
735:
736: /*-------------------------------------------------------------------------------------*/
754: l_where_clause ||
755: l_order_clause;
756:
757: IF PG_DEBUG in ('Y', 'C') THEN
758: arp_util.debug('create_remit_batch: ' || '-----------ARP_PROCESS_BR_REMIT.construct_select_br_for_remit (-)-------------');
759: END IF;
760:
761:
762: EXCEPTION
761:
762: EXCEPTION
763: WHEN OTHERS THEN
764: IF PG_DEBUG in ('Y', 'C') THEN
765: arp_util.debug('create_remit_batch: ' || 'EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.construct_select_br_for_remit ');
766: END IF;
767: RAISE;
768:
769: END construct_select_br_for_remit;
829:
830: BEGIN
831:
832: IF PG_DEBUG in ('Y', 'C') THEN
833: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.validate_br_search_criteria (+)');
834: END IF;
835:
836: -- remittance total amount
837: IF (p_remit_total_low IS NULL) AND (p_remit_total_high IS NULL) THEN
835:
836: -- remittance total amount
837: IF (p_remit_total_low IS NULL) AND (p_remit_total_high IS NULL) THEN
838: IF PG_DEBUG in ('Y', 'C') THEN
839: arp_util.debug('create_remit_batch: ' || 'p_remit_total_low and p_remit_total_high are NULL');
840: END IF;
841: ELSIF (p_remit_total_low IS NULL) OR
842: (p_remit_total_high IS NULL) OR
843: (p_remit_total_high < p_remit_total_low) THEN
847:
848: -- maturity date
849: IF (p_maturity_date_low IS NULL) AND (p_maturity_date_high IS NULL) THEN
850: IF PG_DEBUG in ('Y', 'C') THEN
851: arp_util.debug('create_remit_batch: ' || 'p_maturity_date_low and p_maturity_date_high are NULL');
852: END IF;
853: ELSIF (p_maturity_date_low IS NULL) OR
854: (p_maturity_date_high IS NULL) OR
855: (p_maturity_date_high < p_maturity_date_low) THEN
859:
860: -- BR number
861: IF (p_br_number_low IS NULL) AND (p_br_number_high IS NULL) THEN
862: IF PG_DEBUG in ('Y', 'C') THEN
863: arp_util.debug('create_remit_batch: ' || 'p_br_number_low and p_br_number_high are NULL');
864: END IF;
865: ELSIF (p_br_number_low IS NULL) OR
866: (p_br_number_high IS NULL) OR
867: (p_br_number_high < p_br_number_low) THEN
871:
872: -- BR amount
873: IF (p_br_amount_low IS NULL) AND (p_br_amount_high IS NULL) THEN
874: IF PG_DEBUG in ('Y', 'C') THEN
875: arp_util.debug('create_remit_batch: ' || 'p_br_amount_low and p_br_amount_high are NULL');
876: END IF;
877: ELSIF (p_br_amount_low IS NULL) OR
878: (p_br_amount_high IS NULL) OR
879: (p_br_amount_high < p_br_amount_low) THEN
883:
884: -- Drawee number
885: IF (p_drawee_number_low IS NULL) AND (p_drawee_number_high IS NULL) THEN
886: IF PG_DEBUG in ('Y', 'C') THEN
887: arp_util.debug('create_remit_batch: ' || 'p_drawee_number_low and p_drawee_number_high are NULL');
888: END IF;
889: ELSIF (p_drawee_number_low IS NULL) OR
890: (p_drawee_number_high IS NULL) OR
891: (p_drawee_number_high < p_drawee_number_low) THEN
949:
950: -- parameter BR sort criteria
951: IF p_br_sort_criteria IS NULL THEN
952: IF PG_DEBUG in ('Y', 'C') THEN
953: arp_util.debug('create_remit_batch: ' || 'p_br_sort_criteria is NULL');
954: END IF;
955: ELSIF p_br_sort_criteria NOT IN ('PS.TRX_NUMBER',
956: 'PS.AMOUNT_DUE_REMAINING',
957: 'TRX_TYPE.NAME') THEN
964:
965: -- parameter drawee sort criteria
966: IF p_drawee_sort_criteria IS NULL THEN
967: IF PG_DEBUG in ('Y', 'C') THEN
968: arp_util.debug('create_remit_batch: ' || 'p_drawee_sort_criteria is NULL');
969: END IF;
970:
971: /* Bug 3550612, should check for party_name and account_number instead of
972: Customer_name and Customer Number */
983: APP_EXCEPTION.raise_exception;
984: END IF;
985:
986: IF PG_DEBUG in ('Y', 'C') THEN
987: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.validate_br_search_criteria (-)');
988: END IF;
989:
990: EXCEPTION
991: WHEN OTHERS THEN
989:
990: EXCEPTION
991: WHEN OTHERS THEN
992: IF PG_DEBUG in ('Y', 'C') THEN
993: arp_util.debug('create_remit_batch: ' || 'EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.validate_br_search_criteria ');
994: END IF;
995: RAISE;
996:
997:
1052:
1053: BEGIN
1054:
1055: IF PG_DEBUG in ('Y', 'C') THEN
1056: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.assign_br_to_remit(+)');
1057: END IF;
1058:
1059: SAVEPOINT assign_br_to_remit_PVT;
1060:
1078: TOTAL_AMOUNT := 0;
1079:
1080: IF (p_remit_total_high IS NULL) THEN
1081: IF PG_DEBUG in ('Y', 'C') THEN
1082: arp_util.debug('create_remit_batch: ' || 'no limit for the remittance');
1083: END IF;
1084: LOOP
1085: FETCH CUR_BR INTO l_ps_rec;
1086: EXIT WHEN CUR_BR%NOTFOUND;
1084: LOOP
1085: FETCH CUR_BR INTO l_ps_rec;
1086: EXIT WHEN CUR_BR%NOTFOUND;
1087: IF PG_DEBUG in ('Y', 'C') THEN
1088: arp_util.debug('create_remit_batch: ' || 'BR '||l_ps_rec.payment_schedule_id||' assign to the remittance '||p_batch_id);
1089: END IF;
1090: AR_BILLS_MAINTAIN_PUB.Select_BR_Remit(p_batch_id,l_ps_rec.payment_schedule_id,l_new_status);
1091: TOTAL_COUNT := TOTAL_COUNT + 1;
1092: TOTAL_AMOUNT := TOTAL_AMOUNT + NVL(l_ps_rec.amount_due_remaining,0);
1092: TOTAL_AMOUNT := TOTAL_AMOUNT + NVL(l_ps_rec.amount_due_remaining,0);
1093: END LOOP;
1094: ELSE
1095: IF PG_DEBUG in ('Y', 'C') THEN
1096: arp_util.debug('create_remit_batch: ' || 'limit for the remittance '||p_remit_total_high);
1097: END IF;
1098: LOOP
1099: FETCH CUR_BR INTO l_ps_rec;
1100: EXIT WHEN CUR_BR%NOTFOUND;
1099: FETCH CUR_BR INTO l_ps_rec;
1100: EXIT WHEN CUR_BR%NOTFOUND;
1101: IF (TOTAL_AMOUNT + NVL(l_ps_rec.amount_due_remaining,0) <= p_remit_total_high) THEN
1102: IF PG_DEBUG in ('Y', 'C') THEN
1103: arp_util.debug('create_remit_batch: ' || 'BR '||l_ps_rec.payment_schedule_id||' assign to the remittance '||p_batch_id);
1104: END IF;
1105: AR_BILLS_MAINTAIN_PUB.Select_BR_Remit(p_batch_id,l_ps_rec.payment_schedule_id,l_new_status);
1106: TOTAL_COUNT := TOTAL_COUNT + 1;
1107: TOTAL_AMOUNT := TOTAL_AMOUNT + NVL(l_ps_rec.amount_due_remaining,0);
1111:
1112: CLOSE CUR_BR;
1113:
1114: IF PG_DEBUG in ('Y', 'C') THEN
1115: arp_util.debug('create_remit_batch: ' || 'NB remitted BR :'|| TOTAL_COUNT);
1116: arp_util.debug('create_remit_batch: ' || 'Remittance total amount :'|| TOTAL_AMOUNT);
1117: END IF;
1118:
1119: p_control_count := TOTAL_COUNT;
1112: CLOSE CUR_BR;
1113:
1114: IF PG_DEBUG in ('Y', 'C') THEN
1115: arp_util.debug('create_remit_batch: ' || 'NB remitted BR :'|| TOTAL_COUNT);
1116: arp_util.debug('create_remit_batch: ' || 'Remittance total amount :'|| TOTAL_AMOUNT);
1117: END IF;
1118:
1119: p_control_count := TOTAL_COUNT;
1120: p_control_amount := TOTAL_AMOUNT;
1119: p_control_count := TOTAL_COUNT;
1120: p_control_amount := TOTAL_AMOUNT;
1121:
1122: IF PG_DEBUG in ('Y', 'C') THEN
1123: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.assign_br_to_remit(-)');
1124: END IF;
1125:
1126: EXCEPTION
1127: WHEN OTHERS THEN
1125:
1126: EXCEPTION
1127: WHEN OTHERS THEN
1128: IF PG_DEBUG in ('Y', 'C') THEN
1129: arp_util.debug('create_remit_batch: ' || 'EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.assign_br_to_remit');
1130: END IF;
1131: ROLLBACK TO assign_br_to_remit_PVT;
1132:
1133: IF CUR_BR%ISOPEN THEN
1190:
1191: BEGIN
1192:
1193: IF PG_DEBUG in ('Y', 'C') THEN
1194: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.add_or_rm_br_to_remit(+)');
1195: END IF;
1196:
1197: SAVEPOINT add_or_rm_br_to_remit_PVT;
1198:
1246: l_br_amount := l_ps_rec.amount_due_remaining;
1247:
1248: IF (p_action_flag = 'D') THEN
1249: IF PG_DEBUG in ('Y', 'C') THEN
1250: arp_util.debug('create_remit_batch: ' || 'Action Deselect - Remove the BR '||p_ps_id||' from its remittance');
1251: END IF;
1252: AR_BILLS_MAINTAIN_PUB.DeSelect_BR_Remit(p_ps_id,l_new_status);
1253: l_control_count := l_control_count - 1;
1254: l_control_amount := l_control_amount - l_br_amount;
1253: l_control_count := l_control_count - 1;
1254: l_control_amount := l_control_amount - l_br_amount;
1255: ELSIF (p_action_flag = 'E') THEN
1256: IF PG_DEBUG in ('Y', 'C') THEN
1257: arp_util.debug('create_remit_batch: ' || 'Action Erase - Remove the BR '||p_ps_id||' from its remittance');
1258: END IF;
1259: AR_BILLS_MAINTAIN_PUB.cancel_br_remit(p_ps_id);
1260: l_control_count := l_control_count - 1;
1261: l_control_amount := l_control_amount - l_br_amount;
1260: l_control_count := l_control_count - 1;
1261: l_control_amount := l_control_amount - l_br_amount;
1262: ELSE
1263: IF PG_DEBUG in ('Y', 'C') THEN
1264: arp_util.debug('create_remit_batch: ' || 'Action Select - BR '||l_ps_rec.payment_schedule_id||' assign to the remittance '||p_batch_id);
1265: END IF;
1266: AR_BILLS_MAINTAIN_PUB.Select_BR_Remit(p_batch_id,p_ps_id,l_new_status);
1267: l_control_count := l_control_count + 1;
1268: l_control_amount := l_control_amount + l_br_amount;
1274: arp_cr_batches_pkg.update_p(l_batch_rec,l_batch_rec.batch_id);
1275:
1276: IF FND_API.To_Boolean(p_commit) THEN
1277: IF PG_DEBUG in ('Y', 'C') THEN
1278: arp_util.debug('create_remit_batch: ' || 'commit');
1279: END IF;
1280: COMMIT;
1281: END IF;
1282:
1283: p_control_count := l_control_count;
1284: p_control_amount := l_control_amount;
1285:
1286: IF PG_DEBUG in ('Y', 'C') THEN
1287: arp_util.debug('create_remit_batch: ' || 'ARP_PROCESS_BR_REMIT.add_or_rm_br_to_remit(-)');
1288: END IF;
1289:
1290: EXCEPTION
1291: WHEN FND_API.G_EXC_ERROR THEN
1289:
1290: EXCEPTION
1291: WHEN FND_API.G_EXC_ERROR THEN
1292: IF PG_DEBUG in ('Y', 'C') THEN
1293: arp_util.debug('create_remit_batch: ' || 'EXCEPTION FND_API.G_EXC_ERROR: ARP_PROCESS_BR_REMIT.add_or_rm_br_to_remit');
1294: END IF;
1295: x_return_status := FND_API.G_RET_STS_ERROR;
1296: ROLLBACK TO add_or_rm_br_to_remit_PVT;
1297:
1296: ROLLBACK TO add_or_rm_br_to_remit_PVT;
1297:
1298: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1299: IF PG_DEBUG in ('Y', 'C') THEN
1300: arp_util.debug('create_remit_batch: ' || 'EXCEPTION FND_API.G_EXC_UNEXPECTED_ERROR: ARP_PROCESS_BR_REMIT.add_or_rm_br_to_remit');
1301: END IF;
1302: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1303: ROLLBACK TO add_or_rm_br_to_remit_PVT;
1304:
1303: ROLLBACK TO add_or_rm_br_to_remit_PVT;
1304:
1305: WHEN OTHERS THEN
1306: IF PG_DEBUG in ('Y', 'C') THEN
1307: arp_util.debug('create_remit_batch: ' || 'EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.add_or_rm_br_to_remit');
1308: arp_util.debug('create_remit_batch: ' || SQLERRM);
1309: END IF;
1310: ROLLBACK TO add_or_rm_br_to_remit_PVT;
1311: IF (SQLCODE = -20001) THEN
1304:
1305: WHEN OTHERS THEN
1306: IF PG_DEBUG in ('Y', 'C') THEN
1307: arp_util.debug('create_remit_batch: ' || 'EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.add_or_rm_br_to_remit');
1308: arp_util.debug('create_remit_batch: ' || SQLERRM);
1309: END IF;
1310: ROLLBACK TO add_or_rm_br_to_remit_PVT;
1311: IF (SQLCODE = -20001) THEN
1312: x_return_status := FND_API.G_RET_STS_ERROR;
1410: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1411: END IF;
1412:
1413: IF PG_DEBUG in ('Y', 'C') THEN
1414: arp_util.debug('ARP_PROCESS_BR_REMIT.create_remit_batch_conc_req (+)');
1415: END IF;
1416:
1417: x_return_status := FND_API.G_RET_STS_SUCCESS;
1418:
1524: FND_MESSAGE.set_token('PROCEDURE','ARP_PROCESS_BR_REMIT.create_remit_batch_conc_req');
1525: APP_EXCEPTION.raise_exception;
1526: ELSE
1527: IF PG_DEBUG in ('Y', 'C') THEN
1528: arp_util.debug('create_remit_batch: ' || 'Submitted Request - '||l_program||'. Request ID ='||to_char(l_request_id));
1529: END IF;
1530: END IF;
1531:
1532: p_control_count := l_batch_rec.control_count;
1540:
1541: COMMIT;
1542:
1543: IF PG_DEBUG in ('Y', 'C') THEN
1544: arp_util.debug('ARP_PROCESS_BR_REMIT.create_remit_batch_conc_req (-)');
1545: END IF;
1546:
1547: EXCEPTION
1548: WHEN FND_API.G_EXC_ERROR THEN
1546:
1547: EXCEPTION
1548: WHEN FND_API.G_EXC_ERROR THEN
1549: IF PG_DEBUG in ('Y', 'C') THEN
1550: arp_util.debug('EXCEPTION FND_API.G_EXC_ERROR: ARP_PROCESS_BR_REMIT.create_remit_batch_conc_req');
1551: END IF;
1552: x_return_status := FND_API.G_RET_STS_ERROR;
1553: ROLLBACK TO create_conc_req_PVT;
1554:
1553: ROLLBACK TO create_conc_req_PVT;
1554:
1555: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1556: IF PG_DEBUG in ('Y', 'C') THEN
1557: arp_util.debug('EXCEPTION FND_API.G_EXC_UNEXPECTED_ERROR: ARP_PROCESS_BR_REMIT.create_remit_batch_conc_req');
1558: END IF;
1559: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1560: ROLLBACK TO create_conc_req_PVT;
1561:
1560: ROLLBACK TO create_conc_req_PVT;
1561:
1562: WHEN OTHERS THEN
1563: IF PG_DEBUG in ('Y', 'C') THEN
1564: arp_util.debug('EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.create_remit_batch_conc_req');
1565: arp_util.debug('create_remit_batch: ' || SQLERRM);
1566: END IF;
1567: ROLLBACK TO create_conc_req_PVT;
1568: IF (SQLCODE = -20001) THEN
1561:
1562: WHEN OTHERS THEN
1563: IF PG_DEBUG in ('Y', 'C') THEN
1564: arp_util.debug('EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.create_remit_batch_conc_req');
1565: arp_util.debug('create_remit_batch: ' || SQLERRM);
1566: END IF;
1567: ROLLBACK TO create_conc_req_PVT;
1568: IF (SQLCODE = -20001) THEN
1569: x_return_status := FND_API.G_RET_STS_ERROR;
1633: l_org_id number;
1634: BEGIN
1635:
1636: IF PG_DEBUG in ('Y', 'C') THEN
1637: arp_util.debug('ARP_PROCESS_BR_REMIT.maintain_remit_batch_conc_req (+)');
1638: END IF;
1639:
1640: SAVEPOINT maintain_conc_req_PVT;
1641:
1758: FND_MESSAGE.set_token('PROCEDURE','ARP_PROCESS_BR_REMIT.maintain_remit_batch_conc_req');
1759: APP_EXCEPTION.raise_exception;
1760: ELSE
1761: IF PG_DEBUG in ('Y', 'C') THEN
1762: arp_util.debug('maintain_remit_batch_conc_req: ' || 'Submitted Request - '||l_program||'. Request ID ='||to_char(l_request_id));
1763: END IF;
1764: END IF;
1765:
1766: -- Update the batch row with the request id and the batch applied status
1783:
1784: COMMIT;
1785:
1786: IF PG_DEBUG in ('Y', 'C') THEN
1787: arp_util.debug('ARP_PROCESS_BR_REMIT.maintain_remit_batch_conc_req (-)');
1788: END IF;
1789:
1790: EXCEPTION
1791: WHEN FND_API.G_EXC_ERROR THEN
1789:
1790: EXCEPTION
1791: WHEN FND_API.G_EXC_ERROR THEN
1792: IF PG_DEBUG in ('Y', 'C') THEN
1793: arp_util.debug('EXCEPTION FND_API.G_EXC_ERROR: ARP_PROCESS_BR_REMIT.maintain_remit_batch_conc_req');
1794: END IF;
1795: x_return_status := FND_API.G_RET_STS_ERROR;
1796: ROLLBACK TO maintain_conc_req_PVT;
1797:
1796: ROLLBACK TO maintain_conc_req_PVT;
1797:
1798: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1799: IF PG_DEBUG in ('Y', 'C') THEN
1800: arp_util.debug('EXCEPTION FND_API.G_EXC_UNEXPECTED_ERROR: ARP_PROCESS_BR_REMIT.maintain_remit_batch_conc_req');
1801: END IF;
1802: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1803: ROLLBACK TO maintain_conc_req_PVT;
1804:
1803: ROLLBACK TO maintain_conc_req_PVT;
1804:
1805: WHEN OTHERS THEN
1806: IF PG_DEBUG in ('Y', 'C') THEN
1807: arp_util.debug('EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.maintain_remit_batch_conc_req');
1808: arp_util.debug('maintain_remit_batch_conc_req: ' || SQLERRM);
1809: END IF;
1810: ROLLBACK TO maintain_conc_req_PVT;
1811: IF (SQLCODE = -20001) THEN
1804:
1805: WHEN OTHERS THEN
1806: IF PG_DEBUG in ('Y', 'C') THEN
1807: arp_util.debug('EXCEPTION OTHERS: ARP_PROCESS_BR_REMIT.maintain_remit_batch_conc_req');
1808: arp_util.debug('maintain_remit_batch_conc_req: ' || SQLERRM);
1809: END IF;
1810: ROLLBACK TO maintain_conc_req_PVT;
1811: IF (SQLCODE = -20001) THEN
1812: x_return_status := FND_API.G_RET_STS_ERROR;
1858:
1859: BEGIN
1860:
1861: IF PG_DEBUG in ('Y', 'C') THEN
1862: arp_util.debug('ARP_PROCESS_BR_REMIT.update_batch_status (+)');
1863: END IF;
1864:
1865: SAVEPOINT update_batch_status_PVT;
1866:
1890:
1891: commit;
1892:
1893: IF PG_DEBUG in ('Y', 'C') THEN
1894: arp_util.debug('ARP_PROCESS_BR_REMIT.update_batch_status (-)');
1895: END IF;
1896:
1897: EXCEPTION
1898: WHEN FND_API.G_EXC_ERROR THEN
1896:
1897: EXCEPTION
1898: WHEN FND_API.G_EXC_ERROR THEN
1899: IF PG_DEBUG in ('Y', 'C') THEN
1900: arp_util.debug('EXCEPTION FND_API.G_EXC_ERROR:ARP_PROCESS_BR_REMIT.update_batch_status');
1901: END IF;
1902: x_return_status := FND_API.G_RET_STS_ERROR;
1903: ROLLBACK TO update_batch_status_PVT;
1904:
1903: ROLLBACK TO update_batch_status_PVT;
1904:
1905: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1906: IF PG_DEBUG in ('Y', 'C') THEN
1907: arp_util.debug('EXCEPTION FND_API.G_EXC_UNEXPECTED_ERROR:ARP_PROCESS_BR_REMIT.update_batch_status');
1908: END IF;
1909: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1910: ROLLBACK TO update_batch_status_PVT;
1911:
1910: ROLLBACK TO update_batch_status_PVT;
1911:
1912: WHEN OTHERS THEN
1913: IF PG_DEBUG in ('Y', 'C') THEN
1914: arp_util.debug('EXCEPTION FND_API.G_EXC_UNEXPECTED_ERROR:ARP_PROCESS_BR_REMIT.update_batch_status');
1915: arp_util.debug('update_batch_status: ' || SQLERRM);
1916: END IF;
1917: ROLLBACK TO update_batch_status_PVT;
1918: IF (SQLCODE = -20001) THEN
1911:
1912: WHEN OTHERS THEN
1913: IF PG_DEBUG in ('Y', 'C') THEN
1914: arp_util.debug('EXCEPTION FND_API.G_EXC_UNEXPECTED_ERROR:ARP_PROCESS_BR_REMIT.update_batch_status');
1915: arp_util.debug('update_batch_status: ' || SQLERRM);
1916: END IF;
1917: ROLLBACK TO update_batch_status_PVT;
1918: IF (SQLCODE = -20001) THEN
1919: x_return_status := FND_API.G_RET_STS_ERROR;