DBA Data[Home] [Help]

PACKAGE: APPS.OZF_BUDGETAPPROVAL_PVT

Source


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