DBA Data[Home] [Help]

PACKAGE: APPS.GL_FLEXFIELDS_PKG

Source


1 PACKAGE gl_flexfields_pkg AS
2 /*  $Header: glumsfls.pls 120.8 2006/04/03 17:00:38 cma ship $ */
3 --
4 -- Package
5 --   gl_flexfields_pkg
6 -- Purpose
7 --   This package contains various flexfields utilities.
8 --   This package should eventually be outdated by AOL provided
9 --   PL/SQL and/or user exits
10 --
11 -- History
12 --   12-17-93   D J Ogg		Created
13 --
14 
15   --
16   -- Exceptions
17   --
18   -- User defined exceptions for gl_seg_val_desc:
19   -- o INVALID_SEGNUM   - User has passed in invalid combination of
20   --                      chart of account id and segment number.
21   --
22   INVALID_SEGNUM      EXCEPTION;
23 
24 
25   --
26   -- Procedure
27   --   get_account_segment
28   -- Purpose
29   --   Gets the name of the account segment for this chart of accounts
30   -- History
31   --   12-17-93  D. J. Ogg    Created
32   -- Arguments
33   --   coa_id		The chart of accounts id
34   -- Example
35   --   acctseg := gl_budget_entities_pkg.get_account_segment(101);
36   -- Notes
37   --
38   FUNCTION get_account_segment(coa_id NUMBER) RETURN VARCHAR2;
39 
40    --
41   -- Procedure
42   --   get_description
43   --
44   -- Purpose
45   --   Gets the description for an account or balancing segment value
46   --
47   -- History
48   --   13-Jan-97  D J Ogg 	Created
49   --
50   -- Arguments
51   --   x_coa_id 		ID of the current chart of accounts
52   --   x_qual_text		GL_ACCOUNT or GL_BALANCING
53   --   x_segment_val		Segment value
54   FUNCTION get_description(
55 	      x_coa_id					NUMBER,
56 	      x_qual_text				VARCHAR2,
57 	      x_segment_val				VARCHAR2
58 	   ) RETURN VARCHAR2;
59 
60   --
61   -- Procedure
62   --   get_any_seg_description
63   --
64   -- Purpose
65   --   Gets the description for any segment value
66   --
67   -- History
68   --   01-Dec-98  K Vora 	Created
69   --
70   -- Arguments
71   --   x_coa_id 		ID of the current chart of accounts
72   --   x_qual_text		GL_ACCOUNT or GL_BALANCING
73   --   x_segment_val		Segment value
74   --   x_seg_num                Segment position
75   FUNCTION get_any_seg_description(
76 	      x_coa_id					NUMBER,
77 	      x_qual_text				VARCHAR2,
78 	      x_segment_val				VARCHAR2,
79               x_seg_num                                 NUMBER
80 	   ) RETURN VARCHAR2;
81 
82 
83   -- Procedure
84   --   get_coa_name
85   --
86   -- Purpose
87   --   Gets the Chart of Accounts name
88   --
89   -- History
90   --   26-Feb-98   S Kung	Created
91   --
92   -- Arguments
93   --   coa_id			Chart of Accounts ID
94   FUNCTION get_coa_name(coa_id	NUMBER) RETURN VARCHAR2;
95 
96   --   Procedure
97   --     get_coa_info
98   --   Purpose
99   --     Gets various chart of accounts attributes based on
100   --     the coa id provided.
101   --   History
102   --     11-12-93   K Vora      Created
103   --   Arguments
104   --     x_chart_of_accounts_id  ID of the chart of accounts
105   --     <segment information>
106   --   Example
107   --     GL_FLEXFIELDS_PKG.get_coa_info(50134, <variables>);
108   --
109   PROCEDURE get_coa_info (x_chart_of_accounts_id    IN     NUMBER,
110                           x_segment_delimiter       IN OUT NOCOPY VARCHAR2,
111                           x_enabled_segment_count   IN OUT NOCOPY NUMBER,
112                           x_segment_order_by        IN OUT NOCOPY VARCHAR2,
113                           x_accseg_segment_num      IN OUT NOCOPY NUMBER,
114                           x_accseg_app_col_name     IN OUT NOCOPY VARCHAR2,
115                           x_accseg_left_prompt      IN OUT NOCOPY VARCHAR2,
116                           x_balseg_segment_num      IN OUT NOCOPY NUMBER,
117                           x_balseg_app_col_name     IN OUT NOCOPY VARCHAR2,
118                           x_balseg_left_prompt      IN OUT NOCOPY VARCHAR2,
119                           x_ieaseg_segment_num      IN OUT NOCOPY NUMBER,
120                           x_ieaseg_app_col_name     IN OUT NOCOPY VARCHAR2,
121                           x_ieaseg_left_prompt      IN OUT NOCOPY VARCHAR2);
122 
123   --
124   -- Function
125   --    get_sd_description_sql
126   -- PURPOSE
127   --    wrapper function to call get_description_sql to get
128   --    segment value description for gl_oasis_summary_data_v
129   -- History
130   --    Jun-28-99       Maria Hui       Created
131   -- Arguments
132   --    x_coa_id        Number          Chart of account id.
133   --    x_pos		Number          Indicate whether it is getting
134   --					description for balancing segment (1)
135   --					or drilldown segment (2).
136   --    x_seg_num       Number          Segment number.
137   --    x_seg_val       Varchar2        Segment value.
138   -- Returns
139   --    Segment value description (Varchar2)
140   -- Example
141   --     GL_FLEXFIELDS_PKG.get_sd_description_sql(101, 1, 3, '1110');
142   -- Notes
143   --
144 
145     FUNCTION get_sd_description_sql (
146             x_coa_id    IN NUMBER,
147             x_pos       IN NUMBER,
148             x_seg_num   IN NUMBER,
149             x_seg_val   IN VARCHAR2 ) RETURN VARCHAR2;
150 
151 
152   --
153   -- Function
154   --    get_description_sql
155   -- PURPOSE
156   --    get segment value description
157   -- History
158   --    Jun-24-99       Maria Hui       Created
159   -- Arguments
160   --    x_coa_id        Number          Chart of account id.
161   --    x_seg_num       Number          Segment number.
162   --    x_seg_val       Varchar2        Segment value.
163   -- Returns
164   --    Segment value description (Varchar2)
165   -- Example
166   --    gl_seg_val_desc.get_description_sql(101, 3, '1110');
167   -- Notes
168   --
169     FUNCTION get_description_sql (
170             		x_coa_id    	IN NUMBER,
171                         x_seg_num       IN NUMBER,
172                         x_seg_val       IN VARCHAR2 ) RETURN VARCHAR2;
173 
174   --
175   -- Function
176   --    get_summary_flag
177   -- Purpose
178   --    Get the summary flag for the segment value in the given value set
179   -- History
180   --    Feb-28-2001	T Cheng		Created
181   -- Arguments
182   --    x_value_set_id		the value set id
183   --    x_segment_value		the value to be examined
184   -- Notes
185   --
186   FUNCTION get_summary_flag(x_value_set_id   NUMBER,
187                             x_segment_value  VARCHAR2) RETURN VARCHAR2;
188 
189 
190   --
191   -- Function
192   --    get_parent_from_children
193   -- PURPOSE
194   --    Determines the direct parent of a child range given
195   --    the child range, an ancestor of the child range, and
196   --    the value set id
197   -- History
198   --    08-APR-2002	D J Ogg		Created
199   -- Arguments
200   --    vs_id		Value Set id
201   --    ancestor	Ancestor of the child range
202   --    child_low	Low value of the child range
203   --    child_high      High value of the child range
204   --    parent_num      If child range has multiple parents,
205   --                    which one to pick
206   -- Returns
207   --    Direct parent of the child range
208   -- Example
209   --    x:=gl_flexfields_pkg.get_parent_from_children(50, 'A', '100', '150', 1)
210   -- Notes
211   --
212     FUNCTION get_parent_from_children(
213 			vs_id		IN NUMBER,
214 			ancestor	IN VARCHAR2,
215 			child_low	IN VARCHAR2,
216 			child_high	IN VARCHAR2,
217 			parent_num	IN NUMBER) RETURN VARCHAR2;
218 
219   --
220   -- Function
221   --    get_concat_description
222   -- PURPOSE
223   --    Retrieves the concatenated account description.
224   -- History
225   --    08-DEC-2004	K Vora 		Created
226   -- Arguments
227   --    x_coa_id                  Chart of accounts id
228   --    x_ccid                    Code combination id
229   --    x_enforce_value_security  Whether to enforce segment security, Y or N.
230   -- Returns
231   --    Concatenated account description
232   -- Example
233   --    descp := gl_flexfields_pkg.get_concat_description(101, 13131)
234   -- Notes
235   --    If x_enforce_value_security = 'Y' and the account is secured, the
236   --    function will return a string not likely to be a valid description.
237   --    It's the caller's responsibility to check the value before using it.
238   --
239   FUNCTION Get_Concat_Description(
240                    x_coa_id                  NUMBER,
241                    x_ccid                    NUMBER,
242                    x_enforce_value_security  VARCHAR2 DEFAULT 'Y'
243                    ) RETURN VARCHAR;
244 
245   --
246   -- Function
247   --    get_qualifier_segnum
248   -- PURPOSE
249   --    Retrieves the segment number corresponding to the qualifier name entered.
250   -- DESCRIPTION
251   --   	Gets the segment number corresponding to the **UNIQUE** qualifier
252   --   	name entered.  Segment number is the display order of the segment
253   --   	not to be confused with the SEGMENT_NUM column of the
254   -- 	  FND_ID_FLEX_SEGMENTS table.  Returns segment_number if ok,
255   -- 	  otherwise 0.
256   -- History
257   --    06-APR-2005	A Desu  Created
258   -- Arguments
259   --    x_key_flex_code        IN  VARCHAR2
260   --    x_chart_of_accounts_id IN  NUMBER
261   --    x_flex_qual_name       IN  VARCHAR2
262   -- Returns
263   --    Segment number
264   -- Example
265   --    seg_num := gl_flexfields_pkg.get_qualifier_segnum('GL#', 13131, '01-000-1100')
266   -- Notes
267   --
268   FUNCTION get_qualifier_segnum(
269                       x_key_flex_code        VARCHAR2,
270                       x_chart_of_accounts_id NUMBER,
271                       x_flex_qual_name       VARCHAR2) RETURN NUMBER;
272 
273 
274   --
275   -- Function
276   --   get_validation_error_message
277   -- PURPOSE
278   --   Validate value security and return the error message if account is
279   --   secured.
280   -- History
281   --   12-AUG-2005	T Cheng		Created
282   -- Arguments
283   --   x_ccid		Code combination id
284   -- Returns
285   --   The error message if validation did not pass, otherwise null.
286   -- Example
287   --   errmsg := gl_flexfields_pkg.get_validation_error_message(101, 12831);
288   -- Notes
289   --
290   FUNCTION get_validation_error_message(x_coa_id    NUMBER,
291                                         x_ccid      NUMBER) RETURN VARCHAR;
292 
293 END gl_flexfields_pkg;