DBA Data[Home] [Help]

PACKAGE: APPS.AMS_ACTMETRICFACT_PVT

Source


1 PACKAGE Ams_Actmetricfact_Pvt AUTHID CURRENT_USER AS
2 /* $Header: amsvamfs.pls 115.13 2002/11/16 01:09:39 mgudivak ship $ */
3 
4 --
5 -- Start of comments.
6 --
7 -- NAME
8 --   Ams_ActMetricsFact_Pvt
9 --
10 -- PURPOSE
11 --   This package is a private package used for defining constants, records,
12 --   types and procedures for activity metric facts API.
13 --
14 --   Procedures:
15 --   Create_ActMetricFact
16 --   Update_ActMetricFact
17 --   Lock_ActMetricFact
18 --   Delete_ActMetricFact
19 --   Validate_ActMetricFact
20 --
21 -- NOTES
22 --
23 --
24 -- HISTORY
25 -- 18/Apr/2000 tdonohoe  Created.
26 --
27 -- Start AMS_ACT_METRIC_FACTS_ALL
28 --
29 
30 TYPE act_metric_fact_rec_type
31 IS RECORD ( activity_metric_fact_id      number,
32         last_update_date             date,
33         last_updated_by              number,
34         creation_date                date,
35             created_by                   number,
36             last_update_login            number,
37             object_version_number        number,
38             act_metric_used_by_id        number,
39             arc_act_metric_used_by       varchar2(30),
40             value_type                   varchar2(30),
41             activity_metric_id           number,
42             activity_geo_area_id         number,
43             activity_product_id          number,
44             transaction_currency_code    varchar2(15),
45             trans_forecasted_value       number,
46             base_quantity                number,
47             functional_currency_code     varchar2(15),
48             func_forecasted_value        number,
49             org_id                       number,
50             de_metric_id                 number,
51             de_geographic_area_id        number,
52             de_geographic_area_type      varchar2(30),
53             de_inventory_item_id         number,
54             de_inventory_item_org_id     number,
55             time_id1                     number,
56             time_id2                     number,
57             time_id3                     number,
58             time_id4                     number,
59             time_id5                     number,
60             time_id6                     number,
61             time_id7                     number,
62             time_id8                     number,
63             time_id9                     number,
64             time_id10                    number,
65             time_id11                    number,
66             time_id12                    number,
67             time_id13                    number,
68             time_id14                    number,
69             time_id15                    number,
70             time_id16                    number,
71             time_id17                    number,
72             time_id18                    number,
73             time_id19                    number,
74             time_id20                    number,
75             time_id21                    number,
76             time_id22                    number,
77             time_id23                    number,
78             time_id24                    number,
79             time_id25                    number,
80             time_id26                    number,
81             time_id27                    number,
82             time_id28                    number,
83             time_id29                    number,
84             time_id30                    number,
85             time_id31                    number,
86             time_id32                    number,
87             time_id33                    number,
88             time_id34                    number,
89             time_id35                    number,
90             time_id36                    number,
91             time_id37                    number,
92             time_id38                    number,
93             time_id39                    number,
94             time_id40                    number,
95             time_id41                    number,
96             time_id42                    number,
97             time_id43                    number,
98             time_id44                    number,
99             time_id45                    number,
100             time_id46                    number,
101             time_id47                    number,
102             time_id48                    number,
103             time_id49                    number,
104             time_id50                    number,
105             time_id51                    number,
106             time_id52                    number,
107             time_id53                    number,
108             hierarchy_id                 number,
109             node_id                      number,
110             level_depth                  number,
111             formula_id                   number,
112             from_date                    date,
113             to_date                      date,
114             fact_value                   number,
115             fact_percent                 number,
116             root_fact_id                 number,
117             previous_fact_id             number,
118             fact_type                    varchar2(30),
119             fact_reference               varchar2(240),
120 	        forward_buy_quantity         number,
121             /* 05/21/2002 yzhao: add 10 new columns for top-down bottom-up budgeting */
122             status_code                  VARCHAR2(30),
123             hierarchy_type               VARCHAR2(30),
124             approval_date                DATE,
125             recommend_total_amount       NUMBER,
126             recommend_hb_amount          NUMBER,
127             request_total_amount         NUMBER,
128             request_hb_amount            NUMBER,
129             actual_total_amount          NUMBER,
130             actual_hb_amount             NUMBER,
131             base_total_pct               NUMBER,
132             base_hb_pct                  NUMBER
133             /* 05/21/2002 yzhao: add ends */
134             );
135 --
136 -- End AMS_ACT_METRIC_FACTS_ALL
137 --
138 --
139 -- End of comments.
140 
141 
142 -- Start of comments
143 -- API Name       Init_ActMetricFact_Rec
144 -- Type           Private
145 -- Function       This Process initialize Activity Metric Fact record
146 -- Parameters
147 --    OUT NOCOPY         x_fact_rec           OUT NOCOPY act_metric_rec_fact_type
148 -- History
149 --    05/30/2002  created by Ying Zhao
150 -- End of comments
151 
152 PROCEDURE Init_ActMetricFact_Rec(
153    x_fact_rec        OUT NOCOPY act_metric_fact_rec_type
154 );
155 
156 
157 -- Start of comments
158 -- API Name       Create_ActMetricFact
159 -- Type           Private
160 -- Pre-reqs       None.
161 -- Function       Creates a Result associated with an Activity Metric.
162 --                If The Metric is associated with a Hierarchy then the
163 --                Node is also recorded.
164 -- Parameters
165 --    IN          p_api_version               IN NUMBER     Required
166 --                p_init_msg_list             IN VARCHAR2   Optional
167 --                       Default := FND_API.G_FALSE
168 --                p_commit                    IN VARCHAR2   Optional
169 --                       Default := FND_API.G_FALSE
170 --                p_validation_level          IN NUMBER     Optional
171 --                       Default := FND_API.G_VALID_LEVEL_FULL
172 --                p_act_metric_fact_rec       IN act_metric_fact_rec_type  Required
173 --    OUT NOCOPY         x_return_status             OUT NOCOPY VARCHAR2
174 --                x_msg_count                 OUT NOCOPY NUMBER
175 --                x_msg_data                  OUT NOCOPY VARCHAR2
176 -- Version        Current version: 1.0
177 --                Previous version: 1.0
178 --                Initial version: 1.0
179 -- End of comments
180 
181 
182 PROCEDURE Create_ActMetricFact (
183    p_api_version                IN     NUMBER,
184    p_init_msg_list              IN  VARCHAR2 := FND_API.G_FALSE,
185    p_commit                     IN  VARCHAR2 := FND_API.G_FALSE,
186    p_validation_level           IN  NUMBER   := FND_API.G_Valid_Level_Full,
187 
188    x_return_status              OUT NOCOPY VARCHAR2,
189    x_msg_count                  OUT NOCOPY NUMBER,
190    x_msg_data                   OUT NOCOPY VARCHAR2,
191 
192    p_act_metric_fact_rec        IN  act_metric_fact_rec_type,
193    x_activity_metric_fact_id    OUT NOCOPY NUMBER
194 );
195 
196 
197 
198 -- Start of comments
199 -- API Name       Update_ActMetricFact
200 -- Type           Private
201 -- Pre-reqs       None.
202 -- Function       Updates the Result associated with a Node for
203 --                The Activity Metric.
204 -- Parameters
205 --    IN          p_api_version               IN NUMBER     Required
206 --                p_init_msg_list             IN VARCHAR2   Optional
207 --                       Default := FND_API.G_FALSE
208 --                p_commit                    IN VARCHAR2   Optional
209 --                       Default := FND_API.G_FALSE
210 --                p_validation_level          IN NUMBER     Optional
211 --                       Default := FND_API.G_VALID_LEVEL_FULL
212 --                p_act_metric_fact_rec       IN act_metric_fact_rec_type Required
213 --    OUT NOCOPY         x_return_status             OUT NOCOPY VARCHAR2
214 --                x_msg_count                 OUT NOCOPY NUMBER
215 --                x_msg_data                  OUT NOCOPY VARCHAR2
216 -- Version        Current version: 1.0
217 --                Previous version: 1.0
218 --                Initial version: 1.0
219 -- End of comments
220 
221 PROCEDURE Update_ActMetricFact (
222    p_api_version                IN     NUMBER,
223    p_init_msg_list              IN  VARCHAR2 := FND_API.G_FALSE,
224    p_commit                     IN  VARCHAR2 := FND_API.G_FALSE,
225    p_validation_level           IN  NUMBER   := FND_API.G_VALID_LEVEL_FULL,
226 
227    x_return_status              OUT NOCOPY VARCHAR2,
228    x_msg_count                  OUT NOCOPY NUMBER,
229    x_msg_data                   OUT NOCOPY VARCHAR2,
230 
231    p_act_metric_fact_rec        IN     act_metric_fact_rec_type
232 );
233 
234 -- Start of comments
235 -- API Name       Delete_ActMetricFact
236 -- Type           Private
237 -- Pre-reqs       None.
238 -- Function       Deletes the Result associated with a node
239 --                associated with an Activity Metric.
240 -- Parameters
241 --    IN          p_api_version               IN NUMBER     Required
242 --                p_init_msg_list             IN VARCHAR2   Optional
243 --                       Default := FND_API.G_FALSE
244 --                p_commit                    IN VARCHAR2   Optional
245 --                       Default := FND_API.G_FALSE
246 --                p_activity_metric_fact_id   IN NUMBER  Required
247 --                p_object_version_number     IN NUMBER
248 --    OUT NOCOPY         x_return_status             OUT NOCOPY VARCHAR2
249 --                x_msg_count                 OUT NOCOPY NUMBER
250 --                x_msg_data                  OUT NOCOPY VARCHAR2
251 -- Version        Current version: 1.0
252 --                Previous version: 1.0
253 --                Initial version: 1.0
254 -- End of comments
255 
256 PROCEDURE Delete_ActMetricFact (
257    p_api_version              IN  NUMBER,
258    p_init_msg_list            IN  VARCHAR2 := FND_API.G_FALSE,
259    p_commit                   IN  VARCHAR2 := FND_API.G_FALSE,
260 
261    x_return_status            OUT NOCOPY VARCHAR2,
262    x_msg_count                OUT NOCOPY NUMBER,
263    x_msg_data                 OUT NOCOPY VARCHAR2,
264 
265    p_activity_metric_fact_id  IN  NUMBER DEFAULT NULL,
266    p_activity_metric_id       IN  NUMBER DEFAULT NULL,
267    p_object_version_number    IN  NUMBER DEFAULT NULL
268 );
269 
270 -- Start of comments
271 -- API Name       Lock_ActMetricFact
272 -- Type           Private
273 -- Pre-reqs       None.
274 -- Function       Lock the given row in AMS_ACT_METRIC_FACTS_ALL.
275 -- Parameters
276 --    IN          p_api_version             IN NUMBER     Required
277 --                p_init_msg_list           IN VARCHAR2   Optional
278 --                       Default := FND_API.G_FALSE
279 --                p_commit                  IN VARCHAR2   Optional
280 --                       Default := FND_API.G_FALSE
281 --                p_activity_metric_fact_id IN NUMBER  Required
282 --          p_object_version_number   IN NUMBER     Required
283 --    OUT NOCOPY         x_return_status           OUT NOCOPY VARCHAR2
284 --                x_msg_count               OUT NOCOPY NUMBER
285 --                x_msg_data                OUT NOCOPY VARCHAR2
286 -- Version        Current version: 1.0
287 --                Previous version: 1.0
288 --                Initial version: 1.0
289 -- End of comments
290 
291 
292 PROCEDURE Lock_ActMetricFact (
293    p_api_version             IN  NUMBER,
294    p_init_msg_list           IN  VARCHAR2 := FND_API.G_FALSE,
295 
296    x_return_status           OUT NOCOPY VARCHAR2,
297    x_msg_count               OUT NOCOPY NUMBER,
298    x_msg_data                OUT NOCOPY VARCHAR2,
299 
300    p_activity_metric_fact_id IN  NUMBER,
301    p_object_version_number   IN  NUMBER
302 );
303 
304 -- Start of comments
305 -- API Name       Validate_ActMetFact
306 -- Type           Private
307 -- Pre-reqs       None.
308 -- Function       Validate items in metric fact table associated with
309 --                an Activity Metric.
310 -- Parameters
311 --    IN          p_api_version           IN NUMBER     Required
312 --                p_init_msg_list         IN VARCHAR2   Optional
313 --                       Default := FND_API.G_FALSE
314 --                p_commit                IN VARCHAR2   Optional
315 --                       Default := FND_API.G_FALSE
316 --                p_validation_level      IN NUMBER     Optional
317 --                       Default := FND_API.G_VALID_LEVEL_FULL
318 --                p_act_metric_fact_rec   IN act_metric_fact_rec_type  Required
319 --    OUT NOCOPY         x_return_status         OUT NOCOPY VARCHAR2
320 --                x_msg_count             OUT NOCOPY NUMBER
321 --                x_msg_data              OUT NOCOPY VARCHAR2
322 -- Version        Current version: 1.0
323 --                Previous version: 1.0
324 --                Initial version: 1.0
325 -- End of comments
326 
327 
328 PROCEDURE Validate_ActMetFact (
329    p_api_version                IN  NUMBER,
330    p_init_msg_list              IN  VARCHAR2 := FND_API.G_FALSE,
331    p_validation_level           IN  NUMBER   := FND_API.G_Valid_Level_Full,
332 
333    x_return_status              OUT NOCOPY VARCHAR2,
334    x_msg_count                  OUT NOCOPY NUMBER,
335    x_msg_data                   OUT NOCOPY VARCHAR2,
336 
337    p_act_metric_fact_rec        IN  act_metric_fact_rec_type
338 );
339 
340 
341 -- Start of comments
342 -- API Name       Validate_ActMetFact_Items
343 -- Type           Private
344 -- Pre-reqs       None.
345 -- Function       Validate Activity Metric Fact Items
346 -- Parameters
347 --    IN          p_act_metric_fact_rec    IN act_metric_fact_rec_type  Required
348 --                p_validate_mode        IN VARCHAR2
349 --    OUT NOCOPY         x_return_status          OUT NOCOPY VARCHAR2
350 -- Version        Current version: 1.0
351 --                Previous version: 1.0
352 --                Initial version: 1.0
353 -- End of comments
354 
355 PROCEDURE Validate_ActMetFact_items(
356    p_act_metric_fact_rec IN  act_metric_fact_rec_type,
357    p_validation_mode     IN  VARCHAR2 := JTF_PLSQL_API.g_create,
358    x_return_status       OUT NOCOPY VARCHAR2
359 ) ;
360 
361 -- Start of comments
362 -- API Name       Validate_ActMetFact_Rec
363 -- Type           Private
364 -- Pre-reqs       None.
365 -- Function       Validate Activity Metric Fact Records
366 -- Parameters
370 -- Version        Current version:  1.0
367 --    IN          p_act_metric_fact_rec   IN act_metric_fact_rec_type  Required
368 --                p_complete_fact_rec       IN act_metric_fact_rec_type  Required
369 --    OUT NOCOPY         x_return_status         OUT NOCOPY VARCHAR2
371 --                Previous version: 1.0
372 --                Initial version:  1.0
373 -- End of comments
374 
375 PROCEDURE Validate_ActMetFact_Rec(
376    p_act_metric_fact_rec   IN  act_metric_fact_rec_type,
377    p_complete_fact_rec     IN  act_metric_fact_rec_type,
378    x_return_status    OUT NOCOPY VARCHAR2
379 ) ;
380 
381 
382 -- Start of comments
383 -- API Name       Complete_ActMetFact_Rec
384 -- Type           Private
385 -- Pre-reqs       None.
386 -- Function       This Process returns the details for the Activity Metric Fact
387 --
388 -- Parameters
389 --    IN          p_act_metric_fact_rec         IN  act_metric_rec_fact_type  Required
390 --    OUT NOCOPY         x_complete_fact_rec           OUT NOCOPY act_metric_rec_fact_type
391 -- Version        Current version: 1.0
392 --                Previous version: 1.0
393 --                Initial version: 1.0
394 -- End of comments
395 
396 PROCEDURE Complete_ActMetFact_Rec(
397    p_act_metric_fact_rec      IN  act_metric_fact_rec_type,
398    x_complete_fact_rec        OUT NOCOPY act_metric_fact_rec_type
399 );
400 
401 -- Start of comments
402 -- API Name       Validate_FUND_Facts
403 -- Type           Private
404 -- Pre-reqs       None.
405 -- Function       Validate Activity Metric Fact for a act metric used by funds allocation. For each node:
406 --      Sum(this node and its sibling's allocation amount) <= parent allocation amount - holdback amount
407 --      Sum(child allocation amount) <= this node's allocation amount - holdback amount
408 -- Parameters
409 --    IN          p_act_metric_id          IN  NUMBER  Required
410 --    OUT NOCOPY         x_return_status          OUT NOCOPY VARCHAR2
411 -- End of comments
412 
413 PROCEDURE Validate_FUND_Facts(
414    p_api_version                IN  NUMBER,
415    p_init_msg_list              IN  VARCHAR2 := FND_API.G_FALSE,
416    p_validation_level           IN  NUMBER   := FND_API.G_Valid_Level_Full,
420    x_msg_data                   OUT NOCOPY VARCHAR2
417    p_act_metric_id              IN  NUMBER,
418    x_return_status              OUT NOCOPY VARCHAR2,
419    x_msg_count                  OUT NOCOPY NUMBER,
421 ) ;
422 
423 END Ams_Actmetricfact_Pvt;