DBA Data[Home] [Help]

APPS.PA_COST1 dependencies on PA_COST

Line 1: package body PA_COST1 as

1: package body PA_COST1 as
2: -- $Header: PAXCSR1B.pls 120.9 2011/07/10 05:41:48 racheruv ship $
3:
4: g_debug_flag Varchar2(10) ;
5:

Line 32: l_module varchar2(100) := 'PA_COST1';

28: PROCEDURE print_msg(p_debug_flag varchar2
29: ,p_msg varchar2 Default NULL) IS
30:
31: l_msg varchar2(1000);
32: l_module varchar2(100) := 'PA_COST1';
33: BEGIN
34: --calc_log(p_msg);
35: If p_debug_flag = 'Y' Then
36: l_msg := substr(p_msg,1,1000);

Line 154: PA_DEBUG.init_err_stack ('PA_COST1.get_projLevel_BurdSchds');

150: End If;
151: l_debug_flag := NVL(g_debug_flag,'N');
152: IF ( l_debug_flag = 'Y' )
153: THEN
154: PA_DEBUG.init_err_stack ('PA_COST1.get_projLevel_BurdSchds');
155: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
156: ,x_write_file => 'LOG'
157: ,x_debug_mode => l_debug_flag
158: );

Line 484: IF ((pa_cost1.g_project_type is NULL OR pa_cost1.g_project_type <> p_project_type )

480:
481: l_burden_flag varchar2(10) := 'N';
482: BEGIN
483: /* Bug fix: 4230258 Use one-level cache logic so that executing cursor will be avoided */
484: IF ((pa_cost1.g_project_type is NULL OR pa_cost1.g_project_type <> p_project_type )
485: OR (pa_cost1.g_project_id is NULL or pa_cost1.g_project_id <> p_project_id)) Then
486:
487: OPEN cur_burden_flag;
488: FETCH cur_burden_flag INTO l_burden_flag;

Line 485: OR (pa_cost1.g_project_id is NULL or pa_cost1.g_project_id <> p_project_id)) Then

481: l_burden_flag varchar2(10) := 'N';
482: BEGIN
483: /* Bug fix: 4230258 Use one-level cache logic so that executing cursor will be avoided */
484: IF ((pa_cost1.g_project_type is NULL OR pa_cost1.g_project_type <> p_project_type )
485: OR (pa_cost1.g_project_id is NULL or pa_cost1.g_project_id <> p_project_id)) Then
486:
487: OPEN cur_burden_flag;
488: FETCH cur_burden_flag INTO l_burden_flag;
489: CLOSE cur_burden_flag;

Line 491: pa_cost1.g_project_type := p_project_type;

487: OPEN cur_burden_flag;
488: FETCH cur_burden_flag INTO l_burden_flag;
489: CLOSE cur_burden_flag;
490: --print_msg(g_debug_flag,'Executing cursor to get burden cost flag');
491: pa_cost1.g_project_type := p_project_type;
492: pa_cost1.g_project_id := p_project_id;
493: pa_cost1.g_burden_costFlag := l_burden_flag;
494: Else
495: --print_msg(g_debug_flag,'Getting from cache');

Line 492: pa_cost1.g_project_id := p_project_id;

488: FETCH cur_burden_flag INTO l_burden_flag;
489: CLOSE cur_burden_flag;
490: --print_msg(g_debug_flag,'Executing cursor to get burden cost flag');
491: pa_cost1.g_project_type := p_project_type;
492: pa_cost1.g_project_id := p_project_id;
493: pa_cost1.g_burden_costFlag := l_burden_flag;
494: Else
495: --print_msg(g_debug_flag,'Getting from cache');
496: l_burden_flag := pa_cost1.g_burden_costFlag;

Line 493: pa_cost1.g_burden_costFlag := l_burden_flag;

489: CLOSE cur_burden_flag;
490: --print_msg(g_debug_flag,'Executing cursor to get burden cost flag');
491: pa_cost1.g_project_type := p_project_type;
492: pa_cost1.g_project_id := p_project_id;
493: pa_cost1.g_burden_costFlag := l_burden_flag;
494: Else
495: --print_msg(g_debug_flag,'Getting from cache');
496: l_burden_flag := pa_cost1.g_burden_costFlag;
497: End If;

Line 496: l_burden_flag := pa_cost1.g_burden_costFlag;

492: pa_cost1.g_project_id := p_project_id;
493: pa_cost1.g_burden_costFlag := l_burden_flag;
494: Else
495: --print_msg(g_debug_flag,'Getting from cache');
496: l_burden_flag := pa_cost1.g_burden_costFlag;
497: End If;
498: RETURN l_burden_flag;
499:
500: END check_proj_burdened;

Line 678: PA_DEBUG.init_err_stack ('PA_COST1.Get_Plan_Actual_Cost_Rates');

674: g_debug_flag := NVL(g_debug_flag, 'N');
675: End If;
676: l_debug_flag := NVL(g_debug_flag,'N');
677: IF l_debug_flag = 'Y' Then
678: PA_DEBUG.init_err_stack ('PA_COST1.Get_Plan_Actual_Cost_Rates');
679: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
680: ,x_write_file => 'LOG'
681: ,x_debug_mode => l_debug_flag
682: );

Line 688: l_stage := 'Inside PA_COST1.Get_Plan_Actual_Cost_Rates API';

684:
685: /* Derive the Rate Organization Id from the params*/
686: l_rate_organization_id := NVL(p_override_organization_id,NVL(p_incurred_by_organization_id,p_nlr_organization_id));
687:
688: l_stage := 'Inside PA_COST1.Get_Plan_Actual_Cost_Rates API';
689: l_stage := l_stage||' IN PARAMS mode['||p_calling_mode||']Proj Type['||p_project_type||
690: ']Proj Id['||p_project_id||']TaskId['||p_task_id||']TopTask['||p_top_task_id||
691: ']Ei Date['||p_Exp_item_date||']ExpType['||p_expenditure_type||
692: ']ResClass['||p_resource_class||']Personid['||p_person_id||']NLR['||p_non_labor_resource||

Line 929: l_stage := 'Calling pa_cost.Override_exp_organization api';

925:
926: /* Bug fix: 4232181 Derive the organization overrides from the project level */
927: IF l_trxn_type IN ('LABOR SCH RATE','JOB SCH RATE','LABOR RATE') Then
928: IF l_override_organization_id is NULL Then
929: l_stage := 'Calling pa_cost.Override_exp_organization api';
930: print_msg(l_debug_flag,l_stage);
931: pa_cost.Override_exp_organization
932: (P_item_date => p_exp_item_date
933: ,P_person_id => p_person_id

Line 931: pa_cost.Override_exp_organization

927: IF l_trxn_type IN ('LABOR SCH RATE','JOB SCH RATE','LABOR RATE') Then
928: IF l_override_organization_id is NULL Then
929: l_stage := 'Calling pa_cost.Override_exp_organization api';
930: print_msg(l_debug_flag,l_stage);
931: pa_cost.Override_exp_organization
932: (P_item_date => p_exp_item_date
933: ,P_person_id => p_person_id
934: ,P_project_id => p_project_id
935: ,P_incurred_by_organz_id => p_incurred_by_organization_id

Line 942: l_stage := 'Return status of pa_cost.Override_exp_organization ['||l_return_status||']';

938: ,X_return_status => l_return_status
939: ,X_msg_count => l_msg_count
940: ,X_msg_data => l_msg_data
941: );
942: l_stage := 'Return status of pa_cost.Override_exp_organization ['||l_return_status||']';
943: l_stage := l_stage||']msgData['||l_msg_data||']OverideOrg['||l_override_organization_id||']' ;
944: print_msg(l_debug_flag,l_stage);
945: End If;
946: End If;

Line 1380: l_stage := 'Calling PA_COST_RATE_PUB.get_labor_rate API in STAFFED calling mode';

1376: print_msg(l_debug_flag,l_stage);
1377:
1378: /* 12.2 payroll integration .. set the globals for RBC .. end */
1379:
1380: l_stage := 'Calling PA_COST_RATE_PUB.get_labor_rate API in STAFFED calling mode';
1381: print_msg(l_debug_flag,l_stage);
1382: l_rate_organization_id := NVL(l_override_organization_id,
1383: NVl(p_incurred_by_organization_id,p_nlr_organization_id));
1384: PA_COST_RATE_PUB.get_labor_rate

Line 1384: PA_COST_RATE_PUB.get_labor_rate

1380: l_stage := 'Calling PA_COST_RATE_PUB.get_labor_rate API in STAFFED calling mode';
1381: print_msg(l_debug_flag,l_stage);
1382: l_rate_organization_id := NVL(l_override_organization_id,
1383: NVl(p_incurred_by_organization_id,p_nlr_organization_id));
1384: PA_COST_RATE_PUB.get_labor_rate
1385: (p_person_id => p_person_id
1386: ,p_txn_date => p_Exp_item_date
1387: ,p_calling_module =>'STAFFED'
1388: ,p_org_id => NVL(p_expenditure_ou,p_project_OU)

Line 1431: pa_cost1.Get_Non_Labor_raw_cost

1427: -- Call non-labor raw cost api
1428: l_stage := 'Calling Non Labor raw cost API';
1429: print_msg(l_debug_flag,l_stage);
1430: If (p_non_labor_resource is NOT NULL and p_expenditure_type is NOT NULL ) Then
1431: pa_cost1.Get_Non_Labor_raw_cost
1432: (p_project_id => p_project_id
1433: ,p_task_id => p_task_id
1434: ,p_non_labor_resource => p_non_labor_resource
1435: ,p_nlr_organization_id => p_nlr_organization_id

Line 1536: pa_cost1.get_RateSchDetails

1532: l_cost_rate_multiplier := NULL;
1533: End If;
1534: l_stage := 'Calling get_RateSchDetails SchType['||l_bill_rate_schedule_type||']SchId['||l_bill_rate_sch_id||']';
1535: print_msg(l_debug_flag,l_stage);
1536: pa_cost1.get_RateSchDetails
1537: (p_schedule_type => l_bill_rate_schedule_type
1538: ,p_rate_sch_id => l_bill_rate_sch_id
1539: ,p_person_id => p_person_id
1540: ,p_job_id => p_job_id

Line 1575: pa_cost1.get_RateSchDetails

1571: l_stage := 'Calling get_RateSchDetails SchType['
1572: ||l_bill_rate_schedule_type||']SchId['
1573: ||l_bill_rate_sch_id||']';
1574: print_msg(l_debug_flag,l_stage);
1575: pa_cost1.get_RateSchDetails
1576: (p_schedule_type => l_bill_rate_schedule_type
1577: ,p_rate_sch_id => l_bill_rate_sch_id
1578: ,p_person_id => p_person_id
1579: ,p_job_id => p_job_id

Line 1621: l_proj_flag := pa_cost1.check_proj_burdened(p_project_type,p_project_id);

1617: ']CurrCode['||x_trxn_curr_code||']';
1618: print_msg(l_debug_flag,l_stage);
1619: /* End of Raw Cost calculation*/
1620:
1621: l_proj_flag := pa_cost1.check_proj_burdened(p_project_type,p_project_id);
1622: print_msg(l_debug_flag,'ProjBurdFlag['||l_proj_flag||']');
1623: -- Check if project type is burdened if so calculate the burdened costs
1624:
1625: /**** Burden cost Calculation Starts here */

Line 1670: ElsIf ( pa_cost1.check_proj_burdened(p_project_type,p_project_id) = 'Y' ) Then

1666: Else
1667: l_burden_multiplier := 0;
1668: End If;
1669:
1670: ElsIf ( pa_cost1.check_proj_burdened(p_project_type,p_project_id) = 'Y' ) Then
1671:
1672: l_stage := 'Calling PA_COST1.Get_burden_sch_details API';
1673: print_msg(l_debug_flag,l_stage);
1674: pa_cost1.Get_burden_sch_details

Line 1672: l_stage := 'Calling PA_COST1.Get_burden_sch_details API';

1668: End If;
1669:
1670: ElsIf ( pa_cost1.check_proj_burdened(p_project_type,p_project_id) = 'Y' ) Then
1671:
1672: l_stage := 'Calling PA_COST1.Get_burden_sch_details API';
1673: print_msg(l_debug_flag,l_stage);
1674: pa_cost1.Get_burden_sch_details
1675: (p_calling_mode => p_calling_mode
1676: ,p_exp_item_id => NULL

Line 1674: pa_cost1.Get_burden_sch_details

1670: ElsIf ( pa_cost1.check_proj_burdened(p_project_type,p_project_id) = 'Y' ) Then
1671:
1672: l_stage := 'Calling PA_COST1.Get_burden_sch_details API';
1673: print_msg(l_debug_flag,l_stage);
1674: pa_cost1.Get_burden_sch_details
1675: (p_calling_mode => p_calling_mode
1676: ,p_exp_item_id => NULL
1677: ,p_trxn_type => NULL
1678: ,p_project_type => p_project_type

Line 1799: x_error_msg_code := 'PA_COST1_INVALID_PARAMS';

1795: x_error_msg_code := 'PA_INVALID_PLAN_FIN_PARAMS';
1796: End If;
1797: End If;
1798: If x_error_msg_code is NULL Then
1799: x_error_msg_code := 'PA_COST1_INVALID_PARAMS';
1800: End If;
1801: x_return_status := 'E';
1802: print_msg(l_debug_flag,l_stage);
1803: If l_debug_flag = 'Y' Then

Line 1926: PA_DEBUG.init_err_stack ('PA_COST1.Get_Non_Labor_raw_cost');

1922: g_debug_flag := NVL(g_debug_flag, 'N');
1923: End If;
1924: l_debug_flag := NVL(g_debug_flag,'N');
1925: IF l_debug_flag = 'Y' Then
1926: PA_DEBUG.init_err_stack ('PA_COST1.Get_Non_Labor_raw_cost');
1927: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
1928: ,x_write_file => 'LOG'
1929: ,x_debug_mode => l_debug_flag
1930: );

Line 1940: l_stage := 'Inside PA_COST1.Get_Non_Labor_raw_cost API CostRateFlag['||l_exp_cost_rate_flag||']' ;

1936: l_cost_rate_curr_code := Null;
1937:
1938: l_exp_cost_rate_flag := check_expCostRateFlag(p_expenditure_type);
1939:
1940: l_stage := 'Inside PA_COST1.Get_Non_Labor_raw_cost API CostRateFlag['||l_exp_cost_rate_flag||']' ;
1941: print_msg(l_debug_flag,l_stage);
1942:
1943: /* get the currency code */
1944: l_stage := 'Getting currency code the for the given OU';

Line 2062: * Which in turn makes calls to pa_cost_plus package

2058: End If;
2059: END Get_Non_Labor_raw_cost;
2060:
2061: /* This is a wrapper api to derive compiled set id and burden multiplier
2062: * Which in turn makes calls to pa_cost_plus package
2063: * p_calling_mode IN required for PLAN_RATES
2064: * p_burden_schedule_id IN required for PLAN_RATES
2065: */
2066: PROCEDURE Get_burden_sch_details

Line 2135: PA_DEBUG.init_err_stack ('PA_COST1.Get_burden_sch_details');

2131: g_debug_flag := NVL(g_debug_flag, 'N');
2132: End If;
2133: l_debug_flag := NVL(g_debug_flag,'N');
2134: IF l_debug_flag = 'Y' Then
2135: PA_DEBUG.init_err_stack ('PA_COST1.Get_burden_sch_details');
2136: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
2137: ,x_write_file => 'LOG'
2138: ,x_debug_mode => l_debug_flag
2139: );

Line 2155: l_stage := 'Calling pa_cost_plus.find_rate_sch_rev_id to get sch Id and RevId';

2151: print_msg(l_debug_flag,l_stage);
2152:
2153: If ( l_schedule_type is NOT NULL and check_proj_burdened (p_project_type ,p_project_id ) = 'Y') Then
2154: --call the api to get the schedule info
2155: l_stage := 'Calling pa_cost_plus.find_rate_sch_rev_id to get sch Id and RevId';
2156: print_msg(l_debug_flag,l_stage);
2157: If l_schedule_type = 'COST' Then
2158: l_schedule_type := 'C';
2159: Elsif l_schedule_type = 'REVENUE' Then

Line 2185: pa_cost_plus.find_rate_sch_rev_id

2181: );
2182:
2183: ELSE -- get details for the given task
2184:
2185: pa_cost_plus.find_rate_sch_rev_id
2186: (l_exp_item_id --transaction_id
2187: ,l_trxn_type --transaction_type
2188: ,l_task_id --t_id
2189: ,l_schedule_type --schedule_type

Line 2231: l_stage := 'Calling pa_cost_plus.get_cost_plus_structure api';

2227:
2228: End If;
2229:
2230: If l_sch_revision_id is NOT NULL Then
2231: l_stage := 'Calling pa_cost_plus.get_cost_plus_structure api';
2232: print_msg(l_debug_flag,l_stage);
2233: pa_cost_plus.get_cost_plus_structure
2234: (l_sch_revision_id
2235: ,l_cost_plus_structure

Line 2233: pa_cost_plus.get_cost_plus_structure

2229:
2230: If l_sch_revision_id is NOT NULL Then
2231: l_stage := 'Calling pa_cost_plus.get_cost_plus_structure api';
2232: print_msg(l_debug_flag,l_stage);
2233: pa_cost_plus.get_cost_plus_structure
2234: (l_sch_revision_id
2235: ,l_cost_plus_structure
2236: ,l_status
2237: ,l_error_msg_code );

Line 2247: l_stage := 'Calling pa_cost_plus.get_cost_base api';

2243: End If;
2244: End If;
2245:
2246: If l_cost_plus_structure is NOT NULL Then
2247: l_stage := 'Calling pa_cost_plus.get_cost_base api';
2248: print_msg(l_debug_flag,l_stage);
2249: pa_cost_plus.get_cost_base
2250: (l_expenditure_type
2251: ,l_cost_plus_structure

Line 2249: pa_cost_plus.get_cost_base

2245:
2246: If l_cost_plus_structure is NOT NULL Then
2247: l_stage := 'Calling pa_cost_plus.get_cost_base api';
2248: print_msg(l_debug_flag,l_stage);
2249: pa_cost_plus.get_cost_base
2250: (l_expenditure_type
2251: ,l_cost_plus_structure
2252: ,l_cost_base
2253: ,l_status

Line 2270: l_stage := 'Calling pa_cost.Override_exp_organization api From Burden sch api';

2266: /* Bug fix:4232181 Get the override organization Id from the project level org overrides */
2267: /* sent mail to anders, if its ok to call this for all resource classes once receiving the responce
2268: * the comment has to be opened
2269: IF l_overide_organization_id is NULL Then
2270: l_stage := 'Calling pa_cost.Override_exp_organization api From Burden sch api';
2271: print_msg(l_debug_flag,l_stage);
2272: pa_cost.Override_exp_organization
2273: (P_item_date => l_exp_item_date
2274: ,P_person_id => l_person_id

Line 2272: pa_cost.Override_exp_organization

2268: * the comment has to be opened
2269: IF l_overide_organization_id is NULL Then
2270: l_stage := 'Calling pa_cost.Override_exp_organization api From Burden sch api';
2271: print_msg(l_debug_flag,l_stage);
2272: pa_cost.Override_exp_organization
2273: (P_item_date => l_exp_item_date
2274: ,P_person_id => l_person_id
2275: ,P_project_id => l_project_id
2276: ,P_incurred_by_organz_id => l_exp_organization_id

Line 2283: l_stage := 'Return status of pa_cost.Override_exp_organization ['||l_return_status||']';

2279: ,X_return_status => l_return_status
2280: ,X_msg_count => l_msg_count
2281: ,X_msg_data => l_error_msg_code
2282: );
2283: l_stage := 'Return status of pa_cost.Override_exp_organization ['||l_return_status||']';
2284: l_stage := l_stage||']msgData['||l_error_msg_code||']OverideOrg['||l_overide_organization_id||']' ;
2285: print_msg(l_debug_flag,l_stage);
2286: End If;
2287: **/

Line 2288: l_stage := 'Calling pa_cost_plus.get_compiled_set_id api';

2284: l_stage := l_stage||']msgData['||l_error_msg_code||']OverideOrg['||l_overide_organization_id||']' ;
2285: print_msg(l_debug_flag,l_stage);
2286: End If;
2287: **/
2288: l_stage := 'Calling pa_cost_plus.get_compiled_set_id api';
2289: print_msg(l_debug_flag,l_stage);
2290: pa_cost_plus.get_compiled_set_id
2291: (l_sch_revision_id
2292: ,NVL(l_overide_organization_id,l_exp_organization_id)

Line 2290: pa_cost_plus.get_compiled_set_id

2286: End If;
2287: **/
2288: l_stage := 'Calling pa_cost_plus.get_compiled_set_id api';
2289: print_msg(l_debug_flag,l_stage);
2290: pa_cost_plus.get_compiled_set_id
2291: (l_sch_revision_id
2292: ,NVL(l_overide_organization_id,l_exp_organization_id)
2293: ,l_cost_base
2294: ,l_compiled_set_id

Line 2306: l_stage := 'Calling pa_cost_plus.get_compiled_multiplier api';

2302: End If;
2303: End If;
2304:
2305: IF l_compiled_set_id is NOT NULL Then
2306: l_stage := 'Calling pa_cost_plus.get_compiled_multiplier api';
2307: print_msg(l_debug_flag,l_stage);
2308: pa_cost_plus.get_compiled_multiplier
2309: (NVL(l_overide_organization_id,l_exp_organization_id)
2310: ,l_cost_base

Line 2308: pa_cost_plus.get_compiled_multiplier

2304:
2305: IF l_compiled_set_id is NOT NULL Then
2306: l_stage := 'Calling pa_cost_plus.get_compiled_multiplier api';
2307: print_msg(l_debug_flag,l_stage);
2308: pa_cost_plus.get_compiled_multiplier
2309: (NVL(l_overide_organization_id,l_exp_organization_id)
2310: ,l_cost_base
2311: ,l_sch_revision_id
2312: ,l_burden_multiplier

Line 2711: PA_DEBUG.init_err_stack ('PA_COST1.Convert_COST_TO_PC_PFC');

2707: g_debug_flag := NVL(g_debug_flag, 'N');
2708: End If;
2709: l_debug_flag := NVL(g_debug_flag,'N');
2710: If l_debug_flag = 'Y' Then
2711: PA_DEBUG.init_err_stack ('PA_COST1.Convert_COST_TO_PC_PFC');
2712: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
2713: ,x_write_file => 'LOG'
2714: ,x_debug_mode => l_debug_flag
2715: );

Line 2892: END PA_COST1;

2888: End If;
2889:
2890: END Convert_COST_TO_PC_PFC;
2891:
2892: END PA_COST1;