62: BEGIN
63:
64: x_msg_count := 0;
65: x_return_status := FND_API.G_RET_STS_SUCCESS;
66: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
67:
68: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
69: FND_MSG_PUB.initialize;
70: END IF;
73: savepoint en_db_cust_at_top_task_pub;
74: END IF;
75:
76: IF l_debug_mode = 'Y' THEN
77: PA_DEBUG.set_curr_function( p_function => 'enbl_disbl_cust_at_top_task',
78: p_debug_mode => l_debug_mode );
79: END IF;
80:
81: IF l_debug_mode = 'Y' THEN
78: p_debug_mode => l_debug_mode );
79: END IF;
80:
81: IF l_debug_mode = 'Y' THEN
82: Pa_Debug.g_err_stage:= 'Printing Input parameters';
83: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
84: l_debug_level3);
85:
86: Pa_Debug.WRITE(g_module_name,'p_mode'||':'||p_mode,
79: END IF;
80:
81: IF l_debug_mode = 'Y' THEN
82: Pa_Debug.g_err_stage:= 'Printing Input parameters';
83: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
84: l_debug_level3);
85:
86: Pa_Debug.WRITE(g_module_name,'p_mode'||':'||p_mode,
87: l_debug_level3);
82: Pa_Debug.g_err_stage:= 'Printing Input parameters';
83: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
84: l_debug_level3);
85:
86: Pa_Debug.WRITE(g_module_name,'p_mode'||':'||p_mode,
87: l_debug_level3);
88:
89: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
90: l_debug_level3);
85:
86: Pa_Debug.WRITE(g_module_name,'p_mode'||':'||p_mode,
87: l_debug_level3);
88:
89: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
90: l_debug_level3);
91:
92: Pa_Debug.WRITE(g_module_name,'p_def_top_task_cust'||':'||p_def_top_task_cust,
93: l_debug_level3);
88:
89: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
90: l_debug_level3);
91:
92: Pa_Debug.WRITE(g_module_name,'p_def_top_task_cust'||':'||p_def_top_task_cust,
93: l_debug_level3);
94:
95: Pa_Debug.WRITE(g_module_name,'p_contr_update_cust'||':'||p_contr_update_cust,
96: l_debug_level3);
91:
92: Pa_Debug.WRITE(g_module_name,'p_def_top_task_cust'||':'||p_def_top_task_cust,
93: l_debug_level3);
94:
95: Pa_Debug.WRITE(g_module_name,'p_contr_update_cust'||':'||p_contr_update_cust,
96: l_debug_level3);
97: END IF;
98:
99: IF l_debug_mode = 'Y' THEN
96: l_debug_level3);
97: END IF;
98:
99: IF l_debug_mode = 'Y' THEN
100: Pa_Debug.g_err_stage:= 'Validating Input parameters';
101: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
102: l_debug_level3);
103: END IF;
104:
97: END IF;
98:
99: IF l_debug_mode = 'Y' THEN
100: Pa_Debug.g_err_stage:= 'Validating Input parameters';
101: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
102: l_debug_level3);
103: END IF;
104:
105: IF ( ( p_mode IS NULL OR p_mode = FND_API.G_MISS_CHAR ) AND
108: ( p_contr_update_cust IS NULL OR p_contr_update_cust = FND_API.G_MISS_NUM )
109: )
110: THEN
111: IF l_debug_mode = 'Y' THEN
112: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : enbl_disbl_cust_at_top_task :
113: p_mode, p_project_id, p_def_top_task_cust, p_contr_update_cust are NULL';
114: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
115: l_debug_level3);
116: END IF;
110: THEN
111: IF l_debug_mode = 'Y' THEN
112: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : enbl_disbl_cust_at_top_task :
113: p_mode, p_project_id, p_def_top_task_cust, p_contr_update_cust are NULL';
114: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
115: l_debug_level3);
116: END IF;
117: RAISE Invalid_Arg_Exc;
118: END IF;
161:
162: --Commented out call below for bug 3882790
163: --Project_funding_level_flag is now set in project form itself
164: /*IF l_debug_mode = 'Y' THEN
165: Pa_Debug.g_err_stage:= 'Going to set project funding flag';
166: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
167: l_debug_level3);
168: END IF;
169:
162: --Commented out call below for bug 3882790
163: --Project_funding_level_flag is now set in project form itself
164: /*IF l_debug_mode = 'Y' THEN
165: Pa_Debug.g_err_stage:= 'Going to set project funding flag';
166: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
167: l_debug_level3);
168: END IF;
169:
170: PA_TOP_TASK_CUST_INVOICE_PVT.set_top_task_funding_level(
186:
187: END IF;
188: ELSE
189: IF l_debug_mode = 'Y' THEN
190: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : enbl_disbl_cust_at_top_task :
191: Mandatory parameters p_mode or p_project_id are NULL';
192: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
193: l_debug_level3);
194: END IF;
188: ELSE
189: IF l_debug_mode = 'Y' THEN
190: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : enbl_disbl_cust_at_top_task :
191: Mandatory parameters p_mode or p_project_id are NULL';
192: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
193: l_debug_level3);
194: END IF;
195: RAISE Invalid_Arg_Exc;
196: END IF;
225: x_msg_count := l_msg_count;
226: END IF;
227:
228: IF l_debug_mode = 'Y' THEN
229: Pa_Debug.reset_curr_function;
230: END IF;
231:
232: WHEN Invalid_Arg_Exc THEN
233: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
243: , p_procedure_name => 'enbl_disbl_cust_at_top_task'
244: , p_error_text => x_msg_data);
245:
246: IF l_debug_mode = 'Y' THEN
247: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
248: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
249: l_debug_level5);
250: Pa_Debug.reset_curr_function;
251: END IF;
244: , p_error_text => x_msg_data);
245:
246: IF l_debug_mode = 'Y' THEN
247: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
248: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
249: l_debug_level5);
250: Pa_Debug.reset_curr_function;
251: END IF;
252: RAISE;
246: IF l_debug_mode = 'Y' THEN
247: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
248: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
249: l_debug_level5);
250: Pa_Debug.reset_curr_function;
251: END IF;
252: RAISE;
253:
254: WHEN OTHERS THEN
265: , p_procedure_name => 'enbl_disbl_cust_at_top_task'
266: , p_error_text => x_msg_data);
267:
268: IF l_debug_mode = 'Y' THEN
269: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
270: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
271: l_debug_level5);
272: Pa_Debug.reset_curr_function;
273: END IF;
266: , p_error_text => x_msg_data);
267:
268: IF l_debug_mode = 'Y' THEN
269: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
270: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
271: l_debug_level5);
272: Pa_Debug.reset_curr_function;
273: END IF;
274: RAISE;
268: IF l_debug_mode = 'Y' THEN
269: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
270: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
271: l_debug_level5);
272: Pa_Debug.reset_curr_function;
273: END IF;
274: RAISE;
275:
276: END enbl_disbl_cust_at_top_task;
352: x_highst_contr_cust_num := null;
353:
354: x_msg_count := 0;
355: x_return_status := FND_API.G_RET_STS_SUCCESS;
356: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
357:
358: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
359: FND_MSG_PUB.initialize;
360: END IF;
363: savepoint get_highest_cont_cust_svpt;
364: END IF;
365:
366: IF l_debug_mode = 'Y' THEN
367: PA_DEBUG.set_curr_function( p_function => 'Get_Highest_Contr_Cust',
368: p_debug_mode => l_debug_mode );
369: END IF;
370:
371: IF l_debug_mode = 'Y' THEN
368: p_debug_mode => l_debug_mode );
369: END IF;
370:
371: IF l_debug_mode = 'Y' THEN
372: Pa_Debug.g_err_stage:= 'Printing Input parameters';
373: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
374: l_debug_level3);
375:
376: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
369: END IF;
370:
371: IF l_debug_mode = 'Y' THEN
372: Pa_Debug.g_err_stage:= 'Printing Input parameters';
373: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
374: l_debug_level3);
375:
376: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
377: l_debug_level3);
372: Pa_Debug.g_err_stage:= 'Printing Input parameters';
373: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
374: l_debug_level3);
375:
376: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
377: l_debug_level3);
378:
379: END IF;
380:
378:
379: END IF;
380:
381: IF l_debug_mode = 'Y' THEN
382: Pa_Debug.g_err_stage:= 'Validating Input parameters';
383: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
384: l_debug_level3);
385: END IF;
386:
379: END IF;
380:
381: IF l_debug_mode = 'Y' THEN
382: Pa_Debug.g_err_stage:= 'Validating Input parameters';
383: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
384: l_debug_level3);
385: END IF;
386:
387: IF ( p_project_id IS NULL OR p_project_id = FND_API.G_MISS_NUM
387: IF ( p_project_id IS NULL OR p_project_id = FND_API.G_MISS_NUM
388: )
389: THEN
390: IF l_debug_mode = 'Y' THEN
391: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Get_Highest_Contr_Cust :
392: p_project_id is NULL';
393: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
394: l_debug_level3);
395: END IF;
389: THEN
390: IF l_debug_mode = 'Y' THEN
391: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Get_Highest_Contr_Cust :
392: p_project_id is NULL';
393: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
394: l_debug_level3);
395: END IF;
396: RAISE Invalid_Arg_Exc;
397: END IF;
456: x_msg_count := l_msg_count;
457: END IF;
458:
459: IF l_debug_mode = 'Y' THEN
460: Pa_Debug.reset_curr_function;
461: END IF;
462:
463: WHEN Invalid_Arg_Exc THEN
464: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
479: , p_procedure_name => 'Get_Highest_Contr_Cust'
480: , p_error_text => x_msg_data);
481:
482: IF l_debug_mode = 'Y' THEN
483: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
484: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
485: l_debug_level5);
486: Pa_Debug.reset_curr_function;
487: END IF;
480: , p_error_text => x_msg_data);
481:
482: IF l_debug_mode = 'Y' THEN
483: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
484: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
485: l_debug_level5);
486: Pa_Debug.reset_curr_function;
487: END IF;
488: RAISE;
482: IF l_debug_mode = 'Y' THEN
483: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
484: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
485: l_debug_level5);
486: Pa_Debug.reset_curr_function;
487: END IF;
488: RAISE;
489:
490: WHEN OTHERS THEN
506: , p_procedure_name => 'Get_Highest_Contr_Cust'
507: , p_error_text => x_msg_data);
508:
509: IF l_debug_mode = 'Y' THEN
510: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
511: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
512: l_debug_level5);
513: Pa_Debug.reset_curr_function;
514: END IF;
507: , p_error_text => x_msg_data);
508:
509: IF l_debug_mode = 'Y' THEN
510: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
511: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
512: l_debug_level5);
513: Pa_Debug.reset_curr_function;
514: END IF;
515: RAISE;
509: IF l_debug_mode = 'Y' THEN
510: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
511: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
512: l_debug_level5);
513: Pa_Debug.reset_curr_function;
514: END IF;
515: RAISE;
516:
517: END Get_Highest_Contr_Cust;
556: BEGIN
557:
558: x_msg_count := 0;
559: x_return_status := FND_API.G_RET_STS_SUCCESS;
560: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
561:
562: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
563: FND_MSG_PUB.initialize;
564: END IF;
567: savepoint Set_Rev_Acc_At_Top_Task_svpt;
568: END IF;
569:
570: IF l_debug_mode = 'Y' THEN
571: PA_DEBUG.set_curr_function( p_function => 'Set_Rev_Acc_At_Top_Task',
572: p_debug_mode => l_debug_mode );
573: END IF;
574:
575: IF l_debug_mode = 'Y' THEN
572: p_debug_mode => l_debug_mode );
573: END IF;
574:
575: IF l_debug_mode = 'Y' THEN
576: Pa_Debug.g_err_stage:= 'Printing Input parameters';
577: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
578: l_debug_level3);
579:
580: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
573: END IF;
574:
575: IF l_debug_mode = 'Y' THEN
576: Pa_Debug.g_err_stage:= 'Printing Input parameters';
577: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
578: l_debug_level3);
579:
580: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
581: l_debug_level3);
576: Pa_Debug.g_err_stage:= 'Printing Input parameters';
577: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
578: l_debug_level3);
579:
580: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
581: l_debug_level3);
582:
583: Pa_Debug.WRITE(g_module_name,'p_rev_acc'||':'||p_rev_acc,
584: l_debug_level3);
579:
580: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
581: l_debug_level3);
582:
583: Pa_Debug.WRITE(g_module_name,'p_rev_acc'||':'||p_rev_acc,
584: l_debug_level3);
585: END IF;
586:
587: IF l_debug_mode = 'Y' THEN
584: l_debug_level3);
585: END IF;
586:
587: IF l_debug_mode = 'Y' THEN
588: Pa_Debug.g_err_stage:= 'Validating Input parameters';
589: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
590: l_debug_level3);
591: END IF;
592:
585: END IF;
586:
587: IF l_debug_mode = 'Y' THEN
588: Pa_Debug.g_err_stage:= 'Validating Input parameters';
589: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
590: l_debug_level3);
591: END IF;
592:
593: IF ( (p_project_id IS NULL OR p_project_id = FND_API.G_MISS_NUM) AND
594: (p_rev_acc IS NULL OR p_rev_acc = FND_API.G_MISS_CHAR)
595: )
596: THEN
597: IF l_debug_mode = 'Y' THEN
598: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Set_Rev_Acc_At_Top_Task :
599: p_project_id and p_rev_acc are NULL';
600: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
601: l_debug_level3);
602: END IF;
596: THEN
597: IF l_debug_mode = 'Y' THEN
598: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Set_Rev_Acc_At_Top_Task :
599: p_project_id and p_rev_acc are NULL';
600: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
601: l_debug_level3);
602: END IF;
603: RAISE Invalid_Arg_Exc;
604: END IF;
611: WHERE project_id = p_project_id;
612:
613: ELSE
614: IF l_debug_mode = 'Y' THEN
615: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Set_Rev_Acc_At_Top_Task :
616: Mandatory parameters p_project_id or p_rev_acc are NULL';
617: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
618: l_debug_level3);
619: END IF;
613: ELSE
614: IF l_debug_mode = 'Y' THEN
615: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Set_Rev_Acc_At_Top_Task :
616: Mandatory parameters p_project_id or p_rev_acc are NULL';
617: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
618: l_debug_level3);
619: END IF;
620: RAISE Invalid_Arg_Exc;
621: END IF;
650: x_msg_count := l_msg_count;
651: END IF;
652:
653: IF l_debug_mode = 'Y' THEN
654: Pa_Debug.reset_curr_function;
655: END IF;
656:
657: WHEN Invalid_Arg_Exc THEN
658: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
668: , p_procedure_name => 'Set_Rev_Acc_At_Top_Task'
669: , p_error_text => x_msg_data);
670:
671: IF l_debug_mode = 'Y' THEN
672: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
673: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
674: l_debug_level5);
675: Pa_Debug.reset_curr_function;
676: END IF;
669: , p_error_text => x_msg_data);
670:
671: IF l_debug_mode = 'Y' THEN
672: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
673: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
674: l_debug_level5);
675: Pa_Debug.reset_curr_function;
676: END IF;
677: RAISE;
671: IF l_debug_mode = 'Y' THEN
672: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
673: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
674: l_debug_level5);
675: Pa_Debug.reset_curr_function;
676: END IF;
677: RAISE;
678:
679: WHEN OTHERS THEN
690: , p_procedure_name => 'Set_Rev_Acc_At_Top_Task'
691: , p_error_text => x_msg_data);
692:
693: IF l_debug_mode = 'Y' THEN
694: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
695: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
696: l_debug_level5);
697: Pa_Debug.reset_curr_function;
698: END IF;
691: , p_error_text => x_msg_data);
692:
693: IF l_debug_mode = 'Y' THEN
694: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
695: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
696: l_debug_level5);
697: Pa_Debug.reset_curr_function;
698: END IF;
699: RAISE;
693: IF l_debug_mode = 'Y' THEN
694: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
695: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
696: l_debug_level5);
697: Pa_Debug.reset_curr_function;
698: END IF;
699: RAISE;
700:
701: END Set_Rev_Acc_At_Top_Task;
740: BEGIN
741:
742: x_msg_count := 0;
743: x_return_status := FND_API.G_RET_STS_SUCCESS;
744: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
745:
746: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
747: FND_MSG_PUB.initialize;
748: END IF;
751: savepoint Set_Inv_Mth_At_Top_Task_svpt;
752: END IF;
753:
754: IF l_debug_mode = 'Y' THEN
755: PA_DEBUG.set_curr_function( p_function => 'Set_Inv_Mth_At_Top_Task',
756: p_debug_mode => l_debug_mode );
757: END IF;
758:
759: IF l_debug_mode = 'Y' THEN
756: p_debug_mode => l_debug_mode );
757: END IF;
758:
759: IF l_debug_mode = 'Y' THEN
760: Pa_Debug.g_err_stage:= 'Printing Input parameters';
761: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
762: l_debug_level3);
763:
764: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
757: END IF;
758:
759: IF l_debug_mode = 'Y' THEN
760: Pa_Debug.g_err_stage:= 'Printing Input parameters';
761: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
762: l_debug_level3);
763:
764: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
765: l_debug_level3);
760: Pa_Debug.g_err_stage:= 'Printing Input parameters';
761: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
762: l_debug_level3);
763:
764: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
765: l_debug_level3);
766:
767: Pa_Debug.WRITE(g_module_name,'p_inv_mth'||':'||p_inv_mth,
768: l_debug_level3);
763:
764: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
765: l_debug_level3);
766:
767: Pa_Debug.WRITE(g_module_name,'p_inv_mth'||':'||p_inv_mth,
768: l_debug_level3);
769: END IF;
770:
771: IF l_debug_mode = 'Y' THEN
768: l_debug_level3);
769: END IF;
770:
771: IF l_debug_mode = 'Y' THEN
772: Pa_Debug.g_err_stage:= 'Validating Input parameters';
773: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
774: l_debug_level3);
775: END IF;
776:
769: END IF;
770:
771: IF l_debug_mode = 'Y' THEN
772: Pa_Debug.g_err_stage:= 'Validating Input parameters';
773: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
774: l_debug_level3);
775: END IF;
776:
777: IF ( (p_project_id IS NULL OR p_project_id = FND_API.G_MISS_NUM) AND
778: (p_inv_mth IS NULL OR p_inv_mth = FND_API.G_MISS_CHAR)
779: )
780: THEN
781: IF l_debug_mode = 'Y' THEN
782: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Set_Inv_Mth_At_Top_Task :
783: p_project_id and p_inv_mth are NULL';
784: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
785: l_debug_level3);
786: END IF;
780: THEN
781: IF l_debug_mode = 'Y' THEN
782: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Set_Inv_Mth_At_Top_Task :
783: p_project_id and p_inv_mth are NULL';
784: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
785: l_debug_level3);
786: END IF;
787: RAISE Invalid_Arg_Exc;
788: END IF;
794: UPDATE pa_tasks SET invoice_method = p_inv_mth
795: WHERE project_id = p_project_id;
796: ELSE
797: IF l_debug_mode = 'Y' THEN
798: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Set_Inv_Mth_At_Top_Task :
799: Mandatory parameters p_project_id or p_inv_mth are NULL';
800: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
801: l_debug_level3);
802: END IF;
796: ELSE
797: IF l_debug_mode = 'Y' THEN
798: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : Set_Inv_Mth_At_Top_Task :
799: Mandatory parameters p_project_id or p_inv_mth are NULL';
800: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
801: l_debug_level3);
802: END IF;
803: RAISE Invalid_Arg_Exc;
804: END IF;
833: x_msg_count := l_msg_count;
834: END IF;
835:
836: IF l_debug_mode = 'Y' THEN
837: Pa_Debug.reset_curr_function;
838: END IF;
839:
840: WHEN Invalid_Arg_Exc THEN
841: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
851: , p_procedure_name => 'Set_Inv_Mth_At_Top_Task'
852: , p_error_text => x_msg_data);
853:
854: IF l_debug_mode = 'Y' THEN
855: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
856: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
857: l_debug_level5);
858: Pa_Debug.reset_curr_function;
859: END IF;
852: , p_error_text => x_msg_data);
853:
854: IF l_debug_mode = 'Y' THEN
855: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
856: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
857: l_debug_level5);
858: Pa_Debug.reset_curr_function;
859: END IF;
860: RAISE;
854: IF l_debug_mode = 'Y' THEN
855: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
856: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
857: l_debug_level5);
858: Pa_Debug.reset_curr_function;
859: END IF;
860: RAISE;
861:
862: WHEN OTHERS THEN
873: , p_procedure_name => 'Set_Inv_Mth_At_Top_Task'
874: , p_error_text => x_msg_data);
875:
876: IF l_debug_mode = 'Y' THEN
877: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
878: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
879: l_debug_level5);
880: Pa_Debug.reset_curr_function;
881: END IF;
874: , p_error_text => x_msg_data);
875:
876: IF l_debug_mode = 'Y' THEN
877: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
878: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
879: l_debug_level5);
880: Pa_Debug.reset_curr_function;
881: END IF;
882: RAISE;
876: IF l_debug_mode = 'Y' THEN
877: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
878: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
879: l_debug_level5);
880: Pa_Debug.reset_curr_function;
881: END IF;
882: RAISE;
883:
884: END Set_Inv_Mth_At_Top_Task;
926: BEGIN
927:
928: x_msg_count := 0;
929: x_return_status := FND_API.G_RET_STS_SUCCESS;
930: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
931:
932: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
933: FND_MSG_PUB.initialize;
934: END IF;
937: savepoint set_top_tsk_funding_lvl_svpt;
938: END IF;
939:
940: IF l_debug_mode = 'Y' THEN
941: PA_DEBUG.set_curr_function( p_function => 'set_top_task_funding_level',
942: p_debug_mode => l_debug_mode );
943: END IF;
944:
945: IF l_debug_mode = 'Y' THEN
942: p_debug_mode => l_debug_mode );
943: END IF;
944:
945: IF l_debug_mode = 'Y' THEN
946: Pa_Debug.g_err_stage:= 'Printing Input parameters';
947: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
948: l_debug_level3);
949:
950: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
943: END IF;
944:
945: IF l_debug_mode = 'Y' THEN
946: Pa_Debug.g_err_stage:= 'Printing Input parameters';
947: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
948: l_debug_level3);
949:
950: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
951: l_debug_level3);
946: Pa_Debug.g_err_stage:= 'Printing Input parameters';
947: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
948: l_debug_level3);
949:
950: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
951: l_debug_level3);
952: END IF;
953:
954: IF l_debug_mode = 'Y' THEN
951: l_debug_level3);
952: END IF;
953:
954: IF l_debug_mode = 'Y' THEN
955: Pa_Debug.g_err_stage:= 'Validating Input parameters';
956: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
957: l_debug_level3);
958: END IF;
959:
952: END IF;
953:
954: IF l_debug_mode = 'Y' THEN
955: Pa_Debug.g_err_stage:= 'Validating Input parameters';
956: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
957: l_debug_level3);
958: END IF;
959:
960: IF ( (p_project_id IS NULL OR p_project_id = FND_API.G_MISS_NUM)
960: IF ( (p_project_id IS NULL OR p_project_id = FND_API.G_MISS_NUM)
961: )
962: THEN
963: IF l_debug_mode = 'Y' THEN
964: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : set_top_task_funding_level :
965: p_project_id is NULL';
966: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
967: l_debug_level3);
968: END IF;
962: THEN
963: IF l_debug_mode = 'Y' THEN
964: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : set_top_task_funding_level :
965: p_project_id is NULL';
966: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
967: l_debug_level3);
968: END IF;
969: RAISE Invalid_Arg_Exc;
970: END IF;
969: RAISE Invalid_Arg_Exc;
970: END IF;
971:
972: IF l_debug_mode = 'Y' THEN
973: Pa_Debug.g_err_stage:= 'Going to set project funding flag to N';
974: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
975: l_debug_level3);
976: END IF;
977:
970: END IF;
971:
972: IF l_debug_mode = 'Y' THEN
973: Pa_Debug.g_err_stage:= 'Going to set project funding flag to N';
974: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
975: l_debug_level3);
976: END IF;
977:
978: --Commented out code below for bug 3882790
1016: x_msg_count := l_msg_count;
1017: END IF;
1018:
1019: IF l_debug_mode = 'Y' THEN
1020: Pa_Debug.reset_curr_function;
1021: END IF;
1022:
1023: WHEN Invalid_Arg_Exc THEN
1024: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
1034: , p_procedure_name => 'set_top_task_funding_level'
1035: , p_error_text => x_msg_data);
1036:
1037: IF l_debug_mode = 'Y' THEN
1038: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1039: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1040: l_debug_level5);
1041: Pa_Debug.reset_curr_function;
1042: END IF;
1035: , p_error_text => x_msg_data);
1036:
1037: IF l_debug_mode = 'Y' THEN
1038: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1039: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1040: l_debug_level5);
1041: Pa_Debug.reset_curr_function;
1042: END IF;
1043: RAISE;
1037: IF l_debug_mode = 'Y' THEN
1038: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1039: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1040: l_debug_level5);
1041: Pa_Debug.reset_curr_function;
1042: END IF;
1043: RAISE;
1044:
1045: WHEN OTHERS THEN
1056: , p_procedure_name => 'set_top_task_funding_level'
1057: , p_error_text => x_msg_data);
1058:
1059: IF l_debug_mode = 'Y' THEN
1060: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1061: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1062: l_debug_level5);
1063: Pa_Debug.reset_curr_function;
1064: END IF;
1057: , p_error_text => x_msg_data);
1058:
1059: IF l_debug_mode = 'Y' THEN
1060: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1061: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1062: l_debug_level5);
1063: Pa_Debug.reset_curr_function;
1064: END IF;
1065: RAISE;
1059: IF l_debug_mode = 'Y' THEN
1060: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1061: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1062: l_debug_level5);
1063: Pa_Debug.reset_curr_function;
1064: END IF;
1065: RAISE;
1066:
1067: END set_top_task_funding_level;
1147: BEGIN
1148:
1149: x_msg_count := 0;
1150: x_return_status := FND_API.G_RET_STS_SUCCESS;
1151: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
1152:
1153: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
1154: FND_MSG_PUB.initialize;
1155: END IF;
1158: savepoint check_delete_customer;
1159: END IF;
1160:
1161: IF l_debug_mode = 'Y' THEN
1162: PA_DEBUG.set_curr_function( p_function => 'check_delete_customer',
1163: p_debug_mode => l_debug_mode );
1164: END IF;
1165:
1166: IF l_debug_mode = 'Y' THEN
1163: p_debug_mode => l_debug_mode );
1164: END IF;
1165:
1166: IF l_debug_mode = 'Y' THEN
1167: Pa_Debug.g_err_stage:= 'Printing Input parameters';
1168: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1169: l_debug_level3);
1170:
1171: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1164: END IF;
1165:
1166: IF l_debug_mode = 'Y' THEN
1167: Pa_Debug.g_err_stage:= 'Printing Input parameters';
1168: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1169: l_debug_level3);
1170:
1171: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1172: l_debug_level3);
1167: Pa_Debug.g_err_stage:= 'Printing Input parameters';
1168: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1169: l_debug_level3);
1170:
1171: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1172: l_debug_level3);
1173: Pa_Debug.WRITE(g_module_name,'p_customer_id'||':'||p_customer_id,
1174: l_debug_level3);
1175: END IF;
1169: l_debug_level3);
1170:
1171: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1172: l_debug_level3);
1173: Pa_Debug.WRITE(g_module_name,'p_customer_id'||':'||p_customer_id,
1174: l_debug_level3);
1175: END IF;
1176:
1177: IF l_debug_mode = 'Y' THEN
1174: l_debug_level3);
1175: END IF;
1176:
1177: IF l_debug_mode = 'Y' THEN
1178: Pa_Debug.g_err_stage:= 'Validating Input parameters';
1179: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1180: l_debug_level3);
1181: END IF;
1182:
1175: END IF;
1176:
1177: IF l_debug_mode = 'Y' THEN
1178: Pa_Debug.g_err_stage:= 'Validating Input parameters';
1179: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1180: l_debug_level3);
1181: END IF;
1182:
1183: IF ( (p_project_id IS NULL OR p_project_id = FND_API.G_MISS_NUM) AND
1184: (p_customer_id IS NULL OR p_customer_id = FND_API.G_MISS_NUM)
1185: )
1186: THEN
1187: IF l_debug_mode = 'Y' THEN
1188: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : check_delete_customer :
1189: p_project_id AND p_customer_id are NULL';
1190: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1191: l_debug_level3);
1192: END IF;
1186: THEN
1187: IF l_debug_mode = 'Y' THEN
1188: Pa_Debug.g_err_stage:= 'PA_TOP_TASK_CUST_INVOICE_PVT : check_delete_customer :
1189: p_project_id AND p_customer_id are NULL';
1190: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1191: l_debug_level3);
1192: END IF;
1193: RAISE Invalid_Arg_Exc;
1194: END IF;
1203:
1204: l_exclude_cust_id_tbl(1) := p_customer_id;
1205:
1206: IF l_debug_mode = 'Y' THEN
1207: Pa_Debug.g_err_stage:= 'Checking for associations';
1208: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1209: l_debug_level3);
1210: END IF;
1211:
1204: l_exclude_cust_id_tbl(1) := p_customer_id;
1205:
1206: IF l_debug_mode = 'Y' THEN
1207: Pa_Debug.g_err_stage:= 'Checking for associations';
1208: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1209: l_debug_level3);
1210: END IF;
1211:
1212: IF 'Y' = l_task_assoc_exists AND l_def_top_task_cust_id <> p_customer_id THEN
1304: x_msg_count := l_msg_count;
1305: END IF;
1306:
1307: IF l_debug_mode = 'Y' THEN
1308: Pa_Debug.reset_curr_function;
1309: END IF;
1310:
1311: WHEN Invalid_Arg_Exc THEN
1312: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
1328: , p_procedure_name => 'check_delete_customer'
1329: , p_error_text => x_msg_data);
1330:
1331: IF l_debug_mode = 'Y' THEN
1332: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1333: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1334: l_debug_level5);
1335: Pa_Debug.reset_curr_function;
1336: END IF;
1329: , p_error_text => x_msg_data);
1330:
1331: IF l_debug_mode = 'Y' THEN
1332: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1333: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1334: l_debug_level5);
1335: Pa_Debug.reset_curr_function;
1336: END IF;
1337: RAISE;
1331: IF l_debug_mode = 'Y' THEN
1332: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1333: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1334: l_debug_level5);
1335: Pa_Debug.reset_curr_function;
1336: END IF;
1337: RAISE;
1338:
1339: WHEN OTHERS THEN
1356: , p_procedure_name => 'check_delete_customer'
1357: , p_error_text => x_msg_data);
1358:
1359: IF l_debug_mode = 'Y' THEN
1360: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1361: Pa_Debug.WRITE( g_module_name,Pa_Debug.g_err_stage,
1362: l_debug_level5 );
1363: Pa_Debug.reset_curr_function;
1364: END IF;
1357: , p_error_text => x_msg_data);
1358:
1359: IF l_debug_mode = 'Y' THEN
1360: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1361: Pa_Debug.WRITE( g_module_name,Pa_Debug.g_err_stage,
1362: l_debug_level5 );
1363: Pa_Debug.reset_curr_function;
1364: END IF;
1365: RAISE;
1359: IF l_debug_mode = 'Y' THEN
1360: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1361: Pa_Debug.WRITE( g_module_name,Pa_Debug.g_err_stage,
1362: l_debug_level5 );
1363: Pa_Debug.reset_curr_function;
1364: END IF;
1365: RAISE;
1366: END check_delete_customer;
1367: