DBA Data[Home] [Help]

APPS.PA_COST_RATE_PUB dependencies on PA_CC_UTILS

Line 65: if pa_cc_utils.g_debug_mode then

61:
62: begin
63:
64: ----------------- initializaton ------------------------------
65: if pa_cc_utils.g_debug_mode then
66: l_debug_mode := 'Y';
67: else
68: l_debug_mode := 'N';
69: end if;

Line 79: pa_cc_utils.set_curr_function('PA_COST_RATE_PUB.get_labor_rate');

75: IF ( l_debug_mode = 'Y' ) THEN
76: pa_debug.set_process( x_process => 'PLSQL'
77: ,x_debug_mode => l_debug_mode
78: );
79: pa_cc_utils.set_curr_function('PA_COST_RATE_PUB.get_labor_rate');
80: pa_cc_utils.log_message('Start ');
81: END IF;
82:
83: l_stage := 'Input person_id [' || to_char(p_person_id) || '] job_id ['

Line 80: pa_cc_utils.log_message('Start ');

76: pa_debug.set_process( x_process => 'PLSQL'
77: ,x_debug_mode => l_debug_mode
78: );
79: pa_cc_utils.set_curr_function('PA_COST_RATE_PUB.get_labor_rate');
80: pa_cc_utils.log_message('Start ');
81: END IF;
82:
83: l_stage := 'Input person_id [' || to_char(p_person_id) || '] job_id ['
84: || to_char(x_job_id) || '] txn_date ['

Line 88: pa_cc_utils.log_message(l_stage);

84: || to_char(x_job_id) || '] txn_date ['
85: || to_char(p_txn_date) || '] organization_id [' || to_char(x_organization_id) || ']';
86: if ( l_debug_mode = 'Y' )
87: then
88: pa_cc_utils.log_message(l_stage);
89: end if;
90: l_curr_org_id := pa_moac_utils.get_current_org_id; /* Added for bug 7365397 */
91:
92: /*===================================================================+

Line 101: pa_cc_utils.reset_curr_function;

97: (x_job_id is null or x_organization_id is null ) )
98: then
99: x_err_code := 'NO_JOB_ID' ;
100: /*Bug fix:3089560 Plsql numeric value error causes without resetting stack*/
101: pa_cc_utils.reset_curr_function;
102: return;
103: end if;
104:
105: /*2879644*/

Line 125: pa_cc_utils.log_message(l_stage);

121: then
122: l_stage := 'Selecting Functional Currency';
123: if ( l_debug_mode = 'Y' )
124: then
125: pa_cc_utils.log_message(l_stage);
126: end if;
127: select nvl(p_org_id, imp.org_id)
128: ,sob.currency_code
129: into g_ou_id

Line 141: pa_cc_utils.log_message(l_stage);

137:
138: l_stage := 'Org Id [' || to_char(g_ou_id) || '] Func Curr [' || g_func_curr || ']';
139: if ( l_debug_mode = 'Y' )
140: then
141: pa_cc_utils.log_message(l_stage);
142: end if;
143: end if; /* g_func_curr is null */
144:
145: /*====================================================================+

Line 154: pa_cc_utils.log_message(l_stage);

150: then
151: l_stage := 'Selecting Organization and Job Ids';
152: if ( l_debug_mode = 'Y' )
153: then
154: pa_cc_utils.log_message(l_stage);
155: end if;
156:
157: /* cwk changes : Modified stmt to derive the Organization Id, Job Id
158: for a Person Id of a contingent worker also*/

Line 177: pa_cc_utils.log_message(l_stage);

173:
174: l_stage := 'Organization Id [' || to_char(x_organization_id) || '] Job Id [' || to_char(x_job_id) || ']';
175: if ( l_debug_mode = 'Y' )
176: then
177: pa_cc_utils.log_message(l_stage);
178: end if;
179: end if; /* x_organization_id is null */
180: ----------------- initializaton end ------------------------------
181: /*======================================+

Line 216: pa_cc_utils.reset_curr_function;

212: x_ot_project_id := g_rt_ot_project_id ;
213: x_ot_task_id := g_rt_ot_task_id ;
214: x_err_stage := g_rt_err_stage ;
215: x_err_code := g_rt_err_code ;
216: pa_cc_utils.reset_curr_function;
217: return;
218: end if;
219:
220: if ( p_calling_module <> 'REQUIREMENT' )

Line 229: pa_cc_utils.log_message(l_stage);

225: l_override_flag := 'Y' ;
226: l_stage := 'Selecting Override';
227: if ( l_debug_mode = 'Y' )
228: then
229: pa_cc_utils.log_message(l_stage);
230: end if;
231: begin
232: select detail.compensation_rule_set
233: ,detail.hourly_cost_rate

Line 294: pa_cc_utils.log_message(l_stage);

290: || '] end [' || to_char(x_end_date_active)
291: || ']';
292: if ( l_debug_mode = 'Y' )
293: then
294: pa_cc_utils.log_message(l_stage);
295: end if;
296: /*
297: * If the compensation rule available at the override level
298: * and if the costing method id 'Extension', set rate to null

Line 305: pa_cc_utils.log_message(l_stage);

301: if ( x_costing_rule is not null )
302: then
303: l_stage := 'selecting costing method from rule [' || x_costing_rule || ']';
304: if ( l_debug_mode = 'Y' ) then
305: pa_cc_utils.log_message(l_stage);
306: end if;
307: select rule.costing_method
308: into l_costing_method
309: from pa_compensation_rule_sets rule

Line 340: pa_cc_utils.log_message(l_stage);

336: '] p_person_id [' || to_char(p_person_id) ||
337: '] x_job_id [' || to_char(x_job_id) || ']';
338: if ( l_debug_mode = 'Y' )
339: then
340: pa_cc_utils.log_message(l_stage);
341: end if;
342: pa_cost_rate_pub.get_orgn_level_costing_info
343: ( p_org_id => g_ou_id
344: ,p_organization_id => x_organization_id

Line 386: pa_cc_utils.log_message(l_stage);

382: raise USER_EXCEPTION;
383: end if;
384:
385: l_stage := 'selecting costing method from rule [' || x_costing_rule || ']';
386: pa_cc_utils.log_message(l_stage);
387: select rule.costing_method
388: into l_costing_method
389: from pa_compensation_rule_sets rule
390: where rule.compensation_rule_set = x_costing_rule

Line 404: pa_cc_utils.log_message(l_stage);

400: */
401: l_stage := 'Reading Rate Schedule information for [' || to_char(x_rate_sch_id) || ']';
402: if ( l_debug_mode = 'Y' )
403: then
404: pa_cc_utils.log_message(l_stage);
405: end if;
406: select rate_sch.schedule_type
407: ,rate_sch.rate_sch_currency_code
408: ,rate_sch.job_group_id

Line 419: pa_cc_utils.log_message(l_stage);

415: l_stage := 'sch type [' || l_sch_type || '] crcc [' || x_cost_rate_curr_code || '] job group [' ||
416: to_char(l_job_group_id) || ']';
417: if ( l_debug_mode = 'Y' )
418: then
419: pa_cc_utils.log_message(l_stage);
420: end if;
421:
422: if ( l_sch_type = 'EMPLOYEE')
423: then

Line 427: pa_cc_utils.log_message(l_stage);

423: then
424: l_stage := 'Getting rate from this employee type schedule';
425: if ( l_debug_mode = 'Y' )
426: then
427: pa_cc_utils.log_message(l_stage);
428: end if;
429:
430: begin
431: select bill_rates.rate

Line 451: pa_cc_utils.log_message(l_stage);

447: else
448: l_stage := 'Job mapping for [' || to_char(x_job_id) || ']';
449: if ( l_debug_mode = 'Y' )
450: then
451: pa_cc_utils.log_message(l_stage);
452: end if;
453: l_dest_job_id := pa_cross_business_grp.IsMappedToJob(x_job_id, l_job_group_id);
454:
455: l_stage := 'Getting rate for job id [' || to_char(l_dest_job_id) || ']';

Line 458: pa_cc_utils.log_message(l_stage);

454:
455: l_stage := 'Getting rate for job id [' || to_char(l_dest_job_id) || ']';
456: if ( l_debug_mode = 'Y' )
457: then
458: pa_cc_utils.log_message(l_stage);
459: end if;
460: begin
461: select bill_rates.rate
462: ,bill_rates.start_date_active

Line 486: pa_cc_utils.log_message(l_stage);

482:
483: l_stage := 'Rate is [' || to_char(x_cost_rate) || ']';
484: if ( l_debug_mode = 'Y' )
485: then
486: pa_cc_utils.log_message(l_stage);
487: end if;
488:
489: if ( l_debug_mode = 'Y' )
490: then

Line 491: pa_cc_utils.log_message('END');

487: end if;
488:
489: if ( l_debug_mode = 'Y' )
490: then
491: pa_cc_utils.log_message('END');
492: end if;
493: pa_cc_utils.reset_curr_function;
494: exception
495: when USER_EXCEPTION

Line 493: pa_cc_utils.reset_curr_function;

489: if ( l_debug_mode = 'Y' )
490: then
491: pa_cc_utils.log_message('END');
492: end if;
493: pa_cc_utils.reset_curr_function;
494: exception
495: when USER_EXCEPTION
496: then
497: g_rt_calling_module := p_calling_module;

Line 512: pa_cc_utils.reset_curr_function;

508: g_rt_ot_project_id := x_ot_project_id ;
509: g_rt_ot_task_id := x_ot_task_id;
510: g_rt_err_stage := x_err_stage;
511: g_rt_err_code := x_err_code;
512: pa_cc_utils.reset_curr_function;
513: when others then
514: /*Bug fix:3089560 Plsql numeric value error causes without resetting stack*/
515: pa_cc_utils.reset_curr_function;
516: raise;

Line 515: pa_cc_utils.reset_curr_function;

511: g_rt_err_code := x_err_code;
512: pa_cc_utils.reset_curr_function;
513: when others then
514: /*Bug fix:3089560 Plsql numeric value error causes without resetting stack*/
515: pa_cc_utils.reset_curr_function;
516: raise;
517: end get_labor_rate;
518: ---------------------------------------------------------------------------------------------
519: PROCEDURE get_orgn_level_costing_info

Line 612: if pa_cc_utils.g_debug_mode then

608: ,assign.organization_id
609: ,assign.org_id;
610:
611: begin
612: if pa_cc_utils.g_debug_mode then
613: l_debug_mode := 'Y';
614: else
615: l_debug_mode := 'N';
616: end if;

Line 621: pa_cc_utils.set_curr_function('get_orgn_level_costing_info');

617: IF ( l_debug_mode = 'Y' ) THEN
618: pa_debug.set_process( x_process => 'PLSQL'
619: ,x_debug_mode => l_debug_mode
620: );
621: pa_cc_utils.set_curr_function('get_orgn_level_costing_info');
622: pa_cc_utils.log_message('Start ');
623: END IF;
624:
625: l_stage := 'org_id [' || to_char(p_org_id) || '] organization_id [' || to_char(p_organization_id) || ']';

Line 622: pa_cc_utils.log_message('Start ');

618: pa_debug.set_process( x_process => 'PLSQL'
619: ,x_debug_mode => l_debug_mode
620: );
621: pa_cc_utils.set_curr_function('get_orgn_level_costing_info');
622: pa_cc_utils.log_message('Start ');
623: END IF;
624:
625: l_stage := 'org_id [' || to_char(p_org_id) || '] organization_id [' || to_char(p_organization_id) || ']';
626: if ( l_debug_mode = 'Y' )

Line 628: pa_cc_utils.log_message(l_stage);

624:
625: l_stage := 'org_id [' || to_char(p_org_id) || '] organization_id [' || to_char(p_organization_id) || ']';
626: if ( l_debug_mode = 'Y' )
627: then
628: pa_cc_utils.log_message(l_stage);
629: end if;
630:
631: l_stage := 'opening assignment';
632: if ( l_debug_mode = 'Y' )

Line 634: pa_cc_utils.log_message(l_stage);

630:
631: l_stage := 'opening assignment';
632: if ( l_debug_mode = 'Y' )
633: then
634: pa_cc_utils.log_message(l_stage);
635: end if;
636: open assignment (p_org_id,p_organization_id,p_person_id,p_job_id,p_txn_date,p_calling_module);
637:
638: l_stage := 'fetching assignment';

Line 641: pa_cc_utils.log_message(l_stage);

637:
638: l_stage := 'fetching assignment';
639: if ( l_debug_mode = 'Y' )
640: then
641: pa_cc_utils.log_message(l_stage);
642: end if;
643: fetch assignment
644: into l_org_labor_sch_rule_id
645: ,l_rate_sch_id

Line 658: pa_cc_utils.log_message(l_stage);

654: then
655: l_stage := 'assignment not found for organization ';
656: if ( l_debug_mode = 'Y' )
657: then
658: pa_cc_utils.log_message(l_stage);
659: end if;
660: /*
661: * This means - neither this organization nor any of its parent
662: * organizations have an assignment. See if there is any assigmnent

Line 687: pa_cc_utils.log_message(l_stage);

683: begin
684: l_stage := 'Getting OU level assignment for [' || to_char(p_org_id) || ']';
685: if ( l_debug_mode = 'Y' )
686: then
687: pa_cc_utils.log_message(l_stage);
688: end if;
689: select assign.org_id
690: ,assign.org_labor_sch_rule_id
691: ,decode(p_calling_module ,'REQUIREMENT'

Line 717: pa_cc_utils.log_message(l_stage);

713: exception
714: when no_data_found then
715: l_stage := 'assignment not found at the OU level !!!!!!';
716: if ( l_debug_mode = 'Y' ) then
717: pa_cc_utils.log_message(l_stage);
718: end if;
719: x_err_code := 'NO_RATE';
720: when others then
721: raise;

Line 748: pa_cc_utils.log_message(l_stage);

744: '] l_acct_exch_rate [' || to_char( l_acct_exch_rate) ||
745: '] x_err_code [' || x_err_code || ']';
746: if ( l_debug_mode = 'Y' )
747: then
748: pa_cc_utils.log_message(l_stage);
749: end if;
750:
751: /*
752: * Move local variables to out parameters.

Line 766: pa_cc_utils.log_message(l_stage);

762:
763: l_stage := 'Closing Cursor';
764: if ( l_debug_mode = 'Y' )
765: then
766: pa_cc_utils.log_message(l_stage);
767: end if;
768: close assignment;
769:
770: l_stage := 'END';

Line 773: pa_cc_utils.log_message(l_stage);

769:
770: l_stage := 'END';
771: if ( l_debug_mode = 'Y' )
772: then
773: pa_cc_utils.log_message(l_stage);
774: end if;
775: pa_cc_utils.reset_curr_function;
776:
777: exception

Line 775: pa_cc_utils.reset_curr_function;

771: if ( l_debug_mode = 'Y' )
772: then
773: pa_cc_utils.log_message(l_stage);
774: end if;
775: pa_cc_utils.reset_curr_function;
776:
777: exception
778: when others
779: then

Line 839: --pa_cc_utils.log_message('In Getempcost rate');

835: l_numerator number;
836: l_denominator number;
837: Begin
838:
839: --pa_cc_utils.log_message('In Getempcost rate');
840: IF (P_Called_From <> 'R') AND /* Added for 3405326 */
841: P_person_id = nvl(G_EMP_PERSON_ID,-99) AND
842: nvl(P_job_id,-99) = nvl(G_EMP_JOB_ID,-99) AND
843: nvl(P_organization_id,-99) = nvl(G_EMP_ORGANIZATION_ID,-99) AND

Line 846: -- pa_cc_utils.log_message('Getting the Rate from Cache');

842: nvl(P_job_id,-99) = nvl(G_EMP_JOB_ID,-99) AND
843: nvl(P_organization_id,-99) = nvl(G_EMP_ORGANIZATION_ID,-99) AND
844: P_effective_date BETWEEN G_EMP_RATE_START_DATE AND nvl(G_EMP_RATE_END_DATE,SYSDATE) THEN
845: NULL; --Do nothing. Values are in the Cache.
846: -- pa_cc_utils.log_message('Getting the Rate from Cache');
847: ELSE
848:
849: --pa_cc_utils.log_message('Deriving the Rate');
850: --- Call the api to derive rate and attributes.

Line 849: --pa_cc_utils.log_message('Deriving the Rate');

845: NULL; --Do nothing. Values are in the Cache.
846: -- pa_cc_utils.log_message('Getting the Rate from Cache');
847: ELSE
848:
849: --pa_cc_utils.log_message('Deriving the Rate');
850: --- Call the api to derive rate and attributes.
851:
852: l_job_id := P_job_id; --IN OUT parameter
853: l_organization_id := P_organization_id; --IN OUT parameter.

Line 902: -- pa_cc_utils.log_message('Deriving the Functional Rate');

898: G_EMP_RATE_END_DATE := l_end_date_active;
899:
900: IF P_Rate_Type = 'FUNC' THEN --Return the Functional Rate
901:
902: -- pa_cc_utils.log_message('Deriving the Functional Rate');
903: -- Get the Functional Currency code
904: l_acct_currency_code := PA_CURRENCY.get_currency_code;
905:
906: --Check if the denom and functional currencies are different

Line 948: --pa_cc_utils.log_message('before return rate = '||l_return_rate);

944: --Return the Transaction Rate
945: l_return_rate := G_EMP_COST_RATE;
946: END IF;
947:
948: --pa_cc_utils.log_message('before return rate = '||l_return_rate);
949: Return l_return_rate;
950:
951: End GetEmpCostRate;
952:

Line 1005: --pa_cc_utils.log_message('In Getempcostrateinfo...');

1001: l_err_stage number;
1002: l_return_value varchar2(100);
1003: Begin
1004:
1005: --pa_cc_utils.log_message('In Getempcostrateinfo...');
1006: IF (P_Called_From <> 'R') AND /* Added for 3405326 */
1007: P_person_id = nvl(G_EMP_PERSON_ID,-99) AND
1008: nvl(P_job_id,-99) = nvl(G_EMP_JOB_ID,-99) AND
1009: nvl(P_organization_id,-99) = nvl(G_EMP_ORGANIZATION_ID,-99) AND

Line 1012: --pa_cc_utils.log_message('Getting the Rate Attributes from Cache');

1008: nvl(P_job_id,-99) = nvl(G_EMP_JOB_ID,-99) AND
1009: nvl(P_organization_id,-99) = nvl(G_EMP_ORGANIZATION_ID,-99) AND
1010: P_effective_date BETWEEN G_EMP_RATE_START_DATE AND nvl(G_EMP_RATE_END_DATE,SYSDATE) THEN
1011: NULL; --Don't do anything. The values are cached already.
1012: --pa_cc_utils.log_message('Getting the Rate Attributes from Cache');
1013: ELSE
1014:
1015: --pa_cc_utils.log_message('Deriving the Rate Attributes');
1016: --- Call the api to derive rate and attributes.

Line 1015: --pa_cc_utils.log_message('Deriving the Rate Attributes');

1011: NULL; --Don't do anything. The values are cached already.
1012: --pa_cc_utils.log_message('Getting the Rate Attributes from Cache');
1013: ELSE
1014:
1015: --pa_cc_utils.log_message('Deriving the Rate Attributes');
1016: --- Call the api to derive rate and attributes.
1017:
1018: l_job_id := P_job_id; --IN OUT parameter
1019: l_organization_id := P_organization_id; --IN OUT parameter.

Line 1103: if pa_cc_utils.g_debug_mode then

1099: l_stage varchar2(500);
1100: l_debug_mode varchar2(1) := 'Y';
1101: begin
1102:
1103: if pa_cc_utils.g_debug_mode then
1104: l_debug_mode := 'Y';
1105: else
1106: l_debug_mode := 'N';
1107: end if;

Line 1112: pa_cc_utils.set_curr_function('get_orgn_lvl_cst_info_set');

1108: IF ( l_debug_mode = 'Y' ) THEN
1109: pa_debug.set_process( x_process => 'PLSQL'
1110: ,x_debug_mode => l_debug_mode
1111: );
1112: pa_cc_utils.set_curr_function('get_orgn_lvl_cst_info_set');
1113: pa_cc_utils.log_message('Start ');
1114: END IF;
1115:
1116: l_count := p_organization_id_tab.count ;

Line 1113: pa_cc_utils.log_message('Start ');

1109: pa_debug.set_process( x_process => 'PLSQL'
1110: ,x_debug_mode => l_debug_mode
1111: );
1112: pa_cc_utils.set_curr_function('get_orgn_lvl_cst_info_set');
1113: pa_cc_utils.log_message('Start ');
1114: END IF;
1115:
1116: l_count := p_organization_id_tab.count ;
1117: l_stage := 'count [' || to_char(l_count) || ']';

Line 1120: pa_cc_utils.log_message(l_stage);

1116: l_count := p_organization_id_tab.count ;
1117: l_stage := 'count [' || to_char(l_count) || ']';
1118: if ( l_debug_mode = 'Y')
1119: then
1120: pa_cc_utils.log_message(l_stage);
1121: end if;
1122: for i in 1 .. l_count
1123: loop
1124: if ( p_override_type_tab(i) is null or x_costing_rule_tab(i) is null )

Line 1142: pa_cc_utils.log_message(l_stage);

1138: '] aer [' || x_acct_exch_rate_tab(i) ||
1139: ']';
1140: if ( l_debug_mode = 'Y' )
1141: then
1142: pa_cc_utils.log_message(l_stage);
1143: end if;
1144:
1145: /*
1146: * GSCC: Handled File.Date.5 for p_txn_date_tab(i).

Line 1185: pa_cc_utils.log_message(l_stage);

1181: '] err code [' || x_err_code_tab(i) ||
1182: ']';
1183: if ( l_debug_mode = 'Y' )
1184: then
1185: pa_cc_utils.log_message(l_stage);
1186: end if;
1187: end if; /* override type */
1188: end loop;
1189: pa_cc_utils.reset_curr_function;

Line 1189: pa_cc_utils.reset_curr_function;

1185: pa_cc_utils.log_message(l_stage);
1186: end if;
1187: end if; /* override type */
1188: end loop;
1189: pa_cc_utils.reset_curr_function;
1190: exception
1191: when others
1192: then
1193: raise;