DBA Data[Home] [Help]

APPS.QP_PREQ_PUB dependencies on QP_NPREQ_LINES_TMP

Line 108: FROM qp_npreq_lines_tmp;

104: indxno index used
105: */
106: CURSOR l_currency_code_cur IS
107: SELECT currency_code
108: FROM qp_npreq_lines_tmp;
109:
110: /*
111: indxno index used
112: */

Line 116: FROM qp_npreq_lines_tmp;

112: */
113: CURSOR l_min_max_eff_date_cur IS
114: SELECT MIN(pricing_effective_date)
115: , MAX(pricing_effective_date)
116: FROM qp_npreq_lines_tmp;
117:
118: /*
119: indxno index used
120: */

Line 126: FROM qp_npreq_lines_tmp;

122: SELECT line_index
123: , line_quantity
124: , priced_quantity
125: , unit_price
126: FROM qp_npreq_lines_tmp;
127:
128: l_attr_sourcing_rec l_attr_sourcing_cur%ROWTYPE;
129:
130: l_bypass_pricing VARCHAR2(30);

Line 174: UPDATE qp_npreq_lines_tmp

170:
171:
172: --update request_type_code to lines_tmp
173:
174: UPDATE qp_npreq_lines_tmp
175: SET request_type_code = p_control_rec.request_type_code
176: WHERE request_type_code IS NULL;
177:
178: IF l_debug = FND_API.G_TRUE THEN

Line 203: UPDATE qp_npreq_lines_tmp SET

199: BEGIN
200: /*
201: indx no index used
202: */
203: UPDATE qp_npreq_lines_tmp SET
204: unit_price = l_FIXED_PRICE,
205: adjusted_unit_price = l_FIXED_PRICE,
206: pricing_status_code = G_STATUS_UPDATED
207: WHERE unit_price IS NULL

Line 274: /* update qp_npreq_lines_tmp set price_flag = G_PHASE

270: -- Not needed as this is being done in OM. Also OC folks got affected by this change wherein order level
271: -- adjustments were not getting applied on a service line pricing
272: -- Talked to Amy 01/14/03 and she confirmed that we can comment out this update
273:
274: /* update qp_npreq_lines_tmp set price_flag = G_PHASE
275: where line_type_code = G_ORDER_LEVEL
276: and exists(select 'Y' from qp_npreq_lines_tmp
277: where price_flag in (G_PHASE,G_NO,G_CALCULATE_ONLY)
278: and line_type_code = G_LINE_LEVEL); */

Line 276: and exists(select 'Y' from qp_npreq_lines_tmp

272: -- Talked to Amy 01/14/03 and she confirmed that we can comment out this update
273:
274: /* update qp_npreq_lines_tmp set price_flag = G_PHASE
275: where line_type_code = G_ORDER_LEVEL
276: and exists(select 'Y' from qp_npreq_lines_tmp
277: where price_flag in (G_PHASE,G_NO,G_CALCULATE_ONLY)
278: and line_type_code = G_LINE_LEVEL); */
279:
280: IF l_debug = FND_API.G_TRUE THEN

Line 395: FROM qp_npreq_lines_tmp;

391: , decode(l_price_phase_flag, G_YES, qp_number.number_to_canonical(nvl(LINE_QUANTITY, 0)), G_NO, qp_number.number_to_canonical(NVL(nvl(PRICED_QUANTITY, LINE_QUANTITY), 0)), 0)
392: , NULL
393: , NULL
394: , NULL
395: FROM qp_npreq_lines_tmp;
396:
397: IF l_debug = FND_API.G_TRUE THEN
398: QP_PREQ_GRP.engine_debug('QP_PREQ_PUB after insert source line quantity ');
399: END IF;

Line 487: FROM qp_npreq_lines_tmp;

483: , decode(l_price_phase_flag, G_YES, qp_number.number_to_canonical(nvl(LINE_QUANTITY * UNIT_PRICE, 0)), G_NO, qp_number.number_to_canonical(NVL(nvl(PRICED_QUANTITY, LINE_QUANTITY), 0) * nvl(UNIT_PRICE, 0)), 0)
484: , NULL
485: , NULL
486: , NULL
487: FROM qp_npreq_lines_tmp;
488: IF l_debug = FND_API.G_TRUE THEN
489: QP_PREQ_GRP.engine_debug('QP_PREQ_PUB after insert source line amt ');
490: END IF;
491: END IF; --sourcing volume attributes performance changes

Line 510: FROM qp_npreq_lines_tmp

506: BEGIN
507: --populate G_ORDER_PRICE_REQUEST_CODE for limits
508: SELECT line_id
509: INTO l_order_header_id
510: FROM qp_npreq_lines_tmp
511: WHERE line_type_code = G_ORDER_LEVEL;
512: IF l_debug = FND_API.G_TRUE THEN
513: QP_PREQ_GRP.engine_debug('l_order_header_id '|| l_order_header_id);
514: END IF;

Line 539: FROM qp_npreq_lines_tmp

535: END IF;
536: BEGIN
537: --populate price_request_code if not passed
538: SELECT G_YES INTO l_null_price_req_code
539: FROM qp_npreq_lines_tmp
540: WHERE price_request_code IS NULL
541: AND price_flag IN (G_YES, G_PHASE)
542: AND ROWNUM = 1;
543:

Line 545: UPDATE qp_npreq_lines_tmp SET

541: AND price_flag IN (G_YES, G_PHASE)
542: AND ROWNUM = 1;
543:
544: IF l_null_price_req_code = G_YES THEN
545: UPDATE qp_npreq_lines_tmp SET
546: price_request_code = decode(line_type_code,
547: G_ORDER_LEVEL, QP_PREQ_GRP.G_ORDER_PRICE_REQUEST_CODE
548: , G_LINE_LEVEL, QP_PREQ_GRP.G_ORDER_PRICE_REQUEST_CODE || '-' || nvl(line_id, qp_limit_price_request_code_s.NEXTVAL))
549: WHERE price_request_code IS NULL

Line 634: from qp_npreq_lines_tmp line, qp_npreq_ldets_tmp ldet

630: for cl in
631: (select line.line_index, ldet.line_detail_index,
632: ldet.created_from_list_line_id, ldet.modifier_level_code,
633: line.priced_quantity, line.parent_quantity, line.unit_price
634: from qp_npreq_lines_tmp line, qp_npreq_ldets_tmp ldet
635: where line.line_index = l_line_index
636: and line.pricing_status_code in (G_STATUS_NEW, G_STATUS_UPDATED)
637: and line.price_flag in (G_YES, G_PHASE)
638: and line.line_type_code = G_LINE_LEVEL

Line 701: qp_npreq_lines_tmp line,

697: --this lumpsum_qty will be used to prorate the lumpsum adj_amt
698: for cl1 in (select line.line_index, lattr.value_from,
699: line.parent_quantity, ldet.line_detail_index
700: from qp_npreq_ldets_tmp ldet,
701: qp_npreq_lines_tmp line,
702: qp_npreq_line_attrs_tmp lattr
703: where ldet.created_from_list_line_id = cl.created_from_list_line_id
704: and ldet.pricing_status_code = G_STATUS_NEW
705: and ldet.applied_flag = G_YES

Line 762: from qp_npreq_lines_tmp line

758: END LOOP;--while
759:
760: /*
761: for cl3 in (select sum(line.parent_quantity) lumpsum_qty
762: from qp_npreq_lines_tmp line
763: --qp_npreq_line_attrs_tmp ldetattr, qp_npreq_line_attrs_tmp lattr,
764: where ldetattr.line_index = cl.line_index
765: and line.priced_uom_code <> line.line_uom_code
766: and ldetattr.context = QP_PREQ_GRP.G_PRIC_VOLUME_CONTEXT

Line 1135: qp_npreq_lines_tmp line

1131: line.line_quantity ordered_qty
1132: -- line.unit_price,
1133: -- line.adjusted_unit_price
1134: FROM qp_npreq_ldets_tmp ldet,
1135: qp_npreq_lines_tmp line
1136: WHERE ldet.pricing_phase_id > 1
1137: AND ldet.pricing_status_code = G_STATUS_NEW
1138: AND ldet.automatic_flag = G_NO
1139: AND nvl(ldet.applied_flag, G_NO) = G_NO

Line 1251: --this will be indicated in processed_flag = 'C' in qp_npreq_lines_tmp

1247: --For bug 2447181 for changed lines functionality
1248: --to indicate to the calling application to make a subsequent pricing
1249: --call with calculate_only and to pass all lines when they are calling
1250: --with changed lines in case there are new/changed order level modifiers
1251: --this will be indicated in processed_flag = 'C' in qp_npreq_lines_tmp
1252: --on the summary linE
1253: PROCEDURE CHECK_ORDER_LINE_CHANGES(p_request_type_code IN VARCHAR2,
1254: p_full_pricing_call IN VARCHAR2,
1255: x_return_status OUT NOCOPY VARCHAR2,

Line 1291: FROM qp_npreq_lines_tmp

1287: QP_PREQ_GRP.engine_debug('starting order line check ');
1288: END IF;
1289: BEGIN
1290: SELECT line_id INTO l_header_id
1291: FROM qp_npreq_lines_tmp
1292: WHERE line_type_code = G_ORDER_LEVEL
1293: AND pricing_status_code IN (G_STATUS_UPDATED,
1294: G_STATUS_UNCHANGED, G_STATUS_GSA_VIOLATION);
1295: EXCEPTION

Line 1363: UPDATE qp_npreq_lines_tmp SET

1359: THEN
1360: --order level modifiers are mostly % based
1361: -- so if the total % of order level modifiers do not match
1362: --then caller needs to recalculate
1363: UPDATE qp_npreq_lines_tmp SET
1364: processed_flag = G_CALCULATE_ONLY
1365: WHERE line_type_code = G_ORDER_LEVEL;
1366: END IF;
1367: END IF; --l_exist_changed_order_adj

Line 1380: FROM qp_npreq_lines_tmp

1376: END IF;
1377: --check if there is a summary line passed and it has no errors
1378: BEGIN
1379: SELECT line_id INTO l_header_id
1380: FROM qp_npreq_lines_tmp
1381: WHERE line_type_code = G_ORDER_LEVEL
1382: AND pricing_status_code IN (G_STATUS_UPDATED,
1383: G_STATUS_UNCHANGED, G_STATUS_GSA_VIOLATION);
1384: EXCEPTION

Line 1459: UPDATE qp_npreq_lines_tmp SET

1455: THEN
1456: --order level modifiers are mostly % based
1457: -- so if the total % of order level modifiers do not match
1458: --then caller needs to recalculate
1459: UPDATE qp_npreq_lines_tmp SET
1460: processed_flag = G_CALCULATE_ONLY
1461: WHERE line_type_code = G_ORDER_LEVEL;
1462: END IF; --l_ldet_sum_operand
1463: END IF; --l_exist_changed_order_adj

Line 2771: qp_npreq_lines_tmp line,

2767: nvl(line.priced_quantity, line.line_quantity))
2768: FROM
2769: qp_npreq_ldets_tmp ldet,
2770: qp_npreq_ldets_tmp ldet_pbh,
2771: qp_npreq_lines_tmp line,
2772: qp_pricing_attributes qpa
2773: WHERE
2774: ldet.line_detail_index = rltd.related_line_detail_index
2775: AND ldet_pbh.line_detail_index = rltd.line_detail_index

Line 2826: FROM qp_npreq_lines_tmp line,

2822: FUNCTION CHECK_GSA_INDICATOR RETURN VARCHAR2 IS
2823:
2824: CURSOR l_check_gsa_ind_cur IS
2825: SELECT 'Y'
2826: FROM qp_npreq_lines_tmp line,
2827: qp_npreq_line_attrs_tmp gsa_attr
2828: WHERE gsa_attr.line_index = line.line_index
2829: AND gsa_attr.pricing_status_code = G_STATUS_UNCHANGED
2830: AND gsa_attr.attribute_type = G_QUALIFIER_TYPE

Line 2873: FROM qp_npreq_lines_tmp line,

2869: SELECT /*+ ORDERED USE_NL(req lhdr lattr qpa ql) index(qpa qp_pricing_attributes_n5) */
2870: line.line_index,
2871: line.adjusted_unit_price,
2872: MIN(ql.operand) operand
2873: FROM qp_npreq_lines_tmp line,
2874: qp_price_req_sources req,
2875: qp_list_headers_b lhdr,
2876: qp_npreq_line_attrs_tmp lattr,
2877: qp_pricing_attributes qpa,

Line 2918: FROM qp_npreq_lines_tmp line,

2914: SELECT /*+ ORDERED USE_NL(req lhdr lattr qpa ql) index(qpa qp_pricing_attributes_n5) */
2915: line.line_index,
2916: line.adjusted_unit_price,
2917: MIN(ql.operand) operand
2918: FROM qp_npreq_lines_tmp line,
2919: qp_price_req_sources_v req,
2920: qp_list_headers_b lhdr,
2921: qp_npreq_line_attrs_tmp lattr,
2922: qp_pricing_attributes qpa,

Line 3037: UPDATE qp_npreq_lines_tmp

3033: IF l_debug = FND_API.G_TRUE THEN
3034: QP_PREQ_GRP.engine_debug('Before GSA update '|| l_gsa_line_index_tbl.COUNT);
3035: END IF;
3036: FORALL I IN l_gsa_line_index_tbl.FIRST..l_gsa_line_index_tbl.LAST
3037: UPDATE qp_npreq_lines_tmp
3038: SET pricing_status_code = G_STATUS_GSA_VIOLATION,
3039: pricing_status_text =
3040: 'GSA VIOLATION - GSA PRICE '|| l_gsa_sts_text_tbl(I)
3041: WHERE line_index = l_gsa_line_index_tbl(I);

Line 3108: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line

3104: decode(ldet.calculation_code, 'BACK_CALCULATE', 10000,
3105: decode(ldet.created_from_list_line_type, 'DIS',
3106: decode(ldet.applied_flag, G_YES, - 1000, - 100),
3107: decode(ldet.applied_flag, G_YES, 100, 1000)))) precedence
3108: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
3109: WHERE line.line_index = p_line_index
3110: AND line.line_type_code = G_LINE_LEVEL -- sql repos
3111: AND line.price_flag IN (G_YES, G_PHASE)
3112: AND ldet.line_index = line.line_index

Line 3589: FROM qp_npreq_lines_tmp line

3585: /*
3586: SELECT line.line_index, line.unit_price, line.adjusted_unit_price
3587: ,line.line_quantity, line.priced_quantity, line.catchweight_qty,line.actual_order_quantity
3588: , line.rounding_factor
3589: FROM qp_npreq_lines_tmp line
3590: WHERE line.price_flag in (G_YES, G_PHASE,G_CALCULATE_ONLY)
3591: and line.pricing_status_code in (G_STATUS_UPDATED, G_STATUS_UNCHANGED,
3592: G_STATUS_GSA_VIOLATION)
3593: and line.line_type_code = G_LINE_LEVEL

Line 3612: and not exists (select 'Y' from qp_npreq_lines_tmp line2

3608: --as they will not have any adjustments
3609: and line.process_status = G_STATUS_UNCHANGED
3610: --fix for bug 2691794
3611: and nvl(line.processed_flag,'N') <> G_FREEGOOD_LINE;
3612: and not exists (select 'Y' from qp_npreq_lines_tmp line2
3613: where line2.line_id = line.line_id
3614: and line2.line_index <> line.line_index);
3615: */
3616:

Line 3630: FROM qp_npreq_lines_tmp line

3626: , line.pricing_status_code
3627: , line.pricing_status_text
3628: , 0 amount_changed
3629: , line_unit_price
3630: FROM qp_npreq_lines_tmp line
3631: WHERE line.price_flag IN (G_YES, G_PHASE, G_CALCULATE_ONLY)
3632: AND line.pricing_status_code IN (G_STATUS_UPDATED, G_STATUS_UNCHANGED,
3633: G_STATUS_GSA_VIOLATION)
3634: AND line.line_type_code = G_LINE_LEVEL

Line 4036: UPDATE qp_npreq_lines_tmp

4032: QP_PREQ_GRP.engine_debug('unit price needs to be updated');
4033: END IF;
4034:
4035: FORALL i IN l_line_index_tbl.FIRST..l_line_index_tbl.LAST
4036: UPDATE qp_npreq_lines_tmp
4037: SET adjusted_unit_price = l_adj_unit_price_tbl(i)
4038: --, adjusted_unit_price_ur = l_adjusted_unit_price_ur(i) --[prarasto:Post Round], [julin/postround] redesign
4039: , line_unit_price = l_line_unit_price_tbl(i)
4040: , pricing_status_code = nvl(l_pricing_sts_code_tbl(i), G_STATUS_UPDATED) /* bug 3248475 */

Line 4080: UPDATE qp_npreq_lines_tmp line

4076: END IF;
4077:
4078: IF QP_JAVA_ENGINE_UTIL_PUB.Java_Engine_Running = 'N' THEN
4079: /* Modified where clause as per suggestion of spgopal for bug 3401941 */
4080: UPDATE qp_npreq_lines_tmp line
4081: SET pricing_status_code = G_STATUS_UPDATED
4082: --for bug 2812738 not to update if back_calc_error/gsa_violatn
4083: WHERE line.pricing_status_code = G_STATUS_UNCHANGED
4084: --fix for bug 3425569 where frozen lines were set to status updated

Line 5214: -- have to compute list price * qty for the line (query from qp_npreq_lines_tmp)

5210: IF l_debug = FND_API.G_TRUE THEN
5211: QP_PREQ_GRP.engine_debug(t.line_index || ':' || l_prev_bucket_amt_tbl(t.line_index));
5212: END IF; --end debug
5213: ELSE
5214: -- have to compute list price * qty for the line (query from qp_npreq_lines_tmp)
5215: l_prod_line_bucket_amt := nvl(t.priced_quantity, 0) * nvl(t.unit_price, 0);
5216: IF l_debug = FND_API.G_TRUE THEN
5217: QP_PREQ_GRP.engine_debug('* line index '|| t.line_index ||' not in l_prev_bucket_amt_tbl');
5218: QP_PREQ_GRP.engine_debug(' got value '|| l_prod_line_bucket_amt ||' from lines_tmp instead');

Line 7036: UPDATE qp_npreq_lines_tmp

7032: END IF; --l_debug
7033: --===[prarasto:Post Round] End : Calculate rounded values ==--
7034:
7035:
7036: UPDATE qp_npreq_lines_tmp
7037: SET unit_price = l_unit_price_tbl(i),
7038: adjusted_unit_price = l_adj_unit_price_tbl(i), --[prarasto:Post Round]
7039: --adjusted_unit_price_ur = l_adjusted_unit_price_ur(i), --[prarasto:Post Round], [julin/postround] redesign
7040: /* decode(G_ROUND_INDIVIDUAL_ADJ,

Line 7107: INDX,QP_PREQ_PUB.calculate_price.l_line_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1

7103: x_return_status OUT NOCOPY VARCHAR2,
7104: x_return_status_text OUT NOCOPY VARCHAR2) IS
7105:
7106: /*
7107: INDX,QP_PREQ_PUB.calculate_price.l_line_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
7108: */
7109: -- for bug 3820859, to start with adjusted_unit_price should be same as unit_price
7110: -- if not, then the same discount is getting applied twice if limit profile is set, because discounts calculations happens twice -
7111: -- once from QP_PREQ_GRP and then from QP_PREQ_PUB

Line 7121: FROM qp_npreq_lines_tmp line

7117: , line.processed_code
7118: , line.updated_adjusted_unit_price
7119: , line.rounding_factor
7120: , line.pricing_status_code, line.pricing_status_text
7121: FROM qp_npreq_lines_tmp line
7122: WHERE
7123: line.price_flag IN (G_YES, G_PHASE, G_CALCULATE_ONLY)
7124: AND line.line_type_code IN (G_LINE_LEVEL, G_ORDER_LEVEL)
7125: AND line.pricing_status_code IN (G_STATUS_UPDATED

Line 7133: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_INDEX,1

7129: AND line.usage_pricing_type IN
7130: (QP_PREQ_GRP.G_BILLING_TYPE, QP_PREQ_GRP.G_REGULAR_USAGE_TYPE);
7131:
7132: /*
7133: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_INDEX,1
7134: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_TYPE_CODE,2
7135: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
7136: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,LINE_INDEX,1
7137: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,CREATED_FROM_LIST_LINE_TYPE,2

Line 7134: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_TYPE_CODE,2

7130: (QP_PREQ_GRP.G_BILLING_TYPE, QP_PREQ_GRP.G_REGULAR_USAGE_TYPE);
7131:
7132: /*
7133: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_INDEX,1
7134: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_TYPE_CODE,2
7135: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
7136: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,LINE_INDEX,1
7137: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,CREATED_FROM_LIST_LINE_TYPE,2
7138: */

Line 7135: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1

7131:
7132: /*
7133: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_INDEX,1
7134: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_TYPE_CODE,2
7135: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
7136: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,LINE_INDEX,1
7137: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,CREATED_FROM_LIST_LINE_TYPE,2
7138: */
7139: CURSOR l_bucket_price_cur(p_line_index NUMBER) IS -- 2892848

Line 7173: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line

7169: , line.rounding_factor
7170: , G_LINE_LEVEL line_type
7171: , 'N' is_max_frt
7172: , ldet.net_amount_flag
7173: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
7174: --where line.line_index = p_line_index -- 2892848
7175: WHERE ldet.line_index = line.line_index -- 2892848
7176: --and ldet.line_index = line.line_index --2892848
7177: AND line.price_flag IN (G_YES, G_PHASE, G_CALCULATE_ONLY)

Line 7232: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line

7228: , line.rounding_factor
7229: , G_ORDER_LEVEL line_type
7230: , 'N' is_max_frt
7231: , ldet.net_amount_flag
7232: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
7233: , qp_npreq_lines_tmp line1
7234: --where line.line_index = p_line_index -- 2892848
7235: --and ldet.line_index = line1.line_index -- 2892848
7236: WHERE ldet.line_index = line1.line_index -- 2892848

Line 7233: , qp_npreq_lines_tmp line1

7229: , G_ORDER_LEVEL line_type
7230: , 'N' is_max_frt
7231: , ldet.net_amount_flag
7232: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
7233: , qp_npreq_lines_tmp line1
7234: --where line.line_index = p_line_index -- 2892848
7235: --and ldet.line_index = line1.line_index -- 2892848
7236: WHERE ldet.line_index = line1.line_index -- 2892848
7237: AND line1.line_type_code = G_ORDER_LEVEL

Line 8018: -- have to compute list price * qty for the line (query from qp_npreq_lines_tmp)

8014: IF l_debug = FND_API.G_TRUE THEN
8015: QP_PREQ_GRP.engine_debug(t.line_index || ':' || l_prev_bucket_amt_tbl(t.line_index));
8016: END IF; --end debug
8017: ELSE
8018: -- have to compute list price * qty for the line (query from qp_npreq_lines_tmp)
8019: l_prod_line_bucket_amt := nvl(t.priced_quantity, 0) * nvl(t.unit_price, 0);
8020: IF l_debug = FND_API.G_TRUE THEN
8021: QP_PREQ_GRP.engine_debug('* line index '|| t.line_index ||' not in l_prev_bucket_amt_tbl');
8022: QP_PREQ_GRP.engine_debug(' got value '|| l_prod_line_bucket_amt ||' from lines_tmp instead');

Line 9024: INDX,QP_PREQ_PUB.calculate_price.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1

9020:
9021:
9022: IF l_lines_tbl(j).processed_flag = G_PROCESSED THEN
9023: /*
9024: INDX,QP_PREQ_PUB.calculate_price.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
9025: */
9026: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price
9027: = nvl(l_lines_tbl(j).updated_adjusted_unit_price,
9028: l_lines_tbl(j).adjusted_unit_price)

Line 9026: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price

9022: IF l_lines_tbl(j).processed_flag = G_PROCESSED THEN
9023: /*
9024: INDX,QP_PREQ_PUB.calculate_price.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
9025: */
9026: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price
9027: = nvl(l_lines_tbl(j).updated_adjusted_unit_price,
9028: l_lines_tbl(j).adjusted_unit_price)
9029: --, adjusted_unit_price_ur = nvl(l_updated_adj_unit_price_ur(j), --[prarasto:Post Round] added unrounded adjusted unit price, [julin/postround] redesign
9030: -- l_adjusted_unit_price_ur(j))

Line 9049: INDX,QP_PREQ_PUB.calculate_price.upd4,qp_npreq_lines_tmp_N1,LINE_INDEX,1

9045: 'processed_code' || l_lines_tbl(j).processed_code);
9046: END IF;
9047: ELSE
9048: /*
9049: INDX,QP_PREQ_PUB.calculate_price.upd4,qp_npreq_lines_tmp_N1,LINE_INDEX,1
9050: */
9051: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price
9052: = l_lines_tbl(j).adjusted_unit_price
9053: --, adjusted_unit_price_ur = l_adjusted_unit_price_ur(j) --[prarasto:Post Round] added unrounded adjusted unit price, [julin/postround] redesign

Line 9051: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price

9047: ELSE
9048: /*
9049: INDX,QP_PREQ_PUB.calculate_price.upd4,qp_npreq_lines_tmp_N1,LINE_INDEX,1
9050: */
9051: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price
9052: = l_lines_tbl(j).adjusted_unit_price
9053: --, adjusted_unit_price_ur = l_adjusted_unit_price_ur(j) --[prarasto:Post Round] added unrounded adjusted unit price, [julin/postround] redesign
9054: , processed_flag = l_lines_tbl(j).processed_flag
9055: , processed_code = l_lines_tbl(j).processed_code

Line 9110: INDX,QP_PREQ_PUB.calculate_price.upd5,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1

9106: QP_PREQ_GRP.engine_debug('Begin Pub GSA check');
9107:
9108: END IF;
9109: /*
9110: INDX,QP_PREQ_PUB.calculate_price.upd5,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
9111: INDX,QP_PREQ_PUB.calculate_price.upd5,qp_npreq_line_attrs_tmp_N2,LINE_TYPE_CODE,1
9112: INDX,QP_PREQ_PUB.calculate_price.upd5,qp_npreq_line_attrs_tmp_N1,LINE_INDEX,1
9113: INDX,QP_PREQ_PUB.calculate_price.upd5,qp_npreq_line_attrs_tmp_N1,ATTRIBUTE_TYPE,2
9114: INDX,QP_PREQ_PUB.calculate_price.upd5,QP_PRICING_ATTRIBUTES_N5,PRICING_PHASE_ID,1

Line 9137: UPDATE qp_npreq_lines_tmp line

9133: || G_ATTR_MGR_INSTALLED);
9134: END IF;
9135: IF G_ATTR_MGR_INSTALLED = G_NO
9136: THEN
9137: UPDATE qp_npreq_lines_tmp line
9138: SET line.pricing_status_code = G_STATUS_GSA_VIOLATION
9139: , line.pricing_status_text = 'QP_PREQ_PUB: GSA VIOLATION'
9140: WHERE line.line_type_code = G_LINE_LEVEL
9141: --made this change look at only successful lines

Line 9191: UPDATE qp_npreq_lines_tmp line

9187: , line.pricing_effective_date))
9188: AND trunc(nvl(ql.End_date_active
9189: , line.pricing_effective_date)));
9190: ELSE --G_ATTR_MGR_INSTALLED
9191: UPDATE qp_npreq_lines_tmp line
9192: SET line.pricing_status_code = G_STATUS_GSA_VIOLATION
9193: , line.pricing_status_text = 'QP_PREQ_PUB: GSA VIOLATION'
9194: WHERE line.line_type_code = G_LINE_LEVEL
9195: --made this change look at only successful lines

Line 9366: qp_npreq_lines_tmp line,

9362: nvl(line.priced_quantity, line.line_quantity))
9363: qualifier_value
9364: FROM
9365: qp_npreq_rltd_lines_tmp rltd,
9366: qp_npreq_lines_tmp line,
9367: qp_npreq_ldets_tmp ldet,
9368: qp_npreq_ldets_tmp ldet_pbh,
9369: qp_pricing_attributes qpa
9370: WHERE

Line 9444: qp_npreq_lines_tmp line,

9440: ldet.pricing_group_sequence,
9441: nvl(ldet.line_quantity,
9442: nvl(line.priced_quantity, line.line_quantity))
9443: FROM
9444: qp_npreq_lines_tmp line,
9445: qp_npreq_ldets_tmp ldet,
9446: qp_npreq_ldets_tmp ldet_pbh,
9447: qp_pricing_attributes qpa
9448: WHERE

Line 9621: , qp_npreq_lines_tmp line

9617: WHERE ldet.pricing_status_code = G_STATUS_UNCHANGED AND
9618: ldet.applied_flag = G_YES AND
9619: ldet.pricing_phase_id NOT IN (SELECT ev.pricing_phase_id
9620: FROM qp_event_phases ev, qp_pricing_phases ph
9621: , qp_npreq_lines_tmp line
9622: WHERE instr(p_pricing_event, ev.pricing_event_code || ',') > 0
9623: AND ev.pricing_phase_id = ph.pricing_phase_id
9624: AND line.price_flag <> G_CALCULATE_ONLY
9625: AND ((G_GET_FREIGHT_FLAG = G_YES AND ph.freight_exists = G_YES)

Line 9663: (SELECT line.line_index FROM qp_npreq_lines_tmp line

9659: --summary line adjustments with price flag 'N' need to be considered for calc
9660: --reqt from contracts for performance
9661: UPDATE qp_npreq_ldets_tmp ldet SET ldet.process_code = G_STATUS_NEW
9662: WHERE ldet.line_index IN
9663: (SELECT line.line_index FROM qp_npreq_lines_tmp line
9664: WHERE line.line_type_code = G_ORDER_LEVEL
9665: AND line.price_flag = G_NO);
9666:
9667: IF l_debug = FND_API.G_TRUE THEN

Line 9916: FROM qp_npreq_lines_tmp line,

9912: G_LINE_AMT_ATTRIBUTE,
9913: (nvl(line.priced_quantity, line.line_quantity)
9914: * nvl(line.unit_price, 0)),
9915: nvl(line.priced_quantity, line.line_quantity))
9916: FROM qp_npreq_lines_tmp line,
9917: qp_pricing_attributes qpa
9918: WHERE line.line_index = rltd.line_index
9919: AND qpa.list_line_id = rltd.related_list_line_id
9920: AND qpa.pricing_attribute_context =

Line 9923: FROM qp_npreq_lines_tmp line

9919: AND qpa.list_line_id = rltd.related_list_line_id
9920: AND qpa.pricing_attribute_context =
9921: G_PRIC_VOLUME_CONTEXT)
9922: WHERE rltd.line_index IN (SELECT line.line_index
9923: FROM qp_npreq_lines_tmp line
9924: WHERE line.line_index = rltd.line_index
9925: AND rltd.relationship_type_code = G_PBH_LINE
9926: AND line.pricing_status_code IN
9927: (G_STATUS_UNCHANGED, G_STATUS_UPDATED,

Line 10070: FROM qp_npreq_lines_tmp line,

10066: ldet.operand_calculation_code,
10067: ldet.operand_value,
10068: ldet.group_amount,
10069: line.parent_price
10070: FROM qp_npreq_lines_tmp line,
10071: qp_npreq_rltd_lines_tmp rltd,
10072: qp_npreq_ldets_tmp ldet,
10073: qp_pricing_attributes qpa,
10074: qp_npreq_line_attrs_tmp attr

Line 10437: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp line

10433: rltd.related_line_index,
10434: line.unit_price,
10435: line.priced_quantity,
10436: line.priced_uom_code
10437: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp line
10438: WHERE rltd.line_index IS NOT NULL
10439: AND rltd.related_line_index IS NOT NULL
10440: AND rltd.relationship_type_code = G_SERVICE_LINE
10441: AND line.line_index = rltd.line_index;

Line 10469: UPDATE qp_npreq_lines_tmp

10465:
10466: IF l_service_line_tbl.COUNT > 0
10467: THEN
10468: FORALL i IN l_service_line_tbl.FIRST..l_service_line_tbl.LAST
10469: UPDATE qp_npreq_lines_tmp
10470: SET parent_price = l_unit_price_tbl(i),
10471: parent_uom_code = l_priced_uom_code_tbl(i),
10472: processing_order = 2,
10473: parent_quantity = l_priced_quantity_tbl(i)

Line 10476: UPDATE qp_npreq_lines_tmp

10472: processing_order = 2,
10473: parent_quantity = l_priced_quantity_tbl(i)
10474: WHERE line_index = l_service_line_tbl(i);
10475: FORALL i IN l_parent_line_tbl.FIRST..l_parent_line_tbl.LAST
10476: UPDATE qp_npreq_lines_tmp
10477: SET processing_order = 1
10478: WHERE line_index = l_parent_line_tbl(i);
10479: END IF;
10480:

Line 10523: FROM qp_npreq_lines_tmp line, qp_npreq_ldets_tmp ldet

10519: , line.rounding_factor
10520: , line.uom_quantity service_duration
10521: , line.processing_order
10522: , line.parent_price
10523: FROM qp_npreq_lines_tmp line, qp_npreq_ldets_tmp ldet
10524: WHERE line.usage_pricing_type = QP_PREQ_GRP.G_BILLING_TYPE
10525: AND ldet.line_index = line.line_index
10526: AND line.price_flag = G_CALCULATE_ONLY
10527: AND nvl(processing_order, 1) = p_processing_order

Line 10647: UPDATE qp_npreq_lines_tmp

10643: IF l_debug = FND_API.G_TRUE THEN
10644: QP_PREQ_GRP.engine_debug('Begin LINES Usage Pricing LOOP1');
10645: END IF;
10646: FORALL i IN l_line_index_tbl.FIRST..l_line_index_tbl.LAST
10647: UPDATE qp_npreq_lines_tmp
10648: SET unit_price = l_unit_price_tbl(i),
10649: pricing_status_code = l_pricing_sts_code_tbl(i),
10650: pricing_status_text = l_pricing_sts_txt_tbl(i)
10651: WHERE line_index = l_line_index_tbl(i);

Line 10760: UPDATE qp_npreq_lines_tmp

10756: IF l_debug = FND_API.G_TRUE THEN
10757: QP_PREQ_GRP.engine_debug('Begin LINES Usage Pricing LOOP2');
10758: END IF;
10759: FORALL i IN l_line_index_tbl.FIRST..l_line_index_tbl.LAST
10760: UPDATE qp_npreq_lines_tmp
10761: SET unit_price = l_unit_price_tbl(i),
10762: pricing_status_code = l_pricing_sts_code_tbl(i),
10763: pricing_status_text = l_pricing_sts_txt_tbl(i)
10764: WHERE line_index = l_line_index_tbl(i);

Line 10792: FROM qp_npreq_lines_tmp line

10788: FUNCTION Call_Usage_Pricing RETURN VARCHAR2 IS
10789:
10790: CURSOR l_chk_usage_cur IS
10791: SELECT G_YES
10792: FROM qp_npreq_lines_tmp line
10793: WHERE line.pricing_status_code IN
10794: (G_STATUS_UPDATED, G_STATUS_UNCHANGED, G_STATUS_GSA_VIOLATION)
10795: AND line.usage_pricing_type = QP_PREQ_GRP.G_BILLING_TYPE;
10796:

Line 10831: FROM qp_npreq_lines_tmp buyline

10827: oldfgdis.arithmetic_operator operand_calculation_code,
10828: buyline.line_index,
10829: oldprg.list_line_id,
10830: oldprg.updated_flag
10831: FROM qp_npreq_lines_tmp buyline
10832: , qp_event_phases ev
10833: , qp_pricing_phases ph
10834: , oe_price_adjustments oldprg
10835: , oe_price_adj_assocs oldrltd

Line 10837: , qp_npreq_lines_tmp oldfreeline

10833: , qp_pricing_phases ph
10834: , oe_price_adjustments oldprg
10835: , oe_price_adj_assocs oldrltd
10836: , oe_price_adjustments oldfgdis
10837: , qp_npreq_lines_tmp oldfreeline
10838: --where G_REQUEST_TYPE_CODE = 'ONT'
10839: --bug 3085453 handle pricing availability UI
10840: -- they pass reqtype ONT and insert adj into ldets
10841: --bug 3085453 handle pricing availability UI

Line 10882: FROM qp_npreq_lines_tmp buyline

10878: oldfgdis.arithmetic_operator operand_calculation_code,
10879: buyline.line_index,
10880: oldprg.list_line_id,
10881: oldprg.updated_flag
10882: FROM qp_npreq_lines_tmp buyline
10883: , qp_event_phases ev
10884: , qp_pricing_phases ph
10885: , oe_price_adjustments oldprg
10886: , oe_price_adj_assocs oldrltd

Line 10888: , qp_npreq_lines_tmp oldfreeline

10884: , qp_pricing_phases ph
10885: , oe_price_adjustments oldprg
10886: , oe_price_adj_assocs oldrltd
10887: , oe_price_adjustments oldfgdis
10888: , qp_npreq_lines_tmp oldfreeline
10889: --where G_REQUEST_TYPE_CODE = 'ONT'
10890: --bug 3085453 handle pricing availability UI
10891: -- they pass reqtype ONT and insert adj into ldets
10892: WHERE QP_PREQ_PUB.G_CHECK_CUST_VIEW_FLAG = G_YES

Line 10932: FROM qp_npreq_lines_tmp buyline

10928: oldfgdis.operand_calculation_code,
10929: buyline.line_index,
10930: oldprg.created_from_list_line_id,
10931: oldprg.updated_flag
10932: FROM qp_npreq_lines_tmp buyline
10933: , qp_event_phases ev
10934: , qp_pricing_phases ph
10935: , qp_npreq_ldets_tmp oldprg
10936: , qp_npreq_rltd_lines_tmp oldrltd

Line 10938: , qp_npreq_lines_tmp oldfreeline

10934: , qp_pricing_phases ph
10935: , qp_npreq_ldets_tmp oldprg
10936: , qp_npreq_rltd_lines_tmp oldrltd
10937: , qp_npreq_ldets_tmp oldfgdis
10938: , qp_npreq_lines_tmp oldfreeline
10939: --where G_REQUEST_TYPE_CODE <> 'ONT'
10940: --bug 3085453 handle pricing availability UI
10941: -- they pass reqtype ONT and insert adj into ldets
10942: WHERE QP_PREQ_PUB.G_CHECK_CUST_VIEW_FLAG <> G_YES

Line 10985: FROM qp_npreq_lines_tmp line, oe_price_adjustments prg,

10981: fgdis.list_line_id fgdis_list_line_id, prg.pricing_phase_id prg_phase_id,
10982: prg.price_adjustment_id prg_price_adj_id,
10983: fgdis.price_adjustment_id fg_price_adj_id, fgdis.line_id fg_line_id,
10984: prg.updated_flag
10985: FROM qp_npreq_lines_tmp line, oe_price_adjustments prg,
10986: oe_price_adj_assocs ass, oe_price_adjustments fgdis
10987: WHERE line.line_type_code = G_LINE_LEVEL
10988: AND prg.line_id = line.line_id
10989: AND prg.list_line_type_code = 'PRG'

Line 10998: FROM qp_npreq_lines_tmp line, oe_price_adjustments prg,

10994: fgdis.list_line_id fgdis_list_line_id, prg.pricing_phase_id prg_phase_id,
10995: prg.price_adjustment_id prg_price_adj_id,
10996: fgdis.price_adjustment_id fg_price_adj_id, fgdis.line_id fg_line_id,
10997: prg.updated_flag
10998: FROM qp_npreq_lines_tmp line, oe_price_adjustments prg,
10999: oe_price_adj_assocs ass, oe_price_adjustments fgdis
11000: WHERE line.line_type_code = G_ORDER_LEVEL
11001: AND prg.header_id = line.line_id
11002: AND prg.line_id IS NULL

Line 11036: FROM qp_npreq_lines_tmp buyline

11032: FOR cl IN
11033: (SELECT buyline.line_index
11034: , oldprg.list_line_id, oldfgdis.line_id
11035: , oldprg.updated_flag
11036: FROM qp_npreq_lines_tmp buyline
11037: , qp_event_phases ev
11038: , qp_pricing_phases ph
11039: , oe_price_adjustments oldprg
11040: , oe_price_adj_assocs oldrltd

Line 11112: UPDATE qp_npreq_lines_tmp

11108: END LOOP; --l_fg_line_index_tbl
11109: END IF; --debug
11110:
11111: FORALL i IN l_fg_line_index_tbl.FIRST..l_fg_line_index_tbl.LAST
11112: UPDATE qp_npreq_lines_tmp
11113: SET process_status = G_FREEGOOD || l_fg_list_line_id_tbl(i) || G_BUYLINE
11114: || l_buy_line_index_tbl(i) || G_PROMO_GOODS_DISCOUNT || l_buy_list_line_id_tbl(i)
11115: || G_PROMO_GOODS_DISCOUNT || nvl(l_buy_updated_flag_tbl(i), G_NO)
11116: || G_STATUS_UPDATED || l_fg_operand_tbl(i) || l_fg_operator_tbl(i)

Line 11126: FOR cl IN (SELECT line_index, process_status FROM qp_npreq_lines_tmp

11122: END IF; --l_fg_line_index_tbl.count
11123:
11124: IF QP_PREQ_GRP.G_DEBUG_ENGINE = FND_API.G_TRUE
11125: THEN
11126: FOR cl IN (SELECT line_index, process_status FROM qp_npreq_lines_tmp
11127: WHERE instr(process_status, G_FREEGOOD) > 0)
11128: LOOP
11129: IF l_debug = FND_API.G_TRUE THEN
11130: QP_PREQ_GRP.engine_debug('Freegood line dtl: line_ind '

Line 11159: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp line

11155: PROCEDURE Update_prg_pricing_status(x_return_status OUT NOCOPY VARCHAR2,
11156: x_return_status_text OUT NOCOPY VARCHAR2) IS
11157: CURSOR l_mark_prg_delete_cur IS
11158: SELECT rltd.line_detail_index, rltd.related_line_detail_index
11159: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp line
11160: WHERE rltd.pricing_status_code = G_STATUS_NEW
11161: AND rltd.relationship_type_code = G_GENERATED_LINE
11162: AND line.line_index = rltd.related_line_index
11163: AND line.process_status IN (G_NOT_VALID, G_STATUS_DELETED); --bug 3126969

Line 11351: FROM qp_npreq_lines_tmp oldfreeline

11347: oldfreeline.LINE_UNIT_PRICE old_LINE_UNIT_PRICE,
11348: oldfreeline.process_status old_list_line_id,
11349: newfgdis.created_from_list_line_id newfgdis_list_line_id,
11350: newfgdis.operand_value || newfgdis.operand_calculation_code newfgdis_operand
11351: FROM qp_npreq_lines_tmp oldfreeline
11352: , qp_npreq_rltd_lines_tmp newrltd
11353: , qp_npreq_ldets_tmp newfgdis
11354: , qp_npreq_lines_tmp newfgline
11355: , qp_npreq_line_attrs_tmp oldfreeitem

Line 11354: , qp_npreq_lines_tmp newfgline

11350: newfgdis.operand_value || newfgdis.operand_calculation_code newfgdis_operand
11351: FROM qp_npreq_lines_tmp oldfreeline
11352: , qp_npreq_rltd_lines_tmp newrltd
11353: , qp_npreq_ldets_tmp newfgdis
11354: , qp_npreq_lines_tmp newfgline
11355: , qp_npreq_line_attrs_tmp oldfreeitem
11356: , qp_npreq_line_attrs_tmp newfgitem
11357: --where G_REQUEST_TYPE_CODE = 'ONT'
11358: --bug 3085453 handle pricing availability UI

Line 11471: FROM qp_npreq_lines_tmp oldfreeline

11467: oldfreeline.LINE_UNIT_PRICE old_LINE_UNIT_PRICE,
11468: oldfreeline.process_status old_list_line_id,
11469: newfgdis.created_from_list_line_id newfgdis_list_line_id,
11470: newfgdis.operand_value || newfgdis.operand_calculation_code newfgdis_operand
11471: FROM qp_npreq_lines_tmp oldfreeline
11472: , qp_npreq_rltd_lines_tmp newrltd
11473: , qp_npreq_ldets_tmp newfgdis
11474: , qp_npreq_lines_tmp newfgline
11475: , qp_npreq_line_attrs_tmp newfgitem

Line 11474: , qp_npreq_lines_tmp newfgline

11470: newfgdis.operand_value || newfgdis.operand_calculation_code newfgdis_operand
11471: FROM qp_npreq_lines_tmp oldfreeline
11472: , qp_npreq_rltd_lines_tmp newrltd
11473: , qp_npreq_ldets_tmp newfgdis
11474: , qp_npreq_lines_tmp newfgline
11475: , qp_npreq_line_attrs_tmp newfgitem
11476: , qp_npreq_line_attrs_tmp oldfreeitem
11477: --WHERE G_REQUEST_TYPE_CODE <> 'ONT'
11478: --bug 3085453 handle pricing availability UI

Line 11502: FROM qp_npreq_lines_tmp buyline, oe_price_adjustments prg,

11498: AND oldfreeitem.attribute = G_PRIC_ATTRIBUTE1;
11499:
11500: CURSOR l_updated_prg_fg_cur IS
11501: SELECT /*+ INDEX(prg OE_PRICE_ADJUSTMENTS_N2) */ rltd.related_line_index
11502: FROM qp_npreq_lines_tmp buyline, oe_price_adjustments prg,
11503: qp_npreq_ldets_tmp ldet, qp_npreq_rltd_lines_tmp rltd
11504: --WHERE G_REQUEST_TYPE_CODE = 'ONT'
11505: --bug 3085453 handle pricing availability UI
11506: -- they pass reqtype ONT and insert adj into ldets

Line 11521: FROM qp_npreq_lines_tmp buyline, oe_price_adjustments prg,

11517: AND rltd.line_detail_index = ldet.line_detail_index
11518: AND rltd.pricing_status_code = G_STATUS_NEW
11519: UNION
11520: SELECT /*+ INDEX(prg OE_PRICE_ADJUSTMENTS_N1) */ rltd.related_line_index
11521: FROM qp_npreq_lines_tmp buyline, oe_price_adjustments prg,
11522: qp_npreq_ldets_tmp ldet, qp_npreq_rltd_lines_tmp rltd
11523: --WHERE G_REQUEST_TYPE_CODE = 'ONT'
11524: --bug 3085453 handle pricing availability UI
11525: -- they pass reqtype ONT and insert adj into ldets

Line 11542: FROM qp_npreq_lines_tmp buyline, qp_npreq_ldets_tmp prg,

11538: AND rltd.pricing_status_code = G_STATUS_NEW
11539: UNION
11540: -- hint added for 5575718
11541: SELECT /*+ ORDERED */ rltd.related_line_index
11542: FROM qp_npreq_lines_tmp buyline, qp_npreq_ldets_tmp prg,
11543: qp_npreq_ldets_tmp ldet, qp_npreq_rltd_lines_tmp rltd
11544: --WHERE G_REQUEST_TYPE_CODE <> 'ONT'
11545: --bug 3085453 handle pricing availability UI
11546: -- they pass reqtype ONT and insert adj into ldets

Line 11625: FROM qp_npreq_lines_tmp line

11621: IF l_Process_PRG = G_NO
11622: THEN
11623: BEGIN
11624: SELECT 'Y' INTO l_Process_PRG
11625: FROM qp_npreq_lines_tmp line
11626: WHERE line.pricing_status_code IN (G_STATUS_UNCHANGED,
11627: G_STATUS_UPDATED, G_STATUS_NEW, G_STATUS_GSA_VIOLATION, G_STATUS_INVALID_PRICE_LIST)
11628: AND instr(line.process_status, G_FREEGOOD) > 0
11629: AND ROWNUM = 1;

Line 11637: FROM qp_npreq_lines_tmp line

11633: END IF; --l_debug
11634:
11635: IF l_Process_PRG = G_NO THEN
11636: SELECT 'Y' INTO l_Process_PRG
11637: FROM qp_npreq_lines_tmp line
11638: WHERE line.pricing_status_code IN (G_STATUS_UNCHANGED,
11639: G_STATUS_UPDATED, G_STATUS_NEW, G_STATUS_GSA_VIOLATION)
11640: AND EXISTS
11641: (SELECT 'Y' FROM oe_price_adjustments adj

Line 11685: FROM qp_npreq_lines_tmp line, oe_price_adjustments adj

11681: IF l_debug = FND_API.G_TRUE THEN
11682: FOR cl IN
11683: (SELECT adj.list_line_id, adj.updated_flag, line.line_index,
11684: adj.pricing_phase_id, adj.price_adjustment_id, adj.line_id
11685: FROM qp_npreq_lines_tmp line, oe_price_adjustments adj
11686: WHERE line.line_type_code = G_LINE_LEVEL
11687: AND adj.line_id = line.line_id
11688: AND adj.list_line_type_code = G_PROMO_GOODS_DISCOUNT
11689: UNION

Line 11692: FROM qp_npreq_lines_tmp line, oe_price_adjustments adj

11688: AND adj.list_line_type_code = G_PROMO_GOODS_DISCOUNT
11689: UNION
11690: SELECT adj.list_line_id, adj.updated_flag, line.line_index,
11691: adj.pricing_phase_id, adj.price_adjustment_id, adj.line_id
11692: FROM qp_npreq_lines_tmp line, oe_price_adjustments adj
11693: WHERE line.line_type_code = G_ORDER_LEVEL
11694: AND adj.header_id = line.line_id
11695: AND adj.line_id IS NULL
11696: AND adj.list_line_type_code = G_PROMO_GOODS_DISCOUNT)

Line 11758: UPDATE qp_npreq_lines_tmp SET

11754:
11755: IF l_upd_engine_fg_index.COUNT > 0 THEN
11756: --update the engine inserted fg line to G_NOT_VALID
11757: FORALL i IN l_upd_engine_fg_index.FIRST..l_upd_engine_fg_index.LAST
11758: UPDATE qp_npreq_lines_tmp SET
11759: pricing_status_code = G_NOT_VALID, process_status = G_NOT_VALID
11760: WHERE line_index = l_upd_engine_fg_index(i);
11761: END IF; --l_upd_engine_fg_index
11762:

Line 11765: UPDATE qp_npreq_lines_tmp oldfg SET process_status = G_STATUS_UNCHANGED

11761: END IF; --l_upd_engine_fg_index
11762:
11763: --the following update will mark the overridden PRG's passed in
11764: --freegood lines as process_status = G_STATUS_UNCHANGED
11765: UPDATE qp_npreq_lines_tmp oldfg SET process_status = G_STATUS_UNCHANGED
11766: --fix for bug 2691794
11767: , processed_flag = G_FREEGOOD_LINE
11768: WHERE oldfg.pricing_status_code IN (G_STATUS_UPDATED, G_STATUS_UNCHANGED)
11769: AND instr(oldfg.process_status, G_PROMO_GOODS_DISCOUNT || G_YES || G_STATUS_UPDATED) > 0;

Line 11779: FROM qp_npreq_lines_tmp oldfgline

11775: AND l_debug = FND_API.G_TRUE
11776: THEN
11777: FOR cl IN (SELECT newprg.line_index line_ind
11778: , newprg.created_from_list_line_id
11779: FROM qp_npreq_lines_tmp oldfgline
11780: , qp_npreq_ldets_tmp newprg
11781: WHERE --ldet.line_index = oldfgline.line_index
11782: instr(oldfgline.process_status
11783: , G_BUYLINE || newprg.line_index || G_PROMO_GOODS_DISCOUNT) > 0

Line 11800: UPDATE qp_npreq_lines_tmp oldfgline

11796: --the following update will update the process_status on freegood lines
11797: --identified from the previous identify_freegood_lines procedure
11798: --to G_STATUS_DELETED if the pricing engine has not created matching
11799: --PRG modifiers against its buy line
11800: UPDATE qp_npreq_lines_tmp oldfgline
11801: SET oldfgline.process_status = G_STATUS_DELETED
11802: WHERE NOT EXISTS (SELECT newprg.line_index
11803: FROM qp_npreq_ldets_tmp newprg
11804: --, qp_npreq_line_attrs_tmp newfgitem <-- commented out, sql repos

Line 11976: UPDATE qp_npreq_lines_tmp line SET

11972: QP_PREQ_GRP.engine_debug('passed in frg update '|| l_prg_line_ind_tbl.COUNT);
11973:
11974: END IF;
11975: FORALL i IN l_prg_line_ind_tbl.FIRST..l_prg_line_ind_tbl.LAST
11976: UPDATE qp_npreq_lines_tmp line SET
11977: line.process_status = l_prg_process_sts_tbl(i)
11978: --pricing_status_code needs to be set to G_NOT_VALID so that
11979: --this does not get into OM's
11980: --update statement to update lines with UPDATE status

Line 12059: UPDATE qp_npreq_lines_tmp line SET line.process_status =

12055: END LOOP; --G_prg_unch_line_index_tbl
12056: END IF; --QP_PREQ_GRP.G_DEBUG_ENGINE
12057:
12058: FORALL i IN G_prg_unch_line_index_tbl.FIRST..G_prg_unch_line_index_tbl.LAST
12059: UPDATE qp_npreq_lines_tmp line SET line.process_status =
12060: --fix for bug 2831270
12061: decode(line.adjusted_unit_price, G_prg_unch_calc_price_tbl(i),
12062: G_NOT_VALID, G_STATUS_UPDATED)
12063: --Calling application looks at pricing_status_code this also needs to be updated

Line 12074: UPDATE qp_npreq_lines_tmp line SET line.process_status =

12070: WHERE line.line_index = G_prg_unch_new_index_tbl(i)
12071: RETURNING line.process_status BULK COLLECT INTO G_prg_unch_process_sts_tbl;
12072:
12073: FORALL i IN G_prg_unch_line_index_tbl.FIRST..G_prg_unch_line_index_tbl.LAST
12074: UPDATE qp_npreq_lines_tmp line SET line.process_status =
12075: decode(G_prg_unch_process_sts_tbl(i), G_NOT_VALID
12076: , G_STATUS_UNCHANGED, G_STATUS_UPDATED, G_NOT_VALID)
12077: --pricing_status_code needs to be set
12078: --to G_NOT_VALID so that this does not get into OM's

Line 12120: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp buyline

12116: -- 3493716: added prg.line_detail_index to cursor
12117: CURSOR l_buyline_price_flag_cur IS
12118: SELECT /*+ ORDERED USE_NL(buyline prg dis)*/
12119: dis.created_from_list_line_id, prg.line_detail_index, buyline.price_flag, 'Y' is_ldet, dis.line_index
12120: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp buyline
12121: , qp_npreq_ldets_tmp prg, qp_npreq_ldets_tmp dis
12122: WHERE rltd.pricing_status_code = G_STATUS_NEW
12123: AND rltd.relationship_type_code = G_GENERATED_LINE
12124: AND buyline.line_index = rltd.line_index

Line 12200: from qp_npreq_rltd_lines_tmp rl, qp_npreq_lines_tmp buyline

12196: G_buyline_list_line_id, G_buyline_price_flag;
12197: CLOSE l_buyline_price_flag_cur;
12198: UPDATE qp_npreq_ldets_tmp freegood_dis set buy_line_price_flag =
12199: (select buyline.price_flag
12200: from qp_npreq_rltd_lines_tmp rl, qp_npreq_lines_tmp buyline
12201: where rl.pricing_status_code = G_STATUS_NEW
12202: and rl.relationship_type_code = G_GENERATED_LINE
12203: and rl.related_line_detail_index = freegood_dis.line_detail_index
12204: and buyline.line_index = rl.line_index)

Line 12298: from qp_event_phases evt , qp_pricing_phases ph, qp_npreq_lines_tmp line

12294: --you don't need to match the phase as this will be called after cleanup
12295: --and by the time adjustments w/b picked up from oe_price_adj and ldets
12296: --from the right phases
12297: AND pricing_phase_id in (select ph.pricing_phase_id
12298: from qp_event_phases evt , qp_pricing_phases ph, qp_npreq_lines_tmp line
12299: where ph.pricing_phase_id = evt.pricing_phase_id
12300: and instr(p_pricing_event,evt.pricing_event_code||',') > 0
12301: and line.line_index = ldets.line_index
12302: and (line.price_flag = G_YES

Line 12755: FROM qp_npreq_lines_tmp;

12751: PROCESS_STATUS,
12752: CATCHWEIGHT_QTY,
12753: ACTUAL_ORDER_QUANTITY,
12754: ORDER_UOM_SELLING_PRICE
12755: FROM qp_npreq_lines_tmp;
12756:
12757: /*
12758: INDX,QP_PREQ_GRP.populate_output.l_ldets_cur,QP_LIST_LINES_PK,LIST_LINE_ID,1
12759: INDX,QP_PREQ_GRP.populate_output.l_ldets_cur,qp_npreq_ldets_tmp_N4,PRICING_STATUS_CODE,1

Line 13016: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line

13012: , ldet.updated_flag
13013: , ldet.calculation_code
13014: , line.qualifiers_exist_flag
13015: , ldet.pricing_group_sequence bucket
13016: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
13017: WHERE line.line_index = ldet.line_index
13018: ORDER BY line_ind;
13019:
13020: --3169430

Line 13071: from qp_npreq_lines_tmp;

13067: IF nvl(p_control_rec.temp_table_insert_flag, G_YES) = G_NO
13068: THEN
13069: -- temp table/direct insert path
13070: select count(*) into l_no_of_lines
13071: from qp_npreq_lines_tmp;
13072: ELSE
13073: -- PL/SQL table path
13074: l_no_of_lines := p_line_tbl.count;
13075: END IF;

Line 14614: -- changed the out param value for x_adjusted_unit_price to qp_npreq_lines_tmp.order_uom_selling_price

14610:
14611: END PRICE_REQUEST;
14612:
14613: --procedure to return price and status code and text -- needed by PO team
14614: -- changed the out param value for x_adjusted_unit_price to qp_npreq_lines_tmp.order_uom_selling_price
14615: PROCEDURE get_price_for_line(p_line_index IN NUMBER,
14616: p_line_id IN NUMBER,
14617: x_line_unit_price OUT NOCOPY NUMBER,
14618: x_adjusted_unit_price OUT NOCOPY NUMBER,

Line 14648: FROM QP_NPREQ_LINES_TMP

14644: INTO x_line_unit_price,
14645: x_adjusted_unit_price,
14646: x_pricing_status_code,
14647: x_pricing_status_text
14648: FROM QP_NPREQ_LINES_TMP
14649: WHERE line_index = p_line_index;
14650: ELSIF p_line_id IS NOT NULL THEN
14651: SELECT line_unit_price,
14652: order_uom_selling_price,

Line 14659: FROM QP_NPREQ_LINES_TMP

14655: INTO x_line_unit_price,
14656: x_adjusted_unit_price,
14657: x_pricing_status_code,
14658: x_pricing_status_text
14659: FROM QP_NPREQ_LINES_TMP
14660: WHERE line_id = p_line_id;
14661: ELSE
14662: x_return_status := FND_API.G_RET_STS_ERROR;
14663: x_pricing_status_text := 'Must pass either p_line_index or p_line_id while calling ' || l_routine;