35:
36: l_eng_item_flag VARCHAR2(1) := NULL;
37: CURSOR eng_item_cur IS
38: SELECT eng_item_flag
39: FROM mtl_system_items
40: WHERE inventory_item_id = p_revised_item_id
41: AND organization_id = p_organization_id;
42:
43: BEGIN
1330: SELECT bom_item_type
1331: , pick_components_flag
1332: , bom_enabled_flag
1333: , eng_item_flag
1334: FROM MTL_SYSTEM_ITEMS
1335: WHERE ( bom_enabled_flag <> 'Y'
1336: OR pick_components_flag <> 'N'
1337: OR bom_item_type = l_PLANNING )
1338: AND organization_id = p_org_id
1497: , p_revised_item_id NUMBER)
1498: IS
1499: SELECT DECODE(restrict_subinventories_code, 1, 'Y', 'N') restrict_code
1500: , inventory_asset_flag
1501: FROM MTL_SYSTEM_ITEMS
1502: WHERE inventory_item_id = p_revised_item_id
1503: AND organization_id = p_organization_id ;
1504:
1505:
1563:
1564: -- Get Value of Item Locator
1565: SELECT location_control_code
1566: INTO l_item_locator_control
1567: FROM mtl_system_items
1568: WHERE organization_id = p_organization_id
1569: AND inventory_item_id = p_revised_item_id;
1570:
1571: -- Get if locator is restricted or unrestricted
1570:
1571: -- Get if locator is restricted or unrestricted
1572: SELECT RESTRICT_LOCATORS_CODE
1573: INTO l_item_loc_restricted
1574: FROM mtl_system_items
1575: WHERE organization_id = p_organization_id
1576: AND inventory_item_id = p_revised_item_id;
1577:
1578:
2184:
2185: l_bom_enabled_flag VARCHAR2(1);
2186: CURSOR c_CheckBomEnabled IS
2187: SELECT bom_enabled_flag
2188: FROM mtl_system_items msi
2189: WHERE msi.inventory_item_id =
2190: p_rev_item_unexp_rec.revised_item_id
2191: AND msi.organization_id =
2192: p_rev_item_unexp_rec.organization_id;
2202:
2203: l_product_family BOOLEAN := FALSE;
2204: CURSOR c_CheckItemProductFamily IS
2205: SELECT 'Product Family'
2206: FROM mtl_system_items
2207: WHERE inventory_item_id = p_rev_item_unexp_rec.revised_item_id
2208: AND organization_id = p_rev_item_unexp_rec.organization_id
2209: AND bom_item_type = 5; -- Product Family
2210:
5392: l_approval_status VARCHAR2(30);
5393:
5394: CURSOR c_approval_status IS
5395: SELECT nvl(approval_status,'A')
5396: FROM MTL_SYSTEM_ITEMS_B
5397: WHERE inventory_item_id = p_item_id
5398: AND organization_id = p_org_id;
5399: BEGIN
5400: OPEN c_approval_status;
6215: --Start of changes Bug no:3034642
6216: l_profile_exist BOOLEAN;
6217: l_profile_val VARCHAR2(30);
6218: l_phase_change_code VARCHAR2(30) :='REVISE';
6219: l_catalog_category_id MTL_SYSTEM_ITEMS_B.ITEM_CATALOG_GROUP_ID%TYPE;
6220: l_Lifecycle_Id NUMBER;
6221: l_policy_code VARCHAR2(100);
6222: l_Old_Phase_Id mtl_item_revisions_b.current_phase_id%TYPE;
6223: l_Error_Code NUMBER;
6228: l_package_name varchar2(100) := 'EGO_LIFECYCLE_USER_PUB.get_policy_for_phase_change';
6229:
6230: CURSOR c_get_default_life(inv_id NUMBER,cp_org_id NUMBER)
6231: IS
6232: select current_phase_id, LIFECYCLE_ID ,ITEM_CATALOG_GROUP_ID from mtl_system_items
6233: where INVENTORY_ITEM_ID =inv_id and organization_id =cp_org_id;
6234:
6235: --End of changes Bug no:3034642
6236: BEGIN
6501: AND trunc(scheduled_date) = trunc(p_effectivity_date);
6502:
6503: CURSOR c_RevItemType IS
6504: SELECT bom_item_type,eng_item_flag
6505: FROM mtl_system_items
6506: WHERE inventory_item_id = p_revised_item_id
6507: AND organization_id = p_organization_id;
6508:
6509: -- Moved from BOM_Validate_Op_Seq.Check_Access by MK on 12/04
6994: ,x_item_catalogue_Group => l_item_catalog_group_id
6995: ,x_item_type => l_item_type);
6996: -- Added bom_parameters, bom_delete_status_code condition for bug 13362684
6997: l_sql := 'SELECT COUNT(*)
6998: FROM mtl_system_items_b i,
6999: bom_parameters bp
7000: WHERE i.organization_id = :1
7001: AND i.inventory_item_status_code not in (''Inactive'', ''Obsolete'')
7002: AND i.inventory_item_status_code <> nvl(bp.bom_delete_status_code, FND_API.G_MISS_CHAR)
7102: EXC_ERR_PVT_API_MAIN EXCEPTION;
7103:
7104: -- init the following
7105: l_org_code VARCHAR2(3);
7106: l_revised_item_number mtl_system_items_vl.concatenated_segments%TYPE;
7107: l_use_up_item_name mtl_system_items_vl.concatenated_segments%TYPE;
7108: l_from_item_revision mtl_item_revisions.revision%TYPE;
7109: l_completion_location_name VARCHAR2(1);
7110: l_from_work_order VARCHAR2(1);
7103:
7104: -- init the following
7105: l_org_code VARCHAR2(3);
7106: l_revised_item_number mtl_system_items_vl.concatenated_segments%TYPE;
7107: l_use_up_item_name mtl_system_items_vl.concatenated_segments%TYPE;
7108: l_from_item_revision mtl_item_revisions.revision%TYPE;
7109: l_completion_location_name VARCHAR2(1);
7110: l_from_work_order VARCHAR2(1);
7111: l_to_work_order VARCHAR2(1);