1 PACKAGE OZF_BudgetApproval_PVT AUTHID CURRENT_USER as
2 /*$Header: ozfvbdas.pls 115.4 2004/02/07 07:27:04 yzhao noship $*/
3
4 -- Start of Comments
5 --
6 -- NAME
7 -- OZF_BudgetApproval_PVT
8 --
9 -- PURPOSE
10 -- This package is a Private API for interfacing with Workflow
11 -- budget approval.
12 --
13 -- Procedures:
14 -- WF_Respond
15 -- Close_ActBudget
16 --
17 -- NOTES
18 --
19 -- History
20 -- 12-Sep-2000 choang Created.
21 -- 01/12/2001 mpande UPDATED for Note
22 -- 10/28/2002 feliu Change for 11.5.9
23 -- 10/28/2002 feliu added budget_request_approval for non_approval budget request.
24 -- 22-Aug-2003 kdass added validate_object_budget_all for 11.5.10 Offer Budget Validation.
25 -- End of Comments
26
27 -- global constants
28
29
30 -------------------------------------------------------------------
31 -- NAME
32 -- WF_Respond
33 -- PURPOSE
34 -- Called by the money owner to approve the
35 -- requested budget amount. The API is called
36 -- from Workflow.
37 PROCEDURE WF_Respond (
38 p_api_version IN NUMBER,
39 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
40 p_commit IN VARCHAR2 := FND_API.G_FALSE,
41 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
42 x_return_status OUT NOCOPY VARCHAR2,
43 x_msg_count OUT NOCOPY NUMBER,
44 x_msg_data OUT NOCOPY VARCHAR2,
45
46 p_respond_status_id IN VARCHAR2,
47 p_activity_budget_id IN NUMBER,
48 p_approver_id IN NUMBER := NULL,
49 p_approved_amount IN NUMBER := NULL,
50 p_approved_currency IN VARCHAR2 := NULL,
51 -- 11/12/2001 mpande added the following
52 p_comment IN VARCHAR2 := NULL
53
54 );
55
56
57 -------------------------------------------------------------------
58 -- NAME
59 -- Close_ActBudget
60 -- PURPOSE
61 -- Close the books for the budget source line.
62 PROCEDURE Close_ActBudget (
63 p_api_version IN NUMBER,
64 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
65 p_commit IN VARCHAR2 := FND_API.G_FALSE,
66 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
67 x_return_status OUT NOCOPY VARCHAR2,
68 x_msg_count OUT NOCOPY NUMBER,
69 x_msg_data OUT NOCOPY VARCHAR2,
70
71 p_activity_budget_id IN NUMBER
72 );
73
74 -------------------------------------------------------------------
75 -- NAME
76 -- notify vendor
77 -- PURPOSE
78 -- notify the vendor wheneever a partner creates a budget line
79 -- History
80 -- Created Mpande 01/03/2002
81 ----------------------------------------------------------------
82 PROCEDURE notify_vendor (
83 p_act_budget_rec IN OZF_ACTBUDGETS_PVT.Act_Budgets_Rec_Type,
84 x_return_status OUT NOCOPY VARCHAR2,
85 x_msg_count OUT NOCOPY NUMBER,
86 x_msg_data OUT NOCOPY VARCHAR2);
87
88
89 -------------------------------------------------------------------
90 -- NAME
91 -- given a customer and product, check if a budget is qualified
92 -- PURPOSE
93 --
94 -- History
95 -- Created yzhao 02/06/2004
96 ----------------------------------------------------------------
97 PROCEDURE check_budget_qualification(
98 p_budget_id IN NUMBER
99 , p_cust_account_id IN NUMBER := NULL
100 , p_product_item_id IN NUMBER := NULL
101 , x_qualify_flag OUT NOCOPY BOOLEAN
102 , x_return_status OUT NOCOPY VARCHAR2
103 , x_msg_count OUT NOCOPY NUMBER
104 , x_msg_data OUT NOCOPY VARCHAR2
105 );
106
107
108 -------------------------------------------------------------------
109 -- NAME
110 -- validate_object_budget
111 -- PURPOSE
112 -- this API will be called by the Workflow API for each budget line to
113 -- validate whether a budget is qualified to fund an offer in terms of
114 -- market and product eligibility
115 -- History
116 -- Created yzhao 01/22/2002
117 -- Modified kdass 22-Aug-2003 modified for 11.5.10 Offer Budget Validation
118 ----------------------------------------------------------------
119 PROCEDURE validate_object_budget (
120 p_object_id IN NUMBER,
121 p_object_type IN VARCHAR2,
122 p_actbudget_id IN NUMBER,
123 x_return_status OUT NOCOPY VARCHAR2,
124 x_msg_count OUT NOCOPY NUMBER,
125 x_msg_data OUT NOCOPY VARCHAR2);
126
127 -----------------------------------------------------------------
128 -- NAME
129 -- validate_object_budget_all
130 -- PURPOSE
131 -- this API will be called by the Workflow API after all the budget line
132 -- approvals are done. it will validate the offer's market and product
133 -- eligibility in terms of all budget lines
134 -- History
135 -- Created kdass 22-Aug-2003 11.5.10 Offer Budget Validation
136 ----------------------------------------------------------------
137 PROCEDURE validate_object_budget_all (
138 p_object_id IN NUMBER,
139 p_object_type IN VARCHAR2,
140 x_return_status OUT NOCOPY VARCHAR2,
141 x_msg_count OUT NOCOPY NUMBER,
142 x_msg_data OUT NOCOPY VARCHAR2);
143
144 -------------------------------------------------------------------
145 -- NAME
146 -- concurrent program for budget-object eligibility validation
147 -- PURPOSE
148 -- Validate whether a budget is qualified to fund an object(offer only for now)
149 -- in terms of market and product eligibility
150 -- if validation succeeds, budget request is set to APPROVED
151 -- otherwise, budget request is reverted to NEW.
152 -- if it is called for offer activation, offer status is updated based on validation result
153 -- This process is kicked off when object's budget approval is not required
154 -- but budget-object validation is needed
155 -- History
156 -- Created yzhao 07/11/2002
157 ----------------------------------------------------------------
158 PROCEDURE conc_validate_offer_budget (
159 x_errbuf OUT NOCOPY VARCHAR2,
160 x_retcode OUT NOCOPY NUMBER,
161 p_object_id IN NUMBER,
162 p_object_type IN VARCHAR2,
163 p_actbudget_id IN NUMBER DEFAULT NULL
164 );
165
166 -------------------------------------------------------------------
167 -- NAME
168 -- budget_request_approval
169 -- PURPOSE
170 -- called by each activity update api to approval budget request
171 -- when budget request approval is not required.
172 -- History
173 -- Created feliu 07/11/2002
174 ----------------------------------------------------------------
175
176 PROCEDURE budget_request_approval(
177 p_init_msg_list IN VARCHAR2,
178 p_api_version IN NUMBER,
179 p_commit IN VARCHAR2,
180 x_return_status OUT NOCOPY VARCHAR2,
181 x_msg_count OUT NOCOPY NUMBER,
182 x_msg_data OUT NOCOPY VARCHAR2,
183 p_object_type IN VARCHAR2,
184 p_object_id NUMBER,
185 x_status_code OUT NOCOPY VARCHAR2
186 );
187
188 -------------------------------------------------------------------
189 -- NAME
190 -- budget_request_approval
191 -- PURPOSE
192 -- called by each activity update api to approval budget request
193 -- when budget request approval is not required.
194 -- called by objects except offer.
195 -- History
196 -- Created feliu 07/11/2002
197 ----------------------------------------------------------------
198
199 PROCEDURE budget_request_approval(
200 p_init_msg_list IN VARCHAR2,
201 p_api_version IN NUMBER,
202 p_commit IN VARCHAR2,
203 x_return_status OUT NOCOPY VARCHAR2,
204 x_msg_count OUT NOCOPY NUMBER,
205 x_msg_data OUT NOCOPY VARCHAR2,
206 p_object_type IN VARCHAR2,
207 p_object_id NUMBER
208 );
209
210 END OZF_BudgetApproval_PVT;