[Home] [Help]
PACKAGE: APPS.OZF_ACTMETRICFACT_PVT
Source
1 PACKAGE Ozf_Actmetricfact_Pvt AS
2 /* $Header: ozfvamfs.pls 120.1 2005/08/12 18:36:54 appldev ship $ */
3
4 --
5 -- Start of comments.
6 --
7 -- NAME
8 -- Ozf_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 -- Validate_ActMetricFact
18 --
19 -- NOTES
20 --
21 --
22 -- HISTORY
23 -- 18/Apr/2000 tdonohoe Created.
24 --
25 -- Start OZF_ACT_METRIC_FACTS_ALL
26 --
27
28 TYPE act_metric_fact_rec_type
29 IS RECORD ( activity_metric_fact_id number,
30 last_update_date date,
31 last_updated_by number,
32 creation_date date,
33 created_by number,
34 last_update_login number,
35 object_version_number number,
36 act_metric_used_by_id number,
37 arc_act_metric_used_by varchar2(30),
38 value_type varchar2(30),
39 activity_metric_id number,
40 activity_geo_area_id number,
41 activity_product_id number,
42 transaction_currency_code varchar2(15),
43 trans_forecasted_value number,
44 base_quantity number,
45 functional_currency_code varchar2(15),
46 func_forecasted_value number,
47 org_id number,
48 de_metric_id number,
49 de_geographic_area_id number,
50 de_geographic_area_type varchar2(30),
51 de_inventory_item_id number,
52 de_inventory_item_org_id number,
53 time_id1 number,
54 time_id2 number,
55 time_id3 number,
56 time_id4 number,
57 time_id5 number,
58 time_id6 number,
59 time_id7 number,
60 time_id8 number,
61 time_id9 number,
62 time_id10 number,
63 time_id11 number,
64 time_id12 number,
65 time_id13 number,
66 time_id14 number,
67 time_id15 number,
68 time_id16 number,
69 time_id17 number,
70 time_id18 number,
71 time_id19 number,
72 time_id20 number,
73 time_id21 number,
74 time_id22 number,
75 time_id23 number,
76 time_id24 number,
77 time_id25 number,
78 time_id26 number,
79 time_id27 number,
80 time_id28 number,
81 time_id29 number,
82 time_id30 number,
83 time_id31 number,
84 time_id32 number,
85 time_id33 number,
86 time_id34 number,
87 time_id35 number,
88 time_id36 number,
89 time_id37 number,
90 time_id38 number,
91 time_id39 number,
92 time_id40 number,
93 time_id41 number,
94 time_id42 number,
95 time_id43 number,
96 time_id44 number,
97 time_id45 number,
98 time_id46 number,
99 time_id47 number,
100 time_id48 number,
101 time_id49 number,
102 time_id50 number,
103 time_id51 number,
104 time_id52 number,
105 time_id53 number,
106 hierarchy_id number,
107 node_id number,
108 level_depth number,
109 formula_id number,
110 from_date date,
111 to_date date,
112 fact_value number,
113 fact_percent number,
114 root_fact_id number,
115 previous_fact_id number,
116 fact_type varchar2(30),
117 fact_reference varchar2(240),
118 forward_buy_quantity number,
119 /* 05/21/2002 yzhao: add 10 new columns for top-down bottom-up budgeting */
120 status_code VARCHAR2(30),
121 hierarchy_type VARCHAR2(30),
122 approval_date DATE,
123 recommend_total_amount NUMBER,
124 recommend_hb_amount NUMBER,
125 request_total_amount NUMBER,
126 request_hb_amount NUMBER,
127 actual_total_amount NUMBER,
128 actual_hb_amount NUMBER,
129 base_total_pct NUMBER,
130 base_hb_pct NUMBER,
131 /* 05/21/2002 yzhao: add ends */
132 /* 08/12/2005 mkothari: added 4 new columns for forecasting with 3rd party baseline sales */
133 baseline_sales NUMBER,
134 tpr_percent NUMBER,
135 lift_factor NUMBER,
136 incremental_sales NUMBER
137 /* 08/12/2005 mkothari: add ends */
138 );
139 --
140 -- End OZF_ACT_METRIC_FACTS_ALL
141 --
142 --
143 -- End of comments.
144
145
146 -- Start of comments
147 -- API Name Init_ActMetricFact_Rec
148 -- Type Private
149 -- Function This Process initialize Activity Metric Fact record
150 -- Parameters
151 -- OUT NOCOPY x_fact_rec OUT NOCOPY act_metric_rec_fact_type
152 -- History
153 -- 05/30/2002 created by Ying Zhao
154 -- End of comments
155
156 PROCEDURE Init_ActMetricFact_Rec(
157 x_fact_rec OUT NOCOPY act_metric_fact_rec_type
158 );
159
160
161 -- Start of comments
162 -- API Name Create_ActMetricFact
163 -- Type Private
164 -- Pre-reqs None.
165 -- Function Creates a Result associated with an Activity Metric.
166 -- If The Metric is associated with a Hierarchy then the
167 -- Node is also recorded.
168 -- Parameters
169 -- IN p_api_version IN NUMBER Required
170 -- p_init_msg_list IN VARCHAR2 Optional
171 -- Default := FND_API.G_FALSE
172 -- p_commit IN VARCHAR2 Optional
173 -- Default := FND_API.G_FALSE
174 -- p_validation_level IN NUMBER Optional
175 -- Default := FND_API.G_VALID_LEVEL_FULL
176 -- p_act_metric_fact_rec IN act_metric_fact_rec_type Required
177 -- OUT NOCOPY x_return_status OUT NOCOPY VARCHAR2
178 -- x_msg_count OUT NOCOPY NUMBER
179 -- x_msg_data OUT NOCOPY VARCHAR2
180 -- Version Current version: 1.0
181 -- Previous version: 1.0
182 -- Initial version: 1.0
183 -- End of comments
184
185
186 PROCEDURE Create_ActMetricFact (
187 p_api_version IN NUMBER,
188 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
189 p_commit IN VARCHAR2 := FND_API.G_FALSE,
190 p_validation_level IN NUMBER := FND_API.G_Valid_Level_Full,
191
192 x_return_status OUT NOCOPY VARCHAR2,
193 x_msg_count OUT NOCOPY NUMBER,
194 x_msg_data OUT NOCOPY VARCHAR2,
195
196 p_act_metric_fact_rec IN act_metric_fact_rec_type,
197 x_activity_metric_fact_id OUT NOCOPY NUMBER
198 );
199
200
201
202 -- Start of comments
203 -- API Name Update_ActMetricFact
204 -- Type Private
205 -- Pre-reqs None.
206 -- Function Updates the Result associated with a Node for
207 -- The Activity Metric.
208 -- Parameters
209 -- IN p_api_version IN NUMBER Required
210 -- p_init_msg_list IN VARCHAR2 Optional
211 -- Default := FND_API.G_FALSE
212 -- p_commit IN VARCHAR2 Optional
213 -- Default := FND_API.G_FALSE
214 -- p_validation_level IN NUMBER Optional
215 -- Default := FND_API.G_VALID_LEVEL_FULL
216 -- p_act_metric_fact_rec IN act_metric_fact_rec_type Required
217 -- OUT NOCOPY x_return_status OUT NOCOPY VARCHAR2
218 -- x_msg_count OUT NOCOPY NUMBER
219 -- x_msg_data OUT NOCOPY VARCHAR2
220 -- Version Current version: 1.0
221 -- Previous version: 1.0
222 -- Initial version: 1.0
223 -- End of comments
224
225 PROCEDURE Update_ActMetricFact (
226 p_api_version IN NUMBER,
227 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
228 p_commit IN VARCHAR2 := FND_API.G_FALSE,
229 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
230
231 x_return_status OUT NOCOPY VARCHAR2,
232 x_msg_count OUT NOCOPY NUMBER,
233 x_msg_data OUT NOCOPY VARCHAR2,
234
235 p_act_metric_fact_rec IN act_metric_fact_rec_type
236 );
237
238 -- Start of comments
239 -- API Name Validate_ActMetFact
240 -- Type Private
241 -- Pre-reqs None.
242 -- Function Validate items in metric fact table associated with
243 -- an Activity Metric.
244 -- Parameters
245 -- IN p_api_version IN NUMBER Required
246 -- p_init_msg_list IN VARCHAR2 Optional
247 -- Default := FND_API.G_FALSE
248 -- p_commit IN VARCHAR2 Optional
249 -- Default := FND_API.G_FALSE
250 -- p_validation_level IN NUMBER Optional
251 -- Default := FND_API.G_VALID_LEVEL_FULL
252 -- p_act_metric_fact_rec IN act_metric_fact_rec_type Required
253 -- OUT NOCOPY x_return_status OUT NOCOPY VARCHAR2
254 -- x_msg_count OUT NOCOPY NUMBER
255 -- x_msg_data OUT NOCOPY VARCHAR2
256 -- Version Current version: 1.0
257 -- Previous version: 1.0
258 -- Initial version: 1.0
259 -- End of comments
260
261
262 PROCEDURE Validate_ActMetFact (
263 p_api_version IN NUMBER,
264 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
265 p_validation_level IN NUMBER := FND_API.G_Valid_Level_Full,
266
267 x_return_status OUT NOCOPY VARCHAR2,
268 x_msg_count OUT NOCOPY NUMBER,
269 x_msg_data OUT NOCOPY VARCHAR2,
270
271 p_act_metric_fact_rec IN act_metric_fact_rec_type
272 );
273
274
275 -- Start of comments
276 -- API Name Validate_ActMetFact_Items
277 -- Type Private
278 -- Pre-reqs None.
279 -- Function Validate Activity Metric Fact Items
280 -- Parameters
281 -- IN p_act_metric_fact_rec IN act_metric_fact_rec_type Required
282 -- p_validate_mode IN VARCHAR2
283 -- OUT NOCOPY x_return_status OUT NOCOPY VARCHAR2
284 -- Version Current version: 1.0
285 -- Previous version: 1.0
286 -- Initial version: 1.0
287 -- End of comments
288
289 PROCEDURE Validate_ActMetFact_items(
290 p_act_metric_fact_rec IN act_metric_fact_rec_type,
291 p_validation_mode IN VARCHAR2 := JTF_PLSQL_API.g_create,
292 x_return_status OUT NOCOPY VARCHAR2
293 ) ;
294
295 -- Start of comments
296 -- API Name Validate_ActMetFact_Rec
297 -- Type Private
298 -- Pre-reqs None.
299 -- Function Validate Activity Metric Fact Records
300 -- Parameters
301 -- IN p_act_metric_fact_rec IN act_metric_fact_rec_type Required
302 -- p_complete_fact_rec IN act_metric_fact_rec_type Required
303 -- OUT NOCOPY x_return_status OUT NOCOPY VARCHAR2
304 -- Version Current version: 1.0
305 -- Previous version: 1.0
306 -- Initial version: 1.0
307 -- End of comments
308
309 PROCEDURE Validate_ActMetFact_Rec(
310 p_act_metric_fact_rec IN act_metric_fact_rec_type,
311 p_complete_fact_rec IN act_metric_fact_rec_type,
312 x_return_status OUT NOCOPY VARCHAR2
313 ) ;
314
315
316 -- Start of comments
317 -- API Name Complete_ActMetFact_Rec
318 -- Type Private
319 -- Pre-reqs None.
320 -- Function This Process returns the details for the Activity Metric Fact
321 --
322 -- Parameters
323 -- IN p_act_metric_fact_rec IN act_metric_rec_fact_type Required
324 -- OUT NOCOPY x_complete_fact_rec OUT NOCOPY act_metric_rec_fact_type
325 -- Version Current version: 1.0
326 -- Previous version: 1.0
327 -- Initial version: 1.0
328 -- End of comments
329
330 PROCEDURE Complete_ActMetFact_Rec(
331 p_act_metric_fact_rec IN act_metric_fact_rec_type,
332 x_complete_fact_rec OUT NOCOPY act_metric_fact_rec_type
333 );
334
335 TYPE ozf_formula_rec_type
336 IS RECORD ( formula_id number
337 ,activity_metric_id number
338 ,level_depth number
339 ,parent_formula_id number
340 ,last_update_date date
341 ,last_updated_by number
342 ,creation_date date
343 ,created_by number
344 ,last_update_login number
345 ,object_version_number number
346 ,formula_type varchar2(30));
347
348 TYPE ozf_formula_entry_rec_type
349 IS RECORD ( formula_entry_id number
350 ,formula_id number
351 ,order_number number
352 ,formula_entry_type varchar2(30)
353 ,formula_entry_value varchar2(150)
354 ,metric_column_value varchar2(30)
355 ,formula_entry_operator varchar2(30)
356 ,last_update_date date
357 ,last_updated_by number
358 ,creation_date date
359 ,created_by number
360 ,last_update_login number
361 ,object_version_number number);
362
363 ---------------------------------------------------------------------
364 -- Start of comments
365 -- API Name Create_Formula
366 -- Type Private
367 -- Pre-reqs None.
368 -- Function Creates an Activity Metric Formula.
369 -- Parameters
370 -- IN p_api_version IN NUMBER Required
371 -- p_init_msg_list IN VARCHAR2 Optional
372 -- Default := FND_API.G_FALSE
373 -- p_commit IN VARCHAR2 Optional
374 -- Default := FND_API.G_FALSE
375 -- p_validation_level IN NUMBER Optional
376 -- Default := FND_API.G_VALID_LEVEL_FULL
377 -- p_act_forecast_rec IN ozf_formula_rec_type Required
378 -- OUT x_return_status OUT VARCHAR2
379 -- x_msg_count OUT NUMBER
380 -- x_msg_data OUT VARCHAR2
381 -- Version Current version: 1.0
382 -- Previous version: 1.0
383 -- Initial version: 1.0
384 -- End of comments
385 ---------------------------------------------------------------------
386
387 PROCEDURE Create_Formula (
388 p_api_version IN NUMBER,
389 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
390 p_commit IN VARCHAR2 := FND_API.G_FALSE,
391 p_validation_level IN NUMBER := FND_API.G_Valid_Level_Full,
392
393 x_return_status OUT NOCOPY VARCHAR2,
394 x_msg_count OUT NOCOPY NUMBER,
395 x_msg_data OUT NOCOPY VARCHAR2,
396
397 p_formula_rec IN ozf_formula_rec_type,
398 x_formula_id OUT NOCOPY NUMBER
399 );
400
401
402
403 -- Start of comments
404 -- API Name Delete_Formula
405 -- Type Private
406 -- Pre-reqs None.
407 -- Function Deletes the Activity Metric Formula.
408 -- Parameters
409 -- IN p_api_version IN NUMBER Required
410 -- p_init_msg_list IN VARCHAR2 Optional
411 -- Default := FND_API.G_FALSE
412 -- p_commit IN VARCHAR2 Optional
413 -- Default := FND_API.G_FALSE
414 -- p_forecast_id IN NUMBER Required
415 -- p_object_version_number IN NUMBER
416 -- OUT x_return_status OUT VARCHAR2
417 -- x_msg_count OUT NUMBER
418 -- x_msg_data OUT VARCHAR2
419 -- Version Current version: 1.0
420 -- Previous version: 1.0
421 -- Initial version: 1.0
422 -- End of comments
423
424 PROCEDURE Delete_Formula (
425 p_api_version IN NUMBER,
426 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
427 p_commit IN VARCHAR2 := FND_API.G_FALSE,
428
429 x_return_status OUT NOCOPY VARCHAR2,
430 x_msg_count OUT NOCOPY NUMBER,
431 x_msg_data OUT NOCOPY VARCHAR2,
432
433 p_formula_id IN NUMBER ,
434 p_object_version_number IN NUMBER
435 );
436
437
438 -- Start of comments
439 -- API Name Validate_Formula
440 -- Type Private
441 -- Pre-reqs None.
442 -- Function Validate items in the activity metric forecast table.
443
444 -- Parameters
445 -- IN p_api_version IN NUMBER Required
446 -- p_init_msg_list IN VARCHAR2 Optional
447 -- Default := FND_API.G_FALSE
448 -- p_commit IN VARCHAR2 Optional
449 -- Default := FND_API.G_FALSE
450 -- p_validation_level IN NUMBER Optional
451 -- Default := FND_API.G_VALID_LEVEL_FULL
452 -- p_formula_rec IN ozf_formula_rec_type Required
453 -- OUT x_return_status OUT VARCHAR2
454 -- x_msg_count OUT NUMBER
455 -- x_msg_data OUT VARCHAR2
456 -- Version Current version: 1.0
457 -- Previous version: 1.0
458 -- Initial version: 1.0
459 -- End of comments
460
461
462 PROCEDURE Validate_Formula (
463 p_api_version IN NUMBER,
464 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
465 p_validation_level IN NUMBER := FND_API.G_Valid_Level_Full,
466
467 x_return_status OUT NOCOPY VARCHAR2,
468 x_msg_count OUT NOCOPY NUMBER,
469 x_msg_data OUT NOCOPY VARCHAR2,
470
471 p_formula_rec IN ozf_formula_rec_type
472 );
473
474
475 -- Start of comments
476 -- API Name Validate_Formula_Items
477 -- Type Private
478 -- Pre-reqs None.
479 -- Function Validate Activity Metric Formula Items
480 -- Parameters
481 -- IN p_formula_rec IN ozf_formula_rec_type Required
482 -- p_validate_mode IN VARCHAR2
483 -- OUT x_return_status OUT VARCHAR2
484 -- Version Current version: 1.0
485 -- Previous version: 1.0
486 -- Initial version: 1.0
487 -- End of comments
488
489 PROCEDURE Validate_Formula_Items(
490 p_formula_rec IN ozf_formula_rec_type,
491 p_validation_mode IN VARCHAR2 := JTF_PLSQL_API.g_create,
492 x_return_status OUT NOCOPY VARCHAR2
493 ) ;
494
495
496 -- Start of comments
497 -- API Name Validate_Formula_Rec
498 -- Type Private
499 -- Pre-reqs None.
500 -- Function Validate Activity Metric Formula Records
501 -- Parameters
502 -- IN p_formula_rec IN ozf_formula_rec_type Required
503 -- p_complete_formula_rec IN ozf_formula_rec_type Required
504 -- OUT x_return_status OUT VARCHAR2
505 -- Version Current version: 1.0
506 -- Previous version: 1.0
507 -- Initial version: 1.0
508 -- End of comments
509
510 PROCEDURE Validate_Formula_Rec(
511 p_formula_rec IN ozf_formula_rec_type ,
512 p_complete_formula_rec IN ozf_formula_rec_type ,
513 x_return_status OUT NOCOPY VARCHAR2
514 ) ;
515
516
517 ---------------------------------------------------------------------
518 -- Start of comments
519 -- API Name Create_Formula_Entry
520 -- Type Private
521 -- Pre-reqs None.
522 -- Function Creates an Activity Metric Formula_Entry.
523 -- Parameters
524 -- IN p_api_version IN NUMBER Required
525 -- p_init_msg_list IN VARCHAR2 Optional
526 -- Default := FND_API.G_FALSE
527 -- p_commit IN VARCHAR2 Optional
528 -- Default := FND_API.G_FALSE
529 -- p_validation_level IN NUMBER Optional
530 -- Default := FND_API.G_VALID_LEVEL_FULL
531 -- p_formula_entry_rec IN ozf_formula_entry_rec_type Required
532 -- OUT x_return_status OUT VARCHAR2
533 -- x_msg_count OUT NUMBER
534 -- x_msg_data OUT VARCHAR2
535 -- Version Current version: 1.0
536 -- Previous version: 1.0
537 -- Initial version: 1.0
538 -- End of comments
539 ---------------------------------------------------------------------
540
541 PROCEDURE Create_Formula_Entry (
542 p_api_version IN NUMBER,
543 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
544 p_commit IN VARCHAR2 := FND_API.G_FALSE,
545 p_validation_level IN NUMBER := FND_API.G_Valid_Level_Full,
546
547 x_return_status OUT NOCOPY VARCHAR2,
548 x_msg_count OUT NOCOPY NUMBER,
549 x_msg_data OUT NOCOPY VARCHAR2,
550
551 p_formula_entry_rec IN ozf_formula_entry_rec_type,
552 x_formula_entry_id OUT NOCOPY NUMBER
553 );
554
555
556 -- Start of comments
557 -- API Name Validate_formula_entry
558 -- Type Private
559 -- Pre-reqs None.
560 -- Function Validate items in the activity metric forecast table.
561
562 -- Parameters
563 -- IN p_api_version IN NUMBER Required
564 -- p_init_msg_list IN VARCHAR2 Optional
565 -- Default := FND_API.G_FALSE
566 -- p_commit IN VARCHAR2 Optional
567 -- Default := FND_API.G_FALSE
568 -- p_validation_level IN NUMBER Optional
569 -- Default := FND_API.G_VALID_LEVEL_FULL
570 -- p_formula_entry_rec IN ozf_formula_entry_rec_type Required
571 -- OUT x_return_status OUT VARCHAR2
572 -- x_msg_count OUT NUMBER
573 -- x_msg_data OUT VARCHAR2
574 -- Version Current version: 1.0
575 -- Previous version: 1.0
576 -- Initial version: 1.0
577 -- End of comments
578
579
580 PROCEDURE Validate_formula_entry (
581 p_api_version IN NUMBER,
582 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
583 p_validation_level IN NUMBER := FND_API.G_Valid_Level_Full,
584
585 x_return_status OUT NOCOPY VARCHAR2,
586 x_msg_count OUT NOCOPY NUMBER,
587 x_msg_data OUT NOCOPY VARCHAR2,
588
589 p_formula_entry_rec IN ozf_formula_entry_rec_type
590 );
591
592
593 -- Start of comments
594 -- API Name Validate_form_ent_Items
595 -- Type Private
596 -- Pre-reqs None.
597 -- Function Validate Activity Metric formula_entry Items
598 -- Parameters
599 -- IN p_formula_entry_rec IN ozf_formula_entry_rec_type Required
600 -- p_validate_mode IN VARCHAR2
601 -- OUT x_return_status OUT VARCHAR2
602 -- Version Current version: 1.0
603 -- Previous version: 1.0
604 -- Initial version: 1.0
605 -- End of comments
606
607 PROCEDURE Validate_form_ent_Items(
608 p_formula_entry_rec IN ozf_formula_entry_rec_type,
609 p_validation_mode IN VARCHAR2 := JTF_PLSQL_API.g_create,
610 x_return_status OUT NOCOPY VARCHAR2
611 ) ;
612
613
614 -- Start of comments
615 -- API Name Validate_form_ent_Rec
616 -- Type Private
617 -- Pre-reqs None.
618 -- Function Validate Activity Metric formula_entry Records
619 -- Parameters
620 -- IN p_formula_entry_rec IN ozf_formula_entry_rec_type Required
621 -- p_complete_formula_entry_rec IN ozf_formula_entry_rec_type Required
622 -- OUT x_return_status OUT VARCHAR2
623 -- Version Current version: 1.0
624 -- Previous version: 1.0
625 -- Initial version: 1.0
626 -- End of comments
627
628 PROCEDURE Validate_form_ent_Rec(
629 p_formula_entry_rec IN ozf_formula_entry_rec_type ,
630 p_complete_formula_entry_rec IN ozf_formula_entry_rec_type ,
631 x_return_status OUT NOCOPY VARCHAR2
632 ) ;
633
634
635 END Ozf_Actmetricfact_Pvt;