DBA Data[Home] [Help]

APPS.QP_MAINTAIN_DENORMALIZED_DATA dependencies on QP_LIST_LINES

Line 33: qp_list_lines ql

29: SELECT 'N' FROM dual WHERE
30: EXISTS(
31: SELECT 'Y'
32: FROM qp_list_headers_b qh,
33: qp_list_lines ql
34: WHERE qh.list_type_code = 'PRO'
35: and qh.active_flag = 'Y'
36: and ql.list_header_id = qh.list_header_id
37: and ql.list_line_type_code in ('PRG','IUE','TSN','CIE')

Line 111: from qp_list_lines ql, qp_list_headers_b qlh

107:
108: insert into qp_adv_mod_products
109: (pricing_phase_id, product_attribute, product_attr_value)
110: (select /*+ ORDERED USE_NL(qlh) */ ql.pricing_phase_id, 'PRICING_ATTRIBUTE3', 'ALL_ITEMS'
111: from qp_list_lines ql, qp_list_headers_b qlh
112: where ql.qualification_ind = 0
113: and ql.pricing_phase_id <> 1
114: and ql.modifier_level_code = 'LINEGROUP'
115: --added for bug 5237249

Line 132: from qp_rltd_modifiers rltd, qp_list_lines ql, qp_list_headers_b qlh

128: insert into qp_adv_mod_products
129: (pricing_phase_id, product_attribute, product_attr_value)
130: (select
131: distinct ql.pricing_phase_id, qpa.product_attribute, qpa.product_attr_value
132: from qp_rltd_modifiers rltd, qp_list_lines ql, qp_list_headers_b qlh
133: ,qp_pricing_attributes qpa
134: where rltd.rltd_modifier_grp_type = 'BENEFIT'
135: and ql.list_line_id = rltd.to_rltd_modifier_id
136: --and ql.list_line_type_code = 'DIS'

Line 154: from qp_list_lines ql

150: and item.product_attr_value = qpa.product_attr_value)
151: UNION
152: select
153: distinct ql.pricing_phase_id, qpa.product_attribute, qpa.product_attr_value
154: from qp_list_lines ql
155: , qp_list_headers_b qlh
156: , qp_pricing_attributes qpa
157: where ql.pricing_phase_id > 1
158: and ql.qualification_ind > 0

Line 177: from qp_list_lines ql

173: and item.product_attr_value = qpa.product_attr_value)
174: UNION
175: select
176: distinct ql.pricing_phase_id, qpa.product_attribute, qpa.product_attr_value
177: from qp_list_lines ql
178: , qp_list_headers_b qlh
179: , qp_pricing_attributes qpa
180: where ql.modifier_level_code = 'LINEGROUP'
181: and ql.pricing_phase_id > 1

Line 218: qp_list_lines ql

214: SELECT 'Y' FROM DUAL WHERE
215: EXISTS(
216: SELECT 'Y'
217: FROM qp_list_headers_b qh,
218: qp_list_lines ql
219: WHERE qh.list_type_code = 'PRO'
220: and qh.active_flag = 'Y'
221: and ql.list_header_id = qh.list_header_id
222: and ql.list_line_type_code in ('OID','PRG','IUE','TSN','CIE')

Line 271: select /*+ ordered use_nl(rlt lh) index(ll QP_LIST_LINES_N5) * / 'Y'

267: -- also rearranged the tables and changed the optimizer hint
268: /*update qp_pricing_phases PH
269: --at least 1 PRG modifier exists with rltd line
270: set rltd_exists = (
271: select /*+ ordered use_nl(rlt lh) index(ll QP_LIST_LINES_N5) * / 'Y'
272: from qp_list_lines LL, qp_rltd_modifiers RLT, qp_list_headers_b LH
273: where LH.active_flag = 'Y'
274: and LH.list_type_code = 'PRO'
275: and LL.pricing_phase_id = PH.pricing_phase_id

Line 272: from qp_list_lines LL, qp_rltd_modifiers RLT, qp_list_headers_b LH

268: /*update qp_pricing_phases PH
269: --at least 1 PRG modifier exists with rltd line
270: set rltd_exists = (
271: select /*+ ordered use_nl(rlt lh) index(ll QP_LIST_LINES_N5) * / 'Y'
272: from qp_list_lines LL, qp_rltd_modifiers RLT, qp_list_headers_b LH
273: where LH.active_flag = 'Y'
274: and LH.list_type_code = 'PRO'
275: and LL.pricing_phase_id = PH.pricing_phase_id
276: and LL.list_header_id = LH.list_header_id

Line 283: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N5) * / 'Y'

279: and LL.list_line_type_code = 'PRG'
280: and rownum = 1)
281: --atleast 1 modifier of type OID exist
282: , oid_exists = (
283: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N5) * / 'Y'
284: from qp_list_lines LL, qp_list_headers_b LH
285: where LH.list_type_code = 'PRO'
286: and LH.active_flag = 'Y'
287: and LL.pricing_phase_id = PH.pricing_phase_id

Line 284: from qp_list_lines LL, qp_list_headers_b LH

280: and rownum = 1)
281: --atleast 1 modifier of type OID exist
282: , oid_exists = (
283: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N5) * / 'Y'
284: from qp_list_lines LL, qp_list_headers_b LH
285: where LH.list_type_code = 'PRO'
286: and LH.active_flag = 'Y'
287: and LL.pricing_phase_id = PH.pricing_phase_id
288: and LL.list_line_type_code = 'OID'

Line 293: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N4) * / 'Y'

289: and LL.list_header_id = LH.list_header_id
290: and rownum = 1)
291: --at least 1 modifier of level line_group exist
292: , line_group_exists = (
293: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N4) * / 'Y'
294: from qp_list_lines LL, qp_list_headers_b LH
295: where LH.list_type_code in ('DLT','DEL','SLT','PRO','CHARGES')
296: and LH.active_flag = 'Y'
297: and LL.list_header_id = LH.list_header_id

Line 294: from qp_list_lines LL, qp_list_headers_b LH

290: and rownum = 1)
291: --at least 1 modifier of level line_group exist
292: , line_group_exists = (
293: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N4) * / 'Y'
294: from qp_list_lines LL, qp_list_headers_b LH
295: where LH.list_type_code in ('DLT','DEL','SLT','PRO','CHARGES')
296: and LH.active_flag = 'Y'
297: and LL.list_header_id = LH.list_header_id
298: and LL.pricing_phase_id = PH.pricing_phase_id

Line 303: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N5) * / 'Y'

299: and LL.modifier_level_code = 'LINEGROUP'
300: and rownum = 1)
301: --at least 1 freight charge modifier exist
302: , freight_exists = (
303: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N5) * / 'Y'
304: from qp_list_lines LL, qp_list_headers_b LH
305: where LH.list_type_code = 'CHARGES'
306: and LH.active_flag = 'Y'
307: and LL.list_header_id = LH.list_header_id

Line 304: from qp_list_lines LL, qp_list_headers_b LH

300: and rownum = 1)
301: --at least 1 freight charge modifier exist
302: , freight_exists = (
303: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N5) * / 'Y'
304: from qp_list_lines LL, qp_list_headers_b LH
305: where LH.list_type_code = 'CHARGES'
306: and LH.active_flag = 'Y'
307: and LL.list_header_id = LH.list_header_id
308: and LL.pricing_phase_id = PH.pricing_phase_id

Line 322: from qp_list_lines LL, qp_list_headers_b LH

318: --at least 1 PRG modifier exists with rltd line
319: --[julin/4698834] removed qp_rltd_modifiers RLT; per bug, needs to be 'Y' if PRG simply exists
320: set rltd_exists = (
321: select 'Y'
322: from qp_list_lines LL, qp_list_headers_b LH
323: where LH.active_flag = 'Y'
324: and LH.list_type_code = 'PRO'
325: and LL.pricing_phase_id = PH.pricing_phase_id
326: and LL.list_header_id = LH.list_header_id

Line 338: from qp_list_lines LL, qp_list_headers_b LH

334: --atleast 1 modifier of type OID exist
335: update qp_pricing_phases PH
336: set oid_exists = (
337: SELECT 'Y'
338: from qp_list_lines LL, qp_list_headers_b LH
339: where LH.list_type_code = 'PRO'
340: and LH.active_flag = 'Y'
341: and LL.pricing_phase_id = PH.pricing_phase_id
342: and LL.list_line_type_code = 'OID'

Line 352: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N4) */ 'Y'

348: --at least 1 modifier of level line_group exist
349: if (nvl(p_pricing_phase_id,3) >2) then
350: update qp_pricing_phases PH
351: set line_group_exists = (
352: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N4) */ 'Y'
353: from qp_list_lines LL, qp_list_headers_b LH
354: where LH.list_type_code in ('DLT','DEL','SLT','PRO','CHARGES')
355: and LH.active_flag = 'Y'
356: and LL.list_header_id = LH.list_header_id

Line 353: from qp_list_lines LL, qp_list_headers_b LH

349: if (nvl(p_pricing_phase_id,3) >2) then
350: update qp_pricing_phases PH
351: set line_group_exists = (
352: SELECT /*+ ordered use_nl(lh) index(ll QP_LIST_LINES_N4) */ 'Y'
353: from qp_list_lines LL, qp_list_headers_b LH
354: where LH.list_type_code in ('DLT','DEL','SLT','PRO','CHARGES')
355: and LH.active_flag = 'Y'
356: and LL.list_header_id = LH.list_header_id
357: and LL.pricing_phase_id = PH.pricing_phase_id

Line 369: from qp_list_lines LL, qp_list_headers_b LH

365: --at least 1 freight charge modifier exist
366: update qp_pricing_phases PH
367: set freight_exists = (
368: SELECT 'Y'
369: from qp_list_lines LL, qp_list_headers_b LH
370: where LH.list_type_code = 'CHARGES'
371: and LH.active_flag = 'Y'
372: and LL.list_header_id = LH.list_header_id
373: and LL.pricing_phase_id = PH.pricing_phase_id

Line 425: from qp_list_lines l, qp_list_headers_b h

421:
422: begin
423: /*
424: select 'Y' into l_automatic_exists
425: from qp_list_lines l, qp_list_headers_b h
426: where l.automatic_flag = 'Y'
427: and l.pricing_phase_id = I.pricing_phase_id
428: and l.list_header_id = h.list_header_id
429: and l.modifier_level_code in ('LINE', 'LINEGROUP', 'ORDER')

Line 435: where exists (select 1 from qp_list_lines l

431: and rownum = 1;
432: */
433: --fix for sql repository perf bug 3640054
434: select 'Y' into l_automatic_exists from dual
435: where exists (select 1 from qp_list_lines l
436: where l.automatic_flag = 'Y'
437: and l.pricing_phase_id = I.pricing_phase_id
438: and exists (select 'x' from qp_list_headers_b h
439: where l.list_header_id = h.list_header_id

Line 449: from qp_list_lines l, qp_list_headers_b h

445:
446: begin
447: /*
448: select 'Y' into l_manual_exists
449: from qp_list_lines l, qp_list_headers_b h
450: where l.automatic_flag = 'N'
451: and l.pricing_phase_id = I.pricing_phase_id
452: and l.list_header_id = h.list_header_id
453: and l.modifier_level_code in ('LINE', 'LINEGROUP', 'ORDER')

Line 459: where exists (select 1 from qp_list_lines l

455: and rownum = 1;
456: */
457: --fix for sql repository perf bug 3640054
458: select 'Y' into l_manual_exists from dual
459: where exists (select 1 from qp_list_lines l
460: where l.automatic_flag = 'N'
461: and l.pricing_phase_id = I.pricing_phase_id
462: and exists (select 'x' from qp_list_headers_b h
463: where l.list_header_id = h.list_header_id

Line 496: (select /*+ ordered use_nl(h) index(l QP_LIST_LINES_N5)

492: -- Changed the update statement to look for pricing_phase_id other than 1, bug 2981629
493: -- also rearranged the tables and changed the optimizer hint
494: /* update qp_pricing_phases I
495: set manual_modifier_flag =
496: (select /*+ ordered use_nl(h) index(l QP_LIST_LINES_N5)
497: decode(min(l.automatic_flag)||max(l.automatic_flag),'YY','A','NN','M','B')
498: from qp_list_lines l, qp_list_headers_b h
499: where l.pricing_phase_id = I.pricing_phase_id
500: and l.list_header_id = h.list_header_id

Line 498: from qp_list_lines l, qp_list_headers_b h

494: /* update qp_pricing_phases I
495: set manual_modifier_flag =
496: (select /*+ ordered use_nl(h) index(l QP_LIST_LINES_N5)
497: decode(min(l.automatic_flag)||max(l.automatic_flag),'YY','A','NN','M','B')
498: from qp_list_lines l, qp_list_headers_b h
499: where l.pricing_phase_id = I.pricing_phase_id
500: and l.list_header_id = h.list_header_id
501: and h.active_flag = 'Y')
502: where pricing_phase_id = nvl(p_pricing_phase_id, pricing_phase_id)

Line 754: select /*+ index(l qp_list_lines_n15) index(h qp_list_headers_b_n7)*/ --8418006

750: */
751:
752: cursor list_lines_cur(a_list_header_id number,b_list_header_id NUMBER, l_request_id NUMBER)
753: is
754: select /*+ index(l qp_list_lines_n15) index(h qp_list_headers_b_n7)*/ --8418006
755: l.list_line_id, l.qualification_ind, h.list_type_code, h.list_header_id
756: from qp_list_lines l, qp_list_headers_b h
757: where l.list_header_id = h.list_header_id
758: and h.active_flag = 'Y'

Line 756: from qp_list_lines l, qp_list_headers_b h

752: cursor list_lines_cur(a_list_header_id number,b_list_header_id NUMBER, l_request_id NUMBER)
753: is
754: select /*+ index(l qp_list_lines_n15) index(h qp_list_headers_b_n7)*/ --8418006
755: l.list_line_id, l.qualification_ind, h.list_type_code, h.list_header_id
756: from qp_list_lines l, qp_list_headers_b h
757: where l.list_header_id = h.list_header_id
758: and h.active_flag = 'Y'
759: and (h.list_header_id between a_list_header_id and b_list_header_id)
760: and decode (l_request_id,null,1,l.REQUEST_ID) = nvl (l_request_id,1) --bug 8359554

Line 786: select list_line_id from qp_list_lines where

782: --for bug 5121471
783: p_List_Header_Id and p_List_Header_Id_high;
784: cursor l_line_qual_exc (p_pricing_phase_id number,
785: p_list_header_id number) is
786: select list_line_id from qp_list_lines where
787: list_header_id = p_list_header_id
788: and pricing_phase_id = p_pricing_phase_id
789: minus
790: select list_line_id from qp_qualifiers where

Line 1104: UPDATE qp_list_lines

1100: END;
1101: END LOOP; --End of For Loop
1102:
1103: FORALL j IN l_list_line_id_tbl.FIRST..l_list_line_id_tbl.LAST
1104: UPDATE qp_list_lines
1105: SET qualification_ind = l_qualification_ind_tbl(j)
1106: WHERE list_line_id = l_list_line_id_tbl(j);
1107:
1108: FORALL k IN l_list_line_id_tbl.FIRST..l_list_line_id_tbl.LAST

Line 1174: from qp_list_lines

1170: */
1171:
1172: insert into qp_list_header_phases (list_header_id,pricing_phase_id,PRIC_PROD_ATTR_ONLY_FLAG) /* Added column names for 2236671 */
1173: (select distinct list_header_id, pricing_phase_id,'N'
1174: from qp_list_lines
1175: where pricing_phase_id > 1
1176: and qualification_ind in (2,6,8,10,12,14,22,28,30)
1177: and list_header_id = l_rec.list_header_id);
1178: