DBA Data[Home] [Help]

PACKAGE: APPS.BSC_UPDATE_BASE

Source


1 PACKAGE BSC_UPDATE_BASE AS
2 /* $Header: BSCDBASS.pls 120.0 2005/05/31 19:04:11 appldev noship $ */
3 
4 
5 /*===========================================================================+
6 |
7 |   Name:          Calc_New_Period_Base_Table
8 |
9 |   Description:   Calculate the update period of the base based on the update
10 |                  period and subperiod of the input table and the possible
11 |                  change of periodicity.
12 |
13 |   Parameters:	   x_base_table - base table name
14 |                  x_periodicity_base_table - periodicity of base table
15 |                  x_periodicity_input_table - periodicity of input table
16 |                  x_current_fy - current fiscal year
17 |                  x_per_input_table - update period of input table
18 |                  x_subper_input_table -update subperiod of input table
19 |                  x_current_per_base_table - current period of base table
20 |                  x_per_base_table - new update period of base table
21 |
22 |   Returns:       TRUE - Success.
23 |                  FALSE - Failure.
24 |
25 |   Notes:
26 |
27 +============================================================================*/
28 FUNCTION Calc_New_Period_Base_Table(
29 	x_base_table IN VARCHAR2,
30         x_periodicity_base_table IN NUMBER,
31         x_periodicity_input_table IN NUMBER,
32         x_current_fy IN NUMBER,
33         x_per_input_table IN NUMBER,
34         x_subper_input_table IN NUMBER,
35         x_current_per_base_table OUT NOCOPY NUMBER,
36         x_per_base_table OUT NOCOPY NUMBER
37 	) RETURN BOOLEAN;
38 
39 
40 /*===========================================================================+
41 |
42 |   Name:          Calc_New_Period_Input_Table
43 |
44 |   Description:   Calculate the update period and sub-period of the input
45 |                  table according to its current update period and
46 |                  sub-period and the maximum period of a real data reported
47 |                  in the table.
48 |
49 |   Parameters:	   x_input_table - input table name
50 |                  x_periodicity - periodicity of the input table
51 |                  x_period_col_name - period column name in the input table
52 |                  x_subperiod_col_name - subperiod column name
53 |                  x_current_fy - current fiscal year
54 |                  x_period - update period
55 |                  x_subperiod - update subperiod
56 |
57 |   Returns:       TRUE - Success.
58 |                  FALSE - Failure.
59 |
60 |   Notes:
61 |
62 +============================================================================*/
63 FUNCTION Calc_New_Period_Input_Table(
64 	x_input_table IN VARCHAR2,
65  	x_periodicity IN NUMBER,
66         x_period_col_name IN VARCHAR2,
67         x_subperiod_col_name IN VARCHAR2,
68         x_current_fy IN NUMBER,
69 	x_period OUT NOCOPY NUMBER,
70 	x_subperiod OUT NOCOPY NUMBER
71 	) RETURN BOOLEAN;
72 
73 
74 /*===========================================================================+
75 |
76 |   Name:          Calculate_Base_Table
77 |
78 |   Description:   This function calculate the base table.
79 |                  - Update the data of the base table with the data of the
80 |                    input table.
81 |                  - Calculates the current period of the base table and
82 |                    the input table and stores them in the database
83 |                  - Deletes the data from the input table after updating
84 |                    the base table.
85 |
86 |   Parameters:	   x_base_table - base table name
87 |                  x_input_table - input table name
88 |
89 |   Returns:       TRUE - Success.
90 |                  FALSE - Failure.
91 |
92 |   Notes:
93 |
94 +============================================================================*/
95 FUNCTION Calculate_Base_Table(
96 	x_base_table IN VARCHAR2,
97         x_input_table IN VARCHAR2,
98         x_correction_flag IN BOOLEAN,
99         x_aw_flag IN BOOLEAN
100 	) RETURN BOOLEAN;
101 
102 --LOCKING: new function
103 FUNCTION Calculate_Base_Table_AT(
104         x_base_table IN VARCHAR2,
105         x_input_table IN VARCHAR2,
106         x_correction_flag IN BOOLEAN,
107         x_aw_flag IN BOOLEAN
108 	) RETURN BOOLEAN;
109 
110 
111 /*===========================================================================+
112 |
113 |   Name:   	   Create_Generic_Temp_Tables
114 |
115 |   Description:   Create generic temporal tables for base table calculation
116 |
117 |   Returns:
118 |
119 |   Notes:
120 |
121 +============================================================================*/
122 FUNCTION Create_Generic_Temp_Tables RETURN BOOLEAN;
123 
124 --LOCKING: new function
125 FUNCTION Create_Generic_Temp_Tables_AT RETURN BOOLEAN;
126 
127 
128 /*===========================================================================+
129 |
130 |   Name:   	   Update_Base_Table
131 |
132 |   Description:   Updates a basic system table from the data in a user
133 |		   input table.
134 |
135 |   Returns:
136 |
137 |   Notes:
138 |
139 +============================================================================*/
140 FUNCTION Update_Base_Table(
141 	x_base_tbl		VARCHAR2,
142 	x_in_tbl		VARCHAR2,
143 	x_key_columns 		BSC_UPDATE_UTIL.t_array_of_varchar2,
144 	x_key_dim_tables	BSC_UPDATE_UTIL.t_array_of_varchar2,
145         x_num_key_columns 	NUMBER,
146         x_data_columns 		BSC_UPDATE_UTIL.t_array_of_varchar2,
147 	x_data_formulas		BSC_UPDATE_UTIL.t_array_of_varchar2,
148         x_data_measure_types    BSC_UPDATE_UTIL.t_array_of_number,
149         x_num_data_columns 	NUMBER,
150 	x_base_percode		NUMBER,
151 	x_in_percode		NUMBER,
152 	x_in_per_fld		VARCHAR2,
153 	x_in_subper_fld		VARCHAR2,
154 	x_projection_flag	VARCHAR2,
155         x_current_fy            NUMBER,
156         x_current_per_base_table NUMBER,
157         x_prev_current_period NUMBER, -- Fix bug#4235448: need this parameter
158         x_correction_flag       BOOLEAN,
159         x_aw_flag               BOOLEAN,
160         x_change_vector_value   NUMBER
161         ) RETURN BOOLEAN;
162 
163 
164 -- AW_INTEGRATION: New function
165 /*===========================================================================+
166 |
167 |   Name:   	   Get_Base_AW_Table_Name
168 |
169 |   Description:   Returns the name of the AW table created for the base table
170 |
171 +============================================================================*/
172 FUNCTION Get_Base_AW_Table_Name(
173 	x_base_tbl IN VARCHAR2
174     ) RETURN VARCHAR2;
175 
176 
177 END BSC_UPDATE_BASE;