509: l_message := FND_MESSAGE.GET;
510:
511: --Update the lines_tmp table with the translated error message.
512: /*
513: INDX,qp_limit_balance_check_pvt.recheck_balance.upd1,qp_npreq_lines_tmp_N1,LINE_INDEX,1
514: */
515: --sql statement upd1
516: UPDATE qp_npreq_lines_tmp
517: SET pricing_status_text = l_message,
512: /*
513: INDX,qp_limit_balance_check_pvt.recheck_balance.upd1,qp_npreq_lines_tmp_N1,LINE_INDEX,1
514: */
515: --sql statement upd1
516: UPDATE qp_npreq_lines_tmp
517: SET pricing_status_text = l_message,
518: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
519: WHERE line_index = g_limit_balance_line(i).line_index;
520:
553: l_message := FND_MESSAGE.GET;
554:
555: --Update the lines_tmp table with the translated error message.
556: /*
557: INDX,qp_limit_balance_check_pvt.recheck_balance.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
558: */
559: --sql statement upd3
560: UPDATE qp_npreq_lines_tmp
561: SET pricing_status_text = l_message,
556: /*
557: INDX,qp_limit_balance_check_pvt.recheck_balance.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
558: */
559: --sql statement upd3
560: UPDATE qp_npreq_lines_tmp
561: SET pricing_status_text = l_message,
562: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
563: WHERE line_index = g_limit_balance_line(i).line_index;
564:
636: l_message := FND_MESSAGE.GET;
637:
638: --Update the lines_tmp table with the translated error message.
639: /*
640: INDX,qp_limit_balance_check_pvt.recheck_balance.upd5,qp_npreq_lines_tmp_N1,LINE_INDEX,1
641: */
642: --sql statement upd5
643: UPDATE qp_npreq_lines_tmp
644: SET pricing_status_text = l_message,
639: /*
640: INDX,qp_limit_balance_check_pvt.recheck_balance.upd5,qp_npreq_lines_tmp_N1,LINE_INDEX,1
641: */
642: --sql statement upd5
643: UPDATE qp_npreq_lines_tmp
644: SET pricing_status_text = l_message,
645: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
646: WHERE line_index = g_limit_balance_line(i).line_index;
647:
680: l_message := FND_MESSAGE.GET;
681:
682: --Update the lines_tmp table with the translated error message.
683: /*
684: INDX,qp_limit_balance_check_pvt.recheck_balance.upd7,qp_npreq_lines_tmp_N1,LINE_INDEX,1
685: */
686: --sql statement upd7
687: UPDATE qp_npreq_lines_tmp
688: SET pricing_status_text = l_message,
683: /*
684: INDX,qp_limit_balance_check_pvt.recheck_balance.upd7,qp_npreq_lines_tmp_N1,LINE_INDEX,1
685: */
686: --sql statement upd7
687: UPDATE qp_npreq_lines_tmp
688: SET pricing_status_text = l_message,
689: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
690: WHERE line_index = g_limit_balance_line(i).line_index;
691:
1003: l_message := FND_MESSAGE.GET;
1004:
1005: --Update the lines_tmp table with the translated error message.
1006: /*
1007: INDX,qp_limit_balance_check_pvt.check_balance.upd9,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1008: */
1009: --sql statement upd9
1010: UPDATE qp_npreq_lines_tmp
1011: SET pricing_status_text = l_message,
1006: /*
1007: INDX,qp_limit_balance_check_pvt.check_balance.upd9,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1008: */
1009: --sql statement upd9
1010: UPDATE qp_npreq_lines_tmp
1011: SET pricing_status_text = l_message,
1012: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
1013: WHERE line_index = g_limit_balance_line(i).line_index;
1014:
1043: l_message := FND_MESSAGE.GET;
1044:
1045: --Update the lines_tmp table with the translated error message.
1046: /*
1047: INDX,qp_limit_balance_check_pvt.check_balance.upd1,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1048: */
1049: --sql statement upd1
1050: UPDATE qp_npreq_lines_tmp
1051: SET pricing_status_text = l_message,
1046: /*
1047: INDX,qp_limit_balance_check_pvt.check_balance.upd1,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1048: */
1049: --sql statement upd1
1050: UPDATE qp_npreq_lines_tmp
1051: SET pricing_status_text = l_message,
1052: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
1053: WHERE line_index = g_limit_balance_line(i).line_index;
1054:
1087: l_message := FND_MESSAGE.GET;
1088: l_message := substr(ltrim(rtrim(l_message))||l_message, 1, 2000);
1089: --Update the lines_tmp table with the translated error message.
1090: /*
1091: INDX,qp_limit_balance_check_pvt.check_balance.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1092: */
1093: --sql statement upd3
1094: UPDATE qp_npreq_lines_tmp
1095: SET pricing_status_text = l_message,
1090: /*
1091: INDX,qp_limit_balance_check_pvt.check_balance.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1092: */
1093: --sql statement upd3
1094: UPDATE qp_npreq_lines_tmp
1095: SET pricing_status_text = l_message,
1096: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
1097: WHERE line_index = g_limit_balance_line(i).line_index;
1098:
1533: l_message := FND_MESSAGE.GET;
1534:
1535: --Update the lines_tmp table with the translated error message.
1536: /*
1537: INDX,qp_limit_balance_check_pvt.check_balance.upd11,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1538: */
1539: --sql statement upd11
1540: UPDATE qp_npreq_lines_tmp
1541: SET pricing_status_text = l_message,
1536: /*
1537: INDX,qp_limit_balance_check_pvt.check_balance.upd11,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1538: */
1539: --sql statement upd11
1540: UPDATE qp_npreq_lines_tmp
1541: SET pricing_status_text = l_message,
1542: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
1543: WHERE line_index = g_limit_balance_line(i).line_index;
1544:
1573: l_message := FND_MESSAGE.GET;
1574:
1575: --Update the lines_tmp table with the translated error message.
1576: /*
1577: INDX,qp_limit_balance_check_pvt.check_balance.upd5,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1578: */
1579: --sql statement upd5
1580: UPDATE qp_npreq_lines_tmp
1581: SET pricing_status_text = l_message,
1576: /*
1577: INDX,qp_limit_balance_check_pvt.check_balance.upd5,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1578: */
1579: --sql statement upd5
1580: UPDATE qp_npreq_lines_tmp
1581: SET pricing_status_text = l_message,
1582: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
1583: WHERE line_index = g_limit_balance_line(i).line_index;
1584:
1619: l_message := substr(ltrim(rtrim(l_message))||l_message, 1, 2000);
1620:
1621: --Update the lines_tmp table with the translated error message.
1622: /*
1623: INDX,qp_limit_balance_check_pvt.check_balance.upd7,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1624: */
1625: --sql statement upd7
1626: UPDATE qp_npreq_lines_tmp
1627: SET pricing_status_text = l_message,
1622: /*
1623: INDX,qp_limit_balance_check_pvt.check_balance.upd7,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1624: */
1625: --sql statement upd7
1626: UPDATE qp_npreq_lines_tmp
1627: SET pricing_status_text = l_message,
1628: pricing_status_code = QP_PREQ_GRP.G_STATUS_OTHER_ERRORS
1629: WHERE line_index = g_limit_balance_line(i).line_index;
1630:
1896: INDX,qp_limit_balance_check_pvt.process_limits.limits_cur,qp_npreq_line_attrs_tmp_N2,CONTEXT,3
1897: INDX,qp_limit_balance_check_pvt.process_limits.limits_cur,qp_npreq_line_attrs_tmp_N2,ATTRIBUTE,4
1898: INDX,qp_limit_balance_check_pvt.process_limits.limits_cur,qp_npreq_line_attrs_tmp_N2,VALUE_FROM,5
1899: INDX,qp_limit_balance_check_pvt.process_limits.limits_cur,qp_npreq_line_attrs_tmp_N2,LINE_INDEX,6
1900: INDX,qp_limit_balance_check_pvt.process_limits.limits_cur,qp_npreq_lines_tmp_N1,LINE_INDEX,1
1901: */
1902: CURSOR limits_cur
1903: IS
1904: --Statement to select line-level limits for pure Non-each and mixed cases
1935: r.benefit_qty * q.priced_quantity) accrual_wanted, -- 3598337, see bug for explanation*/
1936: r.benefit_qty accrual_wanted, --4328118, see bug for explanation.
1937: q.priced_quantity quantity_wanted
1938: FROM qp_npreq_ldets_tmp r, qp_limits l,
1939: qp_limit_attributes a, qp_npreq_line_attrs_tmp rl, qp_npreq_lines_tmp q
1940: WHERE r.created_from_list_header_id = l.list_header_id
1941: AND r.created_from_list_line_id = l.list_line_id
1942: AND r.pricing_status_code = QP_PREQ_GRP.G_STATUS_NEW
1943: AND r.applied_flag = 'Y' -- [5385851/5322832]
2003: QP_PREQ_GRP.G_LUMPSUM_DISCOUNT, r.benefit_qty,
2004: r.benefit_qty * q.priced_quantity) accrual_wanted, -- 3598337, see bug for explanation*/
2005: r.benefit_qty accrual_wanted, --4328118, see bug for explanation.
2006: q.priced_quantity quantity_wanted
2007: FROM qp_npreq_ldets_tmp r, qp_limits l, qp_npreq_lines_tmp q
2008: WHERE r.created_from_list_header_id = l.list_header_id
2009: AND r.created_from_list_line_id = l.list_line_id
2010: AND r.pricing_status_code = QP_PREQ_GRP.G_STATUS_NEW
2011: AND r.applied_flag = 'Y' -- [5385851/5322832]
2049: r.benefit_qty * q.priced_quantity) accrual_wanted, -- 3598337, see bug for explanation*/
2050: r.benefit_qty accrual_wanted, --4328118, see bug for explanation.
2051: q.priced_quantity quantity_wanted
2052: FROM qp_npreq_ldets_tmp r, qp_limits l,
2053: qp_limit_attributes a, qp_npreq_line_attrs_tmp rl, qp_npreq_lines_tmp q
2054: WHERE r.created_from_list_header_id = l.list_header_id
2055: AND l.list_line_id = -1
2056: AND r.pricing_status_code = QP_PREQ_GRP.G_STATUS_NEW
2057: AND r.applied_flag = 'Y' -- [5385851/5322832]
2117: QP_PREQ_GRP.G_LUMPSUM_DISCOUNT, r.benefit_qty,
2118: r.benefit_qty * q.priced_quantity) accrual_wanted, -- 3598337, see bug for explanation*/
2119: r.benefit_qty accrual_wanted, --4328118, see bug for explanation.
2120: q.priced_quantity quantity_wanted
2121: FROM qp_npreq_ldets_tmp r, qp_limits l, qp_npreq_lines_tmp q
2122: WHERE r.created_from_list_header_id = l.list_header_id
2123: AND l.list_line_id = -1
2124: AND r.pricing_status_code = QP_PREQ_GRP.G_STATUS_NEW
2125: AND r.applied_flag = 'Y' -- [5385851/5322832]
2450:
2451: END IF;
2452: --Update Hold_Code
2453: /*
2454: INDX,qp_limit_balance_check_pvt.process_limits.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
2455: */
2456: --sql statement upd3
2457: UPDATE qp_npreq_lines_tmp
2458: SET hold_code = DECODE(hold_code, QP_PREQ_GRP.G_STATUS_LIMIT_HOLD, QP_PREQ_GRP.G_STATUS_LIMIT_HOLD, l_hold_code)
2453: /*
2454: INDX,qp_limit_balance_check_pvt.process_limits.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
2455: */
2456: --sql statement upd3
2457: UPDATE qp_npreq_lines_tmp
2458: SET hold_code = DECODE(hold_code, QP_PREQ_GRP.G_STATUS_LIMIT_HOLD, QP_PREQ_GRP.G_STATUS_LIMIT_HOLD, l_hold_code)
2459: WHERE line_index = g_limit_balance_line(j).line_index;
2460:
2461: IF l_debug = FND_API.G_TRUE THEN
2845: g_limit_balance_line(j).operand_value);
2846:
2847: END IF;
2848: /*
2849: INDX,qp_limit_balance_check_pvt.process_limits.upd9,qp_npreq_lines_tmp_N1,LINE_INDEX,1
2850: */
2851: --sql statement upd9
2852:
2853: UPDATE qp_npreq_lines_tmp
2849: INDX,qp_limit_balance_check_pvt.process_limits.upd9,qp_npreq_lines_tmp_N1,LINE_INDEX,1
2850: */
2851: --sql statement upd9
2852:
2853: UPDATE qp_npreq_lines_tmp
2854: SET hold_code = DECODE(hold_code, QP_PREQ_GRP.G_STATUS_LIMIT_HOLD, QP_PREQ_GRP.G_STATUS_LIMIT_HOLD, l_hold_code)
2855: WHERE line_index = g_limit_balance_line(j).line_index;
2856:
2857: IF g_limit_balance_line(j).transaction_amount is null THEN