DBA Data[Home] [Help]

PACKAGE BODY: APPS.BIV_DBI_PARAM_PKG

Source


1 package body biv_dbi_param_pkg as
2 /* $Header: bivsrvrparb.pls 120.0 2005/05/24 18:11:52 appldev noship $ */
3 
4 function get_params( p_region_code varchar2 default null )
5   return varchar2 as
6 
7   l_basic_parameters varchar2(2000);
8 
9 begin
10 
11   l_basic_parameters :=
12         '&AS_OF_DATE='        || fnd_date.date_to_chardate(TRUNC(sysdate)) ||
13         case
14           when get_def_time_per like '%FII_ROLLING_WEEK%' then
15             '&FII_ROLLING_WEEK=' || get_def_time_per
16           when get_def_time_per like '%FII_ROLLING_MONTH%' then
17             '&FII_ROLLING_MONTH=' || get_def_time_per
18           when get_def_time_per like '%FII_ROLLING_QTR%' then
19             '&FII_ROLLING_QTR=' || get_def_time_per
20           when get_def_time_per like '%FII_ROLLING_YEAR%' then
21             '&FII_ROLLING_YEAR=' || get_def_time_per
22         end ||
23         case
24           when get_def_time_comp like '%YEARLY%' then
25             '&YEARLY='         || get_def_time_comp
26           else
27             '&SEQUENTIAL='     || get_def_time_comp
28         end ||
29         -- note that "All" needs to be in mxed case to work correctly
30         '&REQUESTTYPE=All' ||
31         '&ENI_ITEM_VBH_CAT=All';
32 
33   -- The following was added to show only unresolved service requests on the page
34   if( p_region_code IN ('BIV_DBI_UNR_BAK_TBL' ,'BIV_DBI_UNR_BAK_DBN_TRD' ,'BIV_DBI_UNR_BAK_TRD'))
35   then
36        l_basic_parameters :=  l_basic_parameters ||
37         '&BIV_RES_STATUS=N';
38   end if;
39 
40   case
41     when p_region_code like '%TRD%' then
42       return
43         l_basic_parameters ||
44         '&VIEW_BY=' || get_def_time_per;
45 
46     when p_region_code like '%TBL%' then
47       return
48         l_basic_parameters ||
49         '&VIEW_BY=' || 'SEVERITY+SEVERITY';
50 
51     when p_region_code like '%KPI%' then
52       return
53         l_basic_parameters ||
54         '&VIEW_BY=' || 'BIV_REQUEST_TYPE+REQUESTTYPE';
55     when p_region_code like '%PARAM%' then
56       return
57         l_basic_parameters;
58 
59     else
60       return
61         l_basic_parameters;
62 
63   end case;
64 
65   return '&AS_OF_DATE=' || fnd_date.date_to_chardate(TRUNC(sysdate));
66 
67 end get_params;
68 
69 function get_def_time_per
70   return varchar2 as
71 
72 begin
73 
74   return 'TIME+FII_ROLLING_MONTH';
75 
76 end get_def_time_per;
77 
78 function get_def_time_comp
79   return varchar2 as
80 
81 begin
82 
83   return 'TIME_COMPARISON_TYPE+SEQUENTIAL';
84 
85 end get_def_time_comp;
86 
87 end biv_dbi_param_pkg;