1 PACKAGE BSC_MIGRATION AS
2 /* $Header: BSCSMIGS.pls 120.13 2007/05/10 07:38:34 amitgupt ship $ */
3
4
5 C_BSC_APP_ID CONSTANT NUMBER := 271;
6
7 -- Global types
8 TYPE r_metadata_table IS RECORD (
9 table_name VARCHAR2(30),
10 level NUMBER, -- 0:System level,
11 -- 1:Tab level,
12 -- 2:KPI level,
13 -- 3:Table Level (Back end)
14 level_column VARCHAR2(30), -- Example. INDICATOR, TAB_ID, etc
15 level_condition VARCHAR2(200), -- Some metadata tables has records for more than one level
16 -- example: Source_type = 1 means Tab level and source_type = 2
17 -- means KPI level. In this property you have the condition
18 -- to identify the level.
19 copy_flag BOOLEAN, -- True: Copy data to target
20 -- False: No copy data to target
21 lang_flag BOOLEAN -- True: Language table (Generally are _TL tables)
22 -- False: No language table
23 );
24
25 TYPE t_metadata_tables IS TABLE OF r_metadata_table
26 INDEX BY BINARY_INTEGER;
27
28 TYPE t_array_of_number IS TABLE OF NUMBER
29 INDEX BY BINARY_INTEGER;
30
31 TYPE t_array_of_varchar2 IS TABLE OF VARCHAR2(500)
32 INDEX BY BINARY_INTEGER;
33
34 -- Global variables
35 g_debug_flag VARCHAR2(3) := 'NO';
36 g_db_link VARCHAR2(100);
37
38 -- Procedure and functions
39
40 /*===========================================================================+
41 |
42 | Name: Assign_Target_Responsibilities
43 |
44 | Description: This procedure assign the tabs and kpis to the target
45 | reponsibilities according to the source responsibilities.
46 |
47 | Returns: If any error ocurrs, this function add the error message
48 | to the error stack and return FALSE. Otherwise return
49 | TRUE.
50 |
51 +============================================================================*/
52 FUNCTION Assign_Target_Responsibilities RETURN BOOLEAN;
53
54
55 /*===========================================================================+
56 |
57 | Name: Check_Languages_TL_Tables
58 |
59 | Description: Fix _TL tables according to supported languages in target system
60 |
61 | Returns: If any error ocurrs, this function add the error message
62 | to the error stack and return FALSE. Otherwise return
63 | TRUE.
64 |
65 +============================================================================*/
66 FUNCTION Check_Languages_TL_Tables RETURN BOOLEAN;
67
68
69 /*===========================================================================+
70 |
71 | Name: Clean_Metadata_Invalid_PMF
72 |
73 | Description: Delete from BSC system level metadata the rows for PMF
74 | measures, dimensions and dimension levels that do not
75 | exist in the target system. Those objects are already
76 | loaded in the arrays g_invalid_pmf_measures,
77 | g_invalid_pmf_dimensions and g_invalid_pmf_dim_levels.
78 ||
79 +============================================================================*/
80 PROCEDURE Clean_Metadata_Invalid_PMF;
81
82
83 /*===========================================================================+
84 |
85 | Name: Create_Copy_Of_Table_Def
86 |
87 | Description: This procedure creates a copy of table definition
88 | of given table. The given table is in the source system.
89 |
90 | Parameters:
91 | x_table Table name
92 | x_tbs_type Tablespace type. This is to create
93 | the table in the right tablespace
94 |
95 | Returns: If any error ocurrs, this function add the error message
96 | to the error stack and return FALSE. Otherwise return
97 | TRUE.
98 |
99 +============================================================================*/
100 FUNCTION Create_Copy_Of_Table_Def(
101 x_table IN VARCHAR2,
102 x_tbs_type IN VARCHAR2
103 ) RETURN BOOLEAN;
104
105 -- ENH_B_TABLES_PERF: new fuction
106 FUNCTION Create_Copy_Of_Table_Def(
107 x_table IN VARCHAR2,
108 x_tbs_type IN VARCHAR2,
109 x_with_partitions IN BOOLEAN
110 ) RETURN BOOLEAN;
111
112
113 /*===========================================================================+
114 |
115 | Name: Create_Copy_Of_View_Def
116 |
117 | Description: This procedure creates a copy of view definition
118 | of given view. The given view is in the source system.
119 |
120 | Parameters: x_view View name
121 |
122 | Returns: If any error ocurrs, this function add the error message
123 | to the error stack and return FALSE. Otherwise return
124 | TRUE.
125 |
126 +============================================================================*/
127 FUNCTION Create_Copy_Of_View_Def(
128 x_view IN VARCHAR2,
129 x_replace IN BOOLEAN := TRUE
130 ) RETURN BOOLEAN;
131
132
133 /*===========================================================================+
134 |
135 | Name: Create_Dynamic_Objects
136 |
137 | Description: This function creates all required dynamic objects in the
138 | target system (current schema).
139 | Dynamyc objects are:
140 | - Dimension tables
141 | - Dimension filter views
142 | - Input, base, system tables.
143 |
144 | Returns: If any error ocurrs, this function add the error message
145 | to the error stack and return FALSE. Otherwise return
146 | TRUE.
147 |
148 +============================================================================*/
149 FUNCTION Create_Dynamic_Objects RETURN BOOLEAN;
150
151
152 /*===========================================================================+
153 |
154 | Name: Create_Indexes_Dynamic_Tables
155 |
156 | Description: This function creates all indexes on the dynamic tables.
157 |
158 | Returns: If any error ocurrs, this function add the error message
159 | to the error stack and return FALSE. Otherwise return
160 | TRUE.
161 |
162 +============================================================================*/
163 FUNCTION Create_Indexes_Dynamic_Tables RETURN BOOLEAN;
164
165
166 -- Fix performance bug#3860149: analyze base and dimension tables
167 /*===========================================================================+
168 |
169 | Name: Analyze_Base_And_Dim_Tables
170 |
171 | Description: This function analyzes base and dimension tables
172 |
173 | Returns: If any error ocurrs, this function add the error message
174 | to the error stack and return FALSE. Otherwise return
175 | TRUE.
176 |
177 +============================================================================*/
178 FUNCTION Analyze_Base_And_Dim_Tables RETURN BOOLEAN;
179
180
181 /*===========================================================================+
182 |
183 | Name: Create_Table_Indexes
184 |
185 | Description: This function creates on the given table the same indexes
186 | that already exist on the table in the source system
187 |
188 | Returns: If any error ocurrs, this function add the error message
189 | to the error stack and return FALSE. Otherwise return
190 | TRUE.
191 |
192 +============================================================================*/
193 FUNCTION Create_Table_Indexes(
194 x_table IN VARCHAR2,
195 x_tbs_type IN VARCHAR2
196 ) RETURN BOOLEAN;
197
198
199 /*===========================================================================+
200 |
201 | Name: Decompose_Numeric_List
202 |
203 | Description: This function decompose a string into a number array and
204 | returns the number of items in the array.
205 |
206 | Example:
207 | If x_string = '3001, 3002, 3003' and x_separator = ','
208 | then x_number_array = 3001|3002|3003 and retunrs 3
209 |
210 | Returns: If any error ocurrs, this function add the error message
211 | to the error stack and return -1.
212 |
213 |
214 +============================================================================*/
215 FUNCTION Decompose_Numeric_List(
216 x_string IN VARCHAR2,
217 x_number_array IN OUT NOCOPY t_array_of_number,
218 x_separator IN VARCHAR2
219 ) RETURN NUMBER;
220
221
222 /*===========================================================================+
223 |
224 | Name: Delete_Metadata_Tables
225 |
226 | Description: This function del;ete all record from metadata tables.
227 | The metadata tables are in the global array g_metadata_tables
228 |
229 | Returns: If any error ocurrs, this function add the error message
230 | to the error stack and return FALSE. Otherwise return
231 | TRUE.
232 |
233 +============================================================================*/
234 FUNCTION Delete_Metadata_Tables RETURN BOOLEAN;
235
236
237 /*===========================================================================+
238 |
239 | Name: Drop_Dynamic_Objects
240 |
241 | Description: This function drop all dynamic objects existing in the
242 | target system (current schema).
243 | Dynamyc objects are:
244 | - Dimension tables
245 | - Dimension filter views
246 | - Input, base, system tables.
247 |
248 | Returns: If any error ocurrs, this function add the error message
249 | to the error stack and return FALSE. Otherwise return
250 | TRUE.
251 |
252 +============================================================================*/
253 FUNCTION Drop_Dynamic_Objects RETURN BOOLEAN;
254
255
256 --LOCKING: new function
257 /*===========================================================================+
258 | FUNCTION Lock_Migration
259 +============================================================================*/
260 FUNCTION Lock_Migration (
261 x_process_id IN NUMBER,
262 x_msg_data OUT NOCOPY VARCHAR2
263 ) RETURN BOOLEAN;
264
265
266 /*===========================================================================+
267 |
268 | Name: Execute_Migration
269 |
270 | Description: This procedure is to run migration process as concurrent
271 | program.
272 |
273 | Parameters: ERRBUF This is a required argument. It is used
274 | to return any error message.
275 | RETCODE This is a required argument. It is used
276 | to return completion status: 0 for success
277 | 1 for success with warnings and 2 for error.
278 | After the concurrent program runs, the
279 | concurrent manager writes the contents of both
280 | ERRBUF and RETCODE to the log file associated
281 | with the concurrent request.
282 | Others parameter are the parameters for Migrate_System
283 |
284 +============================================================================*/
285 PROCEDURE Execute_Migration (
286 ERRBUF OUT NOCOPY VARCHAR2,
287 RETCODE OUT NOCOPY VARCHAR2,
288 x_src_responsibilities IN VARCHAR2,
289 x_trg_responsibilities IN VARCHAR2,
290 x_tab_filter IN VARCHAR2,
291 x_kpi_filter IN VARCHAR2,
292 x_overwrite IN VARCHAR2
293 );
294
295
296 /*===========================================================================+
297 |
298 | Name: Get_Lst_Table_Columns
299 |
300 | Description: This function returns the list of columns of the given table
301 |
302 | Returns: If any error ocurrs, this function add the error message
303 | to the error stack and return FALSE. Otherwise return
304 | TRUE.
305 |
306 +============================================================================*/
307 FUNCTION Get_Lst_Table_Columns(
308 x_table IN VARCHAR2
309 ) RETURN VARCHAR2;
310
311
312 /*===========================================================================+
313 |
314 | Name: Get_Migration_Parameters
315 |
316 | Description: Get the migration parameters from BSC_DB_LOADER_CONTROL table
317 |
318 +============================================================================*/
319 PROCEDURE Get_Migration_Parameters(
320 p_process_id IN VARCHAR2,
321 x_src_responsibilities IN OUT NOCOPY VARCHAR2,
322 x_trg_responsibilities IN OUT NOCOPY VARCHAR2,
323 x_tab_filter IN OUT NOCOPY VARCHAR2,
324 x_kpi_filter IN OUT NOCOPY VARCHAR2,
325 x_overwrite IN OUT NOCOPY VARCHAR2,
326 x_adv_mig_features IN OUT NOCOPY VARCHAR2,
327 x_db_link IN OUT NOCOPY VARCHAR2
328 );
329
330
331 /*===========================================================================+
332 |
333 | Name: Init_Invalid_PMF_Objects
334 |
335 | Description: Initialize the arrays g_invalid_pmf_measures,
336 | g_invalid_pmd_dimensions, g_invalid_pmf_dim_levels
337 | with the pmf objects used in the source but do not exist
338 | in the target.
339 | Also init the array g_invalid_kpis with the kpis
340 | using any of those invalid pmf objects.
341 | Those kpis are not migrated.
342 |
346
343 +============================================================================*/
344 PROCEDURE Init_Invalid_PMF_Objects;
345
347 /*===========================================================================+
348 |
349 | Name: Init_Metadata_Tables_Array
350 |
351 | Description: This procedure initialize the array of metadata tables
352 | (system, tab and kpis level tables)
353 |
354 +============================================================================*/
355 PROCEDURE Init_Metadata_Tables_Array;
356
357
358 /*===========================================================================+
359 |
360 | Name: Init_Migration_Objects_Arrays
361 |
362 | Description: This procedure initialize the global arrays g_mig_tabs,
363 | g_mig_kpis and g_mig_tables which contains the tabs, kpis
364 | and tables to be migrated according to the source
365 | responsibilities and tab and kpi filters
366 |
367 | Returns: If any error ocurrs, this function add the error message
368 | to the error stack and return FALSE. Otherwise return
369 | TRUE.
370 |
371 +============================================================================*/
372 FUNCTION Init_Migration_Objects_Arrays RETURN BOOLEAN;
373
374
375
376 /*===========================================================================+
377 |
378 | Name: Insert_Origin_Tables
379 |
380 | Description: This procedure insert into the global array g_mig_tables
381 | the origin tables of the given tables. This recursive
382 | procedure insert all the tables used by the kpis from the
383 | systenm tables to the input tables.
384 |
385 | Parameters: x_tables System tables
386 | x_num_tables Number of system tables
387 |
388 +============================================================================*/
389 PROCEDURE Insert_Origin_Tables(
390 x_tables IN t_array_of_varchar2,
391 x_num_tables IN NUMBER
392 );
393
394
395 /*===========================================================================+
396 |
397 | Name: Item_Belong_To_Array_Number
398 |
399 | Description: This function says if a item belong to an array
400 |
401 | Parameters: x_item - item name
402 | x_array - array
403 | x_num_items - number of item in the array
404 |
405 | Returns: Return TRUE if the item belong to the array. Otherwise
406 | return FALSE.
407 |
408 | Notes:
409 |
410 +============================================================================*/
411 FUNCTION Item_Belong_To_Array_Number(
412 x_item IN NUMBER,
413 x_array IN t_array_of_number,
414 x_num_items IN NUMBER
415 ) RETURN BOOLEAN;
416
417
418 /*===========================================================================+
419 |
420 | Name: Is_Base_Table
421 |
422 | Description: Returns TRUE is the table is a base table.
423 |
424 +============================================================================*/
425 FUNCTION Is_Base_Table(
426 x_table_name IN VARCHAR2
427 ) RETURN BOOLEAN;
428
429
430 /*===========================================================================+
431 |
432 | Name: Is_Input_Table
433 |
434 | Description: Returns TRUE is the table is an input table.
435 |
436 +============================================================================*/
437 FUNCTION Is_Input_Table(
438 x_table_name IN VARCHAR2
439 ) RETURN BOOLEAN;
440
441
442 /*===========================================================================+
443 |
444 | Name: Item_Belong_To_Array_Varchar2
445 |
446 | Description: This function says if a item belong to an array
447 |
448 | Parameters: x_item - item name
449 | x_array - array
450 | x_num_items - number of item in the array
451 |
452 | Returns: Return TRUE if the item belong to the array. Otherwise
453 | return FALSE.
454 |
455 | Notes:
456 |
457 +============================================================================*/
458 FUNCTION Item_Belong_To_Array_Varchar2(
459 x_item IN VARCHAR2,
460 x_array IN t_array_of_varchar2,
461 x_num_items IN NUMBER
462 ) RETURN BOOLEAN;
463
464
465 /*===========================================================================+
466 |
467 | Name: Make_Lst_Cond_Number
468 |
469 | Description: This function returns a list with the condition:
470 | Example
471 | x_column = column
472 | x_values = val1|val2|val3
473 | x_separator = 'OR'
474 |
475 | list = column = val1 OR column = val2 OR column = val3
476 |
477 | Notes:
478 |
479 +============================================================================*/
480 FUNCTION Make_Lst_Cond_Number(
481 x_column IN VARCHAR2,
482 x_values IN t_array_of_number,
483 x_num_values IN NUMBER,
487
484 x_separator IN VARCHAR2
485 ) RETURN VARCHAR2;
486
488 /*===========================================================================+
489 |
490 | Name: Make_Lst_Cond_Varchar2
491 |
492 | Description: This function returns a list with the condition:
493 | Example
494 | x_column = column
495 | x_values = val1|val2|val3
496 | x_separator = 'OR'
497 |
498 | list = UPPER(column) = 'VAL1' OR UPPER(column) =
499 | 'VAL2' OR UPPER(column) = 'VAL3'
500 |
501 | Notes:
502 |
503 +============================================================================*/
504 FUNCTION Make_Lst_Cond_Varchar2(
505 x_column IN VARCHAR2,
506 x_values IN t_array_of_varchar2,
507 x_num_values IN NUMBER,
508 x_separator IN VARCHAR2
509 ) RETURN VARCHAR2;
510
511
512 /*===========================================================================+
513 |
514 | Name: Migrate_Dynamic_Tables_Data
515 |
516 | Description: This function migrate data in dynamic tables from source
517 | system to the target system.
518 |
519 | Returns: If any error ocurrs, this function add the error message
520 | to the error stack and return FALSE. Otherwise return
521 | TRUE.
522 |
523 +============================================================================*/
524 FUNCTION Migrate_Dynamic_Tables_Data RETURN BOOLEAN;
525
526
527 /*===========================================================================+
528 |
529 | Name: Migrate_Metadata
530 |
531 | Description: This function migrate metadata tables from source system
532 | to the target system.
533 |
534 | Returns: If any error ocurrs, this function add the error message
535 | to the error stack and return FALSE. Otherwise return
536 | TRUE.
537 |
538 +============================================================================*/
539 FUNCTION Migrate_Metadata RETURN BOOLEAN;
540
541
542 /*===========================================================================+
543 |
544 | Name: Migrate_System
545 |
546 | Description: This procedure migrate the data for the KPIs in a source
547 | system to the target system. This procedure is call from
548 | the target system.
549 |
550 |
551 | Parameters: x_src_responsibilities Responsibilities (responsibility id)
552 | in the source system. The KPIs
553 | accessible by those responsibilities
554 | are migrated. Use a colon-sperator
555 | list to specify more than one
556 | responsibility. Example: '1001, 1003'
557 |
558 | x_trg_responsibilities Per each source responsibility specified
559 | in the previous parameter, the user
560 | need to specify the corresponding
561 | target responsibility.
562 |
563 | x_tab_filter In this parameter the user provide a subset of
564 | Tabs accessible by source responsibilities and
565 | only those Tabs are migrated to the target system.
566 | If this parameter is NULL, all Tabs accessible by
567 | source responsibilities are migrated.
568 |
569 | x_kpi_filter In this parameter the user provide a subset of
570 | KPIs accessible by source responsibilities and
571 | only those KPIs are migrated to the target system.
572 | If this parameter is NULL, all KPIs accessible by
573 | source responsibilities are migrated.
574 |
575 | x_overwrite Defaults to 'N'. The user must pass 'Y' in order
576 | to the migration program can overwrite the target
577 | system.
578 |
579 |
580 | Notes: If this procedure run on Non-Enterprise version, the log file is bscmig40.log
581 | and is located in the common output directoy defined in the variable UTL_FILE_DIR
582 | of orainit file.
583 |
584 | In APPS this procedure run as a concurrent program. Concurrent manager writes
585 | the log and output files. The user an see them using standard forms.
586 |
587 +============================================================================*/
588 PROCEDURE Migrate_System(
589 x_src_responsibilities IN VARCHAR2,
590 x_trg_responsibilities IN VARCHAR2,
591 x_tab_filter IN VARCHAR2 := NULL,
592 x_kpi_filter IN VARCHAR2 := NULL,
593 x_overwrite IN VARCHAR2 := 'N'
594 );
595 PROCEDURE Migrate_System_AT(
596 x_src_responsibilities IN VARCHAR2,
597 x_trg_responsibilities IN VARCHAR2,
598 x_tab_filter IN VARCHAR2 := NULL,
599 x_kpi_filter IN VARCHAR2 := NULL,
600 x_overwrite IN VARCHAR2 := 'N'
601 );
602
603
604 -- Enh#4697749
605 FUNCTION Remove_Custom_Dim_Objs_In_PMF RETURN BOOLEAN;
606
610 -- Enh#4697749
607 -- Enh#4697749
608 FUNCTION Remove_Custom_Dims_In_PMF RETURN BOOLEAN;
609
611 FUNCTION Remove_Custom_Measures_In_PMF RETURN BOOLEAN;
612
613
614 /*===========================================================================+
615 |
616 | Name: Update_BSC_Dimensions_In_PMF
617 |
618 | Description: Updates description field in bis_dimensions with value
619 | from the source system. ONLY FOR BSC DIMENSIONS.
620 |
621 | Returns: If there is a validation error, it returns FALSE. Otherwise,
622 | returns TRUE.
623 |
624 +============================================================================*/
625 FUNCTION Update_BSC_Dimensions_In_PMF RETURN BOOLEAN;
626
627
628 /*===========================================================================+
629 |
630 | Name: Validate_Filters
631 |
632 | Description: This function validate that the tabs and kpis filter
633 | have been provided in the proper format.
634 | Also, verify the kpis and tabs in hte filters being
635 | accessible by the source responsibilities.
636 |
637 | Parameters: x_tab_filter Tab filter
638 | x_kpi_filter KPI filter
639 | x_validation_error In this parameter returns the
640 | validation error message.
641 |
642 | Returns: If there is a validation error, it returns FALSE. Otherwise,
643 | returns TRUE.
644 |
645 +============================================================================*/
646 FUNCTION Validate_Filters(
647 x_tab_filter IN VARCHAR2,
648 x_kpi_filter IN VARCHAR2,
649 x_validation_error OUT NOCOPY VARCHAR2
650 ) RETURN BOOLEAN;
651
652
653 /*===========================================================================+
654 |
655 | Name: Validate_Responsibilities
656 |
657 | Description: This function validate that the source and target
658 | responsibilities have been provided in the proper format.
659 | Also, verify the the responsibilities existing in the
660 | corresponding system.
661 | Addionally, initialize the global arrays g_src_resps and
662 | g_trg_resps.
663 |
664 | Parameters: x_src_responsibilities Source responsibilities
665 | x_trg_responsibilities Target responsibilities
666 | x_validation_error In this parameter returns the
667 | validation error message.
668 |
669 | Returns: If there is a validation error, it returns FALSE. Otherwise,
670 | returns TRUE.
671 |
672 +============================================================================*/
673 FUNCTION Validate_Responsibilities(
674 x_src_responsibilities IN VARCHAR2,
675 x_trg_responsibilities IN VARCHAR2,
676 x_validation_error OUT NOCOPY VARCHAR2
677 ) RETURN BOOLEAN;
678
679
680 /*===========================================================================+
681 |
682 | Name: Validate_System_Versions
683 |
684 | Description: This function validate that the source and target systems
685 | are upgraded to the version in the global constant c_version.
686 |
687 | Parameters: x_validation_error In this parameter return the validatioon
688 | error message.
689 |
690 | Returns: If there is a validation error, it returns FALSE. Otherwise,
691 | returns TRUE.
692 |
693 +============================================================================*/
694 FUNCTION Validate_System_Versions(
695 x_validation_error OUT NOCOPY VARCHAR2
696 ) RETURN BOOLEAN;
697
698
699 /*===========================================================================+
700 |
701 | Name: Validate_Tables
702 |
703 | Description: This function validates that the tables that are going to
704 | be migrated exists in the source system.
705 | If a table does not exists then it write a message in the
706 | log file with the list of tables and affected indicators
707 | and returns false.
708 +============================================================================*/
709 FUNCTION Validate_Tables RETURN BOOLEAN;
710
711
712 /*===========================================================================+
713 |
714 | Name: Exist_Table_In_Src
715 |
716 | Description: This function returns TRUE if the table exists in the source.
717 |
718 +============================================================================*/
719 FUNCTION Exist_Table_In_Src(
720 x_table_name IN VARCHAR2
721 ) RETURN BOOLEAN;
722
723
724 /*===========================================================================+
725 |
726 | Name: Get_Table_Generation_Type_Src
727 |
728 | Description: Get table generation type from bsc_db_tables in the
729 | source system
730 |
731 +============================================================================*/
732 FUNCTION Get_Table_Generation_Type_Src(
733 x_table_name IN VARCHAR2
734 ) RETURN NUMBER;
735
736
737 --Fix bug#4220506
741 PROCEDURE Migrate_Custom_PMF_Dimensions;
738 PROCEDURE Write_Log_Invalid_PMF_Objects;
739
740 --Enh#4262583 migrate non-preseeded pmf objects
742 PROCEDURE Migrate_Custom_PMF_Dim_Levels;
743 PROCEDURE Migrate_Custom_PMF_Measures;
744
745 PROCEDURE Retrieve_Dimension
746 ( p_dimension_short_name IN VARCHAR2
747 , x_dimension_name OUT NOCOPY VARCHAR2
748 , x_description OUT NOCOPY VARCHAR2
749 , x_hide OUT NOCOPY VARCHAR2
750 , x_application_id OUT NOCOPY NUMBER
751 , x_return_status OUT NOCOPY VARCHAR2
752 , x_error_msg OUT NOCOPY VARCHAR2
753 );
754 PROCEDURE Retrieve_Dimension_Level
755 ( p_dimension_level_short_name IN VARCHAR2
756 , x_dimension_short_name OUT NOCOPY VARCHAR2
757 , x_dimension_name OUT NOCOPY VARCHAR2
758 , x_dimension_level_name OUT NOCOPY VARCHAR2
759 , x_description OUT NOCOPY VARCHAR2
760 , x_hide OUT NOCOPY VARCHAR2
761 , x_level_values_view_name OUT NOCOPY VARCHAR2
762 , x_where_clause OUT NOCOPY VARCHAR2
763 , x_source OUT NOCOPY VARCHAR2
764 , x_comparison_label_code OUT NOCOPY VARCHAR2
765 , x_attribute_code OUT NOCOPY VARCHAR2
766 , x_application_id OUT NOCOPY NUMBER
767 , x_default_search OUT NOCOPY VARCHAR2
768 , x_long_lov OUT NOCOPY VARCHAR2
769 , x_master_level OUT NOCOPY VARCHAR2
770 , x_view_object_name OUT NOCOPY VARCHAR2
771 , x_default_values_api OUT NOCOPY VARCHAR2
772 , x_enabled OUT NOCOPY VARCHAR2
773 , x_drill_to_form_function OUT NOCOPY VARCHAR2
774 , x_primary_dim OUT NOCOPY VARCHAR2
775 , x_return_status OUT NOCOPY VARCHAR2
776 , x_error_msg OUT NOCOPY VARCHAR2
777 );
778 PROCEDURE Retrieve_Measure
779 ( p_measure_short_name IN VARCHAR2
780 , x_measure_name OUT NOCOPY VARCHAR2
781 , x_description OUT NOCOPY VARCHAR2
782 , x_region_app_id OUT NOCOPY NUMBER
783 , x_source_column_app_id OUT NOCOPY NUMBER
784 , x_compare_column_app_id OUT NOCOPY NUMBER
785 , x_actual_data_source_type OUT NOCOPY VARCHAR2
786 , x_actual_data_source OUT NOCOPY VARCHAR2
787 , x_function_name OUT NOCOPY VARCHAR2
788 , x_comparison_source OUT NOCOPY VARCHAR2
789 , x_increase_in_measure OUT NOCOPY VARCHAR2
790 , x_enable_link OUT NOCOPY VARCHAR2
791 , x_enabled OUT NOCOPY VARCHAR2
792 , x_obsolete OUT NOCOPY VARCHAR2
793 , x_measure_type OUT NOCOPY VARCHAR2
794 , x_dimension1_short_name OUT NOCOPY VARCHAR2
795 , x_dimension1_name OUT NOCOPY VARCHAR2
796 , x_dimension2_short_name OUT NOCOPY VARCHAR2
797 , x_dimension2_name OUT NOCOPY VARCHAR2
798 , x_dimension3_short_name OUT NOCOPY VARCHAR2
799 , x_dimension3_name OUT NOCOPY VARCHAR2
800 , x_dimension4_short_name OUT NOCOPY VARCHAR2
801 , x_dimension4_name OUT NOCOPY VARCHAR2
802 , x_dimension5_short_name OUT NOCOPY VARCHAR2
803 , x_dimension5_name OUT NOCOPY VARCHAR2
804 , x_dimension6_short_name OUT NOCOPY VARCHAR2
805 , x_dimension6_name OUT NOCOPY VARCHAR2
806 , x_dimension7_short_name OUT NOCOPY VARCHAR2
807 , x_dimension7_name OUT NOCOPY VARCHAR2
808 , x_unit_of_measure_class OUT NOCOPY VARCHAR2
809 , x_application_id OUT NOCOPY NUMBER
810 , x_is_validate OUT NOCOPY VARCHAR2
811 , x_func_area_short_name OUT NOCOPY VARCHAR2
812 , x_return_status OUT NOCOPY VARCHAR2
813 , x_error_msg OUT NOCOPY VARCHAR2
814 );
815
816 -- ENH_B_TABLES_PERF: new function
817 FUNCTION Get_RowId_Table_Name (
818 x_table_name IN VARCHAR2
819 ) RETURN VARCHAR2;
820
821 -- ENH_B_TABLES_PERF: new function
822 FUNCTION Get_Proj_Table_Name (
823 x_table_name IN VARCHAR2
824 ) RETURN VARCHAR2;
825
826 -- ENH_B_TABLES_PERF: new function
827 FUNCTION Get_Num_Partitions (
828 x_table_name IN VARCHAR2
829 ) RETURN NUMBER;
830
831 -- ENH_B_TABLES_PERF: new function
832 FUNCTION Migrate_BTable_With_Partitions (
833 x_base_table IN VARCHAR2,
834 x_proj_table IN VARCHAR2
835 ) RETURN BOOLEAN;
836
837 -- Enh#4697749 New procedure
838 FUNCTION Migrate_AK_Region(
839 p_region_code IN VARCHAR2,
840 x_error_msg OUT NOCOPY VARCHAR2
841 ) RETURN BOOLEAN;
842
843 -- Enh#4697749 New procedure
844 FUNCTION Migrate_Form_Function(
845 p_function_name IN VARCHAR2,
846 x_error_msg OUT NOCOPY VARCHAR2
847 ) RETURN BOOLEAN;
848
849 -- Fix bug#4873385
850 FUNCTION Get_Source_User_Id RETURN NUMBER;
851
852
853
854 PROCEDURE Migrate_Sim_Data
855 (
856 p_commit IN VARCHAR2 := FND_API.G_FALSE
857 ,p_Trg_indicator IN BSC_KPIS_B.indicator%TYPE
858 ,p_Src_indicator IN BSC_KPIS_B.indicator%TYPE
859 ,p_Region_Code IN VARCHAR2
860 ,p_Old_Region_Code IN BSC_KPIS_B.short_name%TYPE
861 ,p_Old_Dim_Levels IN FND_TABLE_OF_NUMBER
862 ,p_New_Dim_Levels IN FND_TABLE_OF_NUMBER
863 ,p_Old_Dim_Groups IN FND_TABLE_OF_NUMBER
864 ,p_New_Dim_Groups IN FND_TABLE_OF_NUMBER
865 ,p_Old_DataSet_Map IN FND_TABLE_OF_NUMBER
866 ,p_New_DataSet_Map IN FND_TABLE_OF_NUMBER
867 ,p_Target_Calendar IN NUMBER
868 ,p_Old_Periodicities IN FND_TABLE_OF_NUMBER
869 ,p_New_Periodicities IN FND_TABLE_OF_NUMBER
870 ,x_return_status OUT NOCOPY VARCHAR2
871 ,x_msg_count OUT NOCOPY NUMBER
872 ,x_msg_data OUT NOCOPY VARCHAR2
873 );
874
875
876 END BSC_MIGRATION;