DBA Data[Home] [Help]

PACKAGE: APPS.AMS_ACTMETRICS_ENGINE_PVT

Source


1 PACKAGE AMS_ACTMETRICS_ENGINE_PVT AUTHID CURRENT_USER AS
2 /* $Header: amsvmrns.pls 115.30 2003/11/04 23:59:00 asaha ship $ */
3 
4 --
5 -- Start of comments.
6 --
7 -- NAME
8 --   AMS_ActMetrics_Engine_PVT
9 --
10 -- PURPOSE
11 --   This package contains modules for the concurrent program to refresh
12 --   activity metric values.
13 
14 --
15 --   Procedures:
16 --   Build_Refresh_Act_Metrics
17 --   Check_Create_Rollup_Parents
18 
19 --
20 -- NOTES
21 --
22 --
23 -- HISTORY
24 -- 26/03/2001    huili        Created
25 -- 21-May-2001   huili        Fix bugs for calculation for 11.5.4.07
26 -- 05-June-2001  huili        Add type definition for type
27 --                            "act_met_ref_rec_type"
28 -- 15-Jan-2002   huili        Added the "p_update_history" to the
29 --                            "Refresh_Act_Metrics_Engine" module.
30 -- 22-Aug-2003   dmvincen     Exposed APIs Run_functions, Update_Variable,
31 --                            and Update_formulas.
32 --
33 -- End of comments.
34 --
35 
36 -- Start of comments
37 -- API Name       Run_Functions
38 -- Type           Public
39 -- Pre-reqs       None.
40 -- Function       Calculate metrics for changed values.
41 --
42 -- Parameters
43 --    IN          p_commit := FND_API.G_TRUE
44 --    OUT         x_errbuf             VARCHAR2
45 --                x_retcode            NUMBER
46 -- Version        Current version: 1.0
47 --                Previous version: 1.0
48 --                Initial version: 1.0
49 -- End of comments
50 /*PROCEDURE Run_Functions
51         (x_errbuf   OUT NOCOPY   VARCHAR2,
52          x_retcode  OUT NOCOPY   NUMBER,
53          p_commit   IN      VARCHAR2 := Fnd_Api.G_TRUE
54 );
55 */
56 -- Start of comments
57 -- API Name       Refresh_Act_Metrics_Engine
58 -- Type           Public
59 -- Pre-reqs       None.
60 -- Function       Calculate metrics for changed values.
61 --
62 -- Parameters
63 --    IN          p_commit := FND_API.G_TRUE
64 --                                              p_run_functions := FND_API.G_TRUE
65 --    OUT         x_errbuf             VARCHAR2
66 --                x_retcode            NUMBER
67 -- Version        Current version: 1.0
68 --                Previous version: 1.0
69 --                Initial version: 1.0
70 -- End of comments
71 PROCEDURE Refresh_Act_Metrics_Engine
72           (x_errbuf        OUT NOCOPY    VARCHAR2,
73            x_retcode       OUT NOCOPY    NUMBER,
74            p_commit        IN     VARCHAR2 := Fnd_Api.G_TRUE,
75            p_run_functions IN     VARCHAR2 := Fnd_Api.G_TRUE,
76 			  p_update_history IN    VARCHAR2 := Fnd_Api.G_FALSE
77 );
78 
79 PROCEDURE Refresh_Act_Metrics_Engine
80           (p_api_version           IN     NUMBER,
81            p_init_msg_list         IN     VARCHAR2 := Fnd_Api.G_TRUE,
82            p_commit                IN     VARCHAR2 := Fnd_Api.G_TRUE,
83            x_return_status         IN OUT NOCOPY   VARCHAR2,
84            x_msg_count             IN OUT NOCOPY   NUMBER,
85            x_msg_data              IN OUT NOCOPY   VARCHAR2,
86            p_arc_act_metric_used_by IN varchar2,
87            p_act_metric_used_by_id IN number,
88            p_run_functions         IN     VARCHAR2 := Fnd_Api.G_TRUE,
89            p_update_history        IN    VARCHAR2 := Fnd_Api.G_FALSE
90 );
91 
92 --
93 -- NAME
94 --    Exec_Function
95 --
96 -- PURPOSE
97 --    Executes a given function. Return the value calculated from the
98 --    given function if any.
99 --
100 -- NOTES
101 --    Use Native Dynamic SQL (8i feature) for executing the function.
102 --
103 -- HISTORY
104 -- 07/05/1999     choang            Created.
105 -- 08/29/2001     huili             Added non-parameter call for execution of
106 --                                  stored procedures. Expose to spec.
107 --
108 FUNCTION Exec_Function (
109    p_activity_metric_id       IN NUMBER := NULL,
110    p_function_name            IN VARCHAR2,
111    x_return_status            OUT NOCOPY VARCHAR2,
112    p_arc_act_metric_used_by   IN varchar2 := NULL,
113    p_act_metric_used_by_id    IN number := NULL
114 )RETURN NUMBER;
115 
116 --
117 -- NAME
118 --    Update_history
119 --
120 -- PURPOSE
121 --    Updates AMS_ACT_METRIC_HST table against the current state.
122 --    Exposed for testing only.
123 --
124 -- NOTES
125 --
126 -- HISTORY
127 PROCEDURE Update_history(p_commit IN VARCHAR2);
128 
129 -------------------------------------------------------------------------------
130 -- NAME
131 --    Run_Functions
132 -- PURPOSE
133 --    External API to run all the function with in a single object.
134 -- HISTORY
135 -- 22-Aug_2003 dmvincen Created.
136 -------------------------------------------------------------------------------
137 PROCEDURE Run_Functions (
138    p_api_version                IN  NUMBER,
139    p_init_msg_list              IN  VARCHAR2 := Fnd_Api.G_FALSE,
140    p_commit                     IN  VARCHAR2 := Fnd_Api.G_FALSE,
141 
142    x_return_status              OUT NOCOPY VARCHAR2,
143    x_msg_count                  OUT NOCOPY NUMBER,
144    x_msg_data                   OUT NOCOPY VARCHAR2,
145 
146    p_arc_act_metric_used_by     IN VARCHAR2,
147    p_act_metric_used_by_id      IN NUMBER
148 );
149 
150 -------------------------------------------------------------------------------
151 -- NAME
152 --    Update_Variable
153 -- PURPOSE
154 --    External API to calculate variable metrics with in a single object.
155 -- HISTORY
156 -- 22-Aug_2003 dmvincen Created.
157 -------------------------------------------------------------------------------
158 PROCEDURE Update_Variable (
159    p_api_version                IN  NUMBER,
160    p_init_msg_list              IN  VARCHAR2 := Fnd_Api.G_FALSE,
161    p_commit                     IN  VARCHAR2 := Fnd_Api.G_FALSE,
162 
163    x_return_status              OUT NOCOPY VARCHAR2,
164    x_msg_count                  OUT NOCOPY NUMBER,
165    x_msg_data                   OUT NOCOPY VARCHAR2,
166 
167    p_arc_act_metric_used_by     IN VARCHAR2,
168    p_act_metric_used_by_id      IN NUMBER
169 );
170 
171 -------------------------------------------------------------------------------
172 -- NAME
173 --    Update_formulas
174 -- PURPOSE
175 --    External API to calculate Formula metrics with in a single object.
176 -- HISTORY
177 -- 22-Aug_2003 dmvincen Created.
178 -------------------------------------------------------------------------------
179 PROCEDURE Update_formulas (
180    p_api_version                IN  NUMBER,
181    p_init_msg_list              IN  VARCHAR2 := Fnd_Api.G_FALSE,
182    p_commit                     IN  VARCHAR2 := Fnd_Api.G_FALSE,
183 
184    x_return_status              OUT NOCOPY VARCHAR2,
185    x_msg_count                  OUT NOCOPY NUMBER,
186    x_msg_data                   OUT NOCOPY VARCHAR2,
187 
188    p_arc_act_metric_used_by     IN VARCHAR2,
189    p_act_metric_used_by_id      IN NUMBER
190 );
191 
192 -- For testing not intended for public access.
193 --PROCEDURE test_get_object_list(p_output out nocopy varchar2);
194 
195 --========================================================================
196 -- PROCEDURE
197 --    populate_all
198 -- Purpose
199 --    1. populates metrics all denorm table
200 --    2. refreshes yearly,weekly,monthly and quarterly materialized views
201 -- HISTORY
202 --    15-Oct-2003   asaha    Created.
203 --
204 --========================================================================
205 PROCEDURE populate_metrics_denorm(
206                 errbuf            OUT NOCOPY    VARCHAR2,
207                 retcode           OUT NOCOPY    NUMBER,
208                 p_run_incremental IN     VARCHAR2 := Fnd_Api.G_TRUE
209 );
210 
211 
212 END Ams_Actmetrics_Engine_Pvt;