DBA Data[Home] [Help]

APPS.PA_BUDGETARY_CONTROLS_PKG dependencies on PA_BUDGETARY_CONTROLS

Line 1: PACKAGE BODY PA_BUDGETARY_CONTROLS_PKG AS

1: PACKAGE BODY PA_BUDGETARY_CONTROLS_PKG AS
2: -- $Header: PAXBCCRB.pls 120.2 2006/04/18 05:22:08 cmishra noship $
3: PROCEDURE insert_rows
4: (x_project_id IN PA_PROJECTS_ALL.PROJECT_ID%type
5: ,x_budget_type_code IN PA_BUDGET_TYPES.BUDGET_TYPE_CODE%type

Line 6: ,x_funds_control_level_code IN PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type

2: -- $Header: PAXBCCRB.pls 120.2 2006/04/18 05:22:08 cmishra noship $
3: PROCEDURE insert_rows
4: (x_project_id IN PA_PROJECTS_ALL.PROJECT_ID%type
5: ,x_budget_type_code IN PA_BUDGET_TYPES.BUDGET_TYPE_CODE%type
6: ,x_funds_control_level_code IN PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type
7: ,x_top_task_id IN PA_TASKS.TASK_ID%type
8: ,x_task_id IN PA_TASKS.TASK_ID%type
9: ,x_parent_member_id IN PA_RESOURCE_LIST_MEMBERS.PARENT_MEMBER_ID%type
10: ,x_resource_list_member_id IN PA_RESOURCE_LIST_MEMBERS.resource_list_member_id%type

Line 23: -- Inserts Records into PA_BUDGETARY_CONTROLS

19: -- Bug 5162775 : This procedure is made autonomous.
20: PRAGMA AUTONOMOUS_TRANSACTION;
21:
22: --===================================================================================
23: -- Inserts Records into PA_BUDGETARY_CONTROLS
24: -- Called from other routines in this package for the following ...
25: -- records inserted for Project, Tasks, Resource Groups and Resources
26: --===================================================================================
27:

Line 34: insert into PA_BUDGETARY_CONTROLS ( BUDGETARY_CONTROLS_ID

30: l_return_status := FND_API.G_RET_STS_SUCCESS;
31:
32:
33:
34: insert into PA_BUDGETARY_CONTROLS ( BUDGETARY_CONTROLS_ID
35: ,PROJECT_ID
36: ,FUNDS_CONTROL_LEVEL_CODE
37: ,LAST_UPDATE_DATE
38: ,LAST_UPDATED_BY

Line 49: PA_BUDGETARY_CONTROLS_s.nextval

45: ,RESOURCE_LIST_MEMBER_ID
46: ,BUDGET_TYPE_CODE
47: )
48: values (
49: PA_BUDGETARY_CONTROLS_s.nextval
50: ,x_project_id
51: ,x_funds_control_level_code
52: ,SYSDATE
53: ,FND_GLOBAL.USER_ID

Line 81: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'

77: x_msg_count := 1;
78: x_msg_data := SUBSTR(SQLERRM, 1, 240);
79: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
80:
81: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'
82: , p_procedure_name => 'insert_rows');
83:
84: END;
85:

Line 97: delete from pa_budgetary_controls

93: IS
94: PRAGMA AUTONOMOUS_TRANSACTION;
95: BEGIN
96:
97: delete from pa_budgetary_controls
98: where project_id = p_project_id
99: and budget_type_code = p_budget_type_code;
100:
101: COMMIT;

Line 104: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'

100:
101: COMMIT;
102: EXCEPTION
103: WHEN OTHERS THEN
104: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'
105: , p_procedure_name => 'del_bc_rec_for_reset_auto');
106: END del_bc_rec_for_reset_auto;
107:
108: -----------------------------------------------------------------------------------

Line 120: DELETE from pa_budgetary_controls bc

116: IS
117: PRAGMA AUTONOMOUS_TRANSACTION;
118: BEGIN
119:
120: DELETE from pa_budgetary_controls bc
121: WHERE EXISTS
122: ( SELECT pt2.task_id
123: FROM pa_tasks pt2
124: WHERE bc.task_id=pt2.parent_task_id

Line 135: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'

131:
132: COMMIT;
133: EXCEPTION
134: WHEN OTHERS THEN
135: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'
136: , p_procedure_name => 'del_bc_rec_for_task_auto');
137: END del_bc_rec_for_task_auto;
138:
139: -----------------------------------------------------------------------------------

Line 153: v_funds_control_level_project PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;

149: ,x_return_status OUT NOCOPY VARCHAR2
150: ,x_msg_count OUT NOCOPY NUMBER
151: ,x_msg_data OUT NOCOPY VARCHAR2 ) is
152:
153: v_funds_control_level_project PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
154: v_funds_control_level_task PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
155: v_funds_control_level_res_grp PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
156: v_funds_control_level_res PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
157:

Line 154: v_funds_control_level_task PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;

150: ,x_msg_count OUT NOCOPY NUMBER
151: ,x_msg_data OUT NOCOPY VARCHAR2 ) is
152:
153: v_funds_control_level_project PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
154: v_funds_control_level_task PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
155: v_funds_control_level_res_grp PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
156: v_funds_control_level_res PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
157:
158: l_return_status VARCHAR2(10);

Line 155: v_funds_control_level_res_grp PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;

151: ,x_msg_data OUT NOCOPY VARCHAR2 ) is
152:
153: v_funds_control_level_project PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
154: v_funds_control_level_task PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
155: v_funds_control_level_res_grp PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
156: v_funds_control_level_res PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
157:
158: l_return_status VARCHAR2(10);
159: l_msg_count NUMBER(15);

Line 156: v_funds_control_level_res PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;

152:
153: v_funds_control_level_project PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
154: v_funds_control_level_task PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
155: v_funds_control_level_res_grp PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
156: v_funds_control_level_res PA_BUDGETARY_CONTROLS.FUNDS_CONTROL_LEVEL_CODE%type;
157:
158: l_return_status VARCHAR2(10);
159: l_msg_count NUMBER(15);
160: l_msg_data VARCHAR2(2000);

Line 166: cursor c_tasks_no_bc fetches all the tasks for which there exists no records in pa_budgetary_controls.

162: l_debug_mode varchar2(1) := 'N';
163: l_top_task_id NUMBER(15);
164:
165: /* Bug 4551528 :
166: cursor c_tasks_no_bc fetches all the tasks for which there exists no records in pa_budgetary_controls.
167: cursor c_res_resgrp_no_bc fetches all the resources and resource groups for which there exists no records in pa_budgetary_controls.
168: cursor c_res_resgrp_all fetches all the resources and resource groups for a particular resource_list_id.
169: cursor c_tasks_for_new_resource fetches all the tasks for which there exists records in pa_budgetary_controls. */
170:

Line 167: cursor c_res_resgrp_no_bc fetches all the resources and resource groups for which there exists no records in pa_budgetary_controls.

163: l_top_task_id NUMBER(15);
164:
165: /* Bug 4551528 :
166: cursor c_tasks_no_bc fetches all the tasks for which there exists no records in pa_budgetary_controls.
167: cursor c_res_resgrp_no_bc fetches all the resources and resource groups for which there exists no records in pa_budgetary_controls.
168: cursor c_res_resgrp_all fetches all the resources and resource groups for a particular resource_list_id.
169: cursor c_tasks_for_new_resource fetches all the tasks for which there exists records in pa_budgetary_controls. */
170:
171: cursor c_tasks_no_bc is

Line 169: cursor c_tasks_for_new_resource fetches all the tasks for which there exists records in pa_budgetary_controls. */

165: /* Bug 4551528 :
166: cursor c_tasks_no_bc fetches all the tasks for which there exists no records in pa_budgetary_controls.
167: cursor c_res_resgrp_no_bc fetches all the resources and resource groups for which there exists no records in pa_budgetary_controls.
168: cursor c_res_resgrp_all fetches all the resources and resource groups for a particular resource_list_id.
169: cursor c_tasks_for_new_resource fetches all the tasks for which there exists records in pa_budgetary_controls. */
170:
171: cursor c_tasks_no_bc is
172: SELECT
173: pt1.task_id,

Line 190: FROM pa_budgetary_controls bc

186: )
187: )
188: AND not exists
189: ( SELECT 1
190: FROM pa_budgetary_controls bc
191: WHERE bc.project_id = x_project_id
192: AND bc.budget_type_code = x_budget_type_code
193: AND bc.task_id = pt1.task_id
194: );

Line 211: and not exists (select 1 from pa_budgetary_controls bc

207: WHERE br.ENABLED_FLAG = 'Y'
208: AND br.RESOURCE_LIST_ID = x_resource_list_id
209: AND DECODE(br.RESOURCE_TYPE_CODE, 'UNCLASSIFIED', 'Y', DISPLAY_FLAG) = 'Y'
210: and nvl(br.migration_code, 'M') = 'M'
211: and not exists (select 1 from pa_budgetary_controls bc
212: where bc.project_id = x_project_id
213: and bc.budget_type_code = x_budget_type_code
214: and bc.resource_list_member_id = br.resource_list_member_id);
215:

Line 253: FROM pa_budgetary_controls bc

249: )
250: )
251: AND exists
252: ( SELECT 1
253: FROM pa_budgetary_controls bc
254: WHERE bc.project_id = x_project_id
255: AND bc.budget_type_code = x_budget_type_code
256: AND bc.task_id = pt1.task_id
257: );

Line 304: PA_DEBUG.init_err_stack('PA_BUDGETARY_CONTROLS_PKG.CREATE_BC_LEVELS');

300:
301: BEGIN
302:
303:
304: PA_DEBUG.init_err_stack('PA_BUDGETARY_CONTROLS_PKG.CREATE_BC_LEVELS');
305:
306: l_return_status := FND_API.G_RET_STS_SUCCESS;
307:
308: --PLSQL Message stack is initialized

Line 326: PA_DEBUG.write_log (x_module => 'PA_BUDGETARY_CONTROLS_PKG.create_bc_levels start'

322:
323:
324: -- write log messages into FND_LOG_MESSAGES for debugging purposes
325:
326: PA_DEBUG.write_log (x_module => 'PA_BUDGETARY_CONTROLS_PKG.create_bc_levels start'
327: ,x_msg => 'Creating Default Budgetary Control Levels'
328: ,x_log_level => 5);
329:
330:

Line 514: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'

510: x_msg_count := 1;
511: x_msg_data := SUBSTR(SQLERRM, 1, 240);
512: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
513:
514: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'
515: , p_procedure_name => 'CREATE_BC_LEVELS');
516:
517: end; -- Procedure create_bc_levels
518:

Line 544: FROM pa_budgetary_controls bc,

540: CURSOR c_budctrl_exists ( p_budget_version_id NUMBER) IS
541: SELECT 'Y'
542: FROM DUAL
543: WHERE EXISTS (SELECT 1
544: FROM pa_budgetary_controls bc,
545: PA_BUDGET_VERSIONS pbv
546: WHERE BUDGET_VERSION_ID = p_budget_version_id
547: and bc.project_id = pbv.project_id
548: and bc.budget_type_code = pbv.budget_type_code);

Line 594: Then pa_budgetary_controls_pkg.create_bc_levels is called with the appropriate calling mode

590: Else
591: l_calling_mode := 'REBASELINE'
592: end if
593: End if
594: Then pa_budgetary_controls_pkg.create_bc_levels is called with the appropriate calling mode
595: */
596:
597: --====================================================================================
598:

Line 605: PA_DEBUG.init_err_stack('PA_BUDGETARY_CONTROLS_PKG.BUD_CTRL_CREATE');

601: l_return_status := FND_API.G_RET_STS_SUCCESS;
602: l_calling_mode := x_calling_mode;
603:
604: -- Setting debug variables
605: PA_DEBUG.init_err_stack('PA_BUDGETARY_CONTROLS_PKG.BUD_CTRL_CREATE');
606: FND_MSG_PUB.initialize; --PLSQL Message stack is initialized
607: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
608: l_debug_mode := NVL(l_debug_mode, 'N');
609: pa_debug.set_process('PLSQL','LOG',l_debug_mode);

Line 615: PA_DEBUG.write_log (x_module => 'PA_BUDGETARY_CONTROLS_PKG.BUD_CTRL_CREATE start'

611:
612: PA_DEBUG.g_err_stage := 'PA_BC_Log: Baseline Process calls Budg. control creation proc. - start';
613: PA_DEBUG.write_file('LOG',pa_debug.g_err_stage);
614: -- write log messages into FND_LOG_MESSAGES for debugging purposes
615: PA_DEBUG.write_log (x_module => 'PA_BUDGETARY_CONTROLS_PKG.BUD_CTRL_CREATE start'
616: ,x_msg => 'Creating Default Budgetary Control Levels'
617: ,x_log_level => 5);
618: PA_FCK_UTIL.debug_msg('PA_BC_Log: Call CREATE_BC_LEVELS procedure:- start');
619:

Line 675: pa_budgetary_controls_pkg.create_bc_levels

671: END IF; -- If entry_level_code is changed then we need to refresh budgetary control
672:
673: END IF; --IF l_budctrl_exists <> 'Y' THEN
674:
675: pa_budgetary_controls_pkg.create_bc_levels
676: (bud_ctrl_params_rec.project_id
677: ,bud_ctrl_params_rec.budget_type_code
678: ,bud_ctrl_params_rec.entry_level_code
679: ,bud_ctrl_params_rec.resource_list_id

Line 720: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'

716: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
717:
718: PA_FCK_UTIL.debug_msg('PA_BC_Log:8' || SQLERRM);
719:
720: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'
721: , p_procedure_name => 'BUD_CTRL_CREATE');
722:
723: END;
724:

Line 747: PA_DEBUG.init_err_stack('PA_BUDGETARY_CONTROLS_PKG.BUDG_CTRL_RESET');

743: RESET_BC_ERROR EXCEPTION;
744:
745: begin
746:
747: PA_DEBUG.init_err_stack('PA_BUDGETARY_CONTROLS_PKG.BUDG_CTRL_RESET');
748:
749: l_return_status := FND_API.G_RET_STS_SUCCESS;
750:
751: --PLSQL Message stack is initialized

Line 768: PA_DEBUG.write_log (x_module => 'PA_BUDGETARY_CONTROLS_PKG.BUDG_CTRL_RESET start'

764:
765:
766: -- write log messages into FND_LOG_MESSAGES for debugging purposes
767:
768: PA_DEBUG.write_log (x_module => 'PA_BUDGETARY_CONTROLS_PKG.BUDG_CTRL_RESET start'
769: ,x_msg => 'Reset Budgetary Control Levels'
770: ,x_log_level => 5);
771:
772:

Line 776: -- Deletes Budgetary Control records from PA_BUDGETARY_CONTROLS

772:
773: PA_FCK_UTIL.debug_msg('PA_BC_Log: Call CREATE_BC_LEVELS procedure:- start');
774:
775:
776: -- Deletes Budgetary Control records from PA_BUDGETARY_CONTROLS
777:
778:
779: PA_DEBUG.g_err_stage := 'PA_BC_Log: Called from Form . Budg. control RESET proc. - start';
780: PA_DEBUG.write_file('LOG',pa_debug.g_err_stage);

Line 783: delete from pa_budgetary_controls

779: PA_DEBUG.g_err_stage := 'PA_BC_Log: Called from Form . Budg. control RESET proc. - start';
780: PA_DEBUG.write_file('LOG',pa_debug.g_err_stage);
781:
782:
783: delete from pa_budgetary_controls
784: where project_id = x_project_id
785: and budget_type_code = x_budget_type_code;
786:
787: PA_FCK_UTIL.debug_msg('PA_BC_Log: delete budgetary Controls');

Line 792: pa_budgetary_controls_pkg.create_bc_levels

788:
789: PA_DEBUG.g_err_stage := 'PA_BC_Log: Deleted Budgetary Control Records: '||'PROJECT ID = '||x_project_id;
790: PA_DEBUG.write_file('LOG',pa_debug.g_err_stage);
791:
792: pa_budgetary_controls_pkg.create_bc_levels
793: (x_project_id
794: ,x_budget_type_code
795: ,x_entry_level_code
796: ,x_resource_list_id

Line 840: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'

836: x_msg_count := 1;
837: x_msg_data := SUBSTR(SQLERRM, 1, 240);
838: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
839:
840: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_BUDGETARY_CONTROLS_PKG'
841: , p_procedure_name => 'BUD_CTRL_CREATE');
842:
843: END;
844:

Line 928: from pa_budgetary_controls

924:
925: select 'Y' into bc_rec_exists from SYS.DUAL
926: where exists
927: (select' Y'
928: from pa_budgetary_controls
929: where project_id = x_project_id and
930: budget_type_code = x_budget_type_code and
931: rownum=1);
932:

Line 934: from pa_budgetary_controls

930: budget_type_code = x_budget_type_code and
931: rownum=1);
932:
933: /* select count(*) into bc_rec_count
934: from pa_budgetary_controls
935: where project_id = x_project_id and
936: budget_type_code = x_budget_type_code;
937: */
938: if bc_rec_exists = 'Y' then

Line 1096: end PA_BUDGETARY_CONTROLS_PKG; -- Package

1092:
1093: END get_budget_status;
1094:
1095:
1096: end PA_BUDGETARY_CONTROLS_PKG; -- Package