279: l_line_index NUMBER;
280:
281: BEGIN
282:
283: x_return_status := FND_API.g_ret_sts_success;
284:
285: OPEN c_no_groups;
286: FETCH c_no_groups INTO l_no_groups;
287: CLOSE c_no_groups;
375: END IF;
376:
377: EXCEPTION
378: WHEN OTHERS THEN
379: x_return_status := FND_API.g_ret_sts_unexp_error;
380:
381: FND_MESSAGE.set_name('OZF', 'OZF_OFFER_PARTY_STMT_FAILED');
382: FND_MESSAGE.set_token('ERR_MSG',SQLERRM);
383: FND_MSG_PUB.add;
386: THEN
387: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
388: END IF;
389:
390: FND_MSG_PUB.count_and_get(p_encoded => FND_API.g_false,
391: p_count => x_msg_count,
392: p_data => x_msg_data);
393: END refresh_parties;
394:
409: l_ignore NUMBER;
410: --
411: BEGIN
412: --
413: x_return_status := FND_API.g_ret_sts_success;
414:
415: -- denorm parties
416: FND_DSQL.init;
417: FND_DSQL.add_text('INSERT INTO ozf_na_customers_temp(');
442: x_party_stmt => l_stmt_offer);
443:
444: ozf_utility_pvt.write_conc_log('-- Refresh_Parties (-) With Status: ' || x_return_status );
445:
446: IF x_return_status = FND_API.g_ret_sts_unexp_error
447: THEN
448: RAISE FND_API.g_exc_unexpected_error;
449: END IF;
450:
444: ozf_utility_pvt.write_conc_log('-- Refresh_Parties (-) With Status: ' || x_return_status );
445:
446: IF x_return_status = FND_API.g_ret_sts_unexp_error
447: THEN
448: RAISE FND_API.g_exc_unexpected_error;
449: END IF;
450:
451: IF l_stmt_offer IS NOT NULL
452: THEN
475: END IF;
476:
477: EXCEPTION
478: WHEN OTHERS THEN
479: x_return_status := FND_API.g_ret_sts_unexp_error;
480:
481: ozf_utility_pvt.write_conc_log(l_stmt_debug);
482: ozf_utility_pvt.write_conc_log(SQLERRM);
483:
485: THEN
486: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
487: END IF;
488:
489: FND_MSG_PUB.count_and_get(p_encoded => FND_API.g_false,
490: p_count => x_msg_count,
491: p_data => x_msg_data);
492: END populate_customers;
493:
561: l_stmt_denorm VARCHAR2(32000) := NULL;
562: l_stmt_debug VARCHAR2(32000) := NULL;
563:
564: BEGIN
565: x_return_status := FND_API.g_ret_sts_success;
566:
567: l_org_id := fnd_profile.value('QP_ORGANIZATION_ID');
568:
569: FOR l_product IN c_product
690: END LOOP;
691:
692: EXCEPTION
693: WHEN OTHERS THEN
694: x_return_status := FND_API.g_ret_sts_unexp_error;
695:
696: ozf_utility_pvt.write_conc_log(l_stmt_debug);
697: ozf_utility_pvt.write_conc_log(SQLERRM);
698:
700: THEN
701: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
702: END IF;
703:
704: FND_MSG_PUB.count_and_get(p_encoded => FND_API.g_false,
705: p_count => x_msg_count,
706: p_data => x_msg_data);
707: END populate_prod_line;
708:
744: l_stmt_denorm VARCHAR2(32000) := NULL;
745: l_stmt_debug VARCHAR2(32000) := NULL;
746:
747: BEGIN
748: x_return_status := FND_API.g_ret_sts_success;
749:
750: l_org_id := fnd_profile.value('QP_ORGANIZATION_ID');
751: ozf_utility_pvt.write_conc_log(l_api_name);
752:
841:
842:
843: EXCEPTION
844: WHEN OTHERS THEN
845: x_return_status := FND_API.g_ret_sts_unexp_error;
846:
847: ozf_utility_pvt.write_conc_log(l_stmt_debug);
848: ozf_utility_pvt.write_conc_log(SQLERRM);
849:
851: THEN
852: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
853: END IF;
854:
855: FND_MSG_PUB.count_and_get(p_encoded => FND_API.g_false,
856: p_count => x_msg_count,
857: p_data => x_msg_data);
858:
859: END populate_prod_tier;
1322: THEN
1323: ozf_utility_pvt.write_conc_log('Processing exception Id = ' || l_exception_rec.na_conc_exception_id);
1324: END IF;
1325:
1326: l_return_status := FND_API.g_ret_sts_success; -- bug 3655853
1327:
1328: l_act_budgets_rec.act_budget_used_by_id := l_exception_rec.act_budget_used_by_id;
1329: l_act_budgets_rec.arc_act_budget_used_by := l_exception_rec.arc_act_budget_used_by;
1330: l_act_budgets_rec.budget_source_type := l_exception_rec.budget_source_type;
1369: || l_return_status);
1370: ozf_utility_pvt.write_conc_log('Utilization Amount Created: ' || l_utilized_amount);
1371: END IF;
1372:
1373: IF l_return_status = FND_API.g_ret_sts_success
1374: THEN
1375: --
1376: DELETE FROM ozf_na_conc_exceptions
1377: WHERE na_conc_exception_id = l_exception_rec.na_conc_exception_id;
1628: FROM ozf_sys_parameters_all
1629: WHERE org_id = p_org_id;
1630:
1631:
1632: l_exchange_rate_type VARCHAR2(30) := FND_API.G_MISS_CHAR;
1633: l_order_line_tbl t_order_line_tbl;
1634: l_ar_trx_line_tbl t_ar_trx_line_tbl;
1635: l_return_line_tbl t_order_line_tbl;
1636: l_idsm_line_tbl t_order_line_tbl;
1762: ----------------------------------------------------
1763: FOR l_net_accrual_offers IN c_net_accrual_offers
1764: LOOP
1765: --
1766: l_return_status := FND_API.g_ret_sts_success;
1767:
1768: ozf_utility_pvt.write_conc_log('-----------------------------------------');
1769: ozf_utility_pvt.write_conc_log('--');
1770: ozf_utility_pvt.write_conc_log('-------- Processing Offer: '|| l_net_accrual_offers.offer_name);
1862: ,l_msg_data);
1863:
1864: ozf_utility_pvt.write_conc_log('Populate_Customers (-) With Status: ' ||l_return_status);
1865:
1866: IF l_return_status = Fnd_Api.g_ret_sts_error
1867: THEN
1868: RAISE Fnd_Api.g_exc_error;
1869: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
1870: THEN
1864: ozf_utility_pvt.write_conc_log('Populate_Customers (-) With Status: ' ||l_return_status);
1865:
1866: IF l_return_status = Fnd_Api.g_ret_sts_error
1867: THEN
1868: RAISE Fnd_Api.g_exc_error;
1869: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
1870: THEN
1871: RAISE Fnd_Api.g_exc_unexpected_error;
1872: END IF;
1865:
1866: IF l_return_status = Fnd_Api.g_ret_sts_error
1867: THEN
1868: RAISE Fnd_Api.g_exc_error;
1869: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
1870: THEN
1871: RAISE Fnd_Api.g_exc_unexpected_error;
1872: END IF;
1873: --
1867: THEN
1868: RAISE Fnd_Api.g_exc_error;
1869: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
1870: THEN
1871: RAISE Fnd_Api.g_exc_unexpected_error;
1872: END IF;
1873: --
1874: END IF;
1875: ------------------------------------------------------
1901: --
1902: END IF;
1903: ---------------------------------------------------------
1904:
1905: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
1906: RAISE Fnd_Api.g_exc_error;
1907: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
1908: RAISE Fnd_Api.g_exc_unexpected_error;
1909: END IF;
1902: END IF;
1903: ---------------------------------------------------------
1904:
1905: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
1906: RAISE Fnd_Api.g_exc_error;
1907: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
1908: RAISE Fnd_Api.g_exc_unexpected_error;
1909: END IF;
1910:
1903: ---------------------------------------------------------
1904:
1905: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
1906: RAISE Fnd_Api.g_exc_error;
1907: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
1908: RAISE Fnd_Api.g_exc_unexpected_error;
1909: END IF;
1910:
1911: --------------- Start Processing Orders ------------------------
1904:
1905: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
1906: RAISE Fnd_Api.g_exc_error;
1907: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
1908: RAISE Fnd_Api.g_exc_unexpected_error;
1909: END IF;
1910:
1911: --------------- Start Processing Orders ------------------------
1912: ozf_utility_pvt.write_conc_log('-- Start Processing Orders -- ');
1941: LOOP
1942: ---------------------------------------------------------
1943: --
1944:
1945: l_return_status := FND_API.g_ret_sts_success;
1946:
1947: IF G_DEBUG_LOW THEN
1948: ozf_utility_pvt.write_conc_log('Order Line_Id: '||l_order_line_tbl(i).line_id);
1949: END IF;
2041: ,x_rate => l_rate);
2042: l_line_amount := l_new_amount;
2043: ozf_utility_pvt.write_conc_log('l_line_amount converted : '|| l_line_amount);
2044:
2045: IF l_return_status = Fnd_Api.g_ret_sts_error
2046: THEN
2047: ozf_utility_pvt.write_conc_log('Exp Error from Convert_Currency: ' || l_return_status);
2048: RAISE Fnd_Api.g_exc_error;
2049: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2044:
2045: IF l_return_status = Fnd_Api.g_ret_sts_error
2046: THEN
2047: ozf_utility_pvt.write_conc_log('Exp Error from Convert_Currency: ' || l_return_status);
2048: RAISE Fnd_Api.g_exc_error;
2049: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2050: THEN
2051: ozf_utility_pvt.write_conc_log('Unexp Error from Convert_Currency: ' || l_return_status);
2052: RAISE Fnd_Api.g_exc_unexpected_error;
2045: IF l_return_status = Fnd_Api.g_ret_sts_error
2046: THEN
2047: ozf_utility_pvt.write_conc_log('Exp Error from Convert_Currency: ' || l_return_status);
2048: RAISE Fnd_Api.g_exc_error;
2049: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2050: THEN
2051: ozf_utility_pvt.write_conc_log('Unexp Error from Convert_Currency: ' || l_return_status);
2052: RAISE Fnd_Api.g_exc_unexpected_error;
2053: END IF;
2048: RAISE Fnd_Api.g_exc_error;
2049: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2050: THEN
2051: ozf_utility_pvt.write_conc_log('Unexp Error from Convert_Currency: ' || l_return_status);
2052: RAISE Fnd_Api.g_exc_unexpected_error;
2053: END IF;
2054: --
2055: END IF;
2056:
2061: IF G_DEBUG_LOW THEN
2062: ozf_utility_pvt.write_conc_log('Pv_Referral_Comp_Pub.Get_Beneficiary (+)');
2063: END IF;
2064: pv_referral_comp_pub.get_beneficiary (p_api_version => 1.0,
2065: p_init_msg_list => FND_API.g_true,
2066: p_commit => FND_API.g_false,
2067: p_validation_level => FND_API.g_valid_level_full,
2068: p_order_header_id => l_order_line_tbl(i).header_id,
2069: p_order_line_id => l_order_line_tbl(i).line_id,
2062: ozf_utility_pvt.write_conc_log('Pv_Referral_Comp_Pub.Get_Beneficiary (+)');
2063: END IF;
2064: pv_referral_comp_pub.get_beneficiary (p_api_version => 1.0,
2065: p_init_msg_list => FND_API.g_true,
2066: p_commit => FND_API.g_false,
2067: p_validation_level => FND_API.g_valid_level_full,
2068: p_order_header_id => l_order_line_tbl(i).header_id,
2069: p_order_line_id => l_order_line_tbl(i).line_id,
2070: p_offer_id => l_net_accrual_offers.offer_id,
2063: END IF;
2064: pv_referral_comp_pub.get_beneficiary (p_api_version => 1.0,
2065: p_init_msg_list => FND_API.g_true,
2066: p_commit => FND_API.g_false,
2067: p_validation_level => FND_API.g_valid_level_full,
2068: p_order_header_id => l_order_line_tbl(i).header_id,
2069: p_order_line_id => l_order_line_tbl(i).line_id,
2070: p_offer_id => l_net_accrual_offers.offer_id,
2071: x_beneficiary_id => l_beneficiary_id,
2077: ozf_utility_pvt.write_conc_log('Pv_Referral_Comp_Pub.Get_Beneficiary (-) With Status: '||l_return_status);
2078: ozf_utility_pvt.write_conc_log('l_benificiary_id / l_referral_id: '||l_beneficiary_id || ' / ' || l_referral_id);
2079: END IF;
2080:
2081: IF l_return_status = Fnd_Api.g_ret_sts_error
2082: THEN
2083: ozf_utility_pvt.write_conc_log('Exp Error from Get_Beneficiary: ' || l_return_status);
2084: RAISE Fnd_Api.g_exc_error;
2085: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2080:
2081: IF l_return_status = Fnd_Api.g_ret_sts_error
2082: THEN
2083: ozf_utility_pvt.write_conc_log('Exp Error from Get_Beneficiary: ' || l_return_status);
2084: RAISE Fnd_Api.g_exc_error;
2085: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2086: THEN
2087: ozf_utility_pvt.write_conc_log('Unexp Error from Get_Beneficiary: ' || l_return_status);
2088: RAISE Fnd_Api.g_exc_unexpected_error;
2081: IF l_return_status = Fnd_Api.g_ret_sts_error
2082: THEN
2083: ozf_utility_pvt.write_conc_log('Exp Error from Get_Beneficiary: ' || l_return_status);
2084: RAISE Fnd_Api.g_exc_error;
2085: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2086: THEN
2087: ozf_utility_pvt.write_conc_log('Unexp Error from Get_Beneficiary: ' || l_return_status);
2088: RAISE Fnd_Api.g_exc_unexpected_error;
2089: END IF;
2084: RAISE Fnd_Api.g_exc_error;
2085: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2086: THEN
2087: ozf_utility_pvt.write_conc_log('Unexp Error from Get_Beneficiary: ' || l_return_status);
2088: RAISE Fnd_Api.g_exc_unexpected_error;
2089: END IF;
2090: --
2091:
2092: IF ( l_beneficiary_id IS NOT NULL )
2143: THEN
2144: --
2145: IF ( l_beneficiary_id IS NULL
2146: OR
2147: l_beneficiary_id = fnd_api.g_miss_num )
2148: THEN
2149: --
2150: -- Benificiay Id can be NULL only for PV Net Accrual Offers
2151: -- If PV decides not to accrue for this customer, it returns NULL
2198: IF G_DEBUG_LOW THEN
2199: ozf_utility_pvt.write_conc_log('Req Curr/Req Amt/Util Amt: ' || l_act_budgets_rec.request_currency || '/' || l_act_budgets_rec.request_amount || '/' || l_utilized_amount);
2200: END IF;
2201:
2202: IF l_return_status = Fnd_Api.g_ret_sts_error
2203: THEN
2204: ozf_utility_pvt.write_conc_log('Exp Error: Process_Act_Budgets: line_id ( '||l_order_line_tbl(i).line_id
2205: || ' ) Error: '||l_msg_data);
2206: log_exception(l_act_budgets_rec, l_act_util_rec);
2203: THEN
2204: ozf_utility_pvt.write_conc_log('Exp Error: Process_Act_Budgets: line_id ( '||l_order_line_tbl(i).line_id
2205: || ' ) Error: '||l_msg_data);
2206: log_exception(l_act_budgets_rec, l_act_util_rec);
2207: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2208: THEN
2209: ozf_utility_pvt.write_conc_log('UnExp Error: Process_Act_Budgets: line_id ( '||l_order_line_tbl(i).line_id
2210: || ' ) Error: '||l_msg_data);
2211: log_exception(l_act_budgets_rec, l_act_util_rec);
2249: l_utilization_type := 'ACCRUAL';
2250: l_reference_type := NULL;
2251: l_referral_id := NULL;
2252:
2253: IF l_beneficiary_id IS NULL OR l_beneficiary_id = fnd_api.g_miss_num
2254: THEN
2255: -- This condition will never occur.
2256: -- For PV offers, the Batch Mode is always NO and Beneficiary is always required
2257: -- for a Net Accrual Offer.
2293: IF G_DEBUG_LOW THEN
2294: ozf_utility_pvt.write_conc_log('Req Curr/Req Amt/Util Amt: ' || l_act_budgets_rec.request_currency || '/' || l_act_budgets_rec.request_amount || '/' || l_utilized_amount);
2295: END IF;
2296:
2297: IF l_return_status = Fnd_Api.g_ret_sts_error
2298: THEN
2299: ozf_utility_pvt.write_conc_log('Exp Error: Process_Act_Budgets Error: '||l_msg_data );
2300: log_exception(l_act_budgets_rec, l_act_util_rec);
2301: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2297: IF l_return_status = Fnd_Api.g_ret_sts_error
2298: THEN
2299: ozf_utility_pvt.write_conc_log('Exp Error: Process_Act_Budgets Error: '||l_msg_data );
2300: log_exception(l_act_budgets_rec, l_act_util_rec);
2301: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2302: THEN
2303: ozf_utility_pvt.write_conc_log('UnExp Error: Process_Act_Budgets Error: '||l_msg_data );
2304: log_exception(l_act_budgets_rec, l_act_util_rec);
2305: END IF;
2324:
2325: FOR l_na_rule_line IN c_na_rule_lines(l_net_accrual_offers.na_rule_header_id)
2326: LOOP
2327: --
2328: l_return_status := FND_API.g_ret_sts_success; -- bug 3655853
2329:
2330: OPEN c_na_deduction_rule(l_na_rule_line.na_deduction_rule_id);
2331: FETCH c_na_deduction_rule INTO l_na_deduction_rule;
2332: CLOSE c_na_deduction_rule;
2343: --
2344: l_ar_dedu_amount := 0;
2345: l_ar_trx_line_tbl.delete;
2346:
2347: l_return_status := FND_API.g_ret_sts_success; -- bug 3655853
2348:
2349: -- Always set Start Date to offer start date for AR transactions because
2350: -- A transaction "A" can be created on Date1
2351: -- Net Accrual Engine could have run on Date2.It will not pick "A"
2413: ,x_to_amount => l_new_amount
2414: ,x_rate => l_rate);
2415: l_ar_trx_line_tbl(i).extended_amount := l_new_amount;
2416:
2417: IF l_return_status = Fnd_Api.g_ret_sts_error
2418: THEN
2419: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2420: RAISE Fnd_Api.g_exc_error;
2421: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2416:
2417: IF l_return_status = Fnd_Api.g_ret_sts_error
2418: THEN
2419: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2420: RAISE Fnd_Api.g_exc_error;
2421: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2422: THEN
2423: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2424: RAISE Fnd_Api.g_exc_unexpected_error;
2417: IF l_return_status = Fnd_Api.g_ret_sts_error
2418: THEN
2419: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2420: RAISE Fnd_Api.g_exc_error;
2421: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2422: THEN
2423: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2424: RAISE Fnd_Api.g_exc_unexpected_error;
2425: END IF;
2420: RAISE Fnd_Api.g_exc_error;
2421: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2422: THEN
2423: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2424: RAISE Fnd_Api.g_exc_unexpected_error;
2425: END IF;
2426: --
2427: END IF;
2428:
2540: END IF;
2541:
2542: l_utilized_amount := 0;
2543:
2544: IF l_return_status = Fnd_Api.g_ret_sts_error
2545: THEN
2546: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2547: log_exception(l_act_budgets_rec, l_act_util_rec);
2548: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2544: IF l_return_status = Fnd_Api.g_ret_sts_error
2545: THEN
2546: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2547: log_exception(l_act_budgets_rec, l_act_util_rec);
2548: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2549: THEN
2550: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2551: log_exception(l_act_budgets_rec, l_act_util_rec);
2552: END IF;
2622: END IF;
2623:
2624: l_utilized_amount := 0;
2625:
2626: IF l_return_status = Fnd_Api.g_ret_sts_error
2627: THEN
2628: log_exception(l_act_budgets_rec, l_act_util_rec);
2629: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
2630: log_exception(l_act_budgets_rec, l_act_util_rec);
2625:
2626: IF l_return_status = Fnd_Api.g_ret_sts_error
2627: THEN
2628: log_exception(l_act_budgets_rec, l_act_util_rec);
2629: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
2630: log_exception(l_act_budgets_rec, l_act_util_rec);
2631: END IF;
2632:
2633: l_act_budgets_rec := NULL;
2665: FOR i IN l_return_line_tbl.FIRST .. l_return_line_tbl.LAST
2666: LOOP
2667: ---------------------------------------------------------
2668: --
2669: l_return_status := FND_API.g_ret_sts_success; -- bug 3655853
2670:
2671: -- Original value is negtive
2672: l_return_line_tbl(i).invoiced_quantity := -1 * l_return_line_tbl(i).invoiced_quantity;
2673: l_line_amount := l_return_line_tbl(i).invoiced_quantity * l_return_line_tbl(i).unit_selling_price;
2747: ,x_to_amount => l_new_amount
2748: ,x_rate => l_rate);
2749: l_line_amount := l_new_amount;
2750:
2751: IF l_return_status = Fnd_Api.g_ret_sts_error
2752: THEN
2753: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2754: RAISE Fnd_Api.g_exc_error;
2755: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2750:
2751: IF l_return_status = Fnd_Api.g_ret_sts_error
2752: THEN
2753: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2754: RAISE Fnd_Api.g_exc_error;
2755: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2756: THEN
2757: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2758: RAISE Fnd_Api.g_exc_unexpected_error;
2751: IF l_return_status = Fnd_Api.g_ret_sts_error
2752: THEN
2753: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2754: RAISE Fnd_Api.g_exc_error;
2755: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2756: THEN
2757: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2758: RAISE Fnd_Api.g_exc_unexpected_error;
2759: END IF;
2754: RAISE Fnd_Api.g_exc_error;
2755: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2756: THEN
2757: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2758: RAISE Fnd_Api.g_exc_unexpected_error;
2759: END IF;
2760: --
2761: END IF;
2762: --
2775: IF l_net_accrual_offers.custom_setup_id = 105
2776: THEN
2777: --
2778: pv_referral_comp_pub.get_beneficiary (p_api_version => 1.0,
2779: p_init_msg_list => FND_API.g_false,
2780: p_commit => FND_API.g_false,
2781: p_validation_level => FND_API.g_valid_level_full,
2782: p_order_header_id => l_return_line_tbl(i).header_id,
2783: p_order_line_id => l_return_line_tbl(i).line_id,
2776: THEN
2777: --
2778: pv_referral_comp_pub.get_beneficiary (p_api_version => 1.0,
2779: p_init_msg_list => FND_API.g_false,
2780: p_commit => FND_API.g_false,
2781: p_validation_level => FND_API.g_valid_level_full,
2782: p_order_header_id => l_return_line_tbl(i).header_id,
2783: p_order_line_id => l_return_line_tbl(i).line_id,
2784: p_offer_id => l_net_accrual_offers.offer_id,
2777: --
2778: pv_referral_comp_pub.get_beneficiary (p_api_version => 1.0,
2779: p_init_msg_list => FND_API.g_false,
2780: p_commit => FND_API.g_false,
2781: p_validation_level => FND_API.g_valid_level_full,
2782: p_order_header_id => l_return_line_tbl(i).header_id,
2783: p_order_line_id => l_return_line_tbl(i).line_id,
2784: p_offer_id => l_net_accrual_offers.offer_id,
2785: x_beneficiary_id => l_beneficiary_id,
2799: l_referral_id := NULL;
2800: --
2801: END IF;
2802:
2803: IF l_beneficiary_id IS NULL OR l_beneficiary_id = fnd_api.g_miss_num THEN
2804: NULL;
2805: ELSE
2806: l_act_budgets_rec.act_budget_used_by_id := l_net_accrual_offers.qp_list_header_id;
2807: l_act_budgets_rec.arc_act_budget_used_by := 'OFFR';
2850: END IF;
2851:
2852: l_utilized_amount := 0;
2853:
2854: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
2855: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2856: log_exception(l_act_budgets_rec, l_act_util_rec);
2857: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
2858: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2853:
2854: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
2855: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2856: log_exception(l_act_budgets_rec, l_act_util_rec);
2857: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
2858: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2859: log_exception(l_act_budgets_rec, l_act_util_rec);
2860: END IF;
2861: --
2924: END IF;
2925:
2926: l_utilized_amount := 0;
2927:
2928: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
2929: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2930: log_exception(l_act_budgets_rec, l_act_util_rec);
2931: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
2932: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2927:
2928: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
2929: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2930: log_exception(l_act_budgets_rec, l_act_util_rec);
2931: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
2932: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
2933: log_exception(l_act_budgets_rec, l_act_util_rec);
2934: END IF;
2935:
2952: ,l_end_date
2953: ,l_net_accrual_offers.qp_list_header_id)
2954: LOOP
2955: --
2956: l_return_status := FND_API.g_ret_sts_success; -- bug 3655853
2957:
2958: l_customer_qualified := validate_customer(NULL, NULL, l_tm_line.cust_account_id);
2959:
2960: IF l_customer_qualified = 'Y'
2977: ,p_from_amount => l_tm_line.line_amount
2978: ,x_to_amount => l_tm_dedu_line_amt
2979: ,x_rate => l_rate);
2980: --
2981: IF l_return_status = Fnd_Api.g_ret_sts_error
2982: THEN
2983: --
2984: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2985: RAISE Fnd_Api.g_exc_error;
2981: IF l_return_status = Fnd_Api.g_ret_sts_error
2982: THEN
2983: --
2984: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2985: RAISE Fnd_Api.g_exc_error;
2986: --
2987: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2988: THEN
2989: --
2983: --
2984: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2985: RAISE Fnd_Api.g_exc_error;
2986: --
2987: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2988: THEN
2989: --
2990: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2991: RAISE Fnd_Api.g_exc_unexpected_error;
2987: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
2988: THEN
2989: --
2990: ozf_utility_pvt.write_conc_log('Convert currency ' || l_return_status);
2991: RAISE Fnd_Api.g_exc_unexpected_error;
2992: --
2993: END IF;
2994: --
2995: END IF;
2993: END IF;
2994: --
2995: END IF;
2996:
2997: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
2998: RAISE Fnd_Api.g_exc_error;
2999: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
3000: RAISE Fnd_Api.g_exc_unexpected_error;
3001: END IF;
2994: --
2995: END IF;
2996:
2997: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
2998: RAISE Fnd_Api.g_exc_error;
2999: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
3000: RAISE Fnd_Api.g_exc_unexpected_error;
3001: END IF;
3002:
2995: END IF;
2996:
2997: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
2998: RAISE Fnd_Api.g_exc_error;
2999: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
3000: RAISE Fnd_Api.g_exc_unexpected_error;
3001: END IF;
3002:
3003: IF l_tm_dedu_line_amt <> 0
2996:
2997: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
2998: RAISE Fnd_Api.g_exc_error;
2999: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
3000: RAISE Fnd_Api.g_exc_unexpected_error;
3001: END IF;
3002:
3003: IF l_tm_dedu_line_amt <> 0
3004: THEN
3058: ozf_utility_pvt.write_conc_log('Req Curr/Req Amt/Util Amt: ' || l_act_budgets_rec.request_currency || '/' || l_act_budgets_rec.request_amount || '/' || l_utilized_amount);
3059: END IF;
3060: l_utilized_amount := 0;
3061: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
3062: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
3063: log_exception(l_act_budgets_rec, l_act_util_rec);
3064: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
3065: log_exception(l_act_budgets_rec, l_act_util_rec);
3066: END IF;
3060: l_utilized_amount := 0;
3061: ozf_utility_pvt.write_conc_log('Msg from Budget API: '||l_msg_data);
3062: IF l_return_status = Fnd_Api.g_ret_sts_error THEN
3063: log_exception(l_act_budgets_rec, l_act_util_rec);
3064: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
3065: log_exception(l_act_budgets_rec, l_act_util_rec);
3066: END IF;
3067: END IF; -- end amount <> 0
3068:
3112: LOOP
3113: ---------------------------------------------------------
3114: --
3115:
3116: l_return_status := FND_API.g_ret_sts_success;
3117:
3118: l_idsm_line_processed := l_idsm_line_tbl(i).line_id;
3119:
3120: IF G_DEBUG_LOW THEN
3204: ,x_to_amount => l_new_amount
3205: ,x_rate => l_rate);
3206: l_line_amount := l_new_amount;
3207:
3208: IF l_return_status = Fnd_Api.g_ret_sts_error
3209: THEN
3210: ozf_utility_pvt.write_conc_log('Exp Error from Convert_Currency: ' || l_return_status);
3211: RAISE Fnd_Api.g_exc_error;
3212: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3207:
3208: IF l_return_status = Fnd_Api.g_ret_sts_error
3209: THEN
3210: ozf_utility_pvt.write_conc_log('Exp Error from Convert_Currency: ' || l_return_status);
3211: RAISE Fnd_Api.g_exc_error;
3212: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3213: THEN
3214: ozf_utility_pvt.write_conc_log('Unexp Error from Convert_Currency: ' || l_return_status);
3215: RAISE Fnd_Api.g_exc_unexpected_error;
3208: IF l_return_status = Fnd_Api.g_ret_sts_error
3209: THEN
3210: ozf_utility_pvt.write_conc_log('Exp Error from Convert_Currency: ' || l_return_status);
3211: RAISE Fnd_Api.g_exc_error;
3212: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3213: THEN
3214: ozf_utility_pvt.write_conc_log('Unexp Error from Convert_Currency: ' || l_return_status);
3215: RAISE Fnd_Api.g_exc_unexpected_error;
3216: END IF;
3211: RAISE Fnd_Api.g_exc_error;
3212: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3213: THEN
3214: ozf_utility_pvt.write_conc_log('Unexp Error from Convert_Currency: ' || l_return_status);
3215: RAISE Fnd_Api.g_exc_unexpected_error;
3216: END IF;
3217: --
3218: END IF;
3219:
3224: IF G_DEBUG_LOW THEN
3225: ozf_utility_pvt.write_conc_log('Pv_Referral_Comp_Pub.Get_Beneficiary (+)');
3226: END IF;
3227: pv_referral_comp_pub.get_beneficiary (p_api_version => 1.0,
3228: p_init_msg_list => FND_API.g_true,
3229: p_commit => FND_API.g_false,
3230: p_validation_level => FND_API.g_valid_level_full,
3231: p_order_header_id => l_idsm_line_tbl(i).header_id,
3232: p_order_line_id => l_idsm_line_tbl(i).line_id,
3225: ozf_utility_pvt.write_conc_log('Pv_Referral_Comp_Pub.Get_Beneficiary (+)');
3226: END IF;
3227: pv_referral_comp_pub.get_beneficiary (p_api_version => 1.0,
3228: p_init_msg_list => FND_API.g_true,
3229: p_commit => FND_API.g_false,
3230: p_validation_level => FND_API.g_valid_level_full,
3231: p_order_header_id => l_idsm_line_tbl(i).header_id,
3232: p_order_line_id => l_idsm_line_tbl(i).line_id,
3233: p_offer_id => l_net_accrual_offers.offer_id,
3226: END IF;
3227: pv_referral_comp_pub.get_beneficiary (p_api_version => 1.0,
3228: p_init_msg_list => FND_API.g_true,
3229: p_commit => FND_API.g_false,
3230: p_validation_level => FND_API.g_valid_level_full,
3231: p_order_header_id => l_idsm_line_tbl(i).header_id,
3232: p_order_line_id => l_idsm_line_tbl(i).line_id,
3233: p_offer_id => l_net_accrual_offers.offer_id,
3234: x_beneficiary_id => l_beneficiary_id,
3240: ozf_utility_pvt.write_conc_log('Pv_Referral_Comp_Pub.Get_Beneficiary (-) With Status: ' || l_return_status);
3241: ozf_utility_pvt.write_conc_log('l_benificiary_id / l_referral_id: ' || l_beneficiary_id || ' / ' || l_referral_id);
3242: END IF;
3243:
3244: IF l_return_status = Fnd_Api.g_ret_sts_error
3245: THEN
3246: ozf_utility_pvt.write_conc_log('Exp Error from Get_Beneficiary: ' || l_return_status);
3247: RAISE Fnd_Api.g_exc_error;
3248: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3243:
3244: IF l_return_status = Fnd_Api.g_ret_sts_error
3245: THEN
3246: ozf_utility_pvt.write_conc_log('Exp Error from Get_Beneficiary: ' || l_return_status);
3247: RAISE Fnd_Api.g_exc_error;
3248: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3249: THEN
3250: ozf_utility_pvt.write_conc_log('Unexp Error from Get_Beneficiary: ' || l_return_status);
3251: RAISE Fnd_Api.g_exc_unexpected_error;
3244: IF l_return_status = Fnd_Api.g_ret_sts_error
3245: THEN
3246: ozf_utility_pvt.write_conc_log('Exp Error from Get_Beneficiary: ' || l_return_status);
3247: RAISE Fnd_Api.g_exc_error;
3248: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3249: THEN
3250: ozf_utility_pvt.write_conc_log('Unexp Error from Get_Beneficiary: ' || l_return_status);
3251: RAISE Fnd_Api.g_exc_unexpected_error;
3252: END IF;
3247: RAISE Fnd_Api.g_exc_error;
3248: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3249: THEN
3250: ozf_utility_pvt.write_conc_log('Unexp Error from Get_Beneficiary: ' || l_return_status);
3251: RAISE Fnd_Api.g_exc_unexpected_error;
3252: END IF;
3253: --
3254:
3255: IF ( l_beneficiary_id IS NOT NULL )
3306: THEN
3307: --
3308: IF ( l_beneficiary_id IS NULL
3309: OR
3310: l_beneficiary_id = fnd_api.g_miss_num )
3311: THEN
3312: --
3313: -- Benificiay Id can be NULL only for PV Net Accrual Offers
3314: -- If PV decides not to accrue for this customer, it returns NULL
3361: IF G_DEBUG_LOW THEN
3362: ozf_utility_pvt.write_conc_log('Req Curr/Req Amt/Util Amt: ' || l_act_budgets_rec.request_currency || '/' || l_act_budgets_rec.request_amount || '/' || l_utilized_amount);
3363: END IF;
3364:
3365: IF l_return_status = Fnd_Api.g_ret_sts_error
3366: THEN
3367: ozf_utility_pvt.write_conc_log('Exp Error: Process_Act_Budgets: Resale line_id ( ' || l_idsm_line_tbl(i).line_id
3368: || ' ) Error: ' || l_msg_data);
3369: log_exception(l_act_budgets_rec, l_act_util_rec);
3366: THEN
3367: ozf_utility_pvt.write_conc_log('Exp Error: Process_Act_Budgets: Resale line_id ( ' || l_idsm_line_tbl(i).line_id
3368: || ' ) Error: ' || l_msg_data);
3369: log_exception(l_act_budgets_rec, l_act_util_rec);
3370: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3371: THEN
3372: ozf_utility_pvt.write_conc_log('UnExp Error: Process_Act_Budgets: Resale line_id ( ' || l_idsm_line_tbl(i).line_id
3373: || ' ) Error: ' || l_msg_data);
3374: log_exception(l_act_budgets_rec, l_act_util_rec);
3412: l_utilization_type := 'ACCRUAL';
3413: l_reference_type := NULL;
3414: l_referral_id := NULL;
3415:
3416: IF l_beneficiary_id IS NULL OR l_beneficiary_id = fnd_api.g_miss_num
3417: THEN
3418: -- This condition will never occur.
3419: -- For PV offers, the Batch Mode is always NO and Beneficiary is always required
3420: -- for a Net Accrual Offer.
3456: IF G_DEBUG_LOW THEN
3457: ozf_utility_pvt.write_conc_log('Req Curr/Req Amt/Util Amt: ' || l_act_budgets_rec.request_currency || '/' || l_act_budgets_rec.request_amount || '/' || l_utilized_amount);
3458: END IF;
3459:
3460: IF l_return_status = Fnd_Api.g_ret_sts_error
3461: THEN
3462: ozf_utility_pvt.write_conc_log('Exp Error: Process_Act_Budgets Error: ' || l_msg_data );
3463: log_exception(l_act_budgets_rec, l_act_util_rec);
3464: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3460: IF l_return_status = Fnd_Api.g_ret_sts_error
3461: THEN
3462: ozf_utility_pvt.write_conc_log('Exp Error: Process_Act_Budgets Error: ' || l_msg_data );
3463: log_exception(l_act_budgets_rec, l_act_util_rec);
3464: ELSIF l_return_status = Fnd_Api.g_ret_sts_unexp_error
3465: THEN
3466: ozf_utility_pvt.write_conc_log('UnExp Error: Process_Act_Budgets Error: ' || l_msg_data );
3467: log_exception(l_act_budgets_rec, l_act_util_rec);
3468: END IF;
3494:
3495:
3496: Fnd_Msg_Pub.Count_AND_Get(p_count => l_msg_count,
3497: p_data => l_msg_data,
3498: p_encoded => Fnd_Api.G_FALSE);
3499:
3500: EXCEPTION
3501:
3502: WHEN OZF_Utility_PVT.resource_locked THEN
3501:
3502: WHEN OZF_Utility_PVT.resource_locked THEN
3503: OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_API_RESOURCE_LOCKED');
3504:
3505: WHEN FND_API.G_EXC_ERROR THEN
3506: ROLLBACK TO net_accrual_engine;
3507: -- Standard call to get message count and if count=1, get the message
3508: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,
3509: p_count => l_msg_count,
3504:
3505: WHEN FND_API.G_EXC_ERROR THEN
3506: ROLLBACK TO net_accrual_engine;
3507: -- Standard call to get message count and if count=1, get the message
3508: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,
3509: p_count => l_msg_count,
3510: p_data => l_msg_data);
3511:
3512: ERRBUF := l_msg_data;
3511:
3512: ERRBUF := l_msg_data;
3513: RETCODE := '2';
3514:
3515: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3516: ROLLBACK TO net_accrual_engine;
3517: -- Standard call to get message count and if count=1, get the message
3518: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,
3519: p_count => l_msg_count,
3514:
3515: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3516: ROLLBACK TO net_accrual_engine;
3517: -- Standard call to get message count and if count=1, get the message
3518: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,
3519: p_count => l_msg_count,
3520: p_data => l_msg_data);
3521:
3522: ERRBUF := l_msg_data;
3524:
3525: WHEN OTHERS THEN
3526: ROLLBACK TO net_accrual_engine;
3527: -- Standard call to get message count and if count=1, get the message
3528: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,
3529: p_count => l_msg_count,
3530: p_data => l_msg_data);
3531: --ERRBUF := l_msg_data;
3532: ERRBUF := SQLERRM;
3582: BEGIN
3583:
3584: SAVEPOINT retroactive_offer_adj;
3585:
3586: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
3587: Fnd_Msg_Pub.initialize;
3588: END IF;
3589:
3590: x_return_status := Fnd_Api.g_ret_sts_success;
3586: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
3587: Fnd_Msg_Pub.initialize;
3588: END IF;
3589:
3590: x_return_status := Fnd_Api.g_ret_sts_success;
3591:
3592: OPEN c_offer_type;
3593: FETCH c_offer_type INTO l_offer_type, l_tier_level, l_qp_list_header_id, l_custom_setup_id;
3594: CLOSE c_offer_type;
3609: END IF;
3610: END LOOP;
3611:
3612: EXCEPTION
3613: WHEN Fnd_Api.G_EXC_ERROR THEN
3614: x_return_status := Fnd_Api.g_ret_sts_error;
3615: ROLLBACK TO retroactive_offer_adj;
3616: Fnd_Msg_Pub.Count_AND_Get
3617: ( p_count => x_msg_count,
3610: END LOOP;
3611:
3612: EXCEPTION
3613: WHEN Fnd_Api.G_EXC_ERROR THEN
3614: x_return_status := Fnd_Api.g_ret_sts_error;
3615: ROLLBACK TO retroactive_offer_adj;
3616: Fnd_Msg_Pub.Count_AND_Get
3617: ( p_count => x_msg_count,
3618: p_data => x_msg_data,
3615: ROLLBACK TO retroactive_offer_adj;
3616: Fnd_Msg_Pub.Count_AND_Get
3617: ( p_count => x_msg_count,
3618: p_data => x_msg_data,
3619: p_encoded => Fnd_Api.G_FALSE
3620: );
3621: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
3622: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3623: ROLLBACK TO retroactive_offer_adj;
3617: ( p_count => x_msg_count,
3618: p_data => x_msg_data,
3619: p_encoded => Fnd_Api.G_FALSE
3620: );
3621: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
3622: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3623: ROLLBACK TO retroactive_offer_adj;
3624: Fnd_Msg_Pub.Count_AND_Get
3625: ( p_count => x_msg_count,
3618: p_data => x_msg_data,
3619: p_encoded => Fnd_Api.G_FALSE
3620: );
3621: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
3622: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3623: ROLLBACK TO retroactive_offer_adj;
3624: Fnd_Msg_Pub.Count_AND_Get
3625: ( p_count => x_msg_count,
3626: p_data => x_msg_data,
3623: ROLLBACK TO retroactive_offer_adj;
3624: Fnd_Msg_Pub.Count_AND_Get
3625: ( p_count => x_msg_count,
3626: p_data => x_msg_data,
3627: p_encoded => Fnd_Api.G_FALSE
3628: );
3629: WHEN OTHERS THEN
3630: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3631: ROLLBACK TO retroactive_offer_adj;
3626: p_data => x_msg_data,
3627: p_encoded => Fnd_Api.G_FALSE
3628: );
3629: WHEN OTHERS THEN
3630: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3631: ROLLBACK TO retroactive_offer_adj;
3632: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
3633: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3634: END IF;
3634: END IF;
3635: Fnd_Msg_Pub.Count_AND_Get
3636: ( p_count => x_msg_count,
3637: p_data => x_msg_data,
3638: p_encoded => Fnd_Api.G_FALSE
3639: );
3640:
3641: END retroactive_offer_adj;
3642:
3697:
3698: BEGIN
3699: SAVEPOINT offer_adj_new_product;
3700:
3701: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
3702: Fnd_Msg_Pub.initialize;
3703: END IF;
3704:
3705: x_return_status := Fnd_Api.g_ret_sts_success;
3701: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
3702: Fnd_Msg_Pub.initialize;
3703: END IF;
3704:
3705: x_return_status := Fnd_Api.g_ret_sts_success;
3706:
3707: OPEN c_offer_type;
3708: FETCH c_offer_type INTO l_offer_type,
3709: l_tier_level,
3758: --
3759: END LOOP;
3760:
3761: EXCEPTION
3762: WHEN Fnd_Api.G_EXC_ERROR THEN
3763: x_return_status := Fnd_Api.g_ret_sts_error;
3764: ROLLBACK TO offer_adj_new_product;
3765: Fnd_Msg_Pub.Count_AND_Get
3766: ( p_count => x_msg_count,
3759: END LOOP;
3760:
3761: EXCEPTION
3762: WHEN Fnd_Api.G_EXC_ERROR THEN
3763: x_return_status := Fnd_Api.g_ret_sts_error;
3764: ROLLBACK TO offer_adj_new_product;
3765: Fnd_Msg_Pub.Count_AND_Get
3766: ( p_count => x_msg_count,
3767: p_data => x_msg_data,
3764: ROLLBACK TO offer_adj_new_product;
3765: Fnd_Msg_Pub.Count_AND_Get
3766: ( p_count => x_msg_count,
3767: p_data => x_msg_data,
3768: p_encoded => Fnd_Api.G_FALSE
3769: );
3770: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
3771: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3772: ROLLBACK TO offer_adj_new_product;
3766: ( p_count => x_msg_count,
3767: p_data => x_msg_data,
3768: p_encoded => Fnd_Api.G_FALSE
3769: );
3770: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
3771: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3772: ROLLBACK TO offer_adj_new_product;
3773: Fnd_Msg_Pub.Count_AND_Get
3774: ( p_count => x_msg_count,
3767: p_data => x_msg_data,
3768: p_encoded => Fnd_Api.G_FALSE
3769: );
3770: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
3771: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3772: ROLLBACK TO offer_adj_new_product;
3773: Fnd_Msg_Pub.Count_AND_Get
3774: ( p_count => x_msg_count,
3775: p_data => x_msg_data,
3772: ROLLBACK TO offer_adj_new_product;
3773: Fnd_Msg_Pub.Count_AND_Get
3774: ( p_count => x_msg_count,
3775: p_data => x_msg_data,
3776: p_encoded => Fnd_Api.G_FALSE
3777: );
3778: WHEN OTHERS THEN
3779: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3780: ROLLBACK TO offer_adj_new_product;
3775: p_data => x_msg_data,
3776: p_encoded => Fnd_Api.G_FALSE
3777: );
3778: WHEN OTHERS THEN
3779: x_return_status := Fnd_Api.g_ret_sts_unexp_error;
3780: ROLLBACK TO offer_adj_new_product;
3781: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
3782: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3783: END IF;
3783: END IF;
3784: Fnd_Msg_Pub.Count_AND_Get
3785: ( p_count => x_msg_count,
3786: p_data => x_msg_data,
3787: p_encoded => Fnd_Api.G_FALSE
3788: );
3789:
3790: END offer_adj_new_product;
3791: