1 PACKAGE ISC_DEPOT_RPT_UTIL_PKG AS
2 --$Header: iscdepotutils.pls 120.0 2005/05/25 17:23:35 appldev noship $
3 -- for use in get_agg_flag function
4 TYPE mv_agg_tbl_typ is TABLE of NUMBER INDEX BY BINARY_INTEGER ;
5 TYPE bucket_range_typ is TABLE of NUMBER INDEX BY BINARY_INTEGER;
6
7
8 -- Global Variables needed in report query.
9 g_query_typ VARCHAR2(32767);
10 g_view_by_typ VARCHAR2(120);
11 g_view_by_col_typ VARCHAR2(120);
12 g_xtd_typ VARCHAR2(10);
13 g_where_clause_typ VARCHAR2(2000);
14 g_mv_typ VARCHAR2(5000);
15 g_module_name_typ VARCHAR2(100);
16
17 -- Bit Map for each dimension arranged in ascending order of their cost
18 --(associated with aggregation on them)Grouping id of the mv is calculated
19 --with the dimensions placed in the same bit position as this
20
21 --------------------------------------------------------------------------
22 -- Repair Type -> 00001 -> 1
23 -- Repair Order Organization -> 00010 -> 2
24 -- Product Category -> 00100 -> 4
25 -- Customer -> 01000 -> 8
26 -- Item -> 10000 -> 16
27 --------------------------------------------------------------------------
28
29 C_REPAIR_TYPE_BMAP CONSTANT INTEGER := 1;
30 C_ORG_BMAP CONSTANT INTEGER := 2;
31 C_CATEGORY_BMAP CONSTANT INTEGER := 4;
32 C_CUSTOMER_BMAP CONSTANT INTEGER := 8;
33 C_ITEM_BMAP CONSTANT INTEGER := 16;
34 C_DEBUG_LEVEL CONSTANT INTEGER := 3;
35
36 -- process_parameters
37 -- Generic routine to process the parameters passed in from the PMV
38 -- page.
39 -- Date Author Action
40 -- 02-Aug-2004 Vijay Babu Gandhi created.
41
42 PROCEDURE process_parameters (p_param IN BIS_PMV_PAGE_PARAMETER_TBL,
43 x_view_by OUT NOCOPY VARCHAR2,
44 x_view_by_col_name OUT NOCOPY VARCHAR2,
45 x_comparison_type OUT NOCOPY VARCHAR2,
46 x_xtd OUT NOCOPY VARCHAR2,
47 x_cur_suffix OUT NOCOPY VARCHAR2,
48 x_where_clause OUT NOCOPY VARCHAR2,
49 x_mv OUT NOCOPY VARCHAR2,
50 x_join_tbl OUT NOCOPY poa_dbi_util_pkg.poa_dbi_join_tbl,
51 x_mv_type OUT NOCOPY VARCHAR2,
52 x_aggregation_flag OUT NOCOPY NUMBER,
53 p_mv_set IN VARCHAR2,
54 p_trend IN VARCHAR2,
55 x_custom_output OUT NOCOPY BIS_QUERY_ATTRIBUTES_TBL);
56
57 PROCEDURE GET_BUCKET_WHERE_CLAUSE (p_param IN BIS_PMV_PAGE_PARAMETER_TBL,
58 p_dim_level IN VARCHAR2,
59 p_bucket_short_name IN BIS_BUCKET.SHORT_NAME%TYPE,
60 p_col_name IN VARCHAR2,
61 x_where_clause IN OUT NOCOPY VARCHAR2,
62 x_custom_output OUT NOCOPY bis_query_attributes_tbl);
63
64 -- get_agg_flag
65 -- Generic routine to get the appropriate aggregation_flag for the selected parameters
66 -- Points of note:
67 -- Date Author Action
68 -- 02-Aug-2004 Vijay Babu Gandhi created.
69
70 FUNCTION get_agg_flag (p_mv_set IN VARCHAR2
71 ,p_dim_bmap IN NUMBER
72 ,p_mv_type IN VARCHAR2)
73 RETURN NUMBER;
74
75 FUNCTION GET_VIEWBY_SELECT_CLAUSE (p_viewby IN VARCHAR2)
76 RETURN VARCHAR2;
77
78 -- write
79 -- Generic routine for debug purpose
80 -- Date Author Action
81 -- 02-Aug-2004 Vijay Babu Gandhi created.
82
83 PROCEDURE write ( p_module IN VARCHAR2,
84 p_err_stage IN VARCHAR2,
85 p_debug_level IN INTEGER);
86
87 -- get_repair_order_url
88 -- routine for getting the url for repair order drill down
89 -- Date Author Action
90 -- 25-Oct-2004 Vijay Babu Gandhi created.
91
92 FUNCTION get_repair_order_url
93 RETURN VARCHAR2;
94
95 -- get_service_request_url
96 -- routine for getting the url for Service Request drill down
97 -- Date Author Action
98 -- 25-Oct-2004 Vijay Babu Gandhi created.
99
100 FUNCTION get_service_request_url
101 RETURN VARCHAR2;
102
103 END ISC_DEPOT_RPT_UTIL_PKG ;