DBA Data[Home] [Help]

APPS.QP_CLEANUP_ADJUSTMENTS_PVT dependencies on OE_PRICE_ADJUSTMENTS

Line 16: --sequence OE_PRICE_ADJUSTMENTS_S

12:
13: l_debug VARCHAR2(3);
14: --to populate the price_adjustment_id for modifiers applied by the
15: --pricing engine. The price_adjustment_id is queried from the
16: --sequence OE_PRICE_ADJUSTMENTS_S
17: PROCEDURE Populate_Price_Adj_ID(x_return_status OUT NOCOPY VARCHAR2,
18: x_return_status_text OUT NOCOPY VARCHAR2) IS
19:
20: BEGIN

Line 28: OE_PRICE_ADJUSTMENTS_S.NEXTVAL

24: QP_PREQ_GRP.ENGINE_DEBUG('Populate_Price_Adj_ID: Java Engine not Installed ----------');
25: END IF;
26: --ADDED BY YANGLI FOR JAVA ENGINE PUB 3086881
27: Update qp_npreq_ldets_tmp set price_adjustment_id =
28: OE_PRICE_ADJUSTMENTS_S.NEXTVAL
29: where pricing_status_code = QP_PREQ_PUB.G_STATUS_NEW
30: and process_code = QP_PREQ_PUB.G_STATUS_NEW
31: and (automatic_flag = QP_PREQ_PUB.G_YES
32: or created_from_list_line_type = QP_PREQ_PUB.G_FREIGHT_CHARGE)

Line 42: OE_PRICE_ADJUSTMENTS_S.NEXTVAL

38: QP_PREQ_GRP.ENGINE_DEBUG('Populate_Price_Adj_ID: Java Engine is Installed ----------');
39: END IF;
40: IF (QP_UTIL_PUB.HVOP_Pricing_ON = 'Y') THEN
41: Update qp_int_ldets set price_adjustment_id =
42: OE_PRICE_ADJUSTMENTS_S.NEXTVAL
43: where pricing_status_code = QP_PREQ_PUB.G_STATUS_NEW
44: and process_code = QP_PREQ_PUB.G_STATUS_NEW
45: and (applied_flag = QP_PREQ_PUB.G_YES
46: or automatic_flag = QP_PREQ_PUB.G_YES)

Line 54: OE_PRICE_ADJUSTMENTS_S.NEXTVAL

50:
51: ELSE
52:
53: Update qp_int_ldets set price_adjustment_id =
54: OE_PRICE_ADJUSTMENTS_S.NEXTVAL
55: where pricing_status_code = QP_PREQ_PUB.G_STATUS_NEW
56: and process_code = QP_PREQ_PUB.G_STATUS_NEW
57: and (automatic_flag = QP_PREQ_PUB.G_YES)
58: -- or created_from_list_line_type = QP_PREQ_PUB.G_FREIGHT_CHARGE)

Line 81: from oe_price_adjustments adj

77: BEGIN
78:
79: l_debug := QP_PREQ_GRP.G_DEBUG_ENGINE;
80: select sum(operand) into l_adj_sum_operand
81: from oe_price_adjustments adj
82: where adj.header_id = p_header_id
83: and adj.line_id is null
84: and adj.modifier_level_code = QP_PREQ_PUB.G_ORDER_LEVEL
85: and adj.automatic_flag = QP_PREQ_PUB.G_YES

Line 120: --[julin/4865213] merged oe_price_adjustments unions, commented qp_npreq_ldets_tmp

116: x_return_status OUT NOCOPY VARCHAR2,
117: x_return_status_text OUT NOCOPY VARCHAR2) IS
118:
119: --the same cursor for unchanged as well
120: --[julin/4865213] merged oe_price_adjustments unions, commented qp_npreq_ldets_tmp
121: CURSOR l_update_cur IS
122: SELECT /*+ USE_NL(adj ldet ql) dynamic_sampling(1) index(LDET QP_PREQ_LDETS_TMP_N1) */ --bug#11925462 -- Bug No: 6753550
123: ldet.line_index line_index
124: , ldet.line_detail_index line_detail_index

Line 200: , oe_price_adjustments adj

196: , NVL(adj.adjusted_amount,0) adj_ord_qty_adjamt
197: , ldet.order_qty_operand ord_qty_operand
198: , adj.operand adj_ord_qty_operand
199: FROM qp_npreq_lines_tmp line
200: , oe_price_adjustments adj
201: -- Begin Bug No: 6753550
202: --,qp_ldets_v ldet
203: ,qp_npreq_ldets_tmp ldet
204: ,qp_list_lines ql_det

Line 303: , oe_price_adjustments adj

299: , adj.adjusted_amount adj_ord_qty_adjamt
300: , ldet.order_qty_operand ord_qty_operand
301: , adj.operand adj_ord_qty_operand
302: FROM qp_npreq_lines_tmp line
303: , oe_price_adjustments adj
304: ,qp_ldets_v ldet
305: , qp_list_lines ql
306: -- WHERE p_request_type_code = 'ONT'
307: --bug 3085453 handle pricing availability UI

Line 415: --[julin/4865213] merged oe_price_adjustments unions, commented qp_npreq_ldets_tmp

411: and ldet.list_line_id = ql.list_line_id;
412: */
413:
414: --ADDED BY YANGLI FOR JAVA ENGINE PUB 3086881
415: --[julin/4865213] merged oe_price_adjustments unions, commented qp_npreq_ldets_tmp
416: CURSOR l_update_int_cur IS
417: SELECT /*+ ORDERED USE_NL(adj ldet ql)*/
418: ldet.line_index line_index
419: , ldet.line_detail_index line_detail_index

Line 478: , oe_price_adjustments adj

474: , adj.adjusted_amount adj_ord_qty_adjamt
475: , ldet.order_qty_operand ord_qty_operand
476: , adj.operand adj_ord_qty_operand
477: FROM qp_int_lines line
478: , oe_price_adjustments adj
479: ,qp_ldets_v ldet
480: , qp_list_lines ql
481: -- WHERE p_request_type_code = 'ONT'
482: --bug 3085453 handle pricing availability UI

Line 569: , oe_price_adjustments adj

565: , adj.adjusted_amount adj_ord_qty_adjamt
566: , ldet.order_qty_operand ord_qty_operand
567: , adj.operand adj_ord_qty_operand
568: FROM qp_int_lines line
569: , oe_price_adjustments adj
570: ,qp_ldets_v ldet
571: , qp_list_lines ql
572: -- WHERE p_request_type_code = 'ONT'
573: --bug 3085453 handle pricing availability UI

Line 1413: oe_price_adjustments adj,

1409: WHERE lattr.attribute_type = QP_PREQ_PUB.G_PRICING_TYPE
1410: and EXISTS ( SELECT 'X' FROM
1411: qp_npreq_lines_tmp line,
1412: qp_npreq_ldets_tmp ldet,
1413: oe_price_adjustments adj,
1414: oe_price_adj_attribs_v attr
1415: WHERE line.price_flag in
1416: (QP_PREQ_PUB.G_YES, QP_PREQ_PUB.G_PHASE)
1417: and line.line_type_code = QP_PREQ_PUB.G_LINE_LEVEL

Line 1433: oe_price_adjustments adj,

1429: UNION
1430: SELECT 'X' FROM
1431: qp_npreq_lines_tmp line,
1432: qp_npreq_ldets_tmp ldet,
1433: oe_price_adjustments adj,
1434: oe_price_adj_attribs_v attr
1435: WHERE line.price_flag in
1436: (QP_PREQ_PUB.G_YES, QP_PREQ_PUB.G_PHASE)
1437: and line.line_type_code = QP_PREQ_PUB.G_ORDER_LEVEL

Line 1546: ,oe_price_adjustments adj_pbh

1542: adj.updated_flag,
1543: attr.list_header_id,
1544: adj.list_line_no
1545: FROM qp_npreq_lines_tmp line
1546: ,oe_price_adjustments adj_pbh
1547: ,oe_price_adj_assocs ass
1548: ,oe_price_adjustments adj
1549: , qp_pricing_attributes attr
1550: -- WHERE p_request_type_code = 'ONT'

Line 1548: ,oe_price_adjustments adj

1544: adj.list_line_no
1545: FROM qp_npreq_lines_tmp line
1546: ,oe_price_adjustments adj_pbh
1547: ,oe_price_adj_assocs ass
1548: ,oe_price_adjustments adj
1549: , qp_pricing_attributes attr
1550: -- WHERE p_request_type_code = 'ONT'
1551: --bug 3085453 handle pricing availability UI
1552: -- they pass reqtype ONT and insert adj into ldets

Line 1648: SELECT /*+ index(adj OE_PRICE_ADJUSTMENTS_N2) */ 'Y'

1644: and attr.pricing_attribute_context = QP_PREQ_PUB.G_PRIC_VOLUME_CONTEXT;
1645:
1646:
1647: CURSOR l_pbh_adj_exists_cur IS
1648: SELECT /*+ index(adj OE_PRICE_ADJUSTMENTS_N2) */ 'Y'
1649: FROM
1650: qp_npreq_lines_tmp line,
1651: oe_price_adjustments adj
1652: -- WHERE p_request_type_code = 'ONT'

Line 1651: oe_price_adjustments adj

1647: CURSOR l_pbh_adj_exists_cur IS
1648: SELECT /*+ index(adj OE_PRICE_ADJUSTMENTS_N2) */ 'Y'
1649: FROM
1650: qp_npreq_lines_tmp line,
1651: oe_price_adjustments adj
1652: -- WHERE p_request_type_code = 'ONT'
1653: --bug 3085453 handle pricing availability UI
1654: -- they pass reqtype ONT and insert adj into ldets
1655: WHERE QP_PREQ_PUB.G_CHECK_CUST_VIEW_FLAG = QP_PREQ_PUB.G_YES

Line 1678: SELECT /*+ index(adj OE_PRICE_ADJUSTMENTS_N1) */ 'Y'

1674: or (nvl(QP_PREQ_PUB.Get_buy_line_price_flag(adj.list_line_id, line.line_index),line.price_flag) = QP_PREQ_PUB.G_PHASE
1675: and nvl(ph.user_freeze_override_flag,ph.freeze_override_flag) =
1676: QP_PREQ_PUB.G_YES))))
1677: UNION
1678: SELECT /*+ index(adj OE_PRICE_ADJUSTMENTS_N1) */ 'Y'
1679: FROM
1680: qp_npreq_lines_tmp line,
1681: oe_price_adjustments adj
1682: -- WHERE p_request_type_code = 'ONT'

Line 1681: oe_price_adjustments adj

1677: UNION
1678: SELECT /*+ index(adj OE_PRICE_ADJUSTMENTS_N1) */ 'Y'
1679: FROM
1680: qp_npreq_lines_tmp line,
1681: oe_price_adjustments adj
1682: -- WHERE p_request_type_code = 'ONT'
1683: --bug 3085453 handle pricing availability UI
1684: -- they pass reqtype ONT and insert adj into ldets
1685: WHERE QP_PREQ_PUB.G_CHECK_CUST_VIEW_FLAG = QP_PREQ_PUB.G_YES

Line 2044: from qp_npreq_lines_tmp line, oe_price_adjustments adj,

2040: , line.line_quantity ordered_qty
2041: , NULL line_detail_type_code
2042: , line.line_category
2043: , line.price_flag
2044: from qp_npreq_lines_tmp line, oe_price_adjustments adj,
2045: qp_list_headers_b qplh
2046: -- where p_request_type_code = 'ONT'
2047: --bug 3085453 handle pricing availability UI
2048: -- they pass reqtype ONT and insert adj into ldets

Line 2099: from oe_price_adj_assocs a, oe_price_adjustments b

2095: and qplh.list_header_id = adj.list_header_id
2096: and qplh.list_type_code not in (QP_PREQ_PUB.G_PRICE_LIST_HEADER,
2097: QP_PREQ_PUB.G_AGR_LIST_HEADER)
2098: and not exists (select 'x'
2099: from oe_price_adj_assocs a, oe_price_adjustments b
2100: where a.RLTD_PRICE_ADJ_ID = adj.price_adjustment_id
2101: and b.price_adjustment_id = a.price_adjustment_id
2102: and b.list_line_type_code = QP_PREQ_GRP.G_PRICE_BREAK_TYPE)
2103: UNION

Line 2104: select /*+ ORDERED USE_NL(adj line qplh) index(adj OE_PRICE_ADJUSTMENTS_N1) dynamic_sampling(1) */ -- Bug No: 6753550

2100: where a.RLTD_PRICE_ADJ_ID = adj.price_adjustment_id
2101: and b.price_adjustment_id = a.price_adjustment_id
2102: and b.list_line_type_code = QP_PREQ_GRP.G_PRICE_BREAK_TYPE)
2103: UNION
2104: select /*+ ORDERED USE_NL(adj line qplh) index(adj OE_PRICE_ADJUSTMENTS_N1) dynamic_sampling(1) */ -- Bug No: 6753550
2105: adj.list_line_id created_from_list_line_id
2106: , line.line_index line_ind
2107: , line.line_index curr_line_index
2108: , line.line_id line_id

Line 2155: from qp_npreq_lines_tmp line1, oe_price_adjustments adj

2151: , line.line_quantity ordered_qty
2152: , NULL line_detail_type_code
2153: , line.line_category
2154: , line.price_flag
2155: from qp_npreq_lines_tmp line1, oe_price_adjustments adj
2156: ,qp_npreq_lines_tmp line, qp_list_headers_b qplh
2157: -- where p_request_type_code = 'ONT'
2158: --bug 3085453 handle pricing availability UI
2159: -- they pass reqtype ONT and insert adj into ldets