977: l_error_msg_data fnd_new_messages.message_name%TYPE;
978:
979: CURSOR c_ids IS
980: SELECT b.resource_id
981: FROM bom_resources b
982: WHERE b.resource_type = p_res_type_code
983: and NVL(b.disable_date,SYSDATE) >= SYSDATE
984: and b.expenditure_type is NOT NULL
985: and b.resource_code = p_bom_eqlabor_name;
995:
996: BEGIN
997: SELECT b.resource_id
998: INTO x_bom_resource_id
999: FROM bom_resources b
1000: WHERE b.resource_type = p_res_type_code
1001: AND nvl(b.disable_date,SYSDATE) >= SYSDATE
1002: AND b.expenditure_type IS NOT NULL
1003: AND b.resource_id = p_bom_eqlabor_id;
1059:
1060: BEGIN
1061: SELECT b.resource_id
1062: INTO x_bom_resource_id
1063: FROM bom_resources b
1064: WHERE b.resource_type = p_res_type_code --2
1065: AND NVL(b.disable_date,SYSDATE) >= SYSDATE
1066: AND b.expenditure_type IS NOT NULL
1067: AND b.resource_code = p_bom_eqlabor_name;
1792: * Procedure : Default_Expenditure_Type
1793: * 1. If Expenditure Type is available on the planning resource,
1794: * leave as is.
1795: * 2. If Exp Type is null:
1796: * i. Derive from BOM Resources, if the planning resource has one.
1797: * ii. Derive from Non-Labor Resource, if the planning resource has one.
1798: * iii. Derive from item if planning resource has one.
1799: * We could pass back null for the Expenditure type for the planning resource,
1800: * if none of the above yields a value.
1825: -- need to set Exp Type.
1826: UPDATE pa_res_members_temp res_temp
1827: SET res_temp.expenditure_type =
1828: (SELECT exp.expenditure_type
1829: FROM bom_resources bom, pa_expenditure_types exp
1830: WHERE bom.resource_id = res_temp.bom_resource_id
1831: AND exp.expenditure_type = bom.expenditure_type
1832: AND exp.UNIT_OF_MEASURE = 'HOURS'
1833: AND ROWNUM = 1)
1869: END Default_Expenditure_Type;
1870: /******************************************/
1871: /*******************************************************
1872: * Procedure : Default_Rate_Expenditure_Type
1873: * i. Derive from BOM Resources, if the planning resource has one.
1874: * ii. Derive from Non-Labor Resource, if the planning resource has one.
1875: * iii. Derive from item if planning resource has one.
1876: * iv. Derive from class
1877: * We could pass back null for the Rate Expenditure type for the planning
1898: --Join to the pa_expenditure_types table.
1899: UPDATE pa_res_members_temp res_temp
1900: SET res_temp.rate_expenditure_type =
1901: (SELECT exp.expenditure_type
1902: FROM bom_resources bom,pa_expenditure_types exp
1903: WHERE bom.resource_id = res_temp.bom_resource_id
1904: AND exp.expenditure_type = bom.expenditure_type
1905: AND exp.UNIT_OF_MEASURE = 'HOURS'
1906: AND ROWNUM = 1)
2283: * We are deriving the value for organization_id
2284: * ***************************************************/
2285: UPDATE pa_res_members_temp res_temp
2286: SET organization_id = (SELECT b.organization_id
2287: FROM bom_resources b
2288: WHERE b.resource_id = res_temp.bom_resource_id
2289: AND ROWNUM = 1)
2290: WHERE res_temp.incurred_by_res_flag = 'N'
2291: AND res_temp.bom_resource_id IS NOT NULL
2997:
2998: /*************************************************
2999: * Bug - 3461494
3000: * Description - Using the Resource code field from the
3001: * Bom_Resources table to derive the
3002: * resource_name instead of using the
3003: * description.
3004: *************************************************/
3005: Cursor c_BOM (P_BOM_Res_Id IN Number) Is
3005: Cursor c_BOM (P_BOM_Res_Id IN Number) Is
3006: Select
3007: Resource_code
3008: From
3009: Bom_Resources
3010: Where
3011: Resource_Id = P_BOM_Res_Id;
3012:
3013: Cursor c_Item_Cat ( P_Item_Cat_Id IN Number ) Is
6261: -- Validate the combination
6262: BEGIN
6263: SELECT 'Y'
6264: INTO l_bom_combo_exists
6265: FROM bom_resources b
6266: WHERE b.resource_id = X_Bom_Resource_Id
6267: AND b.organization_id = X_Organization_Id
6268: AND ROWNUM = 1;
6269:
7841: l_bom_resource_id IS NOT NULL) THEN
7842: -- Get the Org
7843: SELECT b.organization_id, orgvl.name
7844: INTO X_organization_id, X_organization_name
7845: FROM bom_resources b,
7846: hr_all_organization_units_vl orgvl
7847: WHERE b.resource_id = l_bom_resource_id
7848: AND b.organization_id = orgvl.organization_id
7849: AND ROWNUM = 1;