DBA Data[Home] [Help]

APPS.CTO_UPDATE_CONFIGS_PK dependencies on MTL_SYSTEM_ITEMS

Line 338: from mtl_system_items msi

334: and rownum = 1) -- bug 13876670
335: -- and item is not pre-configured
336: and not exists
337: (select 'pc'
338: from mtl_system_items msi
339: where msi.inventory_item_id = bac.config_item_id
340: -- bug 13876670
341: and msi.auto_created_config_flag = 'N'
342: and msi.organization_id = bac.organization_id

Line 416: from mtl_system_items msi

412: and rownum = 1 -- 13876670
413: )
414: and not exists
415: (select /*+ no_unnest push_subq */ 'pc'
416: from mtl_system_items msi
417: where msi.inventory_item_id = bac.config_item_id
418: and msi.auto_created_config_flag = 'N'
419: -- 13876670
420: and msi.organization_id = bac.organization_id

Line 491: from mtl_system_items msi

487: )
488: -- and item is not pre-configured
489: and not exists
490: (select 'pc'
491: from mtl_system_items msi
492: where msi.inventory_item_id = p_config_id
493: -- bug 13876670
494: and msi.auto_created_config_flag = 'N'
495: and rownum = 1

Line 915: mtl_system_items msi

911: CURSOR c_bac IS
912: -- individual configs not in bcol and having item attribute 3
913: select distinct bac.config_item_id config_id
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)

Line 933: mtl_system_items msi

929: CURSOR c_bac_top IS
930: -- individual configs not in bcol and having item attribute 3
931: select distinct bac.config_item_id config_id
932: from bom_ato_configurations bac,
933: mtl_system_items msi
934: -- item attribute is 3
935: where bac.base_model_id = msi.inventory_item_id
936: and bac.organization_id = msi.organization_id
937: and msi.config_orgs = '3' -- bug 13362916 removed nvl for performance

Line 942: , mtl_system_items msi2

938: -- and is top parent with attribute 3
939: and NOT EXISTS
940: (select 'exists'
941: from bom_ato_configurations bac2
942: , mtl_system_items msi2
943: where bac.config_item_id = bac2.component_item_id
944: and bac2.base_model_id = msi2.inventory_item_id
945: and bac2.organization_id = msi2.organization_id
946: and msi2.config_orgs = '3') -- bug 13362916 removed nvl for performance

Line 1076: , mtl_system_items mtl

1072: , nvl(mtl.config_orgs, '1')
1073: --changed the where clause to use a subquery
1074: --bugfix 3841575
1075: from bom_cto_order_lines bcol2
1076: , mtl_system_items mtl
1077: -- select entire configuration
1078: where mtl.inventory_item_id = bcol2.inventory_item_id
1079: and mtl.organization_id = bcol2.ship_from_org_id
1080: and bcol2.ato_line_id in

Line 1084: , mtl_system_items msi

1080: and bcol2.ato_line_id in
1081: (select distinct bcol1.ato_line_id
1082: from bom_cto_order_lines bcol1
1083: , oe_order_lines_all oel
1084: , mtl_system_items msi
1085: -- for configs whose models have attr=2,3
1086: where bcol1.config_item_id is not null
1087: and bcol1.inventory_item_id = msi.inventory_item_id
1088: and bcol1.ship_from_org_id = msi.organization_id

Line 1183: , mtl_system_items msi

1179: from bom_cto_order_lines bcol1
1180: , bom_cto_order_lines bcol2
1181: , bom_ato_configurations bac
1182: , oe_order_lines_all oel
1183: , mtl_system_items msi
1184: -- base model has item attr = 3
1185: where bac.base_model_id = msi.inventory_item_id
1186: and bac.organization_id = msi.organization_id
1187: and msi.config_orgs = '3' -- bug 13362916 removed nvl for performance

Line 1301: , mtl_system_items msi

1297: , 'UPG' --STATUS
1298: , nvl(msi.config_orgs, '1')
1299: from bom_ato_configurations bac
1300: , bom_cto_order_lines bcol
1301: , mtl_system_items msi
1302: -- base model has item attr = 3
1303: where bac.base_model_id = msi.inventory_item_id
1304: and bac.organization_id = msi.organization_id
1305: and nvl(msi.config_orgs, '1') = '3'

Line 1452: , mtl_system_items msi

1448: , 'UPG' --STATUS
1449: , nvl(msi.CONFIG_ORGS, '1')
1450: from bom_cto_order_lines bcol
1451: , oe_order_lines_all oel
1452: , mtl_system_items msi
1453: -- select all configs on open order lines
1454: where bcol.ato_line_id = oel.ato_line_id
1455: and oel.open_flag = 'Y' -- bug 13362916 removed NVL
1456: and bcol.inventory_item_id = msi.inventory_item_id

Line 1548: , mtl_system_items msi

1544: from bom_cto_order_lines bcol1
1545: , bom_cto_order_lines bcol2
1546: , bom_ato_configurations bac
1547: , oe_order_lines_all oel
1548: , mtl_system_items msi
1549: -- base model has item attr = 3
1550: where bac.base_model_id = msi.inventory_item_id
1551: and bac.organization_id = msi.organization_id
1552: and msi.config_orgs = '3' -- bug 13362916 removed nvl for performance

Line 1650: , mtl_system_items msi

1646: , 'UPG' --STATUS
1647: , nvl(msi.CONFIG_ORGS, '1')
1648: from bom_ato_configurations bac
1649: , bom_cto_order_lines bcol
1650: , mtl_system_items msi
1651: -- base model has item attr = 3
1652: where bac.base_model_id = msi.inventory_item_id
1653: and bac.organization_id = msi.organization_id
1654: and nvl(msi.config_orgs, '1') = '3'

Line 1659: , mtl_system_items msi2

1655: -- and is top parent with attribute 3
1656: and NOT EXISTS
1657: (select 'exists'
1658: from bom_ato_configurations bac2
1659: , mtl_system_items msi2
1660: where bac.config_item_id = bac2.component_item_id
1661: and bac2.base_model_id = msi2.inventory_item_id
1662: and bac2.organization_id = msi2.organization_id
1663: and nvl(msi2.config_orgs, '1') = '3')

Line 1771: mtl_system_items msi,

1767: CURSOR c_bac(p_cat_id number) IS
1768: -- individual configs not in bcol and having item attribute 3
1769: select /*+ ORDERED */ distinct bac.config_item_id config_id --Bugfix 6617686 Added a hint
1770: from mtl_item_categories mcat, --Bugfix 6617686: Changed the order of tables
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

Line 1795: mtl_system_items msi,

1791: CURSOR c_bac_top(p_cat_id number, p_category_set_id number) IS
1792: -- individual configs not in bcol and having item attribute 3
1793: select distinct bac.config_item_id config_id --Bugfix 6617686 Added a hint
1794: from mtl_item_categories mcat, --Bugfix 6617686 Changed the order of tables
1795: mtl_system_items msi,
1796: bom_ato_configurations bac
1797: -- item attribute is 3
1798: where bac.base_model_id = msi.inventory_item_id
1799: and bac.organization_id = msi.organization_id

Line 1811: , mtl_system_items msi2

1807: -- and is top parent with attribute 3
1808: and NOT EXISTS
1809: (select /*+ no_unnest push_subq */ 'exists' -- bug 13876670 added hint
1810: from bom_ato_configurations bac2
1811: , mtl_system_items msi2
1812: where bac.config_item_id = bac2.component_item_id
1813: and bac2.base_model_id = msi2.inventory_item_id
1814: and bac2.organization_id = msi2.organization_id
1815: and msi2.config_orgs = '3')

Line 1941: , mtl_system_items msi

1937: , nvl(msi.config_orgs, '1')
1938: from bom_cto_order_lines bcol1
1939: , bom_cto_order_lines bcol2
1940: , oe_order_lines_all oel
1941: , mtl_system_items msi
1942: , mtl_item_categories mcat
1943: -- select entire configuration
1944: where bcol2.ato_line_id = bcol1.ato_line_id
1945: and bcol1.config_item_id is not null

Line 2049: , mtl_system_items msi

2045: from bom_cto_order_lines bcol1
2046: , bom_cto_order_lines bcol2
2047: , bom_ato_configurations bac
2048: , oe_order_lines_all oel
2049: , mtl_system_items msi
2050: , mtl_item_categories mcat
2051: -- base model has item attr = 3
2052: where bac.base_model_id = msi.inventory_item_id
2053: and bac.organization_id = msi.organization_id

Line 2156: , mtl_system_items msi

2152: , 'UPG' --STATUS
2153: --, bcol.SEQUENCE
2154: , nvl(msi.config_orgs, '1')
2155: from mtl_item_categories mcat --Bugfix 6617686 Changed the order of tables
2156: , mtl_system_items msi
2157: , bom_ato_configurations bac
2158: , bom_cto_order_lines bcol
2159: -- base model has item attr = 3
2160: where bac.base_model_id = msi.inventory_item_id

Line 2314: , mtl_system_items msi2

2310: --, bcol.SEQUENCE
2311: , nvl(msi2.CONFIG_ORGS, '1')
2312: from bom_cto_order_lines bcol
2313: , oe_order_lines_all oel
2314: , mtl_system_items msi2
2315: -- select all configs on open order lines
2316: where bcol.ato_line_id = oel.ato_line_id
2317: and bcol.inventory_item_id = msi2.inventory_item_id
2318: and bcol.ship_from_org_id = msi2.organization_id

Line 2323: , mtl_system_items msi

2319: and oel.open_flag = 'Y' -- 13362916 removed NVL
2320: and oel.ato_line_id in -- bug 6617686 connect using oel rather than bcol to get better filtering
2321: (select /*+ leading(MCAT) */ distinct bcol2.ato_line_id --Bugfix 6617686 Added a hint
2322: from mtl_item_categories mcat --Bugfix 6617686 Changed the order of tables
2323: , mtl_system_items msi
2324: , bom_cto_order_lines bcol2
2325: where bcol2.config_item_id is not null
2326: and bcol2.inventory_item_id = msi.inventory_item_id
2327: and bcol2.ship_from_org_id = msi.organization_id

Line 2427: , mtl_system_items msi

2423: from bom_cto_order_lines bcol1
2424: , bom_cto_order_lines bcol2
2425: , bom_ato_configurations bac
2426: , oe_order_lines_all oel
2427: , mtl_system_items msi
2428: , mtl_item_categories mcat
2429: -- base model has item attr = 3
2430: where bac.base_model_id = msi.inventory_item_id
2431: and bac.organization_id = msi.organization_id

Line 2536: , mtl_system_items msi

2532: --, bcol.SEQUENCE
2533: , nvl(msi.CONFIG_ORGS, '1')
2534: from bom_ato_configurations bac
2535: , bom_cto_order_lines bcol
2536: , mtl_system_items msi
2537: , mtl_item_categories mcat
2538: -- base model has item attr = 3
2539: where bac.base_model_id = msi.inventory_item_id
2540: and bac.organization_id = msi.organization_id

Line 2550: , mtl_system_items msi2

2546: -- and is top parent with attribute 3
2547: and NOT EXISTS
2548: (select 'exists'
2549: from bom_ato_configurations bac2
2550: , mtl_system_items msi2
2551: where bac.config_item_id = bac2.component_item_id
2552: and bac2.base_model_id = msi2.inventory_item_id
2553: and bac2.organization_id = msi2.organization_id
2554: and nvl(msi2.config_orgs, '1') = '3')

Line 2684: from mtl_system_items msi

2680: -- get item attribute for this config
2681: l_stmt_num := 40;
2682: select nvl(msi.config_orgs, '1')
2683: into l_attribute
2684: from mtl_system_items msi
2685: where msi.inventory_item_id =
2686: (select msi2.base_item_id
2687: from mtl_system_items msi2
2688: where msi2.inventory_item_id = p_config_id

Line 2687: from mtl_system_items msi2

2683: into l_attribute
2684: from mtl_system_items msi
2685: where msi.inventory_item_id =
2686: (select msi2.base_item_id
2687: from mtl_system_items msi2
2688: where msi2.inventory_item_id = p_config_id
2689: and rownum = 1)
2690: and rownum = 1;
2691:

Line 2785: , mtl_system_items msi

2781: , nvl(msi.config_orgs, '1')
2782: from bom_cto_order_lines bcol1
2783: , bom_cto_order_lines bcol2
2784: , oe_order_lines_all oel
2785: , mtl_system_items msi
2786: , oe_order_lines_all oel2 --bugfix 3371155
2787: -- select entire configuration
2788: where bcol2.ato_line_id = bcol1.ato_line_id
2789: -- to get item attribute

Line 2895: , mtl_system_items msi

2891: from bom_cto_order_lines bcol1
2892: , bom_cto_order_lines bcol2
2893: , bom_ato_configurations bac
2894: , oe_order_lines_all oel
2895: , mtl_system_items msi
2896: where bac.config_item_id = p_config_id
2897: -- and exists in bcol
2898: and bac.config_item_id = bcol1.config_item_id
2899: -- on open order lines

Line 2997: , mtl_system_items msi

2993: , 'UPG' --STATUS
2994: , nvl(msi.config_orgs, '1')
2995: from bom_ato_configurations bac
2996: , bom_cto_order_lines bcol
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

Line 3123: mtl_system_items msi

3119: 'Y', -- perform_match /* Sushant made changes to identify matched items */
3120: 'N', -- reuse_config
3121: bac.organization_id
3122: from bom_ato_configurations bac,
3123: mtl_system_items msi
3124: where bac.config_item_id = p_config_id
3125: -- and bac.component_item_id <> bac.base_model_id -- not pick up top model
3126: and msi.inventory_item_id = substr(bac.component_code, (instr(bac.component_code, '-', -1)+1)) -- bac.component_item_id
3127: and msi.organization_id = bac.organization_id;

Line 3567: mtl_system_items msi

3563: nvl(Fnd_Global.USER_ID, -1), -- last_updated_by
3564: cto_update_configs_pk.bac_program_id, -- program_id
3565: bac.organization_id --Bugfix 10240482
3566: from bom_ato_configurations bac,
3567: mtl_system_items msi
3568: where bac.config_item_id = l_curr_config_id
3569: and bac.component_item_id <> bac.base_model_id --not pick up top model
3570: and msi.inventory_item_id = bac.component_item_id
3571: and msi.organization_id = bac.organization_id;

Line 3605: from mtl_system_items msi

3601: WriteToLog('t_bcol(l_parent_index).header_id=>'||t_bcol(l_parent_index).header_id);
3602:
3603: select nvl(msi.config_orgs, '1'), inventory_item_id
3604: into l_item_attr, l_child_model_id
3605: from mtl_system_items msi
3606: where msi.inventory_item_id = (select base_item_id --bugfix3845686
3607: from mtl_system_items
3608: where inventory_item_id = t_bcol(l_parent_index).header_id
3609: and rownum =1)

Line 3607: from mtl_system_items

3603: select nvl(msi.config_orgs, '1'), inventory_item_id
3604: into l_item_attr, l_child_model_id
3605: from mtl_system_items msi
3606: where msi.inventory_item_id = (select base_item_id --bugfix3845686
3607: from mtl_system_items
3608: where inventory_item_id = t_bcol(l_parent_index).header_id
3609: and rownum =1)
3610: --and msi.organization_id = t_bcol(l_parent_index).ship_from_org_id;
3611: and rownum = 1;

Line 3622: from mtl_system_items_kfv msi

3618:
3619: l_stmt_num := 30;
3620: select substrb(concatenated_segments,1,50) name
3621: into l_child_model_name
3622: from mtl_system_items_kfv msi
3623: where msi.inventory_item_id = l_child_model_id
3624: and rownum=1;/* Fixed bug 3529482 */
3625:
3626:

Line 3995: mtl_system_items_kfv msi

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
3999: and ((bcolu.config_creation = '3'

Line 4020: mtl_system_items_kfv msi

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
4024: and not exists (select 'exists'

Line 4041: mtl_system_items_kfv msi,

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
4045: and bcolu.config_item_id = msi.inventory_item_id

Line 4296: update mtl_system_items_b msic

4292: If p_item = 1 Then
4293:
4294: -- Update based on all models
4295:
4296: update mtl_system_items_b msic
4297: set (atp_components_flag,atp_flag) = (select CTO_CONFIG_ITEM_PK.evaluate_atp_attributes(nvl(msim.atp_flag,'N'),nvl(msim.atp_components_flag,'N')),CTO_CONFIG_ITEM_PK.get_atp_flag
4298: from mtl_system_items_b msim
4299: where msim.inventory_item_id = msic.base_item_id
4300: and msim.organization_id = msic.organization_id)

Line 4298: from mtl_system_items_b msim

4294: -- Update based on all models
4295:
4296: update mtl_system_items_b msic
4297: set (atp_components_flag,atp_flag) = (select CTO_CONFIG_ITEM_PK.evaluate_atp_attributes(nvl(msim.atp_flag,'N'),nvl(msim.atp_components_flag,'N')),CTO_CONFIG_ITEM_PK.get_atp_flag
4298: from mtl_system_items_b msim
4299: where msim.inventory_item_id = msic.base_item_id
4300: and msim.organization_id = msic.organization_id)
4301:
4302: where msic.base_item_id is not null

Line 4304: from mtl_system_items_b msim1

4300: and msim.organization_id = msic.organization_id)
4301:
4302: where msic.base_item_id is not null
4303: and 'x'= (select 'x'
4304: from mtl_system_items_b msim1
4305: where msim1.inventory_item_id = msic.base_item_id
4306: and msim1.organization_id = msic.organization_id);
4307:
4308:

Line 4314: update mtl_system_items_b msic

4310: WriteToLog(' Number of records updated = '||sql%rowcount);
4311:
4312: elsif p_item = 2 then
4313: -- update based on the category id
4314: update mtl_system_items_b msic
4315: set (atp_components_flag,atp_flag) = (select CTO_CONFIG_ITEM_PK.evaluate_atp_attributes(nvl(msim.atp_flag,'N'),nvl(msim.atp_components_flag,'N')),CTO_CONFIG_ITEM_PK.get_atp_flag
4316: from mtl_system_items_b msim
4317: where msim.inventory_item_id = msic.base_item_id
4318: and msim.organization_id = msic.organization_id)

Line 4316: from mtl_system_items_b msim

4312: elsif p_item = 2 then
4313: -- update based on the category id
4314: update mtl_system_items_b msic
4315: set (atp_components_flag,atp_flag) = (select CTO_CONFIG_ITEM_PK.evaluate_atp_attributes(nvl(msim.atp_flag,'N'),nvl(msim.atp_components_flag,'N')),CTO_CONFIG_ITEM_PK.get_atp_flag
4316: from mtl_system_items_b msim
4317: where msim.inventory_item_id = msic.base_item_id
4318: and msim.organization_id = msic.organization_id)
4319: where msic.inventory_item_id in (select msi.inventory_item_id
4320: from mtl_system_items_b msi,

Line 4320: from mtl_system_items_b msi,

4316: from mtl_system_items_b msim
4317: where msim.inventory_item_id = msic.base_item_id
4318: and msim.organization_id = msic.organization_id)
4319: where msic.inventory_item_id in (select msi.inventory_item_id
4320: from mtl_system_items_b msi,
4321: mtl_item_categories mcat
4322: where msi.base_item_id = mcat.inventory_item_id
4323: and mcat.category_id = p_cat_id)
4324: and exists (select 'x' from mtl_system_items_b msim

Line 4324: and exists (select 'x' from mtl_system_items_b msim

4320: from mtl_system_items_b msi,
4321: mtl_item_categories mcat
4322: where msi.base_item_id = mcat.inventory_item_id
4323: and mcat.category_id = p_cat_id)
4324: and exists (select 'x' from mtl_system_items_b msim
4325: where msim.inventory_item_id = msic.base_item_id
4326: and msim.organization_id = msic.organization_id);
4327:
4328: WriteToLog(' Number of records updated = '||sql%rowcount);

Line 4332: update mtl_system_items_b msic

4328: WriteToLog(' Number of records updated = '||sql%rowcount);
4329:
4330: elsif p_item = 3 then
4331: -- update based on config item
4332: update mtl_system_items_b msic
4333: set (atp_components_flag,atp_flag) = (select CTO_CONFIG_ITEM_PK.evaluate_atp_attributes(msim.atp_flag,msim.atp_components_flag),CTO_CONFIG_ITEM_PK.get_atp_flag
4334: from mtl_system_items_b msim
4335: where msim.inventory_item_id = msic.base_item_id
4336: and msim.organization_id = msic.organization_id)

Line 4334: from mtl_system_items_b msim

4330: elsif p_item = 3 then
4331: -- update based on config item
4332: update mtl_system_items_b msic
4333: set (atp_components_flag,atp_flag) = (select CTO_CONFIG_ITEM_PK.evaluate_atp_attributes(msim.atp_flag,msim.atp_components_flag),CTO_CONFIG_ITEM_PK.get_atp_flag
4334: from mtl_system_items_b msim
4335: where msim.inventory_item_id = msic.base_item_id
4336: and msim.organization_id = msic.organization_id)
4337: where msic.inventory_item_id = p_config_id
4338: and exists (select 'x' from mtl_system_items_b msim

Line 4338: and exists (select 'x' from mtl_system_items_b msim

4334: from mtl_system_items_b msim
4335: where msim.inventory_item_id = msic.base_item_id
4336: and msim.organization_id = msic.organization_id)
4337: where msic.inventory_item_id = p_config_id
4338: and exists (select 'x' from mtl_system_items_b msim
4339: where msim.inventory_item_id = msic.base_item_id
4340: and msim.organization_id = msic.organization_id);
4341: WriteToLog(' Number of records updated = '||sql%rowcount);
4342: end if;