DBA Data[Home] [Help]

APPS.PA_PLANNING_RESOURCE_UTILS dependencies on PA_RES_MEMBERS_TEMP

Line 1810: UPDATE pa_res_members_temp res_temp

1806: --Join to the pa_expenditure_types table.
1807: -- Fixed bug 3962699 - Removed the setting of fc_res_type_code from
1808: -- all the below selects. No need to set fc res type code - only
1809: -- need to set Exp Type.
1810: UPDATE pa_res_members_temp res_temp
1811: SET res_temp.expenditure_type =
1812: (SELECT exp.expenditure_type
1813: FROM bom_resources bom, pa_expenditure_types exp
1814: WHERE bom.resource_id = res_temp.bom_resource_id

Line 1828: UPDATE pa_res_members_temp res_temp

1824: * Update to set the value for expenditure_type
1825: *************************************************/
1826: --Bug 3615477
1827: --Also updating the value of fc_res_type_code.
1828: UPDATE pa_res_members_temp res_temp
1829: SET res_temp.expenditure_type =
1830: (SELECT n.expenditure_type
1831: FROM pa_non_labor_resources n
1832: WHERE n.non_labor_resource =

Line 1842: UPDATE pa_res_members_temp res_temp

1838: -- Get the item's exp type if it exists
1839:
1840: --Bug 3615477
1841: --Also updating the value of fc_res_type_code.
1842: UPDATE pa_res_members_temp res_temp
1843: SET res_temp.expenditure_type =
1844: PJM_COMMITMENT_UTILS.MTL_EXPENDITURE_TYPE(
1845: res_temp.organization_id, res_temp.inventory_item_id)
1846: WHERE res_temp.organization_id IS NOT NULL

Line 1882: UPDATE pa_res_members_temp res_temp

1878: * Update to set the value for rate_expenditure_type
1879: * ************************************************/
1880: --Bug 3628429
1881: --Join to the pa_expenditure_types table.
1882: UPDATE pa_res_members_temp res_temp
1883: SET res_temp.rate_expenditure_type =
1884: (SELECT exp.expenditure_type
1885: FROM bom_resources bom,pa_expenditure_types exp
1886: WHERE bom.resource_id = res_temp.bom_resource_id

Line 1897: UPDATE pa_res_members_temp res_temp

1893: * Update to use when the rate_expenditure_type is null
1894: * and non_labor_resource is not null. We use the below
1895: * Update to set the value for rate_expenditure_type
1896: *************************************************/
1897: UPDATE pa_res_members_temp res_temp
1898: SET res_temp.rate_expenditure_type =
1899: (SELECT n.expenditure_type
1900: FROM pa_non_labor_resources n
1901: WHERE n.non_labor_resource =

Line 1909: UPDATE pa_res_members_temp res_temp

1905: AND res_temp.non_labor_resource IS NOT NULL;
1906:
1907: -- Get the item's exp type if it exists
1908:
1909: UPDATE pa_res_members_temp res_temp
1910: SET res_temp.rate_expenditure_type =
1911: PJM_COMMITMENT_UTILS.MTL_EXPENDITURE_TYPE(
1912: res_temp.organization_id, res_temp.inventory_item_id)
1913: WHERE res_temp.organization_id IS NOT NULL

Line 1921: UPDATE pa_res_members_temp res_temp

1917: /**************************************************
1918: * Final Update which will default the value of
1919: * rate_expenditure_type based on the resource class id
1920: * **************************************************/
1921: UPDATE pa_res_members_temp res_temp
1922: SET res_temp.rate_expenditure_type =
1923: (SELECT expenditure_type
1924: FROM pa_plan_res_defaults
1925: WHERE resource_class_id =

Line 1950: UPDATE pa_res_members_temp res_temp

1946: PROCEDURE default_ou(p_project_id IN PA_PROJECTS_ALL.PROJECT_ID%TYPE)
1947: IS
1948: l_proj_ou NUMBER;
1949: BEGIN
1950: UPDATE pa_res_members_temp res_temp
1951: SET org_id = (SELECT to_number(org_information1)
1952: FROM hr_organization_information
1953: WHERE org_information_context = 'Exp Organization Defaults'
1954: AND organization_id = res_temp.organization_id

Line 1970: UPDATE pa_res_members_temp res_temp

1966: EXCEPTION WHEN NO_DATA_FOUND THEN
1967: l_proj_ou := NULL;
1968: END;
1969:
1970: UPDATE pa_res_members_temp res_temp
1971: SET org_id = l_proj_ou
1972: WHERE res_temp.org_id IS NULL;
1973:
1974: EXCEPTION

Line 1993: UPDATE pa_res_members_temp res_temp

1989: /*********************************************************
1990: * If the resource_class code in the table is 'PEOPLE' or EQUIPMENT
1991: * Then by default the Unit of measure should only be 'HOURS'
1992: *************************************************************/
1993: UPDATE pa_res_members_temp res_temp
1994: SET unit_of_measure = 'HOURS'
1995: WHERE res_temp.resource_class_code IN ('PEOPLE', 'EQUIPMENT')
1996: AND res_temp.unit_of_measure IS NULL;
1997:

Line 2006: UPDATE pa_res_members_temp res_temp

2002: * And Organization id that matches the master_item_id in
2003: * pa_plan_res_defaults. If the planning resource has an organization,
2004: * use that; if not, use item master.
2005: ***************************************************************/
2006: UPDATE pa_res_members_temp res_temp
2007: SET unit_of_measure = (SELECT primary_uom_code
2008: FROM mtl_system_items_b items
2009: WHERE items.inventory_item_id =
2010: res_temp.inventory_item_id

Line 2019: UPDATE pa_res_members_temp res_temp

2015: AND res_temp.unit_of_measure IS NULL
2016: AND res_temp.organization_id IS NOT NULL
2017: AND res_temp.inventory_item_id IS NOT NULL;
2018:
2019: UPDATE pa_res_members_temp res_temp
2020: SET unit_of_measure = (SELECT primary_uom_code
2021: FROM mtl_system_items_b items
2022: WHERE items.inventory_item_id =
2023: res_temp.inventory_item_id

Line 2042: UPDATE pa_res_members_temp res_temp

2038: * Items but there is no item in the planning resource,
2039: * and there is an expenditure type, then take the UOM of
2040: * the expenditure type.
2041: ***************************************************************/
2042: UPDATE pa_res_members_temp res_temp
2043: SET res_temp.unit_of_measure = (SELECT unit_of_measure
2044: FROM pa_expenditure_types et
2045: WHERE et.expenditure_type = res_temp.expenditure_type
2046: AND ROWNUM = 1)

Line 2057: UPDATE pa_res_members_temp res_temp

2053: /******************************************************
2054: * If the Unit of measure column is still null, then
2055: * Default it to 'DOLLARS'
2056: *********************************************************/
2057: UPDATE pa_res_members_temp res_temp
2058: SET res_temp.unit_of_measure = 'DOLLARS'
2059: WHERE res_temp.unit_of_measure IS NULL;
2060:
2061: EXCEPTION

Line 2076: UPDATE pa_res_members_temp res_temp

2072: * ******************************************************/
2073: PROCEDURE Default_Supplier
2074: IS
2075: BEGIN
2076: UPDATE pa_res_members_temp res_temp
2077: SET res_temp.vendor_id =
2078: (SELECT asgn.vendor_id
2079: FROM per_all_assignments_f asgn
2080: WHERE asgn.person_id = res_temp.person_id

Line 2103: UPDATE pa_res_members_temp res_temp

2099: PROCEDURE Default_Currency_Code
2100: IS
2101:
2102: BEGIN
2103: UPDATE pa_res_members_temp res_temp
2104: SET rate_func_curr_code = (
2105: SELECT FC.Currency_Code
2106: FROM FND_CURRENCIES FC,
2107: GL_SETS_OF_BOOKS GB,

Line 2115: UPDATE pa_res_members_temp res_temp

2111: AND IMP.Set_Of_Books_ID = GB.Set_Of_Books_ID
2112: AND FC.Currency_Code =
2113: DECODE(IMP.Set_Of_Books_ID, NULL,NULL,GB.CURRENCY_CODE));
2114:
2115: UPDATE pa_res_members_temp res_temp
2116: SET rate_func_curr_code = unit_of_measure
2117: WHERE inventory_item_id IS NOT NULL
2118: AND rate_based_flag = 'N';
2119:

Line 2122: UPDATE pa_res_members_temp res_temp

2118: AND rate_based_flag = 'N';
2119:
2120: -- Added for bug 3841920 - The UOM for all non-rate based
2121: -- transactions should be 'Currency'
2122: UPDATE pa_res_members_temp res_temp
2123: SET unit_of_measure = 'DOLLARS'
2124: WHERE inventory_item_id IS NOT NULL
2125: AND rate_based_flag = 'N';
2126:

Line 2142: UPDATE pa_res_members_temp res_temp

2138: * ******************************************************/
2139: PROCEDURE default_job
2140: IS
2141: BEGIN
2142: UPDATE pa_res_members_temp res_temp
2143: SET job_id = (SELECT job_id
2144: FROM per_all_assignments_f assn
2145: WHERE assn.person_id = res_temp.person_id
2146: AND SYSDATE BETWEEN assn.effective_start_date

Line 2154: UPDATE pa_res_members_temp res_temp

2150: AND ROWNUM = 1)
2151: WHERE res_temp.job_id IS NULL
2152: AND res_temp.person_id IS NOT NULL;
2153:
2154: UPDATE pa_res_members_temp res_temp
2155: SET job_id = (SELECT default_job_id
2156: FROM pa_project_role_types_vl role
2157: WHERE role.project_role_id = res_temp.project_role_id
2158: AND ROWNUM = 1)

Line 2181: UPDATE pa_res_members_temp res_temp

2177: IS
2178: BEGIN
2179: -- Issue with future dated or terminated employees/contingent workers?
2180:
2181: UPDATE pa_res_members_temp res_temp
2182: SET person_type_code = (SELECT
2183: decode(peo.current_employee_flag, 'Y', 'EMP', 'CWK')
2184: FROM per_all_people_f peo
2185: WHERE peo.person_id = res_temp.person_id

Line 2226: UPDATE pa_res_members_temp res_temp

2222: * and person_id IS NOT NULL.
2223: * We are updating the value for organization_id = derived value
2224: * based on person's HR org.
2225: * ***************************************************/
2226: UPDATE pa_res_members_temp res_temp
2227: SET organization_id = (SELECT a.organization_id
2228: FROM per_assignments_x a,
2229: pa_all_organizations org
2230: WHERE a.person_id = res_temp.person_id

Line 2245: UPDATE pa_res_members_temp res_temp

2241: * This Update will fire when the incurred_by_res_flag = 'N'
2242: * and bom_resource_id IS NOT NULL and organization_id IS NULL.
2243: * We are deriving the value for organization_id
2244: * ***************************************************/
2245: UPDATE pa_res_members_temp res_temp
2246: SET organization_id = (SELECT b.organization_id
2247: FROM bom_resources b
2248: WHERE b.resource_id = res_temp.bom_resource_id
2249: AND ROWNUM = 1)

Line 2259: UPDATE pa_res_members_temp res_temp

2255: * This Update will fire when the incurred_by_res_flag = 'N'
2256: * and inventory_item_id IS NOT NULL and organization_id IS NULL.
2257: * We are deriving the value for organization_id
2258: * ***************************************************/
2259: UPDATE pa_res_members_temp res_temp
2260: SET organization_id = (SELECT i.organization_id
2261: FROM mtl_system_items_b i
2262: WHERE i.inventory_item_id = res_temp.inventory_item_id
2263: AND i.organization_id =

Line 2298: UPDATE pa_res_members_temp res_temp

2294: l_organization_id := NULL;
2295: END;
2296:
2297: IF l_organization_id IS NOT NULL THEN
2298: UPDATE pa_res_members_temp res_temp
2299: SET organization_id = l_organization_id
2300: WHERE res_temp.organization_id IS NULL;
2301: END IF;
2302:

Line 2324: UPDATE pa_res_members_temp res_temp

2320: /****************************************
2321: * First Update all the rows no 'N' as by
2322: * default it should be N and not null.
2323: ******************************************/
2324: UPDATE pa_res_members_temp res_temp
2325: SET rate_based_flag = 'N';
2326:
2327: /********************************************
2328: * Update it to 'Y' for resource_class_code

Line 2331: UPDATE pa_res_members_temp res_temp

2327: /********************************************
2328: * Update it to 'Y' for resource_class_code
2329: * in 'PEOPLE' or 'EQUIPMENT'
2330: ***********************************************/
2331: UPDATE pa_res_members_temp res_temp
2332: SET rate_based_flag = 'Y'
2333: WHERE res_temp.resource_class_code in ('PEOPLE','EQUIPMENT');
2334:
2335: UPDATE pa_res_members_temp res_temp

Line 2335: UPDATE pa_res_members_temp res_temp

2331: UPDATE pa_res_members_temp res_temp
2332: SET rate_based_flag = 'Y'
2333: WHERE res_temp.resource_class_code in ('PEOPLE','EQUIPMENT');
2334:
2335: UPDATE pa_res_members_temp res_temp
2336: SET rate_based_flag = 'Y'
2337: WHERE res_temp.resource_class_code
2338: = 'MATERIAL_ITEMS'
2339: AND res_temp.inventory_item_id IS NOT NULL

Line 2358: UPDATE pa_res_members_temp res_temp

2354: * rate expenditure type if the expenditure type is null
2355: * - added an extra condition to check that either one of
2356: * expenditure type or rate expenditure type should not be null.
2357: * ********************************************************/
2358: UPDATE pa_res_members_temp res_temp
2359: SET rate_based_flag =
2360: (SELECT c.cost_rate_flag
2361: FROM pa_expenditure_types c
2362: WHERE c.expenditure_type = res_temp.expenditure_type)

Line 2471: 'PA_RES_MEMBERS_TEMP',

2467:
2468: -- Commenting out for TEMP fix to bug 4887312 - proper fix will be done soon.
2469: /*
2470: FND_STATS.SET_TABLE_STATS('PA',
2471: 'PA_RES_MEMBERS_TEMP',
2472: 100,
2473: 10,
2474: 100);
2475:

Line 2487: PA_TASK_ASSIGNMENT_UTILS.set_table_stats('PA','PA_RES_MEMBERS_TEMP',100,10,100);

2483:
2484: -- Proper Fix for 4887312 *** RAMURTHY 03/01/06 02:33 pm ***
2485: -- It solves the issue above wrt commit by the FND_STATS.SET_TABLE_STATS call
2486:
2487: PA_TASK_ASSIGNMENT_UTILS.set_table_stats('PA','PA_RES_MEMBERS_TEMP',100,10,100);
2488: PA_TASK_ASSIGNMENT_UTILS.set_table_stats('PA','PA_RES_MEMBER_ID_TEMP',100,10,100);
2489:
2490: -- End Bug fix 4887312
2491:

Line 2496: DELETE FROM pa_res_members_temp;

2492: /***********************************************
2493: * Deleting from the temp tables in the beginning as well
2494: * to be on the safe side.
2495: ***********************************************/
2496: DELETE FROM pa_res_members_temp;
2497:
2498: DELETE FROM pa_res_member_id_temp;
2499: /************************************************************
2500: * Created a script to create 2 tables in the DB

Line 2503: * 2. pa_res_members_temp which would hold the

2499: /************************************************************
2500: * Created a script to create 2 tables in the DB
2501: * 1. pa_res_member_id_temp which would only hold the
2502: * resource_list_member_id
2503: * 2. pa_res_members_temp which would hold the
2504: * resource_list_member_id and all the other attributes
2505: * which need to be defaulted
2506: *************************************************************/
2507:

Line 2527: * pa_res_members_temp table. And in the below insert

2523: * Description : When Duplicate resource list member ID's
2524: * were passed as IN parameters into the PL/SQL
2525: * table, this proc was failing. To rectify that
2526: * we have now induded a column order_id in the
2527: * pa_res_members_temp table. And in the below insert
2528: * we are populating value into it, same as the order
2529: * id in pa_res_members_id_temp.
2530: *********************************************************/
2531: INSERT INTO pa_res_members_temp

Line 2531: INSERT INTO pa_res_members_temp

2527: * pa_res_members_temp table. And in the below insert
2528: * we are populating value into it, same as the order
2529: * id in pa_res_members_id_temp.
2530: *********************************************************/
2531: INSERT INTO pa_res_members_temp
2532: (resource_list_member_id,
2533: order_id,
2534: resource_class_flag ,
2535: resource_class_code ,

Line 2618: UPDATE pa_res_members_temp res_temp

2614: * as Null. We have however fixed the issue with the below Update.
2615: * This Update will fire when if the res_type_code is still null
2616: * and the incurred_by_res_flag='Y'
2617: ****************************************************************/
2618: UPDATE pa_res_members_temp res_temp
2619: SET res_type_code = DECODE(res_temp.person_id, NULL,
2620: DECODE(res_temp.job_id, NULL,
2621: DECODE(res_temp.person_type_code, NULL,
2622: DECODE(res_temp.incur_by_role_id, NULL,

Line 2634: * in the temp table pa_res_members_temp with the correct

2630: AND res_type_code IS NULL;
2631:
2632: /******************************************************************
2633: * Call the Procedure Default_job which will Update the Job ID
2634: * in the temp table pa_res_members_temp with the correct
2635: * value.
2636: * *****************************************************************/
2637: pa_planning_resource_utils.default_job;
2638:

Line 2641: * person_type_code in the temp table pa_res_members_temp with the correct

2637: pa_planning_resource_utils.default_job;
2638:
2639: /******************************************************************
2640: * Call the Procedure default_person_type which will Update the
2641: * person_type_code in the temp table pa_res_members_temp with the correct
2642: * value.
2643: * *****************************************************************/
2644: pa_planning_resource_utils.default_person_type;
2645:

Line 2649: * in the temp table pa_res_members_temp with the correct

2645:
2646: /******************************************************************
2647: * Call the Procedure Default_Organization which will
2648: * Update the organization_id and rate_incurred_by_org_id
2649: * in the temp table pa_res_members_temp with the correct
2650: * values.
2651: * *****************************************************************/
2652: pa_planning_resource_utils.default_organization(
2653: p_project_id => p_project_id);

Line 2658: * in the temp table pa_res_members_temp with the correct

2654:
2655: /******************************************************************
2656: * Call the Procedure Default_Expenditure_Type which will
2657: * Update the expenditure_type
2658: * in the temp table pa_res_members_temp with the correct
2659: * values.
2660: * *****************************************************************/
2661: pa_planning_resource_utils.default_expenditure_type;
2662:

Line 2666: * in the temp table pa_res_members_temp with the correct

2662:
2663: /******************************************************************
2664: * Call the Procedure Default_Rate_Expenditure_Type which will
2665: * Update the rate_expenditure_type
2666: * in the temp table pa_res_members_temp with the correct
2667: * values.
2668: * *****************************************************************/
2669: pa_planning_resource_utils.default_rate_expenditure_type;
2670:

Line 2674: * in the temp table pa_res_members_temp with the correct

2670:
2671: /******************************************************************
2672: * Call the Procedure Default_Supplier which will
2673: * Update the vendor_id
2674: * in the temp table pa_res_members_temp with the correct
2675: * values.
2676: * *****************************************************************/
2677: pa_planning_resource_utils.default_supplier;
2678:

Line 2682: * in the temp table pa_res_members_temp with the correct

2678:
2679: /******************************************************************
2680: * Call the Procedure Default_rate_based which will
2681: * Update the Rate_based_flag
2682: * in the temp table pa_res_members_temp with the correct
2683: * values.
2684: * *****************************************************************/
2685: pa_planning_resource_utils.default_rate_based;
2686:

Line 2690: * in the temp table pa_res_members_temp with the correct

2686:
2687: /******************************************************************
2688: * Call the Procedure Default_OU which will
2689: * Update the OU
2690: * in the temp table pa_res_members_temp with the correct
2691: * values.
2692: *****************************************************************/
2693: pa_planning_resource_utils.default_ou(p_project_id);
2694:

Line 2698: * in the temp table pa_res_members_temp with the correct

2694:
2695: /******************************************************************
2696: * Call the Procedure Default_UOM which will
2697: * Update the Unit_of_measure
2698: * in the temp table pa_res_members_temp with the correct
2699: * values.
2700: *****************************************************************/
2701: pa_planning_resource_utils.default_uom;
2702:

Line 2706: * in the temp table pa_res_members_temp with the correct

2702:
2703: /******************************************************************
2704: * Call the Procedure Default_Currency_Code which will
2705: * Update the Rate_Func_Curr_Code
2706: * in the temp table pa_res_members_temp with the correct
2707: * values.
2708: *****************************************************************/
2709: pa_planning_resource_utils.default_currency_code;
2710:

Line 2712: * Fetch the values that are currently there in the pa_res_members_temp

2708: *****************************************************************/
2709: pa_planning_resource_utils.default_currency_code;
2710:
2711: /*****************************************************************
2712: * Fetch the values that are currently there in the pa_res_members_temp
2713: * table into the out var's. Select it from the Temp table
2714: * pa_res_members_temp and Bulk collect it into the OUT var's.
2715: *********************************************************************/
2716: /**********************************************************

Line 2714: * pa_res_members_temp and Bulk collect it into the OUT var's.

2710:
2711: /*****************************************************************
2712: * Fetch the values that are currently there in the pa_res_members_temp
2713: * table into the out var's. Select it from the Temp table
2714: * pa_res_members_temp and Bulk collect it into the OUT var's.
2715: *********************************************************************/
2716: /**********************************************************
2717: * Added an extra order ID join between the pa_res_members_temp
2718: * and pa_res_member_id_temp table to keep in sync.

Line 2717: * Added an extra order ID join between the pa_res_members_temp

2713: * table into the out var's. Select it from the Temp table
2714: * pa_res_members_temp and Bulk collect it into the OUT var's.
2715: *********************************************************************/
2716: /**********************************************************
2717: * Added an extra order ID join between the pa_res_members_temp
2718: * and pa_res_member_id_temp table to keep in sync.
2719: * Bug - 3473425
2720: **********************************************************/
2721: /*********************************************************

Line 2796: FROM pa_res_members_temp a,

2792: x_rate_based_flag ,
2793: x_rate_expenditure_type ,
2794: x_rate_func_curr_code
2795: -- x_rate_incurred_by_org_id
2796: FROM pa_res_members_temp a,
2797: pa_res_member_id_temp b
2798: WHERE a.resource_list_member_id = b.resource_list_member_id
2799: AND a.order_id = b.order_id
2800: ORDER BY b.order_id;

Line 2807: DELETE FROM pa_res_members_temp;

2803: X_Return_Status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
2804: RAISE l_exception;
2805: END IF;
2806:
2807: DELETE FROM pa_res_members_temp;
2808:
2809: DELETE FROM pa_res_member_id_temp;
2810:
2811: EXCEPTION