1 PACKAGE GCS_DYNAMIC_UTIL_PKG AS
2 /* $Header: gcsdynutils.pls 120.1 2005/10/30 05:17:53 appldev noship $ */
3
4
5 -- Definition of Global Data Types and Variables
6
7 -- Action types for writing module information to the log file.
8 -- g_module_enter CONSTANT VARCHAR2 (2) := '>>';
9 -- g_module_success CONSTANT VARCHAR2 (2) := '<<';
10 -- g_module_failure CONSTANT VARCHAR2 (2) := '<x';
11 -- A newline character. Included for convenience when writing long strings.
12 -- g_nl CONSTANT VARCHAR2 (1) := fnd_global.local_chr(10);
13
14 g_applsys_username VARCHAR2(30);
15
16
17 --
18 -- Procedure
19 -- Build_Comma_List
20 -- Purpose
21 -- Build a list of the dimensions, delimited by commas. Use
22 -- p_default_text if the dimension is not used.
23 -- It is useful to build the columns for a Select, Order By or Group By.
24 -- Arguments
25 -- p_prefix The prefix to put on the dimensions
26 -- p_suffix The suffix to put on the dimensions
27 -- p_default_text The text to be inserted for the dim. not required case
28 -- p_first_rownum The first row number to use for ad_ddl
29 -- Example
30 -- GCS_DYNAMIC_UTIL_PKG.Build_Comma_List('g.', '', '', 123);
31 -- Notes
32 -- 1. If p_default_text is not null, it must include the ',' at the end.
33 -- 2. Returns the line number for the next row after the list.
34 --
35 FUNCTION Build_Comma_List(p_prefix VARCHAR2,
36 p_suffix VARCHAR2,
37 p_default_text VARCHAR2,
38 p_first_rownum NUMBER) RETURN NUMBER;
39
40 --
41 -- Procedure
42 -- Build_Join_List
43 -- Purpose
44 -- Build a list of the dimension join conditions, delimited by commas.
45 -- Skip if the dimension is not used.
46 -- It is useful to build the join conditions for the Where clauses.
47 -- Arguments
48 -- p_left The text to put before the left dimension
49 -- p_middle The text to put between the two dimensions
50 -- p_right The text to put after the right dimension
51 -- p_first_rownum The first row number to use for ad_ddl
52 -- Example
53 -- GCS_DYNAMIC_UTIL_PKG.Build_Join_List('AND g.', ' = h.', '', 123);
54 -- Notes
55 -- Returns the line number for the next row after the list.
56 --
57 FUNCTION Build_Join_List(p_left VARCHAR2,
58 p_middle VARCHAR2,
59 p_right VARCHAR2,
60 p_first_rownum NUMBER) RETURN NUMBER;
61
62 --
63 -- Procedure
64 -- Build_Fem_Comma_List
65 -- Purpose
66 -- Build a list of the dimensions, delimited by commas. Use
67 -- p_default_text if the dimension is not used.
68 -- It is useful to build the columns for a Select, Order By or Group By.
69 -- Arguments
70 -- p_prefix The prefix to put on the dimensions
71 -- p_suffix The suffix to put on the dimensions
72 -- p_default_text The text to be inserted for the dim. not required case
73 -- p_first_rownum The first row number to use for ad_ddl
74 -- p_value_req Default value required or not
75 -- Example
76 -- GCS_DYNAMIC_UTIL_PKG.Build_Fem_Comma_List('g.', '', '', 123, 'N');
77 -- Notes
78 -- 1. If p_default_text is not null, it must include the ',' at the end.
79 -- 2. Returns the line number for the next row after the list.
80 --
81 FUNCTION Build_Fem_Comma_List(p_prefix VARCHAR2,
82 p_suffix VARCHAR2,
83 p_default_text VARCHAR2,
84 p_first_rownum NUMBER,
85 p_value_req VARCHAR2) RETURN NUMBER;
86
87
88 --
89 -- Procedure
90 -- Build_interco_Comma_List
91 -- Purpose
92 -- Build a list of the dimensions, delimited by commas. Use
93 -- p_default_text if the dimension is not used.
94 -- It is useful to build the columns for a Select, Order By or Group By.
95 -- Arguments
96 -- p_prefix The prefix to put on the dimensions
97 -- p_suffix The suffix to put on the dimensions
98 -- p_default_text The text to be inserted for the dim. not required case
99 -- p_first_rownum The first row number to use for ad_ddl
100 -- Example
101 -- GCS_DYNAMIC_UTIL_PKG.Build_interco_Comma_List('g.', '', '', 123);
102 -- Notes
103 -- 1. If p_default_text is not null, it must include the ',' at the end.
104 -- 2. Returns the line number for the next row after the list.
105 --
106 FUNCTION Build_interco_Comma_List( p_pre_prefix VARCHAR2,
107 p_prefix VARCHAR2,
108 P_post_prefix VARCHAR2,
109 p_pre_suffix VARCHAR2,
110 p_suffix VARCHAR2,
111 p_post_suffix VARCHAR2,
112 p_default_text VARCHAR2,
113 p_first_rownum NUMBER) RETURN NUMBER;
114
115 -- Function
116 -- Index_Col_List
117 -- Purpose
118 -- Build a list of the dimensions required by GCS , delimited by commas.
119 -- Its used for listing the columns when creating the dynamic indexes
120 -- Arguments
121 -- collist Contains the concatenated list of columns
122 -- Example
123 -- GCS_DYNAMIC_UTIL_PKG.Index_Col_List( collist);
124 --
125 FUNCTION Index_Col_List( collist OUT NOCOPY VARCHAR2) RETURN VARCHAR2;
126
127 END GCS_DYNAMIC_UTIL_PKG;