DBA Data[Home] [Help]

PACKAGE BODY: APPS.BIS_VALIDATION_UTILITIES

Source


1 package body BIS_VALIDATION_UTILITIES   AS
2 /*$Header: BISVAUTB.pls 115.0 2003/06/26 20:52:09 tiwang noship $*/
3 
4 g_request_id     	number;
5 g_concurrent_id  	number;
6 g_user_id               PLS_INTEGER     := 0;
7 g_login_id              PLS_INTEGER     := 0;
8 
9 
10 PROCEDURE PUT_MISSING_CURRENCY(
11  p_object_type in varchar2,
12  p_object_name in varchar2,
13  p_EXCEPTION_MESSAGE in VARCHAR2 default null,
14  p_CORRECTIVE_ACTION_FF in varchar2 default null,
15  p_Rate_type in varchar2 default null,
16  p_From_currency in varchar2 default null,
17  p_To_currency in varchar2 default null,
18  p_effective_date in date default null) is
19 
20 begin
21  g_concurrent_id:=FND_GLOBAL.conc_program_id;
22  g_request_id:=FND_GLOBAL.conc_request_id;
23  g_user_id := fnd_global.user_id;
24  g_login_id := fnd_global.login_id;
25 
26  insert into bis_refresh_log(
27   Request_id,
28   Concurrent_id,
29   object_type,
30   Object_name,
31   ERROR_TYPE,
32   CORRECTIVE_ACTION_FF,
33   Exception_message,
34   Creation_date,
35   Created_by,
36   Last_update_date,
37   Last_update_login,
38   Last_updated_by,
39   Attribute1,
40   Attribute2,
41   Attribute3,
42   Attribute4,
43   Attribute5,
44   Attribute6,
45   Attribute7,
46   Attribute8,
47   Attribute9,
48   Attribute10 )
49 values (
50 g_request_id,
51 g_concurrent_id,
52 p_object_type,
53 p_object_name,
54 'MISSING_CURRENCY', --error type
55 p_CORRECTIVE_ACTION_FF,
56 p_EXCEPTION_MESSAGE,
57 sysdate,
58 g_user_id,
59 sysdate,
60 g_login_id,
61 g_user_id,
62 p_Rate_type,---attribute 1
63 p_From_currency,---attribute 2
64 p_To_currency,---attribute 3
65 p_effective_date,---attribute 4
66 null,---attribute 5
67 null ,---attribute 6
68 null,---attribute 7
69 null,---attribute 8
70 null, ---attribute 9
71 null); ---attribute 10
72 
73 exception
74   when others then
75    raise;
76 end;
77 
78 
79  PROCEDURE PUT_MISSING_UOM(
80   p_object_type in varchar2,
81  p_object_name in varchar2,
82  p_EXCEPTION_MESSAGE in VARCHAR2 default null,
83  p_CORRECTIVE_ACTION_FF in varchar2 default null,
84  p_From_UOM in varchar2 default null,
85  p_To_UOM in varchar2 default null,
86  p_Inventory_items in varchar2 default null) is
87 
88 begin
89  g_concurrent_id:=FND_GLOBAL.conc_program_id;
90  g_request_id:=FND_GLOBAL.conc_request_id;
91  g_user_id := fnd_global.user_id;
92  g_login_id := fnd_global.login_id;
93 
94  insert into bis_refresh_log(
95   Request_id,
96   Concurrent_id,
97   object_type,
98   Object_name,
99   ERROR_TYPE,
100   CORRECTIVE_ACTION_FF,
101   Exception_message,
102   Creation_date,
103   Created_by,
104   Last_update_date,
105   Last_update_login,
106   Last_updated_by,
107   Attribute1,
108   Attribute2,
109   Attribute3,
110   Attribute4,
111   Attribute5,
112   Attribute6,
113   Attribute7,
114   Attribute8,
115   Attribute9,
116   Attribute10 )
117 values (
118 g_request_id,
119 g_concurrent_id,
120 p_object_type,
121 p_object_name,
122 'MISSING_UOM', --error type
123 p_CORRECTIVE_ACTION_FF,
124 p_EXCEPTION_MESSAGE,
125 sysdate,
126 g_user_id,
127 sysdate,
128 g_login_id,
129 g_user_id,
130 p_From_UOM,---attribute 1
131 p_To_UOM,---attribute 2
132 p_Inventory_items,---attribute 3
133 null,---attribute 4
134 null,---attribute 5
135 null,---attribute 6
136 null,---attribute 7
137 null,---attribute 8
138 null, ---attribute 9
139 null); ---attribute 10
140 
141 exception
142   when others then
143    raise;
144 end;
145 
146 
147 
148 
149  PROCEDURE PUT_MISSING_PERIOD(
150   p_object_type in varchar2,
151   p_object_name in varchar2,
152  p_EXCEPTION_MESSAGE in VARCHAR2 default null,
153  p_CORRECTIVE_ACTION_FF in varchar2 default null,
154  p_period_name in varchar2 default null,
155  p_calendar in varchar2 default null) is
156 
157 begin
158  g_concurrent_id:=FND_GLOBAL.conc_program_id;
159  g_request_id:=FND_GLOBAL.conc_request_id;
160  g_user_id := fnd_global.user_id;
161  g_login_id := fnd_global.login_id;
162 
163  insert into bis_refresh_log(
164   Request_id,
165   Concurrent_id,
166   object_type,
167   Object_name,
168   ERROR_TYPE,
169   CORRECTIVE_ACTION_FF,
170   Exception_message,
171   Creation_date,
172   Created_by,
173   Last_update_date,
174   Last_update_login,
175   Last_updated_by,
176   Attribute1,
177   Attribute2,
178   Attribute3,
179   Attribute4,
180   Attribute5,
181   Attribute6,
182   Attribute7,
183   Attribute8,
184   Attribute9,
185   Attribute10 )
186 values (
187 g_request_id,
188 g_concurrent_id,
189 p_object_type,
190 p_object_name,
191 'MISSING_PERIOD', --error type
192 p_CORRECTIVE_ACTION_FF,
193 p_EXCEPTION_MESSAGE,
194 sysdate,
195 g_user_id,
196 sysdate,
197 g_login_id,
198 g_user_id,
199 p_period_name,---attribute 1
200 p_calendar,---attribute 2
201 null,---attribute 3
202 null,---attribute 4
203 null,---attribute 5
204 null,---attribute 6
205 null,---attribute 7
206 null,---attribute 8
207 null, ---attribute 9
208 null); ---attribute 10
209 
210 exception
211   when others then
212    raise;
213 end;
214 
215 PROCEDURE PUT_OTHER_VALIDATION(
216   p_object_type in varchar2,
217  p_object_name in varchar2,
218  p_error_type in varchar2 default null,
219  p_EXCEPTION_MESSAGE in VARCHAR2 default null,
220  p_CORRECTIVE_ACTION_FF in varchar2 default null) is
221 
222  begin
223  g_concurrent_id:=FND_GLOBAL.conc_program_id;
224  g_request_id:=FND_GLOBAL.conc_request_id;
225  g_user_id := fnd_global.user_id;
226  g_login_id := fnd_global.login_id;
227 
228  insert into bis_refresh_log(
229   Request_id,
230   Concurrent_id,
231   object_type,
232   Object_name,
233   ERROR_TYPE,
234   CORRECTIVE_ACTION_FF,
235   Exception_message,
236   Creation_date,
237   Created_by,
238   Last_update_date,
239   Last_update_login,
240   Last_updated_by,
241   Attribute1,
242   Attribute2,
243   Attribute3,
244   Attribute4,
245   Attribute5,
246   Attribute6,
247   Attribute7,
248   Attribute8,
249   Attribute9,
250   Attribute10 )
251 values (
252 g_request_id,
253 g_concurrent_id,
254 p_object_type,
255 p_object_name,
256 p_error_type, --error type
257 p_CORRECTIVE_ACTION_FF,
258 p_EXCEPTION_MESSAGE,
259 sysdate,
260 g_user_id,
261 sysdate,
262 g_login_id,
263 g_user_id,
264 null,---attribute 1
265 null,---attribute 2
266 null,---attribute 3
267 null,---attribute 4
268 null,---attribute 5
269 null,---attribute 6
270 null,---attribute 7
271 null,---attribute 8
272 null, ---attribute 9
273 null); ---attribute 10
274 
275 exception
276   when others then
277    raise;
278 end;
279 
280 PROCEDURE PUT_MISSING_CONTRACT(
281  p_object_type in varchar2,
282  p_object_name in varchar2,
283  p_EXCEPTION_MESSAGE in VARCHAR2 default null,
284  p_CORRECTIVE_ACTION_FF in varchar2 default null,
285  p_Rate_type in varchar2 default null,
286  p_From_currency in varchar2 default null,
287  p_To_currency in varchar2 default null,
288  p_date in date default null,
289  p_date_override in date default null,
290  p_Contract_number in varchar2 default null,
291  p_Contract_id in number default null,
292  p_Contract_status in varchar2 default null) is
293 
294 begin
295  g_concurrent_id:=FND_GLOBAL.conc_program_id;
296  g_request_id:=FND_GLOBAL.conc_request_id;
297  g_user_id := fnd_global.user_id;
298  g_login_id := fnd_global.login_id;
299 
300  insert into bis_refresh_log(
301   Request_id,
302   Concurrent_id,
303   object_type,
304   Object_name,
305   ERROR_TYPE,
306   CORRECTIVE_ACTION_FF,
307   Exception_message,
308   Creation_date,
309   Created_by,
310   Last_update_date,
311   Last_update_login,
312   Last_updated_by,
313   Attribute1,
314   Attribute2,
315   Attribute3,
316   Attribute4,
317   Attribute5,
318   Attribute6,
319   Attribute7,
320   Attribute8,
321   Attribute9,
322   Attribute10 )
323 values (
324 g_request_id,
325 g_concurrent_id,
326 p_object_type,
327 p_object_name,
328 'MISSING_CONTRACT', --error type
329 p_CORRECTIVE_ACTION_FF,
330 p_EXCEPTION_MESSAGE,
331 sysdate,
332 g_user_id,
333 sysdate,
334 g_login_id,
335 g_user_id,
336 p_Rate_type,---attribute 1
337 p_From_currency,---attribute 2
338 p_To_currency,---attribute 3
339 p_date,---attribute 4
340 p_date_override,---attribute 5
341 p_Contract_number,---attribute 6
342 p_Contract_id ,---attribute 7
343 p_Contract_status,---attribute 8
344 null,---attribute 9
345 null); ---attribute 10
346 
347 exception
348   when others then
349    raise;
350 
351 end;
352 
353 procedure put_missing_global_setup(
354   p_parameter_list       IN DBMS_SQL.VARCHAR2_TABLE) is
355 
356   l_count number := 0;
357   l_profile_list varchar2(4000) := '';
358   l_return_value boolean := true;
359   l_profile_name varchar2(100);
360 
361 begin
362    l_return_value := true;
363    l_profile_list := null;
364    l_count := p_parameter_list.first;
365    LOOP
366       l_profile_name := p_parameter_list(l_count);
367       IF (l_profile_name = 'EDW_DEBUG') THEN
368              l_profile_name := 'BIS_PMF_DEBUG';
369       ELSIF (l_profile_name = 'EDW_TRACE') THEN
370               l_profile_name := 'BIS_SQL_TRACE';
371       END IF;
372       IF (fnd_profile.value(l_profile_name) IS NULL) THEN
373                 l_profile_list := l_profile_list||' '||l_profile_name;
374                 l_return_value := false;
375       END IF;
376       EXIT WHEN l_count = p_parameter_list.last;
377       l_count := p_parameter_list.next(l_count);
378    END LOOP;
379 
380  IF (l_return_value) THEN
381                 null;
382  ELSE
383       fnd_message.set_name('BIS', 'BIS_DBI_PROFILE_NOT_SET');
384       fnd_message.set_token('PROFILE_OPTION', l_profile_list);
385       --- dbms_output.put_line('profilelist: '||l_profile_list);
386       ---- dbms_output.put_line('messages: '||fnd_message.get);
387 
388       PUT_OTHER_VALIDATION(
389        p_object_type=>null,
390        p_object_name=>null,
391        p_error_type =>'MISSING_GLOBAL_SETUP',
392        p_EXCEPTION_MESSAGE=>fnd_message.get ,
393        p_CORRECTIVE_ACTION_FF=>'BIS_SETUP_EDW_S');
394  END IF;
395 end;
396 
397 END BIS_VALIDATION_UTILITIES;