DBA Data[Home] [Help]

APPS.CTO_UPDATE_CONFIGS_PK dependencies on BOM_CTO_ORDER_LINES_UPG

Line 112: from bom_cto_order_lines_upg

108: Redundant cursor
109:
110: CURSOR c_seq(l_seq number) IS
111: select distinct sequence
112: from bom_cto_order_lines_upg
113: where sequence = l_seq;
114: */
115:
116: l_return_status varchar2(1);

Line 135: from bom_cto_order_lines_upg

131: l_cto_aset_id number;
132:
133: Cursor Attachment_cur is
134: select distinct ato_line_id
135: from bom_cto_order_lines_upg
136: where status = 'CTO_SRC'
137: and line_id = ato_line_id;
138:
139:

Line 204: from bom_cto_order_lines_upg bcolu

200: l_stmt_num := 10;
201: delete from bom_cto_src_orgs_b
202: where line_id in (
203: select bcolu.line_id
204: from bom_cto_order_lines_upg bcolu
205: where bcolu.config_item_id is not null
206: and not exists (
207: select 'exists'
208: from oe_order_lines_all oel

Line 216: -- delete from bom_cto_order_lines_upg;

212: l_stmt_num := 15;
213: --
214: -- bug 8789722
215: -- since its a blind delete hence using truncate
216: -- delete from bom_cto_order_lines_upg;
217: --
218: execute immediate 'truncate table '||bom_schema||'.bom_cto_order_lines_upg';
219: WriteToLog('Rows deleted from bcol_upg::'|| sql%rowcount, 1);
220:

Line 218: execute immediate 'truncate table '||bom_schema||'.bom_cto_order_lines_upg';

214: -- bug 8789722
215: -- since its a blind delete hence using truncate
216: -- delete from bom_cto_order_lines_upg;
217: --
218: execute immediate 'truncate table '||bom_schema||'.bom_cto_order_lines_upg';
219: WriteToLog('Rows deleted from bcol_upg::'|| sql%rowcount, 1);
220:
221: BEGIN
222: select assignment_set_id

Line 322: from bom_cto_order_lines_upg bcolu

318: (select config_item_id
319: from bom_ato_configurations bac
320: where not exists
321: (select 'exists'
322: from bom_cto_order_lines_upg bcolu
323: where bcolu.config_item_id = bac.config_item_id
324: and rownum = 1) -- bug 13876670
325: -- and not on open order lines
326: and not exists

Line 399: from bom_cto_order_lines_upg bcolu

395: -- bug 13876670
396: and mcat.category_set_id = p_category_set_id
397: and not exists
398: (select 'exists'
399: from bom_cto_order_lines_upg bcolu
400: where bcolu.config_item_id = bac.config_item_id
401: and rownum = 1 -- 13876670
402: )
403: and NOT EXISTS -- bug 13876670

Line 473: from bom_cto_order_lines_upg bcolu

469: where bac.config_item_id = p_config_id)
470: -- not being upgraded
471: and not exists
472: (select 'exists'
473: from bom_cto_order_lines_upg bcolu
474: where bcolu.config_item_id = p_config_id
475: and rownum = 1 -- bug 13876670
476: )
477: -- and not on open order lines

Line 513: tabname=>'BOM_CTO_ORDER_LINES_UPG',

509: l_stmt_num := 46;
510:
511: fnd_stats.gather_table_stats(
512: ownname=>'BOM',
513: tabname=>'BOM_CTO_ORDER_LINES_UPG',
514: percent=>90);
515:
516: --
517: -- bug 13362916

Line 521: delete from bom_cto_order_lines_upg bcol1

517: -- bug 13362916
518: -- Modified for improving performance
519: --
520: /*
521: delete from bom_cto_order_lines_upg bcol1
522: where ato_line_id not in (select max(bcol2.ato_line_id)
523: from bom_cto_order_lines_upg bcol2
524: where bcol2.config_item_id is not null
525: group by bcol2.config_item_id

Line 523: from bom_cto_order_lines_upg bcol2

519: --
520: /*
521: delete from bom_cto_order_lines_upg bcol1
522: where ato_line_id not in (select max(bcol2.ato_line_id)
523: from bom_cto_order_lines_upg bcol2
524: where bcol2.config_item_id is not null
525: group by bcol2.config_item_id
526: );
527: */

Line 542: FROM bom_cto_order_lines_upg bcol1

538: -- because an open SO line exists for either of these warehouses. Hence modifying this delete to
539: -- remove the duplicate config item-warehouse combination.
540:
541: DELETE
542: FROM bom_cto_order_lines_upg bcol1
543: WHERE rowid IN
544: (SELECT rowid
545: FROM
546: (SELECT rowid,

Line 549: FROM bom_cto_order_lines_upg bcol2

545: FROM
546: (SELECT rowid,
547: --row_number() over(PARTITION BY bcol2.config_item_id ORDER BY bcol2.ato_line_id DESC) rnk
548: row_number() over(PARTITION BY bcol2.config_item_id, bcol2.ship_from_org_id ORDER BY bcol2.ato_line_id DESC) rnk
549: FROM bom_cto_order_lines_upg bcol2
550: WHERE bcol2.config_item_id IS NOT NULL
551: )
552: WHERE rnk <> 1
553: );

Line 561: from bom_cto_order_lines_upg;

557: -- if no rows populated into bcol, return
558: --
559: select count(*)
560: into l_bcolu_count
561: from bom_cto_order_lines_upg;
562: WriteToLog('Rows populated in bcol_upg::'||l_bcolu_count, 1);
563:
564: IF l_bcolu_count = 0 THEN
565: WriteToLog('+++++++++++++++++++++++++++++++++++++++', 1);

Line 590: from bom_cto_order_lines_upg

586: l_stmt_num := 51;
587:
588: select count(*)
589: into l_bcolu_count
590: from bom_cto_order_lines_upg
591: where status <>'ERROR';
592:
593: WriteToLog('Rows populated in bcol_upg and NOT in error status::'||l_bcolu_count, 1);
594:

Line 627: update bom_cto_order_lines_upg bcolu

623:
624: --Bugfix 10240482
625: l_seq_temp := l_seq_temp + 1;
626:
627: update bom_cto_order_lines_upg bcolu
628: set bcolu.sequence = l_seq_temp
629: where bcolu.ato_line_id in
630: (select ato_line_id
631: from bom_cto_order_lines_upg bcolu2

Line 631: from bom_cto_order_lines_upg bcolu2

627: update bom_cto_order_lines_upg bcolu
628: set bcolu.sequence = l_seq_temp
629: where bcolu.ato_line_id in
630: (select ato_line_id
631: from bom_cto_order_lines_upg bcolu2
632: where bcolu2.ato_line_id = bcolu2.line_id
633: and bcolu2.status IN ('UPG')
634: and rownum < G_BATCH_SIZE + 1
635: and bcolu2.sequence is null);

Line 653: FROM bom_cto_order_lines_upg

649: WriteToLog('Going for a second update of sequence numbers', 4);
650:
651: SELECT config_item_id, Max(SEQUENCE)
652: BULK COLLECT INTO l_cfg_itm_tbl, l_seq_tbl
653: FROM bom_cto_order_lines_upg
654: WHERE config_item_id IS NOT NULL
655: GROUP BY config_item_id
656: HAVING Count(DISTINCT SEQUENCE) > 1;
657:

Line 664: UPDATE bom_cto_order_lines_upg bcol1

660: FOR i IN 1..l_cfg_itm_tbl.count loop
661:
662: WriteToLog('i: '||i||' l_cfg_itm_tbl(i): '||l_cfg_itm_tbl(i)||' l_seq_tbl(i): '||l_seq_tbl(i), 4);
663:
664: UPDATE bom_cto_order_lines_upg bcol1
665: SET bcol1.SEQUENCE = l_seq_tbl(i)
666: WHERE ato_line_id IN ( SELECT distinct ato_line_id
667: FROM bom_cto_order_lines_upg bcol2
668: WHERE bcol2.config_item_id = l_cfg_itm_tbl(i)

Line 667: FROM bom_cto_order_lines_upg bcol2

663:
664: UPDATE bom_cto_order_lines_upg bcol1
665: SET bcol1.SEQUENCE = l_seq_tbl(i)
666: WHERE ato_line_id IN ( SELECT distinct ato_line_id
667: FROM bom_cto_order_lines_upg bcol2
668: WHERE bcol2.config_item_id = l_cfg_itm_tbl(i)
669: );
670:
671: WriteToLog('Rows updated::'|| sql%rowcount, 1);

Line 746: from bom_cto_order_lines_upg

742:
743: BEGIN
744: select 'exists'
745: into l_exists
746: from bom_cto_order_lines_upg
747: where sequence = l_seq
748: and rownum = 1;
749:
750: EXCEPTION

Line 918: from bom_cto_order_lines_upg bcolu

914: from bom_ato_configurations bac,
915: mtl_system_items msi
916: where NOT EXISTS
917: (select 'exists'
918: from bom_cto_order_lines_upg bcolu
919: where bcolu.config_item_id = bac.config_item_id)
920: and bac.base_model_id = msi.inventory_item_id
921: and bac.organization_id = msi.organization_id
922: and msi.config_orgs = '3'; -- bug 13362916 removed nvl for performance

Line 950: from bom_cto_order_lines_upg bcolu

946: and msi2.config_orgs = '3') -- bug 13362916 removed nvl for performance
947: -- and not already in bcol_upg
948: and NOT EXISTS
949: (select 'exists'
950: from bom_cto_order_lines_upg bcolu
951: where bcolu.config_item_id = bac.config_item_id);
952:
953: l_match NUMBER;
954: l_exists varchar2(1);

Line 995: from bom_cto_order_lines_upg;

991: WriteToLog('sql 1', 3);
992:
993: select count(line_id)
994: into l_count
995: from bom_cto_order_lines_upg;
996: WriteToLog('kiran cont in bcol_upgs is =>'||l_count);
997:
998: l_stmt_num := 60;
999: insert into bom_cto_order_lines_upg

Line 999: insert into bom_cto_order_lines_upg

995: from bom_cto_order_lines_upg;
996: WriteToLog('kiran cont in bcol_upgs is =>'||l_count);
997:
998: l_stmt_num := 60;
999: insert into bom_cto_order_lines_upg
1000: (
1001: ATO_LINE_ID
1002: , BATCH_ID
1003: , BOM_ITEM_TYPE

Line 1105: insert into bom_cto_order_lines_upg

1101: -- mark as UPG
1102: --
1103: WriteToLog('sql 2', 3);
1104: l_stmt_num := 70;
1105: insert into bom_cto_order_lines_upg
1106: (
1107: ATO_LINE_ID
1108: , BATCH_ID
1109: , BOM_ITEM_TYPE

Line 1226: insert into bom_cto_order_lines_upg

1222: -- perform_match = Y. This resulted in wrong results.
1223:
1224: /*WriteToLog('sql 3', 3);
1225: l_stmt_num := 80;
1226: insert into bom_cto_order_lines_upg
1227: (
1228: ATO_LINE_ID
1229: , BATCH_ID
1230: , BOM_ITEM_TYPE

Line 1309: from bom_cto_order_lines_upg bcolu

1305: and nvl(msi.config_orgs, '1') = '3'
1306: -- and not already in bcol_upg
1307: and NOT EXISTS
1308: (select 'exists'
1309: from bom_cto_order_lines_upg bcolu
1310: where bcolu.config_item_id = bac.config_item_id)
1311: -- select first ato_line_id in bcol
1312: and bcol.ato_line_id =
1313: (select bcol1.ato_line_id

Line 1338: from bom_cto_order_lines_upg

1334: WriteToLog('Item being populated from bac::'|| to_char(v_bac.config_id), 4);
1335: BEGIN
1336: select 'Y'
1337: into l_exists
1338: from bom_cto_order_lines_upg
1339: where config_item_id = v_bac.config_id
1340: and rownum = 1;
1341: WriteToLog('Item::'|| to_char(v_bac.config_id)||' already exists in bcolu', 4);
1342:

Line 1376: insert into bom_cto_order_lines_upg

1372: -- TEST THIS!!
1373: --
1374: WriteToLog('sql 5', 3);
1375: l_stmt_num := 110;
1376: insert into bom_cto_order_lines_upg
1377: (
1378: ATO_LINE_ID
1379: , BATCH_ID
1380: , BOM_ITEM_TYPE

Line 1470: insert into bom_cto_order_lines_upg

1466: -- mark as UPG
1467: --
1468: WriteToLog('sql 6', 3);
1469: l_stmt_num := 120;
1470: insert into bom_cto_order_lines_upg
1471: (
1472: ATO_LINE_ID
1473: , BATCH_ID
1474: , BOM_ITEM_TYPE

Line 1575: insert into bom_cto_order_lines_upg

1571:
1572: -- commenting as part of Bugfix 8894392
1573: /*WriteToLog('sql 7', 3);
1574: l_stmt_num := 130;
1575: insert into bom_cto_order_lines_upg
1576: (
1577: ATO_LINE_ID
1578: , BATCH_ID
1579: , BOM_ITEM_TYPE

Line 1667: from bom_cto_order_lines_upg bcolu

1663: and nvl(msi2.config_orgs, '1') = '3')
1664: -- and not already in bcol_upg
1665: and NOT EXISTS
1666: (select 'exists'
1667: from bom_cto_order_lines_upg bcolu
1668: where bcolu.config_item_id = bac.config_item_id)
1669: -- select first ato_line_id in bcol
1670: and bcol.ato_line_id =
1671: (select bcol1.ato_line_id

Line 1694: from bom_cto_order_lines_upg bcolu

1690: WriteToLog('Item being populated from bac::'|| to_char(v_bac_top.config_id), 4);
1691: BEGIN
1692: select 'exists'
1693: into l_exists
1694: from bom_cto_order_lines_upg bcolu
1695: where bcolu.config_item_id = v_bac_top.config_id
1696: and rownum = 1;
1697: WriteToLog('Item::'|| to_char(v_bac_top.config_id)||' already exists in bcolu', 4);
1698: EXCEPTION

Line 1775: from bom_cto_order_lines_upg bcolu

1771: mtl_system_items msi,
1772: bom_ato_configurations bac
1773: where NOT EXISTS
1774: (select 'exists'
1775: from bom_cto_order_lines_upg bcolu
1776: where bcolu.config_item_id = bac.config_item_id)
1777: and bac.base_model_id = msi.inventory_item_id
1778: and bac.organization_id = msi.organization_id
1779: and msi.config_orgs = '3' -- bug 13362916 removed nvl for performance

Line 1818: (select /*+ index(bcolu BOM_CTO_ORDER_LINES_UPG_N1) */ 'exists' -- 13362916 added hint

1814: and bac2.organization_id = msi2.organization_id
1815: and msi2.config_orgs = '3')
1816: -- and not already in bcol_upg
1817: and NOT EXISTS
1818: (select /*+ index(bcolu BOM_CTO_ORDER_LINES_UPG_N1) */ 'exists' -- 13362916 added hint
1819: from bom_cto_order_lines_upg bcolu
1820: where bcolu.config_item_id = bac.config_item_id);
1821:
1822:

Line 1819: from bom_cto_order_lines_upg bcolu

1815: and msi2.config_orgs = '3')
1816: -- and not already in bcol_upg
1817: and NOT EXISTS
1818: (select /*+ index(bcolu BOM_CTO_ORDER_LINES_UPG_N1) */ 'exists' -- 13362916 added hint
1819: from bom_cto_order_lines_upg bcolu
1820: where bcolu.config_item_id = bac.config_item_id);
1821:
1822:
1823: l_match NUMBER;

Line 1862: insert into bom_cto_order_lines_upg

1858: -- mark as UPG
1859: --
1860: WriteToLog('sql 1', 3);
1861: l_stmt_num := 60;
1862: insert into bom_cto_order_lines_upg
1863: (
1864: ATO_LINE_ID
1865: , BATCH_ID
1866: , BOM_ITEM_TYPE

Line 1969: insert into bom_cto_order_lines_upg

1965: -- mark as UPG
1966: --
1967: WriteToLog('sql 2', 3);
1968: l_stmt_num := 70;
1969: insert into bom_cto_order_lines_upg
1970: (
1971: ATO_LINE_ID
1972: , BATCH_ID
1973: , BOM_ITEM_TYPE

Line 2080: insert into bom_cto_order_lines_upg

2076:
2077: -- commenting as part of Bugfix 8894392
2078: /*WriteToLog('sql 3', 3);
2079: l_stmt_num := 80;
2080: insert into bom_cto_order_lines_upg
2081: (
2082: ATO_LINE_ID
2083: , BATCH_ID
2084: , BOM_ITEM_TYPE

Line 2170: from bom_cto_order_lines_upg bcolu

2166: and mcat.category_id = p_cat_id
2167: -- and not already in bcol_upg
2168: and NOT EXISTS
2169: (select 'exists'
2170: from bom_cto_order_lines_upg bcolu
2171: where bcolu.config_item_id = bac.config_item_id)
2172: -- select first ato_line_id in bcol
2173: and bcol.ato_line_id =
2174: (select bcol1.ato_line_id

Line 2199: from bom_cto_order_lines_upg

2195: WriteToLog('Item being populated from bac::'|| to_char(v_bac.config_id), 4);
2196: BEGIN
2197: select 'Y'
2198: into l_exists
2199: from bom_cto_order_lines_upg
2200: where config_item_id = v_bac.config_id
2201: and rownum = 1;
2202: WriteToLog('Item::'|| to_char(v_bac.config_id)||' already exists in bcolu', 4);
2203:

Line 2236: insert into bom_cto_order_lines_upg

2232: --
2233: WriteToLog('sql 5', 3);
2234: WriteToLog('p_category_set_id = '||p_category_set_id ||' p_cat_id = '||p_cat_id, 3);
2235: l_stmt_num := 100;
2236: insert into bom_cto_order_lines_upg
2237: (
2238: ATO_LINE_ID
2239: , BATCH_ID
2240: , BOM_ITEM_TYPE

Line 2347: insert into bom_cto_order_lines_upg

2343: -- TEST THIS!!
2344: --
2345: WriteToLog('sql 6', 3);
2346: l_stmt_num := 110;
2347: insert into bom_cto_order_lines_upg
2348: (
2349: ATO_LINE_ID
2350: , BATCH_ID
2351: , BOM_ITEM_TYPE

Line 2459: insert into bom_cto_order_lines_upg

2455: --
2456: -- commenting as part of Bugfix 8894392
2457: /*WriteToLog('sql 7', 3);
2458: l_stmt_num := 120;
2459: insert into bom_cto_order_lines_upg
2460: (
2461: ATO_LINE_ID
2462: , BATCH_ID
2463: , BOM_ITEM_TYPE

Line 2558: from bom_cto_order_lines_upg bcolu

2554: and nvl(msi2.config_orgs, '1') = '3')
2555: -- and not already in bcol_upg
2556: and NOT EXISTS
2557: (select 'exists'
2558: from bom_cto_order_lines_upg bcolu
2559: where bcolu.config_item_id = bac.config_item_id)
2560: -- select first ato_line_id in bcol
2561: and bcol.ato_line_id =
2562: (select bcol1.ato_line_id

Line 2585: from bom_cto_order_lines_upg bcolu

2581: WriteToLog('Item being populated from bac::'|| to_char(v_bac_top.config_id), 4);
2582: BEGIN
2583: select 'exists'
2584: into l_exists
2585: from bom_cto_order_lines_upg bcolu
2586: where bcolu.config_item_id = v_bac_top.config_id
2587: and rownum = 1;
2588: WriteToLog('Item::'|| to_char(v_bac_top.config_id)||' already exists in bcolu', 4);
2589: EXCEPTION

Line 2707: insert into bom_cto_order_lines_upg

2703: -- mark as UPG
2704: --
2705: WriteToLog('sql 1', 3);
2706: l_stmt_num := 50;
2707: insert into bom_cto_order_lines_upg
2708: (
2709: ATO_LINE_ID
2710: , BATCH_ID
2711: , BOM_ITEM_TYPE

Line 2815: insert into bom_cto_order_lines_upg

2811: --
2812: IF (l_attribute = 3) THEN
2813: WriteToLog('sql 2', 3);
2814: l_stmt_num := 60;
2815: insert into bom_cto_order_lines_upg
2816: (
2817: ATO_LINE_ID
2818: , BATCH_ID
2819: , BOM_ITEM_TYPE

Line 2922: insert into bom_cto_order_lines_upg

2918: -- commenting as part of Bugfix 8894392
2919: /*IF (l_attribute = 3) THEN
2920: WriteToLog('sql 3', 3);
2921: l_stmt_num := 70;
2922: insert into bom_cto_order_lines_upg
2923: (
2924: ATO_LINE_ID
2925: , BATCH_ID
2926: , BOM_ITEM_TYPE

Line 3001: from bom_cto_order_lines_upg bcolu

2997: , mtl_system_items msi
2998: where bac.config_item_id = p_config_id
2999: and NOT EXISTS
3000: (select 'exists'
3001: from bom_cto_order_lines_upg bcolu
3002: where bcolu.config_item_id = bac.config_item_id)
3003: -- select first ato_line_id in bcol
3004: and bcol.ato_line_id =
3005: (select bcol1.ato_line_id

Line 3037: from bom_cto_order_lines_upg

3033: l_stmt_num := 80;
3034: BEGIN
3035: select 'Y'
3036: into l_exists
3037: from bom_cto_order_lines_upg
3038: where config_item_id = p_config_id
3039: and rownum = 1;
3040: WriteToLog('Item::'|| to_char(p_config_id)||' already exists in bcolu', 4);
3041:

Line 3340: INSERT INTO bom_cto_order_lines_upg(

3336: i := t_bcol.first;
3337:
3338: WHILE i IS NOT NULL LOOP
3339: l_stmt_num := 130;
3340: INSERT INTO bom_cto_order_lines_upg(
3341: HEADER_ID ,
3342: LINE_ID ,
3343: LINK_TO_LINE_ID ,
3344: ATO_LINE_ID ,

Line 3428: from bom_cto_order_lines_upg

3424: --Check if this config already exists in bcolu
3425: BEGIN
3426: select 'Y'
3427: into l_exists
3428: from bom_cto_order_lines_upg
3429: where config_item_id = p_config_id
3430: and rownum = 1;
3431:
3432: WriteToLog('Item::'|| to_char(p_config_id)||' already exists in bcolu', 4);

Line 3442: INSERT INTO bom_cto_order_lines_upg(

3438: if t_bcol.exists(i) then
3439: if t_bcol(i).inventory_item_id = l_base_model_id then
3440: WriteToLog('populate_bcolu_from_bac: inserting in bcolu in status ERROR');
3441:
3442: INSERT INTO bom_cto_order_lines_upg(
3443: HEADER_ID ,
3444: LINE_ID ,
3445: ATO_LINE_ID ,
3446: PARENT_ATO_LINE_ID ,

Line 3994: from bom_cto_order_lines_upg bcolu,

3990: --
3991: CURSOR c_success IS
3992: select distinct substrb(concatenated_segments,1,50) name,msi.inventory_item_id
3993: item_id
3994: from bom_cto_order_lines_upg bcolu,
3995: mtl_system_items_kfv msi
3996: where bcolu.config_item_id is not null
3997: and bcolu.config_item_id = msi.inventory_item_id
3998: and bcolu.ship_from_org_id = msi.organization_id

Line 4001: from bom_cto_order_lines_upg bcolu1

3997: and bcolu.config_item_id = msi.inventory_item_id
3998: and bcolu.ship_from_org_id = msi.organization_id
3999: and ((bcolu.config_creation = '3'
4000: and exists (select 'exists'
4001: from bom_cto_order_lines_upg bcolu1
4002: where bcolu1.config_item_id = bcolu.config_item_id
4003: and bcolu1.status = 'MRP_SRC'
4004: and rownum = 1))
4005: or (bcolu.config_creation <> '3'

Line 4007: from bom_cto_order_lines_upg bcolu1

4003: and bcolu1.status = 'MRP_SRC'
4004: and rownum = 1))
4005: or (bcolu.config_creation <> '3'
4006: and not exists (select 'exists'
4007: from bom_cto_order_lines_upg bcolu1
4008: where bcolu1.config_item_id = bcolu.config_item_id
4009: and bcolu1.status <> 'MRP_SRC')))
4010: order by 1; -- Modified by Renga for bug 3930047
4011:

Line 4019: from bom_cto_order_lines_upg bcolu,

4015: --
4016: CURSOR c_error IS
4017: select distinct substrb(concatenated_segments,1,50) name,
4018: msi.inventory_item_id item_id
4019: from bom_cto_order_lines_upg bcolu,
4020: mtl_system_items_kfv msi
4021: where bcolu.config_item_id is not null
4022: and bcolu.config_item_id = msi.inventory_item_id
4023: and bcolu.ship_from_org_id = msi.organization_id

Line 4025: from bom_cto_order_lines_upg bcolu1

4021: where bcolu.config_item_id is not null
4022: and bcolu.config_item_id = msi.inventory_item_id
4023: and bcolu.ship_from_org_id = msi.organization_id
4024: and not exists (select 'exists'
4025: from bom_cto_order_lines_upg bcolu1
4026: where bcolu1.config_item_id = bcolu.config_item_id
4027: and bcolu1.status = 'MRP_SRC')
4028: order by 1; -- Modified by Renga for bug 3930047
4029:

Line 4040: from bom_cto_order_lines_upg bcolu,

4036: select distinct substrb(concatenated_segments,1,50) name,
4037: msi.inventory_item_id item_id,
4038: oeh.order_number,
4039: decode(bcolu.status, 'MRP_SRC', 'was successfully processed', 'errored out') status
4040: from bom_cto_order_lines_upg bcolu,
4041: mtl_system_items_kfv msi,
4042: oe_order_lines_all oel,
4043: oe_order_headers_all oeh
4044: where bcolu.config_item_id is not null

Line 4049: from bom_cto_order_lines_upg bcolu1

4045: and bcolu.config_item_id = msi.inventory_item_id
4046: and bcolu.ship_from_org_id = msi.organization_id
4047: and config_creation <> '3'
4048: and exists (select 'exists'
4049: from bom_cto_order_lines_upg bcolu1
4050: where bcolu1.config_item_id = bcolu.config_item_id
4051: and bcolu1.status = 'MRP_SRC')
4052: and exists (select 'exists'
4053: from bom_cto_order_lines_upg bcolu1

Line 4053: from bom_cto_order_lines_upg bcolu1

4049: from bom_cto_order_lines_upg bcolu1
4050: where bcolu1.config_item_id = bcolu.config_item_id
4051: and bcolu1.status = 'MRP_SRC')
4052: and exists (select 'exists'
4053: from bom_cto_order_lines_upg bcolu1
4054: where bcolu1.config_item_id = bcolu.config_item_id
4055: and bcolu1.status <> 'MRP_SRC')
4056: and oel.line_id = bcolu.ato_line_id
4057: and oel.header_id = oeh.header_id

Line 4139: FROM bom_cto_order_lines_upg

4135: parent_ato_line_id,
4136: ato_line_id,
4137: line_id,
4138: ship_from_org_id
4139: FROM bom_cto_order_lines_upg
4140: WHERE ato_line_id in ( SELECT DISTINCT bupg1.ato_line_id
4141: FROM bom_cto_order_lines_upg bupg1
4142: WHERE bupg1.config_creation = 3);
4143:

Line 4141: FROM bom_cto_order_lines_upg bupg1

4137: line_id,
4138: ship_from_org_id
4139: FROM bom_cto_order_lines_upg
4140: WHERE ato_line_id in ( SELECT DISTINCT bupg1.ato_line_id
4141: FROM bom_cto_order_lines_upg bupg1
4142: WHERE bupg1.config_creation = 3);
4143:
4144: TYPE r_bcolupg IS RECORD
4145: (

Line 4257: UPDATE bom_cto_order_lines_upg

4253: oe_debug_pub.add('There are ' || t_ato_line_id.count ||'top ato models with invalid configurations');
4254:
4255: l_stmt_num := 80;
4256: FORALL j IN t_ato_line_id.first..t_ato_line_id.last
4257: UPDATE bom_cto_order_lines_upg
4258: SET status = 'ERROR'
4259: WHERE ato_line_id = t_ato_line_id(j);
4260:
4261: l_stmt_num:= 90;