DBA Data[Home] [Help]

PACKAGE: APPS.FND_FLEX_UPGRADE_UTILITIES

Source


1 PACKAGE fnd_flex_upgrade_utilities AUTHID CURRENT_USER AS
2 /* $Header: AFFFUPUS.pls 120.3.12010000.1 2008/07/25 14:14:38 appldev ship $ */
3 
4 
5 bad_parameter EXCEPTION;
6 PRAGMA EXCEPTION_INIT(bad_parameter, -06501);
7 
8 -- ======================================================================
9 -- Function Return Codes
10 -- ======================================================================
11 g_ret_no_error              NUMBER := 0;
12 g_ret_critical_error        NUMBER := 1;
13 g_ret_ignored_errors        NUMBER := 2;
14 g_ret_date_conversion_error NUMBER := 3;
15 g_ret_no_need_to_clone      NUMBER := 4;
16 g_ret_already_cloned        NUMBER := 5;
17 g_ret_new_vset_exists       NUMBER := 6;
18 
19 
20 -- NO-ERROR              : Succesfull operation.
21 -- CRITICAL-ERROR        : Call get_message function.
22 -- IGNORED-ERRORS        : Some errors occured, but they are ignored.
23 --                         Must call get_message.
24 -- DATE-CONVERSION-ERROR : Function is succesfull, however there were some
25 --                         date value corruptions and conversion errors.
26 -- Ex. : to_char(to_date('01-JA-98','DD-MON-RR'),'YYYY/MM/YY HH24:MI:SS')
27 -- In this case to_date function will fail. These cases will be reported in
28 -- message, function will not stop for these errors. It will try to convert
29 -- as much as possible. Call get_message to see those errors.
30 -- NO-NEED-TO-CLONE      : You passed a value set other than 'D' or 'T'.
31 -- ALREADY-CLONED        : Old date value set was already cloned.
32 -- NEW-VSET-EXISTS       : New Value Set Already Exists with a different
33 --                         format type or maximum size.
34 --
35 
36 
37 
38 -- ======================================================================
39 -- Messaging
40 -- ======================================================================
41 -- All errors will be reported in message.
42 -- Final successfull operations are also reported.
43 --
44 FUNCTION get_message RETURN VARCHAR2;
45 
46 PROCEDURE set_messaging(p_flag IN BOOLEAN DEFAULT TRUE);
47 
48 
49 -- ======================================================================
50 -- Function : clone_date_vset
51 -- ======================================================================
52 -- Will create a clone of old value set.
53 -- Sub entities are not cloned. (i.e. values for indep/dep vasets,
54 -- hierarchies, etc...)
55 -- format_type and maximum_size will be changed as;
56 --
57 -- Date (D)(9,11)             -> Standard Date (X)(11)
58 -- Date-Time (T)(15,17,18,20) -> Standard Date-Time (Y)(20)
59 --
60 --
61 -- Return Codes : See Function Return Codes.
62 --
63 FUNCTION clone_date_vset
64   (p_old_value_set_name    IN VARCHAR2,
65    p_new_value_set_name    IN VARCHAR2,
66    p_session_mode          IN VARCHAR2 DEFAULT 'customer_data')
67   RETURN NUMBER;
68 
69 -- ======================================================================
70 -- Function : upgrade_date_report_parameters
71 -- ======================================================================
72 -- Modifies Report Parameters.
73 -- All report parameters which are owned by p_appl_short_name application and
74 -- has p_value_set_from as validation value set will be updated to use
75 -- p_value_set_to as validation value set.
76 --
77 -- p_appl_short_name  : owner application.
78 -- p_value_set_from   : old type date/time value set.
79 -- p_value_set_to     : new (standard) type date/time value set.
80 -- p_session_mode     : 'seed_data' or 'customer_data' (for who columns.)
81 -- p_report_name_like : If passed, only this report parameters will be
82 --                      modified.
83 -- AND descriptive_flexfield_name LIKE '$SRS$.' || p_report_name_like
84 -- condition will be used in the query.
85 --
86 -- Return Codes : See Function Return Codes.
87 --
88 FUNCTION upgrade_date_report_parameters
89   (p_appl_short_name  IN VARCHAR2,
90    p_value_set_from   IN VARCHAR2,
91    p_value_set_to     IN VARCHAR2,
92    p_session_mode     IN VARCHAR2 DEFAULT 'customer_data',
93    p_report_name_like IN VARCHAR2 DEFAULT '%')
94   RETURN NUMBER;
95 
96 -- ======================================================================
97 -- Function : upgrade_date_dff_segments
98 -- ======================================================================
99 -- Will upgrade Descriptive Flexfield Segments.
100 -- Transaction data should be upgraded by FNDFFUPG conc. program.
101 --
102 FUNCTION upgrade_date_dff_segments
103   (p_appl_short_name   IN VARCHAR2,
104    p_value_set_from    IN VARCHAR2,
105    p_value_set_to      IN VARCHAR2,
106    p_session_mode      IN VARCHAR2 DEFAULT 'customer_data',
107    p_dff_name_like     IN VARCHAR2 DEFAULT '%',
108    p_context_code_like IN VARCHAR2 DEFAULT '%')
109   RETURN NUMBER;
110 
111 -- ======================================================================
112 -- Function : upgrade_date_kff_segments
113 -- ======================================================================
114 -- Will upgrade Key Flexfield Segments.
115 -- Transaction data should be upgraded by FNDFFUPG conc. program.
116 --
117 FUNCTION upgrade_date_kff_segments
118   (p_appl_short_name  IN VARCHAR2,
119    p_id_flex_code     IN VARCHAR2,
120    p_value_set_from   IN VARCHAR2,
121    p_value_set_to     IN VARCHAR2,
122    p_session_mode     IN VARCHAR2 DEFAULT 'customer_data',
123    p_struct_num_like  IN VARCHAR2 DEFAULT '%',
124    p_struct_name_like IN VARCHAR2 DEFAULT '%')
125   RETURN NUMBER;
126 
127 -- ======================================================================
128 -- Function : upgrade_vset_to_translatable
129 -- ======================================================================
130 -- Will convert vset to Translatable validation.
131 --
132 FUNCTION upgrade_vset_to_translatable
133   (p_vset_name        IN VARCHAR2,
134    p_session_mode     IN VARCHAR2 DEFAULT 'customer_data')
135   RETURN NUMBER;
136 
137 
138 -- ======================================================================
139 -- NUMBER and DATE UPGRADES
140 -- ======================================================================
141 -- These functions can only be called from FNDFFUPG conc. program.
142 --
143 --
144 -- ======================================================================
145 -- Procedure : cp_init
146 -- ======================================================================
147 -- Used to init following settings.
148 -- 'SESSION_MODE'
149 -- 'NLS_NUMERIC_CHARACTERS'
150 --
151 PROCEDURE cp_init(p_param_name IN VARCHAR2,
152                   p_param_value IN VARCHAR2);
153 
154 -- ======================================================================
155 -- Procedure : cp_upgrade_value_set
156 -- ======================================================================
157 -- Upgrades Number and Date value set.
158 --
159 PROCEDURE cp_upgrade_value_set(p_flex_value_set_type IN VARCHAR2,
160                                p_flex_value_set_name IN VARCHAR2);
161 
162 
163 -- ======================================================================
164 -- Procedure : cp_srs_upgrade_date_all
165 -- ======================================================================
166 -- Upgrades All Standard Date Value Sets. (called from SRS.)
167 --
168 PROCEDURE cp_srs_upgrade_date_all(errbuf  OUT nocopy VARCHAR2,
169                                   retcode OUT nocopy VARCHAR2);
170 
171 
172 -- ======================================================================
173 -- Procedure : cp_srs_upgrade_number_all
174 -- ======================================================================
175 -- Upgrades All Number Value Sets. (called from SRS.)
176 --
177 PROCEDURE cp_srs_upgrade_number_all(errbuf                   OUT nocopy VARCHAR2,
178                                     retcode                  OUT nocopy VARCHAR2,
179                                     p_nls_numeric_characters IN VARCHAR2);
180 
181 
182 -- ======================================================================
183 -- Procedure : cp_srs_upgrade_date_one
184 -- ======================================================================
185 -- Upgrades One Standard Date or Standard DateTime Value Set.(called from SRS.)
186 --
187 PROCEDURE cp_srs_upgrade_date_one(errbuf                OUT nocopy VARCHAR2,
188                                   retcode               OUT nocopy VARCHAR2,
189                                   p_flex_value_set_name IN VARCHAR2);
190 
191 
192 -- ======================================================================
193 -- Procedure : cp_srs_upgrade_number_one
194 -- ======================================================================
195 -- Upgrades One Number Value Set. (called from SRS.)
196 --
197 PROCEDURE cp_srs_upgrade_number_one(errbuf                   OUT nocopy VARCHAR2,
198                                     retcode                  OUT nocopy VARCHAR2,
199                                     p_flex_value_set_name    IN VARCHAR2,
200                                     p_nls_numeric_characters IN VARCHAR2);
201 
202 -- ======================================================================
203 -- Procedure : cp_srs_list_date_usages
204 -- ======================================================================
205 -- Lists Date and DateTime Value Set Usages. (called from SRS.)
206 --
207 PROCEDURE cp_srs_list_date_usages(errbuf                   OUT nocopy VARCHAR2,
208                                   retcode                  OUT nocopy VARCHAR2);
209 
210 
211 
212 -- ======================================================================
213 -- Procedure : cp_srs_clone_date_vset
214 -- ======================================================================
215 -- Clones a Date or DateTime Value Set. (called from SRS.)
216 --
217 PROCEDURE cp_srs_clone_date_vset(errbuf               OUT nocopy VARCHAR2,
218                                  retcode              OUT nocopy VARCHAR2,
219                                  p_old_value_set_name IN VARCHAR2,
220                                  p_new_value_set_name IN VARCHAR2);
221 
222 
223 
224 -- ======================================================================
225 -- Procedure : afffupg1_get_prompt
226 -- ======================================================================
227 -- From $FND_TOP/sql/afffupg1.sql.
228 --
229 PROCEDURE afffupg1_get_prompt(p_menu_choice           IN NUMBER,
230                               p_step                  IN NUMBER,
231                               x_prompt                OUT nocopy VARCHAR2);
232 
233 
234 
235 -- ======================================================================
236 -- Procedure : afffupg1_data_upgrade
237 -- ======================================================================
238 -- From $FND_TOP/sql/afffupg1.sql.
239 --
240 PROCEDURE afffupg1_data_upgrade(p_menu_choice         IN NUMBER,
241                                 p_param1              IN VARCHAR2,
242                                 p_param2              IN VARCHAR2,
243                                 p_param3              IN VARCHAR2,
244                                 p_param4              IN VARCHAR2,
245                                 p_param5              IN VARCHAR2,
246                                 p_param6              IN VARCHAR2,
247                                 x_prompt              IN OUT nocopy VARCHAR2);
248 
249 END fnd_flex_upgrade_utilities;