DBA Data[Home] [Help]

PACKAGE BODY: APPS.BIS_COMMON_PARAMETERS

Source


1 PACKAGE BODY bis_common_parameters AS
2 /* $Header: BISGPFVB.pls 120.0.12000000.2 2007/04/20 09:03:34 rkumar ship $  */
3    version          CONSTANT CHAR (80)
4             := '$Header: BISGPFVB.pls 120.0.12000000.2 2007/04/20 09:03:34 rkumar ship $';
5 
6 
7 FUNCTION get_value_at_site_level(pname IN VARCHAR2) RETURN VARCHAR2 IS
8    CURSOR c_profile_info(pname VARCHAR2) IS
9       select profile_option_id,	application_id
10         from   fnd_profile_options
11         where  profile_option_name = upper(pname)
12         and    start_date_active  <= sysdate
13         and    nvl(end_date_active, sysdate) >= sysdate;
14 
15    CURSOR c_profile_value(pid number, aid number, lid number, lval number) IS
16       select profile_option_value
17 	from   fnd_profile_option_values
18 	where  profile_option_id = pid
19 	and    application_id    = aid
20 	and    level_id          = lid
21 	and    level_value       = lval;
22 
23    v_pid NUMBER;
24    v_aid NUMBER;
25    v_lid NUMBER;
26    v_lval NUMBER;
27    v_profile_val VARCHAR2(240);
28 BEGIN
29    IF(pname IS NULL OR pname = '') THEN
30       RETURN NULL;
31    END IF;
32 
33    OPEN c_profile_info(pname);
34    FETCH c_profile_info INTO v_pid, v_aid;
35    IF (c_profile_info%NOTFOUND) THEN
36       CLOSE c_profile_info;
37       RETURN NULL;
38    END IF;
39    CLOSE c_profile_info;
40 
41    v_lid := 10001;
42    v_lval := 0;
43    OPEN c_profile_value(v_pid, v_aid, v_lid, v_lval);
44    FETCH c_profile_value INTO v_profile_val;
45    IF (c_profile_value%NOTFOUND) THEN
46       CLOSE c_profile_value;
47       RETURN NULL;
48    END IF;
49    CLOSE c_profile_value;
50 
51    RETURN v_profile_val;
52 END;
53 
54 
55 
56 FUNCTION HIGH 	return number IS
57 BEGIN
58     BIS_COLLECTION_UTILITIES.put_line('within HIGH');
59 	return  nvl(to_number(FND_PROFILE.VALUE('BIS_TXN_COMPLEXITY_HIGH'),'999999999999999.9999999999999'), 0.5);
60 END;
61 
62 FUNCTION MEDIUM 	return number IS
63 BEGIN
64     BIS_COLLECTION_UTILITIES.put_line('within MEDIUM');
65 	return  nvl(to_number(FND_PROFILE.VALUE('BIS_TXN_COMPLEXITY_MEDIUM'),'999999999999999.9999999999999'),1.0);
66 END;
67 
68 FUNCTION LOW 	return number IS
69 BEGIN
70     BIS_COLLECTION_UTILITIES.put_line('within LOW');
71 	return  nvl(to_number(FND_PROFILE.VALUE('BIS_TXN_COMPLEXITY_LOW'),'999999999999999.9999999999999'), 2.0);
72 END;
73 
74 
75 
76 FUNCTION get_rate_type RETURN varchar2 is
77  l_rate_type varchar2(30);
78  begin
79     ---l_rate_type:=fnd_profile.value('BIS_PRIMARY_RATE_TYPE');
80     l_rate_type:=get_value_at_site_level('BIS_PRIMARY_RATE_TYPE');
81     return l_rate_type;
82  exception
83     when no_data_found then
84         return null;
85     when others then
86         raise;
87  end;
88 
89 
90 FUNCTION get_secondary_rate_type return varchar2  is
91 l_second_rate_type varchar2(30);
92 begin
93     ---l_second_rate_type:=fnd_profile.value('BIS_SECONDARY_RATE_TYPE');
94     l_second_rate_type:=get_value_at_site_level('BIS_SECONDARY_RATE_TYPE');
95     return l_second_rate_type;
96  exception
97     when no_data_found then
98         return null;
99     when others then
100         raise;
101 end;
102 
103 
104 function get_currency_code  return varchar2 is
105  l_currency_code varchar2(15);
106 begin
107     --l_currency_code:=fnd_profile.value('BIS_PRIMARY_CURRENCY_CODE');
108       l_currency_code:=get_value_at_site_level('BIS_PRIMARY_CURRENCY_CODE');
109      return l_currency_code;
110  exception
111     when no_data_found then
112         return null;
113     when others then
114         raise;
115 end;
116 
117 
118 function get_secondary_currency_code  return varchar2 is
119   l_second_curr_code varchar2(15);
120 begin
121    --- l_second_curr_code:=fnd_profile.value('BIS_SECONDARY_CURRENCY_CODE');
122    l_second_curr_code:=get_value_at_site_level('BIS_SECONDARY_CURRENCY_CODE');
123     return l_second_curr_code;
124  exception
125     when no_data_found then
126         return null;
127     when others then
128         raise;
129 end;
130 
131 
132 
133 function get_period_set_name return varchar2 is
134   l_period_set_name varchar2(15);
135 begin
136   --- l_period_set_name:=fnd_profile.value('BIS_ENTERPRISE_CALENDAR');
137      l_period_set_name:=get_value_at_site_level('BIS_ENTERPRISE_CALENDAR');
138    return l_period_set_name;
139  exception
140     when no_data_found then
141         return null;
142     when others then
143         raise;
144 end;
145 
146 
147 
148 function get_START_DAY_OF_WEEK_ID  return varchar2 is
149  l_start_dayofweek varchar2(30);
150 begin
151      ---l_start_dayofweek:=fnd_profile.value('BIS_START_DAY_OF_WEEK');
152      l_start_dayofweek:=get_value_at_site_level('BIS_START_DAY_OF_WEEK');
153      return l_start_dayofweek;
154  exception
155     when no_data_found then
156         return null;
157     when others then
158         raise;
159 end;
160 
161 
162 function get_period_type  return varchar2 is
163  l_period_type  varchar2(15);
164 begin
165     ---l_period_type:=fnd_profile.value('BIS_PERIOD_TYPE');
166     l_period_type:=get_value_at_site_level('BIS_PERIOD_TYPE');
167     return l_period_type;
168 exception
169     when no_data_found then
170         return null;
171     when others then
172         raise;
173 end;
174 
175 
176 function get_workforce_mes_type_id  return varchar2 is
177   l_workforce_mes_type_id varchar2(30);
178  begin
179   --  l_workforce_mes_type_id:=fnd_profile.value('BIS_WORKFORCE_MEASUREMENT_TYPE');
180       l_workforce_mes_type_id:=get_value_at_site_level('BIS_WORKFORCE_MEASUREMENT_TYPE');
181     return l_workforce_mes_type_id;
182  exception
183     when no_data_found then
184         return null;
185     when others then
186         raise;
187 end;
188 
189 
190 function get_auto_factor_mode  return varchar2 is
191   l_get_auto_factor_mode varchar2(30);
192  begin
193     ---l_get_auto_factor_mode:=fnd_profile.value('BIS_AUTO_FACTOR');
194      l_get_auto_factor_mode:=get_value_at_site_level('BIS_AUTO_FACTOR');
195     return l_get_auto_factor_mode;
196  exception
197     when no_data_found then
198         return null;
199     when others then
200         raise;
201 end;
202 
203 
204 
205 function get_ITM_HRCHY3_VBH_TOP_NODE   return varchar2 is
206   l_ITM_HRCHY3_VBH_TOP_NODE  varchar2(150);
207  begin
208     ---l_ITM_HRCHY3_VBH_TOP_NODE:=fnd_profile.value('BIS_ITEM_HIERARCHY3_VBH_TOP_NODE');
209     l_ITM_HRCHY3_VBH_TOP_NODE:=get_value_at_site_level('BIS_ITEM_HIERARCHY3_VBH_TOP_NODE');
210     return l_ITM_HRCHY3_VBH_TOP_NODE;
211  exception
212     when no_data_found then
213         return null;
214     when others then
215         raise;
216  end;
217 
218 
219 function get_GLOBAL_START_DATE   return date is
220 l_global_start_date varchar2(30);
221  begin
222     -- l_global_start_date:=fnd_profile.value('BIS_GLOBAL_START_DATE');
223      l_global_start_date:=get_value_at_site_level('BIS_GLOBAL_START_DATE');
224      return to_date(l_global_start_date, 'mm/dd/yyyy');
225  exception
226     when no_data_found then
227         return null;
228     when others then
229         raise;
230  end;
231 
232 function get_implementation_type    return varchar2 is
233 l_implementation_type varchar2(30);
234 begin
235   --- l_implementation_type:=fnd_profile.value('BIS_IMPLEMENTATION_TYPE');
236    l_implementation_type:=get_value_at_site_level('BIS_IMPLEMENTATION_TYPE');
237    return l_implementation_type;
238 exception
239     when no_data_found then
240         return null;
241     when others then
242         raise;
243 end;
244 
245 function get_item_category_set_1     return varchar2 is
246 l_item_category_set varchar2(30);
247 begin
248 --l_item_category_set:=fnd_profile.value('BIS_ITEM_CATEGORY_SET_1');
249 l_item_category_set:=get_value_at_site_level('BIS_ITEM_CATEGORY_SET_1');
250 return l_item_category_set;
251 exception
252     when no_data_found then
253         return null;
254     when others then
255         raise;
256 end;
257 
258 
259 function get_item_category_set_2     return varchar2 is
260 l_item_category_set varchar2(30);
261 begin
262 --l_item_category_set:=fnd_profile.value('BIS_ITEM_CATEGORY_SET_2');
263 l_item_category_set:=get_value_at_site_level('BIS_ITEM_CATEGORY_SET_2');
264 return l_item_category_set;
265 exception
266     when no_data_found then
267         return null;
268     when others then
269         raise;
270 end;
271 
272 
273 function get_item_category_set_3     return varchar2 is
274 l_item_category_set varchar2(30);
275 begin
276 --l_item_category_set:=fnd_profile.value('BIS_ITEM_CATEGORY_SET_3');
277 l_item_category_set:=get_value_at_site_level('BIS_ITEM_CATEGORY_SET_3');
278 return l_item_category_set;
279 exception
280     when no_data_found then
281         return null;
282     when others then
283         raise;
284 end;
285 
286 
287 function get_item_org_catset_1      return varchar2 is
288 l_item_org_catset varchar2(30);
289 begin
290 --- l_item_org_catset:=fnd_profile.value('BIS_ITEM_ORG_CATEGORY_SET_1');
291  l_item_org_catset:=get_value_at_site_level('BIS_ITEM_ORG_CATEGORY_SET_1');
292  return l_item_org_catset;
293 exception
294     when no_data_found then
295         return null;
296     when others then
297         raise;
298 end;
299 
300 function get_item_hierarchy3_type     return varchar2 is
301 l_item_hierarchy3_type varchar2(30);
302 begin
303 -- l_item_hierarchy3_type:=fnd_profile.value('BIS_ITEM_HIERARCHY3_TYPE');
304  l_item_hierarchy3_type:=get_value_at_site_level('BIS_ITEM_HIERARCHY3_TYPE');
305  return l_item_hierarchy3_type;
306 exception
307     when no_data_found then
308         return null;
309     when others then
310         raise;
311 end;
312 
313 function get_master_instance     return varchar2 is
314 l_master_instance varchar2(30);
315 begin
316 -- l_master_instance:=fnd_profile.value('BIS_MASTER_INSTANCE');
317 l_master_instance:=get_value_at_site_level('BIS_MASTER_INSTANCE');
318  return l_master_instance;
319 exception
320     when no_data_found then
321         return null;
322     when others then
323         raise;
324 end;
325 
326 
327 --rkumar:bug5864925
328 FUNCTION remove_extra_spaces(INPUT IN  VARCHAR2) RETURN VARCHAR2 IS
329         loop_length NUMBER;
330         spaceflag NUMBER(1);
331         tmp_char VARCHAR2(1);
332         result_string VARCHAR2(4000);
333 BEGIN
334         loop_length := LENGTH(INPUT);
335         spaceflag := 0;
336         FOR i IN 1 .. loop_length
337         LOOP
338           tmp_char := SUBSTR(INPUT,   i,   1);
339           IF tmp_char = ' ' THEN
340             IF spaceflag = 1 THEN
341               NULL;
342             ELSE
343               spaceflag := 1;
344               result_string := result_string || tmp_char;
345             END IF;
346           ELSE
347             IF spaceflag = 1 THEN
348               spaceflag := 0;
349               result_string := result_string || tmp_char;
350             ELSE
351               result_string := result_string || tmp_char;
352             END IF;
353           END IF;
354         END LOOP;
355 
356         RETURN result_string;
357 END;
358 
359 function GET_DISPLAY_VALUE(NAME in varchar2) return varchar2 is
360         l_temp VARCHAR2(4000);
361         sqlvalidation VARCHAR2(4000);
362         l_sql VARCHAR2(4000);
363         l_val VARCHAR2(255);
364         l_display_val VARCHAR2(255);
365         l_start_index number;
366         l_end_index number;
367         l_into_index number;
368         l_from_index number;
369         l_where_index number;
370         l_stmt varchar2(4000);
371 begin
372 	l_val := get_value_at_site_level(upper(name));
373 
374 	if (l_val is null) or (l_val = '') then
375 	  return '';
376 	end if;
377 
378         --get sqlvalidation
379         l_temp := 'select upper(sql_validation) from fnd_profile_options where profile_option_name = UPPER(:name)';
380         execute immediate l_temp into sqlvalidation using name;
381 
382 	--if there is no sql validation, display value is same as internal value.
383         if (sqlvalidation is null) then
384 	  return l_val;
385 	end if;
386 
387         --get parsed sql l_sql
388         l_start_index := instr(sqlvalidation, '"', 1, 1);
389         l_end_index := instr(sqlvalidation, 'COLUMN=', 1, 1);
390         l_temp := substr(sqlvalidation, l_start_index+1, l_end_index-l_start_index-1);
391 
392         -- now backtrack till we hit the first " from the reverse
393 
394          --l_end_index := l_end_index - instr(substr(l_temp, l_start_index, l_end_index), '"' -1,1);
395 
396         l_temp := substr(l_temp, 1, instr(l_temp,'"', -1,1)-1);
397         --Bug#5864925 updated to suppport multiple spaces between into and :
398         l_temp := remove_extra_spaces(l_temp);
399         l_into_index := instr(l_temp, 'INTO :', 1, 1); --??? what if other words have 'into'?
400         l_from_index := instr(l_temp, 'FROM', l_into_index, 1);
401         l_sql := substr(l_temp, 1, l_into_index-1) || substr(l_temp, l_from_index, length(l_temp)-l_from_index+1);
402 
403         --get display value from l_sql
407         -- REMOVE \" and contents between successive \" that is
404 	l_stmt := 'SELECT LOOKUP_CODE, MEANING FROM (' || l_sql ||
405 		') WHERE LOOKUP_CODE = :val';
406 
408 	-- found in some EDW profiles : EDW_DEBUG and EDW_TRACE
409         -- BUG 2516318
410         LOOP
411             l_start_index := 0;
412             l_end_index := 0;
413             L_START_INDEX := instr(l_stmt, '\"', 1, 1);
414             L_END_INDEX := instr(l_stmt, '\"', 1, 2);
415             EXIT WHEN l_start_index =0 OR l_end_index = 0;
416             L_STMT := substr(l_stmt, 1, L_START_INDEX-1) || substr(l_stmt, l_end_index+2);
417         END LOOP;
418         execute immediate l_stmt into l_val, l_display_val using l_val;
419 
420 
421         return l_display_val;
422 end get_display_value ;
423 
424   procedure get_global_parameters(
425 	 p_parameter_list	IN DBMS_SQL.VARCHAR2_TABLE,
426 	 p_attribute_values	OUT NOCOPY DBMS_SQL.VARCHAR2_TABLE) IS
427  l_count  number :=0 ;
428  l_profile_name varchar2(100);
429 
430  BEGIN
431 null;
432 
433 	IF (p_parameter_list.count = 0) THEN
434 		return;
435 	END IF;
436 
437 	l_count := p_parameter_list.first;
438 
439 
440 	LOOP
441 		l_profile_name := p_parameter_list(l_count);
442 	  	IF (l_profile_name = 'EDW_DEBUG') THEN
443 		  l_profile_name := 'BIS_PMF_DEBUG';
444 	  	ELSIF (l_profile_name = 'EDW_TRACE') THEN
445 		  l_profile_name := 'BIS_SQL_TRACE';
446 	  	END IF;
447 
448 	   p_attribute_values(l_count) := fnd_profile.value(l_profile_name);
449 
450 	  EXIT WHEN l_count = p_parameter_list.last;
451 	  l_count := p_parameter_list.next(l_count);
452 	END LOOP;
453 
454 	EXCEPTION WHEN OTHERS THEN
455 		p_attribute_values.delete;
456 		raise;
457 
458  END;
459 
460    FUNCTION check_global_parameters(
461 	p_parameter_list       IN DBMS_SQL.VARCHAR2_TABLE) return BOOLEAN IS
462   l_count number := 0;
463   l_profile_list varchar2(3000) := '';
464   l_new_line  varchar2(10):='
465 ';
466   l_return_value boolean := true;
467   l_profile_name varchar2(100);
468 
469   BEGIN
470 
471 	l_return_value := true;
472 	l_profile_list := null;
473 	IF (p_parameter_list.count = 0) THEN
474 		return true;
475 	END IF;
476 
477 	l_count := p_parameter_list.first;
478 
479 	LOOP
480 
481 	  l_profile_name := p_parameter_list(l_count);
482 	  IF (l_profile_name = 'EDW_DEBUG') THEN
483 		l_profile_name := 'BIS_PMF_DEBUG';
484 	  ELSIF (l_profile_name = 'EDW_TRACE') THEN
485 		l_profile_name := 'BIS_SQL_TRACE';
486 	  END IF;
487 
488 	  IF (fnd_profile.value(l_profile_name) IS NULL) THEN
489 
490 		l_profile_list := l_profile_list || l_profile_name;
491 		l_return_value := false;
492 	  END IF;
493 
494 	  EXIT WHEN l_count = p_parameter_list.last;
495 	  l_count := p_parameter_list.next(l_count);
496 
497 
498 	END LOOP;
499 
500 	IF (l_return_value) THEN
501 		null;
502 	ELSE
503 	fnd_message.set_name('BIS', 'BIS_DBI_PROFILE_NOT_SET');
504         fnd_message.set_token('PROFILE', l_profile_list);
505 
506 	bis_collection_utilities.log(fnd_message.get);
507 	END IF;
508 
509 	return l_return_value;
510   END;
511 
512 
513 
514 
515 FUNCTION get_batch_size(p_complexity_level IN NUMBER) RETURN NUMBER IS
516 
517 l_batch_size number := 10000;
518 
519 BEGIN
520      BIS_COLLECTION_UTILITIES.put_line('within get_batch_size');
521 	IF (p_complexity_level > 0) THEN
522 		l_batch_size := nvl(FND_PROFILE.value('EDW_PUSH_SIZE'), 10000) * p_complexity_level;
523         BIS_COLLECTION_UTILITIES.put_line('l_batch_size: '||l_batch_size);
524 	ELSE
525 		return 10000;
526 	END IF;
527 
528 	IF (l_batch_size < 1000) THEN
529 		return 1000;
530 	ELSE
531 		return l_batch_size;
532 	END IF;
533 
534 END;
535 
536 FUNCTION get_degree_of_parallelism RETURN NUMBER IS
537 l_parallel number;
538 BEGIN
539 
540 	l_parallel := null;
541 	l_parallel := floor(fnd_profile.value('EDW_PARALLEL_SRC')); -- gets value of profile option
542 
543 	  /* Set by the customer, return this value */
544 
545 	  IF (l_parallel IS NOT NULL and l_parallel > 0) THEN
546  		return l_parallel;
547 	  END IF;
548 
549 	  /* Not set by customer, so query v$parameters */
550 
551 	  begin
552      -------Changed to the following logic for bug 4007212.
553      ----the logic was given by performance team
554       select min(para.value) into  l_parallel
555 	  from v$parameter para
556 	  where para.name in ('cpu_count','parallel_max_servers');
557 
558       exception when no_data_found then
559 			l_parallel := 1;
560 	  end;
561 
562 	  IF (l_parallel IS NULL) THEN
563 		l_parallel:=1;
564 	  END IF;
565 
566 	  l_parallel := floor(l_parallel/2);
567 	  IF (l_parallel = 0) THEN
568 		l_parallel := 1;
569 	  END IF;
570 
571 	  return l_parallel;
572 
573 END;
574 
575 
576 function GET_PRIMARY_CURDIS_NAME return varchar2
577 is
578   l_name VARCHAR2(300) := null;
579 begin
580   --l_name := fnd_profile.value('BIS_PRIMARY_CURDISP_NAME'); -- gets value of profile option
581   l_name:=get_value_at_site_level('BIS_PRIMARY_CURDISP_NAME');
582   return l_name;
583 end;
584 
585 function GET_SECONDARY_CURDIS_NAME return varchar2
586 is
587   l_name VARCHAR2(300) := null;
588 begin
592 end;
589 ---  l_name := fnd_profile.value('BIS_SECONDARY_CURDISP_NAME'); -- gets value of profile option
590   l_name:=get_value_at_site_level('BIS_SECONDARY_CURDISP_NAME');
591   return l_name;
593 
594 
595 
596 
597 FUNCTION get_current_date_id return DATE IS
598 l_date DATE := trunc(sysdate);
599 BEGIN
600 
601 	BEGIN
602 	SELECT current_date_id into l_date FROM bis_system_date;
603 	return l_date;
604 
605 	EXCEPTION when no_data_found THEN
606 		return null;
607 	END;
608 
609 END;
610 
611 
612 FUNCTION get_annualized_rate_type return varchar2  is
613 l_annual_rate_type varchar2(30);
614 begin
615    ---l_annual_rate_type:=fnd_profile.value('BIS_ANNUALIZED_RATE_TYPE');
616     l_annual_rate_type:=get_value_at_site_level('BIS_ANNUALIZED_RATE_TYPE');
617     return l_annual_rate_type;
618  exception
619     when no_data_found then
620         return null;
621     when others then
622         raise;
623 end;
624 
625 
626 function get_annualized_currency_code  return varchar2 is
627   l_annual_curr_code varchar2(15);
628 begin
629    --- l_annual_curr_code:=fnd_profile.value('BIS_ANNUALIZED_CURRENCY_CODE');
630     l_annual_curr_code:=get_value_at_site_level('BIS_ANNUALIZED_CURRENCY_CODE');
631     return l_annual_curr_code;
632  exception
633     when no_data_found then
634         return null;
635     when others then
636         raise;
637 end;
638 
639 function GET_ANNUALIZED_CURDIS_NAME  return varchar2
640 is
641   l__disp_name VARCHAR2(300);
642 begin
643   ---l__disp_name := fnd_profile.value('BIS_ANNUALIZED_CURDISP_NAME'); -- gets value of profile option
644    l__disp_name:=get_value_at_site_level('BIS_ANNUALIZED_CURDISP_NAME');
645   return l__disp_name;
646  exception
647     when no_data_found then
648         return null;
649     when others then
650         raise;
651 end;
652 
653 -- get the profile option value at site level
654 -- although this profile option is enabled for site, application, responsibility, and user levels
655 FUNCTION get_low_percentage_range RETURN VARCHAR2
656 IS
657    l_low_percentage_range VARCHAR2(300);
658 BEGIN
659    l_low_percentage_range := get_value_at_site_level('BIS_PMV_CHANGE_LOW_RANGE'); -- gets value of profile option
660    RETURN l_low_percentage_range;
661 EXCEPTION
662    when no_data_found then
663       return null;
664    when others then
665       raise;
666 END get_low_percentage_range;
667 
668 
669 -- get the profile option value at site level
670 -- although this profile option is enabled for site, application, responsibility, and user levels
671 FUNCTION get_high_percentage_range
672   RETURN VARCHAR2
673 IS
674    l_high_percentage_range VARCHAR2(300);
675 BEGIN
676    l_high_percentage_range := get_value_at_site_level('BIS_PMV_CHANGE_HIGH_RANGE'); -- gets value of profile option
677    RETURN l_high_percentage_range;
678 EXCEPTION
679    when no_data_found then
680       return null;
681    when others then
682       RAISE;
683 END get_high_percentage_range;
684 
685 
686 FUNCTION get_treasury_rate_type
687   RETURN VARCHAR2
688 IS
689    l_treasury_rate_type VARCHAR2(300);
690 BEGIN
691   ---l_treasury_rate_type := fnd_profile.value('BIS_TREASURY_RATE_TYPE'); -- gets value of profile option
692   l_treasury_rate_type:=get_value_at_site_level('BIS_TREASURY_RATE_TYPE');
693   RETURN l_treasury_rate_type;
694 EXCEPTION
695    when no_data_found then
696       return null;
697    when others then
698       raise;
699 END get_treasury_rate_type;
700 
701 FUNCTION GET_BIS_CUST_CLASS_TYPE
702   RETURN VARCHAR2
703 IS
704 l_cust_class_type VARCHAR2(300);
705 BEGIN
706 --  l_cust_class_type := fnd_profile.value('BIS_CUST_CLASS_TYPE'); -- gets value of profile option
707     l_cust_class_type:= get_value_at_site_level('BIS_CUST_CLASS_TYPE'); -- gets value of profile option
708   RETURN l_cust_class_type;
709 EXCEPTION
710    when no_data_found then
711       return null;
712    when others then
713       raise;
714 END GET_BIS_CUST_CLASS_TYPE;
715 
716 END bis_common_parameters;
717