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.1.12000000.2 2007/07/16 14:23:38 byeturi 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 650: PA_DEBUG.init_err_stack ('PA_COST1.Get_Plan_Actual_Cost_Rates');

646: g_debug_flag := NVL(g_debug_flag, 'N');
647: End If;
648: l_debug_flag := NVL(g_debug_flag,'N');
649: IF l_debug_flag = 'Y' Then
650: PA_DEBUG.init_err_stack ('PA_COST1.Get_Plan_Actual_Cost_Rates');
651: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
652: ,x_write_file => 'LOG'
653: ,x_debug_mode => l_debug_flag
654: );

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

656:
657: /* Derive the Rate Organization Id from the params*/
658: l_rate_organization_id := NVL(p_override_organization_id,NVL(p_incurred_by_organization_id,p_nlr_organization_id));
659:
660: l_stage := 'Inside PA_COST1.Get_Plan_Actual_Cost_Rates API';
661: l_stage := l_stage||' IN PARAMS mode['||p_calling_mode||']Proj Type['||p_project_type||
662: ']Proj Id['||p_project_id||']TaskId['||p_task_id||']TopTask['||p_top_task_id||
663: ']Ei Date['||p_Exp_item_date||']ExpType['||p_expenditure_type||
664: ']ResClass['||p_resource_class||']Personid['||p_person_id||']NLR['||p_non_labor_resource||

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

897:
898: /* Bug fix: 4232181 Derive the organization overrides from the project level */
899: IF l_trxn_type IN ('LABOR SCH RATE','JOB SCH RATE','LABOR RATE') Then
900: IF l_override_organization_id is NULL Then
901: l_stage := 'Calling pa_cost.Override_exp_organization api';
902: print_msg(l_debug_flag,l_stage);
903: pa_cost.Override_exp_organization
904: (P_item_date => p_exp_item_date
905: ,P_person_id => p_person_id

Line 903: pa_cost.Override_exp_organization

899: IF l_trxn_type IN ('LABOR SCH RATE','JOB SCH RATE','LABOR RATE') Then
900: IF l_override_organization_id is NULL Then
901: l_stage := 'Calling pa_cost.Override_exp_organization api';
902: print_msg(l_debug_flag,l_stage);
903: pa_cost.Override_exp_organization
904: (P_item_date => p_exp_item_date
905: ,P_person_id => p_person_id
906: ,P_project_id => p_project_id
907: ,P_incurred_by_organz_id => p_incurred_by_organization_id

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

910: ,X_return_status => l_return_status
911: ,X_msg_count => l_msg_count
912: ,X_msg_data => l_msg_data
913: );
914: l_stage := 'Return status of pa_cost.Override_exp_organization ['||l_return_status||']';
915: l_stage := l_stage||']msgData['||l_msg_data||']OverideOrg['||l_override_organization_id||']' ;
916: print_msg(l_debug_flag,l_stage);
917: End If;
918: End If;

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

1064: ,p_exp_item_date => p_exp_item_date
1065: );
1066: End If;
1067:
1068: l_stage := 'Calling PA_COST_RATE_PUB.get_labor_rate API in STAFFED calling mode';
1069: print_msg(l_debug_flag,l_stage);
1070: l_rate_organization_id := NVL(l_override_organization_id,
1071: NVl(p_incurred_by_organization_id,p_nlr_organization_id));
1072: PA_COST_RATE_PUB.get_labor_rate

Line 1072: PA_COST_RATE_PUB.get_labor_rate

1068: l_stage := 'Calling PA_COST_RATE_PUB.get_labor_rate API in STAFFED calling mode';
1069: print_msg(l_debug_flag,l_stage);
1070: l_rate_organization_id := NVL(l_override_organization_id,
1071: NVl(p_incurred_by_organization_id,p_nlr_organization_id));
1072: PA_COST_RATE_PUB.get_labor_rate
1073: (p_person_id => p_person_id
1074: ,p_txn_date => p_Exp_item_date
1075: ,p_calling_module =>'STAFFED'
1076: ,p_org_id => NVL(p_expenditure_ou,p_project_OU)

Line 1119: pa_cost1.Get_Non_Labor_raw_cost

1115: -- Call non-labor raw cost api
1116: l_stage := 'Calling Non Labor raw cost API';
1117: print_msg(l_debug_flag,l_stage);
1118: If (p_non_labor_resource is NOT NULL and p_expenditure_type is NOT NULL ) Then
1119: pa_cost1.Get_Non_Labor_raw_cost
1120: (p_project_id => p_project_id
1121: ,p_task_id => p_task_id
1122: ,p_non_labor_resource => p_non_labor_resource
1123: ,p_nlr_organization_id => p_nlr_organization_id

Line 1224: pa_cost1.get_RateSchDetails

1220: l_cost_rate_multiplier := NULL;
1221: End If;
1222: l_stage := 'Calling get_RateSchDetails SchType['||l_bill_rate_schedule_type||']SchId['||l_bill_rate_sch_id||']';
1223: print_msg(l_debug_flag,l_stage);
1224: pa_cost1.get_RateSchDetails
1225: (p_schedule_type => l_bill_rate_schedule_type
1226: ,p_rate_sch_id => l_bill_rate_sch_id
1227: ,p_person_id => p_person_id
1228: ,p_job_id => p_job_id

Line 1263: pa_cost1.get_RateSchDetails

1259: l_stage := 'Calling get_RateSchDetails SchType['
1260: ||l_bill_rate_schedule_type||']SchId['
1261: ||l_bill_rate_sch_id||']';
1262: print_msg(l_debug_flag,l_stage);
1263: pa_cost1.get_RateSchDetails
1264: (p_schedule_type => l_bill_rate_schedule_type
1265: ,p_rate_sch_id => l_bill_rate_sch_id
1266: ,p_person_id => p_person_id
1267: ,p_job_id => p_job_id

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

1305: ']CurrCode['||x_trxn_curr_code||']';
1306: print_msg(l_debug_flag,l_stage);
1307: /* End of Raw Cost calculation*/
1308:
1309: l_proj_flag := pa_cost1.check_proj_burdened(p_project_type,p_project_id);
1310: print_msg(l_debug_flag,'ProjBurdFlag['||l_proj_flag||']');
1311: -- Check if project type is burdened if so calculate the burdened costs
1312:
1313: /**** Burden cost Calculation Starts here */

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

1354: Else
1355: l_burden_multiplier := 0;
1356: End If;
1357:
1358: ElsIf ( pa_cost1.check_proj_burdened(p_project_type,p_project_id) = 'Y' ) Then
1359:
1360: l_stage := 'Calling PA_COST1.Get_burden_sch_details API';
1361: print_msg(l_debug_flag,l_stage);
1362: pa_cost1.Get_burden_sch_details

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

1356: End If;
1357:
1358: ElsIf ( pa_cost1.check_proj_burdened(p_project_type,p_project_id) = 'Y' ) Then
1359:
1360: l_stage := 'Calling PA_COST1.Get_burden_sch_details API';
1361: print_msg(l_debug_flag,l_stage);
1362: pa_cost1.Get_burden_sch_details
1363: (p_calling_mode => p_calling_mode
1364: ,p_exp_item_id => NULL

Line 1362: pa_cost1.Get_burden_sch_details

1358: ElsIf ( pa_cost1.check_proj_burdened(p_project_type,p_project_id) = 'Y' ) Then
1359:
1360: l_stage := 'Calling PA_COST1.Get_burden_sch_details API';
1361: print_msg(l_debug_flag,l_stage);
1362: pa_cost1.Get_burden_sch_details
1363: (p_calling_mode => p_calling_mode
1364: ,p_exp_item_id => NULL
1365: ,p_trxn_type => NULL
1366: ,p_project_type => p_project_type

Line 1487: x_error_msg_code := 'PA_COST1_INVALID_PARAMS';

1483: x_error_msg_code := 'PA_INVALID_PLAN_FIN_PARAMS';
1484: End If;
1485: End If;
1486: If x_error_msg_code is NULL Then
1487: x_error_msg_code := 'PA_COST1_INVALID_PARAMS';
1488: End If;
1489: x_return_status := 'E';
1490: print_msg(l_debug_flag,l_stage);
1491: If l_debug_flag = 'Y' Then

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

1610: g_debug_flag := NVL(g_debug_flag, 'N');
1611: End If;
1612: l_debug_flag := NVL(g_debug_flag,'N');
1613: IF l_debug_flag = 'Y' Then
1614: PA_DEBUG.init_err_stack ('PA_COST1.Get_Non_Labor_raw_cost');
1615: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
1616: ,x_write_file => 'LOG'
1617: ,x_debug_mode => l_debug_flag
1618: );

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

1624: l_cost_rate_curr_code := Null;
1625:
1626: l_exp_cost_rate_flag := check_expCostRateFlag(p_expenditure_type);
1627:
1628: l_stage := 'Inside PA_COST1.Get_Non_Labor_raw_cost API CostRateFlag['||l_exp_cost_rate_flag||']' ;
1629: print_msg(l_debug_flag,l_stage);
1630:
1631: /* get the currency code */
1632: l_stage := 'Getting currency code the for the given OU';

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

1746: End If;
1747: END Get_Non_Labor_raw_cost;
1748:
1749: /* This is a wrapper api to derive compiled set id and burden multiplier
1750: * Which in turn makes calls to pa_cost_plus package
1751: * p_calling_mode IN required for PLAN_RATES
1752: * p_burden_schedule_id IN required for PLAN_RATES
1753: */
1754: PROCEDURE Get_burden_sch_details

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

1819: g_debug_flag := NVL(g_debug_flag, 'N');
1820: End If;
1821: l_debug_flag := NVL(g_debug_flag,'N');
1822: IF l_debug_flag = 'Y' Then
1823: PA_DEBUG.init_err_stack ('PA_COST1.Get_burden_sch_details');
1824: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
1825: ,x_write_file => 'LOG'
1826: ,x_debug_mode => l_debug_flag
1827: );

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

1839: print_msg(l_debug_flag,l_stage);
1840:
1841: If ( l_schedule_type is NOT NULL and check_proj_burdened (p_project_type ,p_project_id ) = 'Y') Then
1842: --call the api to get the schedule info
1843: l_stage := 'Calling pa_cost_plus.find_rate_sch_rev_id to get sch Id and RevId';
1844: print_msg(l_debug_flag,l_stage);
1845: If l_schedule_type = 'COST' Then
1846: l_schedule_type := 'C';
1847: Elsif l_schedule_type = 'REVENUE' Then

Line 1873: pa_cost_plus.find_rate_sch_rev_id

1869: );
1870:
1871: ELSE -- get details for the given task
1872:
1873: pa_cost_plus.find_rate_sch_rev_id
1874: (l_exp_item_id --transaction_id
1875: ,l_trxn_type --transaction_type
1876: ,l_task_id --t_id
1877: ,l_schedule_type --schedule_type

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

1915:
1916: End If;
1917:
1918: If l_sch_revision_id is NOT NULL Then
1919: l_stage := 'Calling pa_cost_plus.get_cost_plus_structure api';
1920: print_msg(l_debug_flag,l_stage);
1921: pa_cost_plus.get_cost_plus_structure
1922: (l_sch_revision_id
1923: ,l_cost_plus_structure

Line 1921: pa_cost_plus.get_cost_plus_structure

1917:
1918: If l_sch_revision_id is NOT NULL Then
1919: l_stage := 'Calling pa_cost_plus.get_cost_plus_structure api';
1920: print_msg(l_debug_flag,l_stage);
1921: pa_cost_plus.get_cost_plus_structure
1922: (l_sch_revision_id
1923: ,l_cost_plus_structure
1924: ,l_status
1925: ,l_error_msg_code );

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

1931: End If;
1932: End If;
1933:
1934: If l_cost_plus_structure is NOT NULL Then
1935: l_stage := 'Calling pa_cost_plus.get_cost_base api';
1936: print_msg(l_debug_flag,l_stage);
1937: pa_cost_plus.get_cost_base
1938: (l_expenditure_type
1939: ,l_cost_plus_structure

Line 1937: pa_cost_plus.get_cost_base

1933:
1934: If l_cost_plus_structure is NOT NULL Then
1935: l_stage := 'Calling pa_cost_plus.get_cost_base api';
1936: print_msg(l_debug_flag,l_stage);
1937: pa_cost_plus.get_cost_base
1938: (l_expenditure_type
1939: ,l_cost_plus_structure
1940: ,l_cost_base
1941: ,l_status

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

1954: /* Bug fix:4232181 Get the override organization Id from the project level org overrides */
1955: /* sent mail to anders, if its ok to call this for all resource classes once receiving the responce
1956: * the comment has to be opened
1957: IF l_overide_organization_id is NULL Then
1958: l_stage := 'Calling pa_cost.Override_exp_organization api From Burden sch api';
1959: print_msg(l_debug_flag,l_stage);
1960: pa_cost.Override_exp_organization
1961: (P_item_date => l_exp_item_date
1962: ,P_person_id => l_person_id

Line 1960: pa_cost.Override_exp_organization

1956: * the comment has to be opened
1957: IF l_overide_organization_id is NULL Then
1958: l_stage := 'Calling pa_cost.Override_exp_organization api From Burden sch api';
1959: print_msg(l_debug_flag,l_stage);
1960: pa_cost.Override_exp_organization
1961: (P_item_date => l_exp_item_date
1962: ,P_person_id => l_person_id
1963: ,P_project_id => l_project_id
1964: ,P_incurred_by_organz_id => l_exp_organization_id

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

1967: ,X_return_status => l_return_status
1968: ,X_msg_count => l_msg_count
1969: ,X_msg_data => l_error_msg_code
1970: );
1971: l_stage := 'Return status of pa_cost.Override_exp_organization ['||l_return_status||']';
1972: l_stage := l_stage||']msgData['||l_error_msg_code||']OverideOrg['||l_overide_organization_id||']' ;
1973: print_msg(l_debug_flag,l_stage);
1974: End If;
1975: **/

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

1972: l_stage := l_stage||']msgData['||l_error_msg_code||']OverideOrg['||l_overide_organization_id||']' ;
1973: print_msg(l_debug_flag,l_stage);
1974: End If;
1975: **/
1976: l_stage := 'Calling pa_cost_plus.get_compiled_set_id api';
1977: print_msg(l_debug_flag,l_stage);
1978: pa_cost_plus.get_compiled_set_id
1979: (l_sch_revision_id
1980: ,NVL(l_overide_organization_id,l_exp_organization_id)

Line 1978: pa_cost_plus.get_compiled_set_id

1974: End If;
1975: **/
1976: l_stage := 'Calling pa_cost_plus.get_compiled_set_id api';
1977: print_msg(l_debug_flag,l_stage);
1978: pa_cost_plus.get_compiled_set_id
1979: (l_sch_revision_id
1980: ,NVL(l_overide_organization_id,l_exp_organization_id)
1981: ,l_cost_base
1982: ,l_compiled_set_id

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

1990: End If;
1991: End If;
1992:
1993: IF l_compiled_set_id is NOT NULL Then
1994: l_stage := 'Calling pa_cost_plus.get_compiled_multiplier api';
1995: print_msg(l_debug_flag,l_stage);
1996: pa_cost_plus.get_compiled_multiplier
1997: (NVL(l_overide_organization_id,l_exp_organization_id)
1998: ,l_cost_base

Line 1996: pa_cost_plus.get_compiled_multiplier

1992:
1993: IF l_compiled_set_id is NOT NULL Then
1994: l_stage := 'Calling pa_cost_plus.get_compiled_multiplier api';
1995: print_msg(l_debug_flag,l_stage);
1996: pa_cost_plus.get_compiled_multiplier
1997: (NVL(l_overide_organization_id,l_exp_organization_id)
1998: ,l_cost_base
1999: ,l_sch_revision_id
2000: ,l_burden_multiplier

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

2395: g_debug_flag := NVL(g_debug_flag, 'N');
2396: End If;
2397: l_debug_flag := NVL(g_debug_flag,'N');
2398: If l_debug_flag = 'Y' Then
2399: PA_DEBUG.init_err_stack ('PA_COST1.Convert_COST_TO_PC_PFC');
2400: PA_DEBUG.SET_PROCESS( x_process => 'PLSQL'
2401: ,x_write_file => 'LOG'
2402: ,x_debug_mode => l_debug_flag
2403: );

Line 2580: END PA_COST1;

2576: End If;
2577:
2578: END Convert_COST_TO_PC_PFC;
2579:
2580: END PA_COST1;