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 AND bug#14102682
541: price_flag IN (G_YES, G_PHASE)
542: AND ROWNUM = 1;
543:

Line 545: UPDATE qp_npreq_lines_tmp SET

541: 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 AND bug#14102682

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 2781: qp_npreq_lines_tmp line,

2777: nvl(line.priced_quantity, line.line_quantity))
2778: FROM
2779: qp_npreq_ldets_tmp ldet,
2780: qp_npreq_ldets_tmp ldet_pbh,
2781: qp_npreq_lines_tmp line,
2782: qp_pricing_attributes qpa
2783: WHERE
2784: ldet.line_detail_index = rltd.related_line_detail_index
2785: AND ldet_pbh.line_detail_index = rltd.line_detail_index

Line 2836: FROM qp_npreq_lines_tmp line,

2832: FUNCTION CHECK_GSA_INDICATOR RETURN VARCHAR2 IS
2833:
2834: CURSOR l_check_gsa_ind_cur IS
2835: SELECT 'Y'
2836: FROM qp_npreq_lines_tmp line,
2837: qp_npreq_line_attrs_tmp gsa_attr
2838: WHERE gsa_attr.line_index = line.line_index
2839: AND gsa_attr.pricing_status_code = G_STATUS_UNCHANGED
2840: AND gsa_attr.attribute_type = G_QUALIFIER_TYPE

Line 2883: FROM qp_npreq_lines_tmp line,

2879: SELECT /*+ ORDERED USE_NL(req lhdr lattr qpa ql) index(qpa qp_pricing_attributes_n5) */
2880: line.line_index,
2881: line.adjusted_unit_price,
2882: MIN(ql.operand) operand
2883: FROM qp_npreq_lines_tmp line,
2884: qp_price_req_sources req,
2885: qp_list_headers_b lhdr,
2886: qp_npreq_line_attrs_tmp lattr,
2887: qp_pricing_attributes qpa,

Line 2928: FROM qp_npreq_lines_tmp line,

2924: SELECT /*+ ORDERED USE_NL(req lhdr lattr qpa ql) index(qpa qp_pricing_attributes_n5) */
2925: line.line_index,
2926: line.adjusted_unit_price,
2927: MIN(ql.operand) operand
2928: FROM qp_npreq_lines_tmp line,
2929: qp_price_req_sources_v req,
2930: qp_list_headers_b lhdr,
2931: qp_npreq_line_attrs_tmp lattr,
2932: qp_pricing_attributes qpa,

Line 3047: UPDATE qp_npreq_lines_tmp

3043: IF l_debug = FND_API.G_TRUE THEN
3044: QP_PREQ_GRP.engine_debug('Before GSA update '|| l_gsa_line_index_tbl.COUNT);
3045: END IF;
3046: FORALL I IN l_gsa_line_index_tbl.FIRST..l_gsa_line_index_tbl.LAST
3047: UPDATE qp_npreq_lines_tmp
3048: SET pricing_status_code = G_STATUS_GSA_VIOLATION,
3049: pricing_status_text =
3050: 'GSA VIOLATION - GSA PRICE '|| l_gsa_sts_text_tbl(I)
3051: WHERE line_index = l_gsa_line_index_tbl(I);

Line 3118: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line

3114: decode(ldet.calculation_code, 'BACK_CALCULATE', 10000,
3115: decode(ldet.created_from_list_line_type, 'DIS',
3116: decode(ldet.applied_flag, G_YES, - 1000, - 100),
3117: decode(ldet.applied_flag, G_YES, 100, 1000)))) precedence
3118: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
3119: WHERE line.line_index = p_line_index
3120: AND line.line_type_code = G_LINE_LEVEL -- sql repos
3121: AND line.price_flag IN (G_YES, G_PHASE)
3122: AND ldet.line_index = line.line_index

Line 3599: FROM qp_npreq_lines_tmp line

3595: /*
3596: SELECT line.line_index, line.unit_price, line.adjusted_unit_price
3597: ,line.line_quantity, line.priced_quantity, line.catchweight_qty,line.actual_order_quantity
3598: , line.rounding_factor
3599: FROM qp_npreq_lines_tmp line
3600: WHERE line.price_flag in (G_YES, G_PHASE,G_CALCULATE_ONLY)
3601: and line.pricing_status_code in (G_STATUS_UPDATED, G_STATUS_UNCHANGED,
3602: G_STATUS_GSA_VIOLATION)
3603: and line.line_type_code = G_LINE_LEVEL

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

3618: --as they will not have any adjustments
3619: and line.process_status = G_STATUS_UNCHANGED
3620: --fix for bug 2691794
3621: and nvl(line.processed_flag,'N') <> G_FREEGOOD_LINE;
3622: and not exists (select 'Y' from qp_npreq_lines_tmp line2
3623: where line2.line_id = line.line_id
3624: and line2.line_index <> line.line_index);
3625: */
3626:

Line 3640: FROM qp_npreq_lines_tmp line

3636: , line.pricing_status_code
3637: , line.pricing_status_text
3638: , 0 amount_changed
3639: , line_unit_price
3640: FROM qp_npreq_lines_tmp line
3641: WHERE line.price_flag IN (G_YES, G_PHASE, G_CALCULATE_ONLY)
3642: AND line.pricing_status_code IN (G_STATUS_UPDATED, G_STATUS_UNCHANGED,
3643: G_STATUS_GSA_VIOLATION)
3644: AND line.line_type_code = G_LINE_LEVEL

Line 4055: UPDATE qp_npreq_lines_tmp

4051: QP_PREQ_GRP.engine_debug('unit price needs to be updated');
4052: END IF;
4053:
4054: FORALL i IN l_line_index_tbl.FIRST..l_line_index_tbl.LAST
4055: UPDATE qp_npreq_lines_tmp
4056: SET adjusted_unit_price = l_adj_unit_price_tbl(i)
4057: --, adjusted_unit_price_ur = l_adjusted_unit_price_ur(i) --[prarasto:Post Round], [julin/postround] redesign
4058: , line_unit_price = l_line_unit_price_tbl(i)
4059: , pricing_status_code = nvl(l_pricing_sts_code_tbl(i), G_STATUS_UPDATED) /* bug 3248475 */

Line 4099: UPDATE qp_npreq_lines_tmp line

4095: END IF;
4096:
4097: IF QP_JAVA_ENGINE_UTIL_PUB.Java_Engine_Running = 'N' THEN
4098: /* Modified where clause as per suggestion of spgopal for bug 3401941 */
4099: UPDATE qp_npreq_lines_tmp line
4100: SET pricing_status_code = G_STATUS_UPDATED
4101: --for bug 2812738 not to update if back_calc_error/gsa_violatn
4102: WHERE line.pricing_status_code = G_STATUS_UNCHANGED
4103: --fix for bug 3425569 where frozen lines were set to status updated

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

5233: IF l_debug = FND_API.G_TRUE THEN
5234: QP_PREQ_GRP.engine_debug(t.line_index || ':' || l_prev_bucket_amt_tbl(t.line_index));
5235: END IF; --end debug
5236: ELSE
5237: -- have to compute list price * qty for the line (query from qp_npreq_lines_tmp)
5238: l_prod_line_bucket_amt := nvl(t.priced_quantity, 0) * nvl(t.unit_price, 0);
5239: IF l_debug = FND_API.G_TRUE THEN
5240: QP_PREQ_GRP.engine_debug('* line index '|| t.line_index ||' not in l_prev_bucket_amt_tbl');
5241: QP_PREQ_GRP.engine_debug(' got value '|| l_prod_line_bucket_amt ||' from lines_tmp instead');

Line 7113: UPDATE qp_npreq_lines_tmp

7109: END IF; --l_debug
7110: --===[prarasto:Post Round] End : Calculate rounded values ==--
7111:
7112:
7113: UPDATE qp_npreq_lines_tmp
7114: SET unit_price = l_unit_price_tbl(i),
7115: adjusted_unit_price = l_adj_unit_price_tbl(i), --[prarasto:Post Round]
7116: --adjusted_unit_price_ur = l_adjusted_unit_price_ur(i), --[prarasto:Post Round], [julin/postround] redesign
7117: /* decode(G_ROUND_INDIVIDUAL_ADJ,

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

7180: x_return_status OUT NOCOPY VARCHAR2,
7181: x_return_status_text OUT NOCOPY VARCHAR2) IS
7182:
7183: /*
7184: INDX,QP_PREQ_PUB.calculate_price.l_line_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
7185: */
7186: -- for bug 3820859, to start with adjusted_unit_price should be same as unit_price
7187: -- if not, then the same discount is getting applied twice if limit profile is set, because discounts calculations happens twice -
7188: -- once from QP_PREQ_GRP and then from QP_PREQ_PUB

Line 7198: FROM qp_npreq_lines_tmp line

7194: , line.processed_code
7195: , line.updated_adjusted_unit_price
7196: , line.rounding_factor
7197: , line.pricing_status_code, line.pricing_status_text
7198: FROM qp_npreq_lines_tmp line
7199: WHERE
7200: line.price_flag IN (G_YES, G_PHASE, G_CALCULATE_ONLY)
7201: AND line.line_type_code IN (G_LINE_LEVEL, G_ORDER_LEVEL)
7202: AND line.pricing_status_code IN (G_STATUS_UPDATED

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

7206: AND line.usage_pricing_type IN
7207: (QP_PREQ_GRP.G_BILLING_TYPE, QP_PREQ_GRP.G_REGULAR_USAGE_TYPE);
7208:
7209: /*
7210: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_INDEX,1
7211: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_TYPE_CODE,2
7212: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
7213: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,LINE_INDEX,1
7214: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,CREATED_FROM_LIST_LINE_TYPE,2

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

7207: (QP_PREQ_GRP.G_BILLING_TYPE, QP_PREQ_GRP.G_REGULAR_USAGE_TYPE);
7208:
7209: /*
7210: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_INDEX,1
7211: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_TYPE_CODE,2
7212: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
7213: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,LINE_INDEX,1
7214: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,CREATED_FROM_LIST_LINE_TYPE,2
7215: */

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

7208:
7209: /*
7210: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_INDEX,1
7211: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N1,LINE_TYPE_CODE,2
7212: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
7213: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,LINE_INDEX,1
7214: INDX,QP_PREQ_PUB.calculate_price.l_bucket_price_cur,qp_npreq_ldets_tmp_N3,CREATED_FROM_LIST_LINE_TYPE,2
7215: */
7216: CURSOR l_bucket_price_cur(p_line_index NUMBER) IS -- 2892848

Line 7250: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line

7246: , line.rounding_factor
7247: , G_LINE_LEVEL line_type
7248: , 'N' is_max_frt
7249: , ldet.net_amount_flag
7250: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
7251: --where line.line_index = p_line_index -- 2892848
7252: WHERE ldet.line_index = line.line_index -- 2892848
7253: --and ldet.line_index = line.line_index --2892848
7254: AND line.price_flag IN (G_YES, G_PHASE, G_CALCULATE_ONLY)

Line 7309: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line

7305: , line.rounding_factor
7306: , G_ORDER_LEVEL line_type
7307: , 'N' is_max_frt
7308: , ldet.net_amount_flag
7309: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
7310: , qp_npreq_lines_tmp line1
7311: --where line.line_index = p_line_index -- 2892848
7312: --and ldet.line_index = line1.line_index -- 2892848
7313: WHERE ldet.line_index = line1.line_index -- 2892848

Line 7310: , qp_npreq_lines_tmp line1

7306: , G_ORDER_LEVEL line_type
7307: , 'N' is_max_frt
7308: , ldet.net_amount_flag
7309: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
7310: , qp_npreq_lines_tmp line1
7311: --where line.line_index = p_line_index -- 2892848
7312: --and ldet.line_index = line1.line_index -- 2892848
7313: WHERE ldet.line_index = line1.line_index -- 2892848
7314: AND line1.line_type_code = G_ORDER_LEVEL

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

8091: IF l_debug = FND_API.G_TRUE THEN
8092: QP_PREQ_GRP.engine_debug(t.line_index || ':' || l_prev_bucket_amt_tbl(t.line_index));
8093: END IF; --end debug
8094: ELSE
8095: -- have to compute list price * qty for the line (query from qp_npreq_lines_tmp)
8096: l_prod_line_bucket_amt := nvl(t.priced_quantity, 0) * nvl(t.unit_price, 0);
8097: IF l_debug = FND_API.G_TRUE THEN
8098: QP_PREQ_GRP.engine_debug('* line index '|| t.line_index ||' not in l_prev_bucket_amt_tbl');
8099: QP_PREQ_GRP.engine_debug(' got value '|| l_prod_line_bucket_amt ||' from lines_tmp instead');

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

9097:
9098:
9099: IF l_lines_tbl(j).processed_flag = G_PROCESSED THEN
9100: /*
9101: INDX,QP_PREQ_PUB.calculate_price.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
9102: */
9103: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price
9104: = nvl(l_lines_tbl(j).updated_adjusted_unit_price,
9105: l_lines_tbl(j).adjusted_unit_price)

Line 9103: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price

9099: IF l_lines_tbl(j).processed_flag = G_PROCESSED THEN
9100: /*
9101: INDX,QP_PREQ_PUB.calculate_price.upd3,qp_npreq_lines_tmp_N1,LINE_INDEX,1
9102: */
9103: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price
9104: = nvl(l_lines_tbl(j).updated_adjusted_unit_price,
9105: l_lines_tbl(j).adjusted_unit_price)
9106: --, adjusted_unit_price_ur = nvl(l_updated_adj_unit_price_ur(j), --[prarasto:Post Round] added unrounded adjusted unit price, [julin/postround] redesign
9107: -- l_adjusted_unit_price_ur(j))

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

9122: 'processed_code' || l_lines_tbl(j).processed_code);
9123: END IF;
9124: ELSE
9125: /*
9126: INDX,QP_PREQ_PUB.calculate_price.upd4,qp_npreq_lines_tmp_N1,LINE_INDEX,1
9127: */
9128: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price
9129: = l_lines_tbl(j).adjusted_unit_price
9130: --, adjusted_unit_price_ur = l_adjusted_unit_price_ur(j) --[prarasto:Post Round] added unrounded adjusted unit price, [julin/postround] redesign

Line 9128: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price

9124: ELSE
9125: /*
9126: INDX,QP_PREQ_PUB.calculate_price.upd4,qp_npreq_lines_tmp_N1,LINE_INDEX,1
9127: */
9128: UPDATE qp_npreq_lines_tmp SET adjusted_unit_price
9129: = l_lines_tbl(j).adjusted_unit_price
9130: --, adjusted_unit_price_ur = l_adjusted_unit_price_ur(j) --[prarasto:Post Round] added unrounded adjusted unit price, [julin/postround] redesign
9131: , processed_flag = l_lines_tbl(j).processed_flag
9132: , processed_code = l_lines_tbl(j).processed_code

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

9183: QP_PREQ_GRP.engine_debug('Begin Pub GSA check');
9184:
9185: END IF;
9186: /*
9187: INDX,QP_PREQ_PUB.calculate_price.upd5,qp_npreq_lines_tmp_N2,LINE_TYPE_CODE,1
9188: INDX,QP_PREQ_PUB.calculate_price.upd5,qp_npreq_line_attrs_tmp_N2,LINE_TYPE_CODE,1
9189: INDX,QP_PREQ_PUB.calculate_price.upd5,qp_npreq_line_attrs_tmp_N1,LINE_INDEX,1
9190: INDX,QP_PREQ_PUB.calculate_price.upd5,qp_npreq_line_attrs_tmp_N1,ATTRIBUTE_TYPE,2
9191: INDX,QP_PREQ_PUB.calculate_price.upd5,QP_PRICING_ATTRIBUTES_N5,PRICING_PHASE_ID,1

Line 9214: UPDATE qp_npreq_lines_tmp line

9210: || G_ATTR_MGR_INSTALLED);
9211: END IF;
9212: IF G_ATTR_MGR_INSTALLED = G_NO
9213: THEN
9214: UPDATE qp_npreq_lines_tmp line
9215: SET line.pricing_status_code = G_STATUS_GSA_VIOLATION
9216: , line.pricing_status_text = 'QP_PREQ_PUB: GSA VIOLATION'
9217: WHERE line.line_type_code = G_LINE_LEVEL
9218: --made this change look at only successful lines

Line 9268: UPDATE qp_npreq_lines_tmp line

9264: , line.pricing_effective_date))
9265: AND trunc(nvl(ql.End_date_active
9266: , line.pricing_effective_date)));
9267: ELSE --G_ATTR_MGR_INSTALLED
9268: UPDATE qp_npreq_lines_tmp line
9269: SET line.pricing_status_code = G_STATUS_GSA_VIOLATION
9270: , line.pricing_status_text = 'QP_PREQ_PUB: GSA VIOLATION'
9271: WHERE line.line_type_code = G_LINE_LEVEL
9272: --made this change look at only successful lines

Line 9443: qp_npreq_lines_tmp line,

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

Line 9521: qp_npreq_lines_tmp line,

9517: ldet.pricing_group_sequence,
9518: nvl(ldet.line_quantity,
9519: nvl(line.priced_quantity, line.line_quantity))
9520: FROM
9521: qp_npreq_lines_tmp line,
9522: qp_npreq_ldets_tmp ldet,
9523: qp_npreq_ldets_tmp ldet_pbh,
9524: qp_pricing_attributes qpa
9525: WHERE

Line 9700: , qp_npreq_lines_tmp line

9696: WHERE ldet.pricing_status_code = G_STATUS_UNCHANGED AND
9697: ldet.applied_flag = G_YES AND
9698: ldet.pricing_phase_id NOT IN (SELECT ev.pricing_phase_id
9699: FROM qp_event_phases ev, qp_pricing_phases ph
9700: , qp_npreq_lines_tmp line
9701: WHERE instr(p_pricing_event, ev.pricing_event_code || ',') > 0
9702: AND ev.pricing_phase_id = ph.pricing_phase_id
9703: AND line.price_flag <> G_CALCULATE_ONLY
9704: AND ((G_GET_FREIGHT_FLAG = G_YES AND ph.freight_exists = G_YES)

Line 9742: (SELECT line.line_index FROM qp_npreq_lines_tmp line

9738: --summary line adjustments with price flag 'N' need to be considered for calc
9739: --reqt from contracts for performance
9740: UPDATE qp_npreq_ldets_tmp ldet SET ldet.process_code = G_STATUS_NEW
9741: WHERE ldet.line_index IN
9742: (SELECT line.line_index FROM qp_npreq_lines_tmp line
9743: WHERE line.line_type_code = G_ORDER_LEVEL
9744: AND line.price_flag = G_NO);
9745:
9746: IF l_debug = FND_API.G_TRUE THEN

Line 9995: FROM qp_npreq_lines_tmp line,

9991: G_LINE_AMT_ATTRIBUTE,
9992: (nvl(line.priced_quantity, line.line_quantity)
9993: * nvl(line.unit_price, 0)),
9994: nvl(line.priced_quantity, line.line_quantity))
9995: FROM qp_npreq_lines_tmp line,
9996: qp_pricing_attributes qpa
9997: WHERE line.line_index = rltd.line_index
9998: AND qpa.list_line_id = rltd.related_list_line_id
9999: AND qpa.pricing_attribute_context =

Line 10002: FROM qp_npreq_lines_tmp line

9998: AND qpa.list_line_id = rltd.related_list_line_id
9999: AND qpa.pricing_attribute_context =
10000: G_PRIC_VOLUME_CONTEXT)
10001: WHERE rltd.line_index IN (SELECT line.line_index
10002: FROM qp_npreq_lines_tmp line
10003: WHERE line.line_index = rltd.line_index
10004: AND rltd.relationship_type_code = G_PBH_LINE
10005: AND line.pricing_status_code IN
10006: (G_STATUS_UNCHANGED, G_STATUS_UPDATED,

Line 10149: FROM qp_npreq_lines_tmp line,

10145: ldet.operand_calculation_code,
10146: ldet.operand_value,
10147: ldet.group_amount,
10148: line.parent_price
10149: FROM qp_npreq_lines_tmp line,
10150: qp_npreq_rltd_lines_tmp rltd,
10151: qp_npreq_ldets_tmp ldet,
10152: qp_pricing_attributes qpa,
10153: qp_npreq_line_attrs_tmp attr

Line 10516: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp line

10512: rltd.related_line_index,
10513: line.unit_price,
10514: line.priced_quantity,
10515: line.priced_uom_code
10516: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp line
10517: WHERE rltd.line_index IS NOT NULL
10518: AND rltd.related_line_index IS NOT NULL
10519: AND rltd.relationship_type_code = G_SERVICE_LINE
10520: AND line.line_index = rltd.line_index;

Line 10548: UPDATE qp_npreq_lines_tmp

10544:
10545: IF l_service_line_tbl.COUNT > 0
10546: THEN
10547: FORALL i IN l_service_line_tbl.FIRST..l_service_line_tbl.LAST
10548: UPDATE qp_npreq_lines_tmp
10549: SET parent_price = l_unit_price_tbl(i),
10550: parent_uom_code = l_priced_uom_code_tbl(i),
10551: processing_order = 2,
10552: parent_quantity = l_priced_quantity_tbl(i)

Line 10555: UPDATE qp_npreq_lines_tmp

10551: processing_order = 2,
10552: parent_quantity = l_priced_quantity_tbl(i)
10553: WHERE line_index = l_service_line_tbl(i);
10554: FORALL i IN l_parent_line_tbl.FIRST..l_parent_line_tbl.LAST
10555: UPDATE qp_npreq_lines_tmp
10556: SET processing_order = 1
10557: WHERE line_index = l_parent_line_tbl(i);
10558: END IF;
10559:

Line 10602: FROM qp_npreq_lines_tmp line, qp_npreq_ldets_tmp ldet

10598: , line.rounding_factor
10599: , line.uom_quantity service_duration
10600: , line.processing_order
10601: , line.parent_price
10602: FROM qp_npreq_lines_tmp line, qp_npreq_ldets_tmp ldet
10603: WHERE line.usage_pricing_type = QP_PREQ_GRP.G_BILLING_TYPE
10604: AND ldet.line_index = line.line_index
10605: AND line.price_flag = G_CALCULATE_ONLY
10606: AND nvl(processing_order, 1) = p_processing_order

Line 10726: UPDATE qp_npreq_lines_tmp

10722: IF l_debug = FND_API.G_TRUE THEN
10723: QP_PREQ_GRP.engine_debug('Begin LINES Usage Pricing LOOP1');
10724: END IF;
10725: FORALL i IN l_line_index_tbl.FIRST..l_line_index_tbl.LAST
10726: UPDATE qp_npreq_lines_tmp
10727: SET unit_price = l_unit_price_tbl(i),
10728: pricing_status_code = l_pricing_sts_code_tbl(i),
10729: pricing_status_text = l_pricing_sts_txt_tbl(i)
10730: WHERE line_index = l_line_index_tbl(i);

Line 10839: UPDATE qp_npreq_lines_tmp

10835: IF l_debug = FND_API.G_TRUE THEN
10836: QP_PREQ_GRP.engine_debug('Begin LINES Usage Pricing LOOP2');
10837: END IF;
10838: FORALL i IN l_line_index_tbl.FIRST..l_line_index_tbl.LAST
10839: UPDATE qp_npreq_lines_tmp
10840: SET unit_price = l_unit_price_tbl(i),
10841: pricing_status_code = l_pricing_sts_code_tbl(i),
10842: pricing_status_text = l_pricing_sts_txt_tbl(i)
10843: WHERE line_index = l_line_index_tbl(i);

Line 10871: FROM qp_npreq_lines_tmp line

10867: FUNCTION Call_Usage_Pricing RETURN VARCHAR2 IS
10868:
10869: CURSOR l_chk_usage_cur IS
10870: SELECT G_YES
10871: FROM qp_npreq_lines_tmp line
10872: WHERE line.pricing_status_code IN
10873: (G_STATUS_UPDATED, G_STATUS_UNCHANGED, G_STATUS_GSA_VIOLATION)
10874: AND line.usage_pricing_type = QP_PREQ_GRP.G_BILLING_TYPE;
10875:

Line 10910: FROM qp_npreq_lines_tmp buyline

10906: oldfgdis.arithmetic_operator operand_calculation_code,
10907: buyline.line_index,
10908: oldprg.list_line_id,
10909: oldprg.updated_flag
10910: FROM qp_npreq_lines_tmp buyline
10911: , qp_event_phases ev
10912: , qp_pricing_phases ph
10913: , oe_price_adjustments oldprg
10914: , oe_price_adj_assocs oldrltd

Line 10916: , qp_npreq_lines_tmp oldfreeline

10912: , qp_pricing_phases ph
10913: , oe_price_adjustments oldprg
10914: , oe_price_adj_assocs oldrltd
10915: , oe_price_adjustments oldfgdis
10916: , qp_npreq_lines_tmp oldfreeline
10917: --where G_REQUEST_TYPE_CODE = 'ONT'
10918: --bug 3085453 handle pricing availability UI
10919: -- they pass reqtype ONT and insert adj into ldets
10920: --bug 3085453 handle pricing availability UI

Line 10965: -- FROM qp_npreq_lines_tmp buyline

10961: -- oldfgdis.arithmetic_operator operand_calculation_code,
10962: -- buyline.line_index,
10963: -- oldprg.list_line_id,
10964: -- oldprg.updated_flag
10965: -- FROM qp_npreq_lines_tmp buyline
10966: -- , qp_event_phases ev
10967: -- , qp_pricing_phases ph
10968: -- , oe_price_adjustments oldprg
10969: -- , oe_price_adj_assocs oldrltd

Line 10971: -- , qp_npreq_lines_tmp oldfreeline

10967: -- , qp_pricing_phases ph
10968: -- , oe_price_adjustments oldprg
10969: -- , oe_price_adj_assocs oldrltd
10970: -- , oe_price_adjustments oldfgdis
10971: -- , qp_npreq_lines_tmp oldfreeline
10972: --where G_REQUEST_TYPE_CODE = 'ONT'
10973: --bug 3085453 handle pricing availability UI
10974: -- they pass reqtype ONT and insert adj into ldets
10975: -- WHERE QP_PREQ_PUB.G_CHECK_CUST_VIEW_FLAG = G_YES

Line 11016: FROM qp_npreq_lines_tmp buyline

11012: oldfgdis.operand_calculation_code,
11013: buyline.line_index,
11014: oldprg.created_from_list_line_id,
11015: oldprg.updated_flag
11016: FROM qp_npreq_lines_tmp buyline
11017: , qp_event_phases ev
11018: , qp_pricing_phases ph
11019: , qp_npreq_ldets_tmp oldprg
11020: , qp_npreq_rltd_lines_tmp oldrltd

Line 11022: , qp_npreq_lines_tmp oldfreeline

11018: , qp_pricing_phases ph
11019: , qp_npreq_ldets_tmp oldprg
11020: , qp_npreq_rltd_lines_tmp oldrltd
11021: , qp_npreq_ldets_tmp oldfgdis
11022: , qp_npreq_lines_tmp oldfreeline
11023: --where G_REQUEST_TYPE_CODE <> 'ONT'
11024: --bug 3085453 handle pricing availability UI
11025: -- they pass reqtype ONT and insert adj into ldets
11026: WHERE QP_PREQ_PUB.G_CHECK_CUST_VIEW_FLAG <> G_YES

Line 11071: FROM qp_npreq_lines_tmp line, oe_price_adjustments prg,

11067: fgdis.list_line_id fgdis_list_line_id, prg.pricing_phase_id prg_phase_id,
11068: prg.price_adjustment_id prg_price_adj_id,
11069: fgdis.price_adjustment_id fg_price_adj_id, fgdis.line_id fg_line_id,
11070: prg.updated_flag
11071: FROM qp_npreq_lines_tmp line, oe_price_adjustments prg,
11072: oe_price_adj_assocs ass, oe_price_adjustments fgdis
11073: WHERE line.line_type_code = G_LINE_LEVEL
11074: AND prg.line_id = line.line_id
11075: AND prg.list_line_type_code = 'PRG'

Line 11084: FROM qp_npreq_lines_tmp line, oe_price_adjustments prg,

11080: fgdis.list_line_id fgdis_list_line_id, prg.pricing_phase_id prg_phase_id,
11081: prg.price_adjustment_id prg_price_adj_id,
11082: fgdis.price_adjustment_id fg_price_adj_id, fgdis.line_id fg_line_id,
11083: prg.updated_flag
11084: FROM qp_npreq_lines_tmp line, oe_price_adjustments prg,
11085: oe_price_adj_assocs ass, oe_price_adjustments fgdis
11086: WHERE line.line_type_code = G_ORDER_LEVEL
11087: AND prg.header_id = line.line_id
11088: AND prg.line_id IS NULL

Line 11123: FROM qp_npreq_lines_tmp buyline

11119: FOR cl IN
11120: (SELECT buyline.line_index
11121: , oldprg.list_line_id, oldfgdis.line_id
11122: , oldprg.updated_flag
11123: FROM qp_npreq_lines_tmp buyline
11124: , qp_event_phases ev
11125: , qp_pricing_phases ph
11126: , oe_price_adjustments oldprg
11127: , oe_price_adj_assocs oldrltd

Line 11240: UPDATE qp_npreq_lines_tmp

11236: END LOOP; --l_fg_line_index_tbl
11237: END IF; --debug
11238:
11239: FORALL i IN l_fg_line_index_tbl.FIRST..l_fg_line_index_tbl.LAST
11240: UPDATE qp_npreq_lines_tmp
11241: SET process_status = G_FREEGOOD || l_fg_list_line_id_tbl(i) || G_BUYLINE
11242: || l_buy_line_index_tbl(i) || G_PROMO_GOODS_DISCOUNT || l_buy_list_line_id_tbl(i)
11243: || G_PROMO_GOODS_DISCOUNT || nvl(l_buy_updated_flag_tbl(i), G_NO)
11244: || G_STATUS_UPDATED || l_fg_operand_tbl(i) || l_fg_operator_tbl(i)

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

11250: END IF; --l_fg_line_index_tbl.count
11251:
11252: IF QP_PREQ_GRP.G_DEBUG_ENGINE = FND_API.G_TRUE
11253: THEN
11254: FOR cl IN (SELECT line_index, process_status FROM qp_npreq_lines_tmp
11255: WHERE instr(process_status, G_FREEGOOD) > 0)
11256: LOOP
11257: IF l_debug = FND_API.G_TRUE THEN
11258: QP_PREQ_GRP.engine_debug('Freegood line dtl: line_ind '

Line 11287: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp line

11283: PROCEDURE Update_prg_pricing_status(x_return_status OUT NOCOPY VARCHAR2,
11284: x_return_status_text OUT NOCOPY VARCHAR2) IS
11285: CURSOR l_mark_prg_delete_cur IS
11286: SELECT rltd.line_detail_index, rltd.related_line_detail_index
11287: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp line
11288: WHERE rltd.pricing_status_code = G_STATUS_NEW
11289: AND rltd.relationship_type_code = G_GENERATED_LINE
11290: AND line.line_index = rltd.related_line_index
11291: AND line.process_status IN (G_NOT_VALID, G_STATUS_DELETED); --bug 3126969

Line 11483: FROM qp_npreq_lines_tmp oldfreeline

11479: newfgdis.created_from_list_line_id newfgdis_list_line_id,
11480: newfgdis.operand_value || newfgdis.operand_calculation_code newfgdis_operand,
11481: oldfreeline.SERVICE_DURATION old_SERVICE_DURATION, -- service project
11482: oldfreeline.SERVICE_PERIOD old_SERVICE_PERIOD -- service project
11483: FROM qp_npreq_lines_tmp oldfreeline
11484: , qp_npreq_rltd_lines_tmp newrltd
11485: , qp_npreq_ldets_tmp newfgdis
11486: , qp_npreq_lines_tmp newfgline
11487: , qp_npreq_line_attrs_tmp oldfreeitem

Line 11486: , qp_npreq_lines_tmp newfgline

11482: oldfreeline.SERVICE_PERIOD old_SERVICE_PERIOD -- service project
11483: FROM qp_npreq_lines_tmp oldfreeline
11484: , qp_npreq_rltd_lines_tmp newrltd
11485: , qp_npreq_ldets_tmp newfgdis
11486: , qp_npreq_lines_tmp newfgline
11487: , qp_npreq_line_attrs_tmp oldfreeitem
11488: , qp_npreq_line_attrs_tmp newfgitem
11489: --where G_REQUEST_TYPE_CODE = 'ONT'
11490: --bug 3085453 handle pricing availability UI

Line 11607: FROM qp_npreq_lines_tmp oldfreeline

11603: newfgdis.created_from_list_line_id newfgdis_list_line_id,
11604: newfgdis.operand_value || newfgdis.operand_calculation_code newfgdis_operand,
11605: oldfreeline.SERVICE_DURATION old_SERVICE_DURATION, -- service project
11606: oldfreeline.SERVICE_PERIOD old_SERVICE_PERIOD -- service project
11607: FROM qp_npreq_lines_tmp oldfreeline
11608: , qp_npreq_rltd_lines_tmp newrltd
11609: , qp_npreq_ldets_tmp newfgdis
11610: , qp_npreq_lines_tmp newfgline
11611: , qp_npreq_line_attrs_tmp newfgitem

Line 11610: , qp_npreq_lines_tmp newfgline

11606: oldfreeline.SERVICE_PERIOD old_SERVICE_PERIOD -- service project
11607: FROM qp_npreq_lines_tmp oldfreeline
11608: , qp_npreq_rltd_lines_tmp newrltd
11609: , qp_npreq_ldets_tmp newfgdis
11610: , qp_npreq_lines_tmp newfgline
11611: , qp_npreq_line_attrs_tmp newfgitem
11612: , qp_npreq_line_attrs_tmp oldfreeitem
11613: --WHERE G_REQUEST_TYPE_CODE <> 'ONT'
11614: --bug 3085453 handle pricing availability UI

Line 11638: FROM qp_npreq_lines_tmp buyline, oe_price_adjustments prg,

11634: AND oldfreeitem.attribute = G_PRIC_ATTRIBUTE1;
11635:
11636: CURSOR l_updated_prg_fg_cur IS
11637: SELECT /*+ INDEX(prg OE_PRICE_ADJUSTMENTS_N2) */ rltd.related_line_index
11638: FROM qp_npreq_lines_tmp buyline, oe_price_adjustments prg,
11639: qp_npreq_ldets_tmp ldet, qp_npreq_rltd_lines_tmp rltd
11640: --WHERE G_REQUEST_TYPE_CODE = 'ONT'
11641: --bug 3085453 handle pricing availability UI
11642: -- they pass reqtype ONT and insert adj into ldets

Line 11657: FROM qp_npreq_lines_tmp buyline, oe_price_adjustments prg,

11653: AND rltd.line_detail_index = ldet.line_detail_index
11654: AND rltd.pricing_status_code = G_STATUS_NEW
11655: UNION
11656: SELECT /*+ INDEX(prg OE_PRICE_ADJUSTMENTS_N1) */ rltd.related_line_index
11657: FROM qp_npreq_lines_tmp buyline, oe_price_adjustments prg,
11658: qp_npreq_ldets_tmp ldet, qp_npreq_rltd_lines_tmp rltd
11659: --WHERE G_REQUEST_TYPE_CODE = 'ONT'
11660: --bug 3085453 handle pricing availability UI
11661: -- they pass reqtype ONT and insert adj into ldets

Line 11678: FROM qp_npreq_lines_tmp buyline, qp_npreq_ldets_tmp prg,

11674: AND rltd.pricing_status_code = G_STATUS_NEW
11675: UNION
11676: -- hint added for 5575718
11677: SELECT /*+ ORDERED */ rltd.related_line_index
11678: FROM qp_npreq_lines_tmp buyline, qp_npreq_ldets_tmp prg,
11679: qp_npreq_ldets_tmp ldet, qp_npreq_rltd_lines_tmp rltd
11680: --WHERE G_REQUEST_TYPE_CODE <> 'ONT'
11681: --bug 3085453 handle pricing availability UI
11682: -- they pass reqtype ONT and insert adj into ldets

Line 11761: FROM qp_npreq_lines_tmp line

11757: IF l_Process_PRG = G_NO
11758: THEN
11759: BEGIN
11760: SELECT 'Y' INTO l_Process_PRG
11761: FROM qp_npreq_lines_tmp line
11762: WHERE line.pricing_status_code IN (G_STATUS_UNCHANGED,
11763: G_STATUS_UPDATED, G_STATUS_NEW, G_STATUS_GSA_VIOLATION, G_STATUS_INVALID_PRICE_LIST)
11764: AND instr(line.process_status, G_FREEGOOD) > 0
11765: AND ROWNUM = 1;

Line 11773: FROM qp_npreq_lines_tmp line

11769: END IF; --l_debug
11770:
11771: IF l_Process_PRG = G_NO THEN
11772: SELECT 'Y' INTO l_Process_PRG
11773: FROM qp_npreq_lines_tmp line
11774: WHERE line.pricing_status_code IN (G_STATUS_UNCHANGED,
11775: G_STATUS_UPDATED, G_STATUS_NEW, G_STATUS_GSA_VIOLATION)
11776: AND EXISTS
11777: (SELECT 'Y' FROM oe_price_adjustments adj

Line 11821: FROM qp_npreq_lines_tmp line, oe_price_adjustments adj

11817: IF l_debug = FND_API.G_TRUE THEN
11818: FOR cl IN
11819: (SELECT adj.list_line_id, adj.updated_flag, line.line_index, --removed index oe_price_adjustments_n1 smbalara 14393164
11820: adj.pricing_phase_id, adj.price_adjustment_id, adj.line_id
11821: FROM qp_npreq_lines_tmp line, oe_price_adjustments adj
11822: WHERE line.line_type_code = G_LINE_LEVEL
11823: AND adj.line_id = line.line_id
11824: AND adj.list_line_type_code = G_PROMO_GOODS_DISCOUNT
11825: UNION

Line 11828: FROM qp_npreq_lines_tmp line, oe_price_adjustments adj

11824: AND adj.list_line_type_code = G_PROMO_GOODS_DISCOUNT
11825: UNION
11826: SELECT adj.list_line_id, adj.updated_flag, line.line_index,
11827: adj.pricing_phase_id, adj.price_adjustment_id, adj.line_id
11828: FROM qp_npreq_lines_tmp line, oe_price_adjustments adj
11829: WHERE line.line_type_code = G_ORDER_LEVEL
11830: AND adj.header_id = line.line_id
11831: AND adj.line_id IS NULL
11832: AND adj.list_line_type_code = G_PROMO_GOODS_DISCOUNT)

Line 11894: UPDATE qp_npreq_lines_tmp SET

11890:
11891: IF l_upd_engine_fg_index.COUNT > 0 THEN
11892: --update the engine inserted fg line to G_NOT_VALID
11893: FORALL i IN l_upd_engine_fg_index.FIRST..l_upd_engine_fg_index.LAST
11894: UPDATE qp_npreq_lines_tmp SET
11895: pricing_status_code = G_NOT_VALID, process_status = G_NOT_VALID
11896: WHERE line_index = l_upd_engine_fg_index(i);
11897:
11898:

Line 11901: UPDATE qp_npreq_lines_tmp oldfg SET process_status = G_STATUS_UNCHANGED

11897:
11898:
11899: --the following update will mark the overridden PRG's passed in
11900: --freegood lines as process_status = G_STATUS_UNCHANGED
11901: UPDATE qp_npreq_lines_tmp oldfg SET process_status = G_STATUS_UNCHANGED
11902: --fix for bug 2691794
11903: , processed_flag = G_FREEGOOD_LINE
11904: WHERE oldfg.pricing_status_code IN (G_STATUS_UPDATED, G_STATUS_UNCHANGED)
11905: AND instr(oldfg.process_status, G_PROMO_GOODS_DISCOUNT || G_YES || G_STATUS_UPDATED) > 0;

Line 11919: FROM qp_npreq_lines_tmp oldfgline

11915: AND l_debug = FND_API.G_TRUE
11916: THEN
11917: FOR cl IN (SELECT newprg.line_index line_ind
11918: , newprg.created_from_list_line_id
11919: FROM qp_npreq_lines_tmp oldfgline
11920: , qp_npreq_ldets_tmp newprg
11921: WHERE --ldet.line_index = oldfgline.line_index
11922: instr(oldfgline.process_status
11923: , G_BUYLINE || newprg.line_index || G_PROMO_GOODS_DISCOUNT) > 0

Line 11940: UPDATE qp_npreq_lines_tmp oldfgline

11936: --the following update will update the process_status on freegood lines
11937: --identified from the previous identify_freegood_lines procedure
11938: --to G_STATUS_DELETED if the pricing engine has not created matching
11939: --PRG modifiers against its buy line
11940: UPDATE qp_npreq_lines_tmp oldfgline
11941: SET oldfgline.process_status = G_STATUS_DELETED
11942: WHERE NOT EXISTS (SELECT newprg.line_index
11943: FROM qp_npreq_ldets_tmp newprg
11944: --, qp_npreq_line_attrs_tmp newfgitem <-- commented out, sql repos

Line 12127: UPDATE qp_npreq_lines_tmp line SET

12123: QP_PREQ_GRP.engine_debug('passed in frg update '|| l_prg_line_ind_tbl.COUNT);
12124:
12125: END IF;
12126: FORALL i IN l_prg_line_ind_tbl.FIRST..l_prg_line_ind_tbl.LAST
12127: UPDATE qp_npreq_lines_tmp line SET
12128: line.process_status = l_prg_process_sts_tbl(i)
12129: --pricing_status_code needs to be set to G_NOT_VALID so that
12130: --this does not get into OM's
12131: --update statement to update lines with UPDATE status

Line 12147: UPDATE qp_npreq_lines_tmp SET pricing_status_code = G_NOT_VALID, process_status = G_NOT_VALID

12143: END IF;
12144: END IF; --l_process_prg
12145: -- service project
12146: IF QP_PREQ_PUB.G_CHECK_CUST_VIEW_FLAG <> G_YES THEN
12147: UPDATE qp_npreq_lines_tmp SET pricing_status_code = G_NOT_VALID, process_status = G_NOT_VALID
12148: WHERE PROCESSED_CODE = G_BY_ENGINE AND SERVICE_PERIOD IS NOT NULL;
12149: QP_PREQ_GRP.engine_debug('deleted service rows'||SQL%rowcount);
12150: END IF;
12151: -- service project

Line 12216: UPDATE qp_npreq_lines_tmp line SET line.process_status =

12212: END LOOP; --G_prg_unch_line_index_tbl
12213: END IF; --QP_PREQ_GRP.G_DEBUG_ENGINE
12214:
12215: FORALL i IN G_prg_unch_line_index_tbl.FIRST..G_prg_unch_line_index_tbl.LAST
12216: UPDATE qp_npreq_lines_tmp line SET line.process_status =
12217: --fix for bug 2831270
12218: decode(line.adjusted_unit_price, G_prg_unch_calc_price_tbl(i),
12219: G_NOT_VALID, G_STATUS_UPDATED)
12220: --Calling application looks at pricing_status_code this also needs to be updated

Line 12231: UPDATE qp_npreq_lines_tmp line SET line.process_status =

12227: WHERE line.line_index = G_prg_unch_new_index_tbl(i)
12228: RETURNING line.process_status BULK COLLECT INTO G_prg_unch_process_sts_tbl;
12229:
12230: FORALL i IN G_prg_unch_line_index_tbl.FIRST..G_prg_unch_line_index_tbl.LAST
12231: UPDATE qp_npreq_lines_tmp line SET line.process_status =
12232: decode(G_prg_unch_process_sts_tbl(i), G_NOT_VALID
12233: , G_STATUS_UNCHANGED, G_STATUS_UPDATED, G_NOT_VALID)
12234: --pricing_status_code needs to be set
12235: --to G_NOT_VALID so that this does not get into OM's

Line 12277: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp buyline

12273: -- 3493716: added prg.line_detail_index to cursor
12274: CURSOR l_buyline_price_flag_cur IS
12275: SELECT /*+ ORDERED USE_NL(buyline prg dis)*/
12276: dis.created_from_list_line_id, prg.line_detail_index, buyline.price_flag, 'Y' is_ldet, dis.line_index
12277: FROM qp_npreq_rltd_lines_tmp rltd, qp_npreq_lines_tmp buyline
12278: , qp_npreq_ldets_tmp prg, qp_npreq_ldets_tmp dis
12279: WHERE rltd.pricing_status_code = G_STATUS_NEW
12280: AND rltd.relationship_type_code = G_GENERATED_LINE
12281: AND buyline.line_index = rltd.line_index

Line 12357: from qp_npreq_rltd_lines_tmp rl, qp_npreq_lines_tmp buyline

12353: G_buyline_list_line_id, G_buyline_price_flag;
12354: CLOSE l_buyline_price_flag_cur;
12355: UPDATE qp_npreq_ldets_tmp freegood_dis set buy_line_price_flag =
12356: (select buyline.price_flag
12357: from qp_npreq_rltd_lines_tmp rl, qp_npreq_lines_tmp buyline
12358: where rl.pricing_status_code = G_STATUS_NEW
12359: and rl.relationship_type_code = G_GENERATED_LINE
12360: and rl.related_line_detail_index = freegood_dis.line_detail_index
12361: and buyline.line_index = rl.line_index)

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

12451: --you don't need to match the phase as this will be called after cleanup
12452: --and by the time adjustments w/b picked up from oe_price_adj and ldets
12453: --from the right phases
12454: AND pricing_phase_id in (select ph.pricing_phase_id
12455: from qp_event_phases evt , qp_pricing_phases ph, qp_npreq_lines_tmp line
12456: where ph.pricing_phase_id = evt.pricing_phase_id
12457: and instr(p_pricing_event,evt.pricing_event_code||',') > 0
12458: and line.line_index = ldets.line_index
12459: and (line.price_flag = G_YES

Line 12914: FROM qp_npreq_lines_tmp;

12910: ACTUAL_ORDER_QUANTITY,
12911: ORDER_UOM_SELLING_PRICE,
12912: SERVICE_DURATION,
12913: SERVICE_PERIOD
12914: FROM qp_npreq_lines_tmp;
12915:
12916: /*
12917: INDX,QP_PREQ_GRP.populate_output.l_ldets_cur,QP_LIST_LINES_PK,LIST_LINE_ID,1
12918: INDX,QP_PREQ_GRP.populate_output.l_ldets_cur,qp_npreq_ldets_tmp_N4,PRICING_STATUS_CODE,1

Line 13181: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line

13177: , ldet.updated_flag
13178: , ldet.calculation_code
13179: , line.qualifiers_exist_flag
13180: , ldet.pricing_group_sequence bucket
13181: FROM qp_npreq_ldets_tmp ldet, qp_npreq_lines_tmp line
13182: WHERE line.line_index = ldet.line_index
13183: ORDER BY line_ind;
13184:
13185: --3169430

Line 13246: from qp_npreq_lines_tmp;

13242: IF nvl(p_control_rec.temp_table_insert_flag, G_YES) = G_NO
13243: THEN
13244: -- temp table/direct insert path
13245: select count(*) into l_no_of_lines
13246: from qp_npreq_lines_tmp;
13247: ELSE
13248: -- PL/SQL table path
13249: l_no_of_lines := p_line_tbl.count;
13250: END IF;

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

14798:
14799: END PRICE_REQUEST;
14800:
14801: --procedure to return price and status code and text -- needed by PO team
14802: -- changed the out param value for x_adjusted_unit_price to qp_npreq_lines_tmp.order_uom_selling_price
14803: PROCEDURE get_price_for_line(p_line_index IN NUMBER,
14804: p_line_id IN NUMBER,
14805: x_line_unit_price OUT NOCOPY NUMBER,
14806: x_adjusted_unit_price OUT NOCOPY NUMBER,

Line 14836: FROM QP_NPREQ_LINES_TMP

14832: INTO x_line_unit_price,
14833: x_adjusted_unit_price,
14834: x_pricing_status_code,
14835: x_pricing_status_text
14836: FROM QP_NPREQ_LINES_TMP
14837: WHERE line_index = p_line_index;
14838: ELSIF p_line_id IS NOT NULL THEN
14839: SELECT line_unit_price,
14840: order_uom_selling_price,

Line 14847: FROM QP_NPREQ_LINES_TMP

14843: INTO x_line_unit_price,
14844: x_adjusted_unit_price,
14845: x_pricing_status_code,
14846: x_pricing_status_text
14847: FROM QP_NPREQ_LINES_TMP
14848: WHERE line_id = p_line_id;
14849: ELSE
14850: x_return_status := FND_API.G_RET_STS_ERROR;
14851: x_pricing_status_text := 'Must pass either p_line_index or p_line_id while calling ' || l_routine;