[Home] [Help]
366: CURSOR C_item_attributes
367: IS
368: SELECT attribute_name
369: , control_level
370: FROM mtl_item_attributes
371: WHERE
372: control_level = 1
373: AND attribute_group_id_gui IN
374: (20, 25, 30, 31, 35, 40, 41, 51,
812: -- Bug 10404086 : Start
813: /*
814: CURSOR c_master_attributes IS
815: SELECT SUBSTR(ATTRIBUTE_NAME,18) Attribute_Code
816: FROM MTL_ITEM_ATTRIBUTES
817: WHERE CONTROL_LEVEL = 1
818: AND (ATTRIBUTE_GROUP_ID_GUI IN
819: (20, 25, 30, 31, 35, 40, 41, 51, 60,
820: 62, 65, 70, 80, 90, 100, 120, 130));
818: AND (ATTRIBUTE_GROUP_ID_GUI IN
819: (20, 25, 30, 31, 35, 40, 41, 51, 60,
820: 62, 65, 70, 80, 90, 100, 120, 130));
821:
822: l_Attribute_Code mtl_item_attributes.attribute_name%TYPE;
823: */
824: m_Item_rec MTL_SYSTEM_ITEMS_INTERFACE%ROWTYPE;
825: l_Item_rec MTL_SYSTEM_ITEMS_VL%ROWTYPE;
826: l_create_child BOOLEAN := FALSE;
841: -- Bug 10404086 : Start - Changed the cusror into bulk collect.
842: IF (g_attribute_code IS NULL OR g_attribute_code.Count = 0) THEN
843: SELECT SUBSTR(ATTRIBUTE_NAME,18)
844: BULK COLLECT INTO g_attribute_code
845: FROM MTL_ITEM_ATTRIBUTES
846: WHERE CONTROL_LEVEL = 1
847: AND (ATTRIBUTE_GROUP_ID_GUI IN
848: (20, 25, 30, 31, 35, 40, 41, 51, 60,
849: 62, 65, 70, 80, 90, 100, 120, 130));
4749: (cost_txn = 2) then
4750:
4751: select control_level
4752: into costing_level
4753: from mtl_item_attributes where attribute_name = 'MTL_SYSTEM_ITEMS.COSTING_ENABLED_FLAG';
4754:
4755: IF (costing_level = 1) then
4756: dumm_status := INVPUOPI.mtl_log_interface_err(
4757: org_id,
4803: (cost_txn = 2) then
4804:
4805: select control_level
4806: into invetory_asset_flag_level
4807: from mtl_item_attributes where attribute_name = 'MTL_SYSTEM_ITEMS.INVENTORY_ASSET_FLAG';
4808:
4809: IF (invetory_asset_flag_level = 1) then
4810: dumm_status := INVPUOPI.mtl_log_interface_err(
4811: org_id,
6157: -- 2433351,new functional area Product Reporting Looping through all the Orgs
6158: IF ( rec.transaction_type = 'UPDATE') THEN
6159: -- Bug 12669090 : Start : Similar to the code change done in the bug 9833451 (12.1)
6160: select count(1) into l_co_control_level
6161: from mtl_item_attributes
6162: WHERE attribute_name = 'MTL_SYSTEM_ITEMS.CUSTOMER_ORDER_FLAG'
6163: and control_level = 1
6164: and rec.CUSTOMER_ORDER_FLAG = 'Y';
6165:
6163: and control_level = 1
6164: and rec.CUSTOMER_ORDER_FLAG = 'Y';
6165:
6166: select count(1) into l_io_control_level
6167: from mtl_item_attributes
6168: WHERE attribute_name = 'MTL_SYSTEM_ITEMS.INTERNAL_ORDER_FLAG'
6169: and control_level = 1
6170: and rec.INTERNAL_ORDER_FLAG = 'Y';
6171:
6235: and mic.category_set_id = s.category_set_id
6236: )
6237: and (exists
6238: (select 'co_mst_controlled'
6239: from mtl_item_attributes
6240: WHERE attribute_name = 'MTL_SYSTEM_ITEMS.CUSTOMER_ORDER_FLAG'
6241: and control_level = 1
6242: and rec.CUSTOMER_ORDER_FLAG = 'Y')
6243: or exists
6241: and control_level = 1
6242: and rec.CUSTOMER_ORDER_FLAG = 'Y')
6243: or exists
6244: (select 'io_mst_controlled'
6245: from mtl_item_attributes
6246: WHERE attribute_name = 'MTL_SYSTEM_ITEMS.INTERNAL_ORDER_FLAG'
6247: and control_level = 1
6248: and rec.INTERNAL_ORDER_FLAG = 'Y')
6249: );
7417:
7418:
7419: /* get_control_level(p_attrName IN VARCHAR2)
7420: * PARAMETERS:
7421: * p_attrName - ATTRIBUTE_NAME specified in table MTL_ITEM_ATTRIBUTES
7422: * RETURN VALUE:
7423: * 0 - ERROR: ATTRIBUTE_NAME NOT FOUND
7424: * 1 - CONTROLLED AT MASTER LEVEL
7425: * 2 - CONTROLLED AT ORG LEVEL
7430: l_level NUMBER;
7431: RETVAL NUMBER;
7432: BEGIN
7433: SELECT CONTROL_LEVEL INTO l_level
7434: FROM MTL_ITEM_ATTRIBUTES
7435: WHERE ATTRIBUTE_NAME = p_attrName;
7436:
7437: RETVAL := l_level;
7438: