DBA Data[Home] [Help]

PACKAGE: APPS.PQH_BDGT_REALLOC_UTILITY

Source


1 Package pqh_bdgt_realloc_utility AUTHID CURRENT_USER as
2 /* $Header: pqbreutl.pkh 120.2 2006/02/03 14:15:33 deenath noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
9  p_entity_id              IN    pqh_bdgt_pool_realloctions.entity_id%TYPE,
6 -- ----------------------------------------------------------------------------
7 FUNCTION get_entity_name
8 (
10  p_entity_type            IN    pqh_budget_pools.entity_type%TYPE
11 ) RETURN  VARCHAR;
12 --
13 FUNCTION GET_PRD_REALLOC_RESERVED_AMT
14 (
15  p_budget_period_id       IN    pqh_budget_periods.budget_period_id%TYPE  Default NULL,
16  p_budget_unit_id         IN    pqh_budgets.budget_unit1_id%TYPE,
17  p_transaction_type       IN   pqh_bdgt_pool_realloctions.transaction_type%TYPE DEFAULT 'DD',
18  p_approval_status        IN    varchar2,
19  p_amount_type            IN    varchar2,
20  p_entity_type            IN    varchar2,
21  p_entity_id              IN    number DEFAULT NULL,
22  p_start_date             IN    date default null,
23  p_end_date               IN    date default null
24 
25 ) RETURN  NUMBER;
26 
27 FUNCTION GET_TRNX_LEVEL_TRANS_AMT
28 (
29  p_transaction_id         IN    pqh_bdgt_pool_realloctions.reallocation_id%TYPE,
30  p_txn_amt_balance_flag    IN    varchar2
31 ) RETURN  NUMBER;
32 
33 FUNCTION GET_FOLDER_LEVEL_TRANS_AMT
34 (
35  p_folder_id             IN    pqh_budget_pools.pool_id%TYPE
36 ) RETURN  NUMBER;
37 
38 FUNCTION GET_DTL_REALLOC_RESERVED_AMT
39 (
40  p_budget_detail_id       IN    pqh_budget_details.budget_detail_id%TYPE default null,
41  p_budget_unit_id         IN    pqh_budgets.budget_unit1_id%TYPE,
42  p_transaction_type       IN    pqh_bdgt_pool_realloctions.transaction_type%TYPE DEFAULT 'DD',
43  p_approval_status        IN    varchar2,
44  p_amount_type            IN    varchar2,
45  p_entity_type  IN varchar2,
46  p_entity_id              IN    number default null,
47  p_start_date             IN    date  default null,
48  p_end_date               IN    date default null
49 
50 )
51 RETURN  NUMBER;
52 
53 FUNCTION GET_TRNX_DNR_REVR_COUNT
54 (
55  p_transaction_id             IN    pqh_bdgt_pool_realloctions.reallocation_id%TYPE,
56  p_transaction_type       IN    pqh_bdgt_pool_realloctions.transaction_type%TYPE
57 ) RETURN  NUMBER;
58 PROCEDURE CHK_RECV_EXISTS
59 (
60 	p_trans_id	IN	pqh_bdgt_pool_realloctions.pool_id%TYPE,
61 	p_entity_id	IN	pqh_bdgt_pool_realloctions.entity_id%TYPE,
62 	p_detail_id	OUT NOCOPY	pqh_bdgt_pool_realloctions.reallocation_id%TYPE
63 );
64 FUNCTION CHK_APPROVED_FOLDER
65 (
66  p_budget_version_id      IN    pqh_budget_pools.budget_version_id%TYPE,
67  p_budget_unit_id                IN    pqh_budget_pools.budget_unit_id%TYPE,
68  p_entity_type            IN    pqh_budget_pools.entity_type%TYPE,
69  p_approval_status        IN    pqh_budget_pools.approval_status%Type) RETURN  NUMBER;
70 FUNCTION GET_TRNX_LEVEL_RESERVED_AMT
71 (
72  p_transaction_id         IN    pqh_bdgt_pool_realloctions.reallocation_id%TYPE,
73  p_transaction_type       IN    pqh_bdgt_pool_realloctions.transaction_type%TYPE DEFAULT 'DD'
74 ) RETURN  NUMBER;
75 FUNCTION GET_LOCATION_CODE
76 (
77  p_entity_code		IN    pqh_budgets.budgeted_entity_cd%TYPE,
78  p_organization_id	IN    pqh_budget_details.organization_id%TYPE,
79  p_business_group_id    IN    hr_organization_units_v.business_group_id%TYPE
80 ) RETURN  VARCHAR;
81 
82 PROCEDURE APP_NEXT_USER
83 (p_trans_id              in pqh_routing_history.transaction_id%type,
84 p_tran_cat_id           in pqh_transaction_categories.transaction_category_id%type,
85 p_cur_user_id           in out nocopy fnd_user.user_id%type,
86 p_cur_user_name         in out nocopy fnd_user.user_name%type,
87 p_user_active_role_id   in out nocopy pqh_roles.role_id%type,
88 p_user_active_role_name in out nocopy pqh_roles.role_name%type,
89 p_routing_category_id      out nocopy pqh_routing_categories.routing_category_id%type,
90 p_member_cd                out nocopy pqh_transaction_categories.member_cd%type,
91 p_routing_list_id          out nocopy pqh_routing_lists.routing_list_id%type,
92 p_member_role_id           out nocopy pqh_roles.role_id%type,
93 p_member_user_id           out nocopy fnd_user.user_id%type,
94 p_person_id                out nocopy fnd_user.employee_id%type,
95 p_member_id                out nocopy pqh_routing_list_members.routing_list_member_id%type,
96 p_position_id              out nocopy pqh_position_transactions.position_id%type,
97 p_cur_person_id            out nocopy fnd_user.employee_id%type,
98 p_cur_member_id            out nocopy pqh_routing_list_members.routing_list_member_id%type,
99 p_cur_position_id          out nocopy pqh_position_transactions.position_id%type,
100 p_pos_str_ver_id           out nocopy pqh_routing_history.pos_structure_version_id%type,
101 p_assignment_id            out nocopy per_assignments_f.assignment_id%type,
102 p_cur_assignment_id        out nocopy per_assignments_f.assignment_id%type,
103 p_next_user                out nocopy varchar2,
104 p_next_user_display        out nocopy varchar2,
105 p_status_flag              out nocopy number,
106 p_can_approve              out nocopy number);
107 procedure get_next_user(p_member_cd           in pqh_transaction_categories.member_cd%type,
108 			p_routing_category_id in pqh_routing_categories.routing_category_id%type,
109                         p_tran_cat_id         in pqh_transaction_categories.transaction_category_id%type,
110 			p_trans_id            in pqh_routing_history.transaction_id%type,
111 			p_cur_assignment_id   in per_assignments_f.assignment_id%type,
112 			p_cur_member_id       in pqh_routing_list_members.routing_list_member_id%type,
113 			p_routing_list_id     in pqh_routing_categories.routing_list_id%type,
114 			p_cur_position_id     in pqh_position_transactions.position_id%type,
115 			p_pos_str_ver_id      in per_pos_structure_elements.pos_structure_version_id%type,
116 			p_next_position_id       out nocopy pqh_position_transactions.position_id%type,
117 			p_next_member_id         out nocopy pqh_routing_list_members.routing_list_member_id%type,
118                         p_next_role_id           out nocopy number,
119                         p_next_user_id           out nocopy number,
120 			p_next_assignment_id     out nocopy per_assignments_f.assignment_id%type,
121 			p_status_flag            out nocopy number,
122                         p_next_user              out nocopy varchar2,
123                         p_next_user_display      out nocopy varchar2) ;
124 PROCEDURE FND_NEXT_USER
125 (
126 p_member_cd                IN pqh_transaction_categories.member_cd%type,
127 p_position_id              IN pqh_position_transactions.position_id%type,
128 p_assignment_id            IN per_assignments_f.assignment_id%type,
129 p_member_role_id           IN pqh_roles.role_id%type,
130 p_member_user_id           IN fnd_user.user_id%type,
131 p_next_name		  OUT NOCOPY VARCHAR,
132 p_next_name_display	  OUT NOCOPY VARCHAR
133 );
134 -- ----------------------------------------------------------------------------
135 -- |------------------------< apply_transaction >------------------------|
136 -- ----------------------------------------------------------------------------
137 
138 function apply_transaction
139 (  p_transaction_id    in  NUMBER,
140    p_validate_only              in varchar2 default 'NO'
141 ) return varchar2;
142 -- ----------------------------------------------------------------------------
143 -- |------------------------< reject_transaction >------------------------|
144 -- ----------------------------------------------------------------------------
145 
146 function reject_transaction
147 (  p_transaction_id    in  NUMBER,
148    p_validate_only     in varchar2 default 'NO'
149 ) return varchar2;
150 --------------------------------------------------------------------------------
151 FUNCTION entity_id
152 ( p_budget_detail_id IN pqh_budget_details.budget_detail_id%TYPE,
153 p_entity_type    IN pqh_budgets.budgeted_entity_cd%TYPE
154 )RETURN NUMBER;
155 --------------------------------------------------------------------------------
156 
157 FUNCTION respond_notification( p_transaction_id in number) RETURN varchar2 ;
158 FUNCTION warning_notification( p_transaction_id in number) RETURN varchar2 ;
159 FUNCTION reject_notification( p_transaction_id in number) RETURN varchar2 ;
160 FUNCTION apply_notification( p_transaction_id in number) RETURN varchar2 ;
161 
162 --------------------------------------------------------------------------------
163 FUNCTION url_builder(p_transaction_id in number) RETURN varchar2;
164 
165 -- ----------------------------------------------------------------------------
166 -- |------------------------< notify_bgt_manager_users >-----------------------|
167 -- ----------------------------------------------------------------------------
168 PROCEDURE notify_bgt_manager_users
169 (
170  p_transaction_id number,
171  p_transaction_name varchar2
172 ) ;
173 
174 -- ----------------------------------------------------------------------------
175 -- |----------------------------< fyi_notification >---------------------------|
176 -- ----------------------------------------------------------------------------
177 
178 FUNCTION fyi_notification (p_transaction_id in number) RETURN varchar2;
179 
180 -- ----------------------------------------------------------------------------
181 -- |-------------------< update_folder_approval_status >----------------------|
182 -- ----------------------------------------------------------------------------
183 
184 PROCEDURE update_folder_approval_status(p_transaction_id in number, p_action_flag in varchar2);
185 
186 -- ----------------------------------------------------------------------------
187 -- |----------------------< bgt_dummy_folder_delete >--------------------------|
188 -- ----------------------------------------------------------------------------
189 
190 PROCEDURE bgt_dummy_folder_delete(p_business_group_id IN number);
191 
192 -- ----------------------------------------------------------------------------
193 -- |----------------------< chk_bpr_route_catg_exist >-------------------------|
194 -- ----------------------------------------------------------------------------
195 PROCEDURE chk_bpr_route_catg_exist(p_business_group_id IN Number,
196                                    p_status  OUT nocopy varchar2);
197 
198 -- ----------------------------------------------------------------------------
199 -- |----------------------< bpr_process_user_action >-------------------------|
200 -- ----------------------------------------------------------------------------
201 PROCEDURE  bpr_process_user_action(
202              	  p_transaction_id                IN  NUMBER
203 	         ,p_transaction_category_id       IN  NUMBER
204 	         ,p_route_to_user                 IN  VARCHAR2
205 	         ,p_routing_category_id           IN  NUMBER
206 	         ,p_pos_structure_version_id      IN  NUMBER
207 	         ,p_user_action_cd                IN  VARCHAR2
208 	         ,p_forwarded_to_user_id          IN  NUMBER
209 	         ,p_forwarded_to_role_id          IN  NUMBER
210 	         ,p_forwarded_to_position_id      IN  NUMBER
211 	         ,p_forwarded_to_assignment_id    IN  NUMBER
212 	         ,p_forwarded_to_member_id        IN  NUMBER
213 	         ,p_forwarded_by_user_id          IN  NUMBER
214 	         ,p_forwarded_by_role_id          IN  NUMBER
215 	         ,p_forwarded_by_position_id      IN  NUMBER
216 	         ,p_forwarded_by_assignment_id    IN  NUMBER
217 	         ,p_forwarded_by_member_id        IN  NUMBER
218 	         ,p_effective_date                IN  DATE
219 	         ,p_approval_cd                   IN  VARCHAR2
220 	         ,p_member_cd                     In  VARCHAR2
221 	         ,p_transaction_name              IN  VARCHAR2
222 	         ,p_apply_error_mesg              OUT NOCOPY VARCHAR2
223        		 ,p_apply_error_num               OUT NOCOPY NUMBER
224        		 ,p_warning_mesg                  OUT NOCOPY VARCHAR2
225        		 );
226 
227 -- ----------------------------------------------------------------------------
228 -- |----------------------< check_approver_skip >-------------------------|
229 -- ----------------------------------------------------------------------------
230 FUNCTION check_approver_skip(p_transaction_category_id IN NUMBER)
231 RETURN VARCHAR2;
232 
233 -- ----------------------------------------------------------------------------
234 -- |----------------------< valid_user_opening >-------------------------------|
235 -- | Wrapper on top of pqh_workflow.valid_user_openingto allow multi messaging |
236 -- ----------------------------------------------------------------------------
237 
238 procedure valid_user_opening(p_business_group_id           in number    default null,
239                              p_short_name                  in varchar2  ,
240                              p_transaction_id              in number    default null,
241                              p_routing_history_id          in number    default null,
242                              p_wf_transaction_category_id     out nocopy number,
243                              p_glb_transaction_category_id    out nocopy number,
244                              p_role_id                        out nocopy number,
245                              p_role_template_id               out nocopy number,
246                              p_status_flag                    out nocopy varchar2) ;
247 
248 -- ----------------------------------------------------------------------------
249 -- |------------------------< get_folder_unit >-------------------------------|
250 -- | Function to return Folder Unit Desciption for Bdgt_Unit_Id. Bug #3027076.|
251 -- ----------------------------------------------------------------------------
252 FUNCTION get_folder_unit (p_budget_unit_id IN NUMBER)
253 RETURN  VARCHAR2;
254 
255 End pqh_bdgt_realloc_utility;