DBA Data[Home] [Help]

PACKAGE: APPS.BIS_MEASURE_PVT

Source


1 PACKAGE BIS_MEASURE_PVT AS
2 /* $Header: BISVMEAS.pls 120.0 2005/06/01 16:19:49 appldev noship $ */
3 --
4 /*
5 REM +=======================================================================+
6 REM |    Copyright (c) 1998 Oracle Corporation, Redwood Shores, CA, USA     |
7 REM |                         All rights reserved.                          |
8 REM +=======================================================================+
9 REM | FILENAME                                                              |
10 REM |     BISVMEAS.pls                                                      |
11 REM |                                                                       |
12 REM | DESCRIPTION                                                           |
13 REM |     Public API for creating and managing Performance Measurements
14 REM |
15 REM | NOTES                                                                 |
16 REM |                                                                       |
17 REM | HISTORY                                                               |
18 REM | 28-NOV-98 irchen Creation
19 REM | 16-JAN-2002 rchandra added new procedure for updating ownership of the given performance measure
20 REM | 30-JAN-03 sugopal FND_API.G_MISS_xxx should not be used in            |
21 REM |                   initialization or declaration (bug#2774644)         |
22 REM | 25-SEP-2003 mdamle Bug#3160325 - Sync up measures for all installed   |
23 REM |                    languages                      |
24 REM | 29-SEP-2003 adrao  Bug#3160325 - Sync up measures for all installed   |
25 REM |                    source languages                                   |
26 REM | 12-NOV-2003 smargand  Added new function to determine whether the     |
27 REM |                       given indicator is customized                   |
28 REM | 27-JUL-2004 sawu   Modified create/update applicaiton measure and     |
29 REM |                    indicator dimensions api to take p_owner           |
30 REM | 22-APR-2005 akoduri   Enhancement#3865711 -- Obsolete Seeded Objects  |
31 REM | 16-MAY-2005 jxyu   Expose Function Get_Measure_Id_From_Short_Name     |
32 REM +=======================================================================+
33 */
34 --
35 --
36 -- creates one Measure, with the dimensions sequenced in the order
37 -- they are passed in
38 --- redundant because of defaults in next overloaded signature
39 --  Procedure Create_Measure
40 --( p_api_version      IN  NUMBER
41 --, p_commit           IN  VARCHAR2   := FND_API.G_FALSE
42 --, p_validation_level IN  NUMBER := FND_API.G_VALID_LEVEL_FULL
43 --, p_Measure_Rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
44 --, x_return_status    OUT NOCOPY VARCHAR2
45 --, x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
46 --);
47 ----
48 ---- creates one Measure for the given owner,
49 -- with the dimensions sequenced in the order they are passed in
50 Procedure Create_Measure
51 ( p_api_version      IN  NUMBER
52 , p_commit           IN  VARCHAR2   := FND_API.G_FALSE
53 , p_validation_level IN  NUMBER := FND_API.G_VALID_LEVEL_FULL
54 , p_Measure_Rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
55 , p_owner            IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
56 , x_return_status    OUT NOCOPY VARCHAR2
57 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
58 );
59 --
60 --
61 --Overload Create_Measure so that old data model ldts can be uploaded using
62 --The latest lct file. The lct file can call Load_Measure which calls this
63 --by passing in Org and Time dimension short_names also
64 Procedure Create_Measure
65 ( p_api_version       IN  NUMBER
66 , p_commit            IN  VARCHAR2   := FND_API.G_FALSE
67 , p_validation_level  IN  NUMBER := FND_API.G_VALID_LEVEL_FULL
68 , p_Measure_Rec       IN  BIS_MEASURE_PUB.Measure_Rec_Type
69 , p_owner             IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
70 , p_Org_Dimension_ID  IN  NUMBER
71 , p_Time_Dimension_ID IN  NUMBER
72 , x_return_status     OUT NOCOPY VARCHAR2
73 , x_error_Tbl         OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
74 );
75 --
76 -- Gets All Performance Measures
77 -- If information about the dimensions are not required, set all_info to
78 -- FALSE
79 Procedure Retrieve_Measures
80 ( p_api_version   IN  NUMBER
81 , p_all_info      IN  VARCHAR2   := FND_API.G_TRUE
82 , x_Measure_tbl   OUT NOCOPY BIS_MEASURE_PUB.Measure_Tbl_Type
83 , x_return_status OUT NOCOPY VARCHAR2
84 , x_error_Tbl     OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
85 );
86 --
87 --
88 -- Gets Information for One Performance Measure
89 -- If information about the dimension are not required, set all_info to FALSE.
90 Procedure Retrieve_Measure
91 ( p_api_version   IN  NUMBER
92 , p_Measure_Rec   IN  BIS_MEASURE_PUB.Measure_Rec_Type
93 , p_all_info      IN  VARCHAR2   := FND_API.G_TRUE
94 , x_Measure_Rec   IN OUT NOCOPY BIS_MEASURE_PUB.Measure_Rec_Type
95 , x_return_status OUT NOCOPY VARCHAR2
96 , x_error_Tbl     OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
97 );
98 --
99 --
100 -- PLEASE VERIFY COMMENT BELOW
101 -- Update_Measures one Measure if
102 --   1) no Measure levels or targets exist
103 --   2) no users have selected to see actuals for the Measure
104 Procedure Update_Measure
105 ( p_api_version      IN  NUMBER
106 , p_commit           IN  VARCHAR2   := FND_API.G_FALSE
107 , p_validation_level IN  NUMBER := FND_API.G_VALID_LEVEL_FULL
108 , p_Measure_Rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
109 , x_return_status    OUT NOCOPY VARCHAR2
110 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
111 );
112 --
113 -- Update_Measures one Measure for the give owner if
114 --   1) no Measure levels or targets exist
115 --   2) no users have selected to see actuals for the Measure
116 Procedure Update_Measure
117 ( p_api_version      IN  NUMBER
118 , p_commit           IN  VARCHAR2   := FND_API.G_FALSE
119 , p_validation_level IN  NUMBER := FND_API.G_VALID_LEVEL_FULL
120 , p_Measure_Rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
121 , p_owner            IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
122 , x_return_status    OUT NOCOPY VARCHAR2
123 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
124 );
125 --
126 --
127 --Overload Update_Measure so that old data model ldts can be uploaded using
128 --The latest lct file. The lct file can call Load_Measure which calls this
129 --by passing in Org and Time dimension short_names also
130 Procedure Update_Measure
131 ( p_api_version       IN  NUMBER
132 , p_commit            IN  VARCHAR2   := FND_API.G_FALSE
133 , p_validation_level  IN  NUMBER := FND_API.G_VALID_LEVEL_FULL
134 , p_Measure_Rec       IN  BIS_MEASURE_PUB.Measure_Rec_Type
135 , p_owner             IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
136 , p_Org_Dimension_ID  IN  NUMBER
137 , p_Time_Dimension_ID IN  NUMBER
138 , x_return_status     OUT NOCOPY VARCHAR2
139 , x_error_Tbl         OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
140 );
141 --
142 --
143 -- PLEASE VERIFY COMMENT BELOW
144 -- deletes one Measure if
145 -- 1) no Measure levels, targets exist and
146 -- 2) the Measure access has not been granted to a resonsibility
147 -- 3) no users have selected to see actuals for the Measure
148 Procedure Delete_Measure
149 ( p_api_version   IN  NUMBER
150 , p_commit        IN  VARCHAR2   := FND_API.G_FALSE
151 , p_Measure_Rec   IN  BIS_MEASURE_PUB.Measure_Rec_Type
152 , x_return_status OUT NOCOPY VARCHAR2
153 , x_error_Tbl     OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
154 );
155 --
156 --
157 Procedure Translate_Measure
158 ( p_api_version       IN  NUMBER
159 , p_commit            IN  VARCHAR2   := FND_API.G_FALSE
160 , p_validation_level  IN  NUMBER := FND_API.G_VALID_LEVEL_FULL
161 , p_Measure_Rec       IN  BIS_MEASURE_PUB.Measure_Rec_Type
162 , x_return_status     OUT NOCOPY VARCHAR2
163 , x_error_Tbl         OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
164 );
165 --
166 Procedure Translate_Measure
167 ( p_api_version       IN  NUMBER
168 , p_commit            IN  VARCHAR2 := FND_API.G_FALSE
169 , p_validation_level  IN  NUMBER   := FND_API.G_VALID_LEVEL_FULL
170 , p_Measure_Rec       IN  BIS_MEASURE_PUB.Measure_Rec_Type
171 , p_owner             IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
172 , x_return_status     OUT NOCOPY VARCHAR2
173 , x_error_Tbl         OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
174 );
175 --
176 -- Validates measure
177 PROCEDURE Validate_Measure
178 ( p_api_version      IN  NUMBER
179 , p_validation_level IN  NUMBER := FND_API.G_VALID_LEVEL_FULL
180 , p_Measure_Rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
181 , p_owner            IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
182 , x_return_status    OUT NOCOPY VARCHAR2
183 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
184 );
185 --
186 -- Value - ID conversion
187 PROCEDURE Value_ID_Conversion
188 ( p_api_version     IN  NUMBER
189 , p_Measure_Rec IN  BIS_Measure_PUB.Measure_Rec_Type
190 , x_Measure_Rec IN OUT NOCOPY BIS_Measure_PUB.Measure_Rec_Type
191 , x_return_status   OUT NOCOPY VARCHAR2
192 , x_error_Tbl       OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
193 );
194 --
195 PROCEDURE Value_ID_Conversion
196 ( p_api_version        IN  NUMBER
197 , p_Measure_Short_Name IN  VARCHAR2
198 , p_Measure_Name       IN  VARCHAR2
199 , x_Measure_ID         OUT NOCOPY NUMBER
200 , x_return_status      OUT NOCOPY VARCHAR2
201 , x_error_Tbl          OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
202 );
203 --
204 PROCEDURE Measure_Value_ID_Conversion
205 ( p_api_version     IN  NUMBER
206 , p_Measure_Rec IN  BIS_Measure_PUB.Measure_Rec_Type
207 , x_Measure_Rec OUT NOCOPY BIS_Measure_PUB.Measure_Rec_Type
208 , x_return_status   OUT NOCOPY VARCHAR2
209 , x_error_Tbl       OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
210 );
211 --
212 PROCEDURE Dimension_Value_ID_Conversion
213 ( p_api_version     IN  NUMBER
214 , p_Measure_Rec IN  BIS_Measure_PUB.Measure_Rec_Type
215 , x_Measure_Rec IN OUT NOCOPY BIS_Measure_PUB.Measure_Rec_Type
216 , x_return_status   OUT NOCOPY VARCHAR2
217 , x_error_Tbl       OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
218 );
219 --
220 Procedure Retrieve_Measure_Dimensions
221 ( p_api_version   IN  NUMBER
222 , p_Measure_Rec   IN  BIS_MEASURE_PUB.Measure_Rec_Type
223 , x_dimension_Tbl OUT NOCOPY BIS_DIMENSION_PUB.Dimension_Tbl_Type
224 , x_return_status OUT NOCOPY VARCHAR2
225 , x_error_Tbl     OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
226 );
227 --
228 PROCEDURE Lock_Record
229 ( p_api_version   IN  NUMBER
230 , p_Measure_Rec   IN  BIS_Measure_PUB.Measure_Rec_Type
231 , p_timestamp     IN  VARCHAR  := NULL
232 , x_return_status OUT NOCOPY VARCHAR2
233 , x_error_Tbl     OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
234 );
235 --
236 PROCEDURE Retrieve_Last_Update_Date
237 ( p_api_version      IN  NUMBER
238 , p_Measure_Rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
239 , x_last_update_date OUT NOCOPY DATE
240 , x_return_status    OUT NOCOPY VARCHAR2
241 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
242 );
243 --
244 -- creates one Measure, with the dimensions sequenced in the order
245 PROCEDURE Create_Application_Measure
246 ( p_api_version             IN  NUMBER
247 , p_commit                  IN  VARCHAR2   := FND_API.G_FALSE
248 , p_Measure_rec             IN  BIS_MEASURE_PUB.Measure_Rec_Type
249 , p_application_rec         IN  BIS_Application_PVT.Application_Rec_Type
250 , p_owning_application      IN  VARCHAR2
251 , p_owner                   IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
252 , x_return_status           OUT NOCOPY VARCHAR2
253 , x_error_Tbl               OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
254 );
255 --
256 --
257 PROCEDURE Retrieve_Application_Measures
258 ( p_api_version     IN  NUMBER
259 , p_Measure_Rec     IN  BIS_Measure_PUB.Measure_Rec_Type
260 , p_all_info        IN  VARCHAR2
261 , x_owning_application_rec  OUT NOCOPY BIS_Application_PVT.Application_Rec_Type
262 , x_Application_tbl OUT NOCOPY BIS_Application_PVT.Application_Tbl_Type
263 , x_return_status   OUT NOCOPY VARCHAR2
264 , x_error_Tbl       OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
265 );
266 --
267 --
268 PROCEDURE Update_Application_Measure
269 ( p_api_version      IN  NUMBER
270 , p_commit           IN  VARCHAR2   := FND_API.G_FALSE
271 , p_Measure_rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
272 , p_application_rec  IN  BIS_Application_PVT.Application_Rec_Type
273 , p_owning_application      IN  VARCHAR2
274 , p_owner             IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
275 , x_return_status    OUT NOCOPY VARCHAR2
276 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
277 );
278 --
279 --
280 PROCEDURE Delete_Application_Measure
281 ( p_api_version      IN  NUMBER
282 , p_commit           IN  VARCHAR2   := FND_API.G_FALSE
283 , p_Measure_rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
284 , p_application_rec  IN  BIS_Application_PVT.Application_Rec_Type
285 , x_return_status    OUT NOCOPY VARCHAR2
286 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
287 );
288 --
289 PROCEDURE Delete_Application_Measures
290 ( p_api_version      IN  NUMBER
291 , p_commit           IN  VARCHAR2   := FND_API.G_FALSE
292 , p_Measure_rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
293 , x_return_status    OUT NOCOPY VARCHAR2
294 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
295 );
296 --
297 PROCEDURE Lock_Record
298 ( p_api_version      IN  NUMBER
299 , p_Measure_rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
300 , p_application_rec  IN  BIS_Application_PVT.Application_Rec_Type
301 , p_timestamp        IN  VARCHAR  := NULL
302 , x_return_status    OUT NOCOPY VARCHAR2
303 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
304 );
305 --
306 PROCEDURE Retrieve_Last_Update_Date
307 ( p_api_version      IN  NUMBER
308 , p_Measure_rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
309 , p_application_rec  IN  BIS_Application_PVT.Application_Rec_Type
310 , x_last_update_date OUT NOCOPY DATE
311 , x_return_status    OUT NOCOPY VARCHAR2
312 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
313 );
314 --
315 Procedure Create_Indicator_Dimension
316 ( p_Measure_id    number
317 , p_dimension_id  number
318 , p_sequence_no   number
319 , p_owner         IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER --2465354
320 , x_return_status OUT NOCOPY VARCHAR2
321 , x_error_Tbl     OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
322 );
323 --
324 PROCEDURE Create_Indicator_Dimensions
325 ( p_Measure_Rec      IN  BIS_MEASURE_PUB.Measure_Rec_Type
326 , p_owner            IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
327 , x_return_status    OUT NOCOPY VARCHAR2
328 , x_error_Tbl        OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
329 );
330 --
331 --Overload Create_Indicator_Dimensions so that old data model ldts can be uploaded using
332 --The latest lct file. The lct file can indirectly call this overloaded procedure
333 --by passing in Org and Time  also
334 PROCEDURE Create_Indicator_Dimensions
335 ( p_Measure_Rec       IN  BIS_MEASURE_PUB.Measure_Rec_Type
336 , p_Org_Dimension_ID  IN   NUMBER := BIS_UTILITIES_PUB.G_NULL_NUM
337 , p_Time_Dimension_ID IN   NUMBER := BIS_UTILITIES_PUB.G_NULL_NUM
338 , p_owner             IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
339 , x_return_status     OUT NOCOPY VARCHAR2
340 , x_error_Tbl         OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
341 );
342 
343 --added new function to determine whether the data model is new or old while loading measures
344 FUNCTION IS_OLD_DATA_MODEL
345 (p_Measure_rec    IN BIS_MEASURE_PUB.MEASURE_REC_TYPE
346  ,p_Org_Dimension_Id IN NUMBER
347  ,p_Time_Dimension_Id IN NUMBER
348 )
349 RETURN BOOLEAN;
350 
351 --OverLoad Dimension Count so that when loader tries to update a measure
352 --with an old ldt file, it will not fail
353 FUNCTION Dimension_Count
354 (p_Measure_Rec IN  BIS_MEASURE_PUB.Measure_Rec_Type
355 ,p_Org_Dimension_Id IN NUMBER
356 ,p_Time_Dimension_Id IN NUMBER
357 )
358 return NUMBER;
359 
360 -- Given a performance measure short name update the
361 --  bis_indicators, bis_indicators_tl and  bis_indicator_dimensions
362 -- for last_updated_by , created_by as 1
363 PROCEDURE updt_pm_owner(p_pm_short_name  IN VARCHAR2
364                        ,x_return_status OUT NOCOPY VARCHAR2);
365 
366 -- mdamle 09/25/2003 - Sync up measures for all installed languages
367 Procedure Translate_Measure_by_lang
368 ( p_api_version       IN  NUMBER
369 , p_commit            IN  VARCHAR2 := FND_API.G_FALSE
370 , p_Measure_Rec       IN  BIS_MEASURE_PUB.Measure_Rec_Type
371 , p_owner             IN  VARCHAR2 := BIS_UTILITIES_PUB.G_CUSTOM_OWNER
372 , p_lang              IN  VARCHAR2
373 , p_source_lang       IN  VARCHAR2
374 , x_return_status     OUT NOCOPY VARCHAR2
375 , x_error_Tbl         OUT NOCOPY BIS_UTILITIES_PUB.Error_Tbl_Type
376 );
377 
378 --added new function to determine whether the given indicator is customized
379 
380 FUNCTION GET_CUSTOMIZED_ENABLED
381 ( p_indicator_id IN NUMBER
382 )
383 RETURN VARCHAR2;
384 
385 --Procedure to update the obsolete flag of an indicator
386 PROCEDURE Update_Measure_Obsolete_Flag(
387    p_commit                      IN VARCHAR2 := FND_API.G_FALSE,
388    p_measure_short_name          IN VARCHAR2,
389    p_obsolete                    IN VARCHAR2,
390    x_return_status               OUT nocopy VARCHAR2,
391    x_Msg_Count                   OUT NOCOPY NUMBER,
392    x_msg_data                    OUT nocopy VARCHAR2
393 );
394 
395 FUNCTION Get_Measure_Id_From_Short_Name
396 ( p_measure_rec IN  BIS_MEASURE_PUB.Measure_Rec_Type
397 ) RETURN NUMBER;
398 
399 END BIS_MEASURE_PVT;
400 
401