1 package fa_rx_flex_pkg as
2 /* $Header: FARXFLXS.pls 120.3.12010000.2 2008/07/31 06:52:50 sbhaskar ship $ */
3
4
5 ------------------------------------
6 -- Functions/Procedures
7 ------------------------------------
8
9 -------------------------------------------------------------------------
10 --
11 -- FUNCTION flex_sql
12 --
13 -- Parameters
14 -- p_application_id Application ID of key flexfield
15 -- p_id_flex_code Flexfield code
16 -- p_id_flex_num Flexfield structure num
17 -- p_table_alias Table Alias
18 -- p_mode Output mode
19 -- p_qualifier Flexfield qualifier or segment number
20 -- p_function Operator
21 -- p_operand1,2 Operands
22 --
23 -- Returns VARCHAR2
24 -- Returns the required SQL clause
25 --
26 -- Description
27 -- This function mimics the functionality of the userexit FLEXSQL.
28 -- Given the parameters, this function is equivalent to:
29 -- FND FLEXSQL
30 -- CODE=":p_id_flex_code"
31 -- APPL_SHORT_NAME="Short name from :p_application_id"
32 -- OUTPUT=":This is the return value"
33 -- MODE=":p_mode"
34 -- DISPLAY=":p_qualifier"
35 -- NUM=":p_id_flex_num"
36 -- TABLEALIAS=":p_table_alias"
37 -- OPERATOR=":p_function"
38 -- OPERAND1=":p_operand1"
39 -- OPERAND2=":p_operand2"
40 --
41 -- Restrictions
42 -- No support for SHOWDEPSEG parameter
43 -- No support for MULTINUM parameter
44 -- p_qualifier must be 'ALL' or a valid qualifier name or the segment number.
45 -- p_function does not support "QBE".
46 --
47 -- Modification History
48 -- KMIZUTA 02-APR-99 Created.
49 --
50 -------------------------------------------------------------------------
51 function flex_sql(
52 p_application_id in number,
53 p_id_flex_code in varchar2,
54 p_id_flex_num in number default null,
55 p_table_alias in varchar2,
56 p_mode in varchar2,
57 p_qualifier in varchar2,
58 p_function in varchar2 default null,
59 p_operand1 in varchar2 default null,
60 p_operand2 in varchar2 default null) return varchar2;
61
62 -------------------------------------------------------------------------
63 --
64 -- FUNCTION get_value
65 --
66 -- Parameters
67 -- p_application_id Application ID of key flexfield
68 -- p_id_flex_code Flexfield code
69 -- p_id_flex_num Flexfield structure num
70 -- p_table_alias Table Alias
71 -- p_mode Output mode
72 -- p_qualifier Flexfield qualifier or segment number
73 -- p_ccid Code combination ID
74 --
75 -- Returns VARCHAR2
76 -- Returns the concatenated segment values of the key flexfield
77 --
78 -- Description
79 -- There is no equivalent for this function. This function takes
80 -- the code combination id for the key flexfield and returns the
81 -- actual segment values. This function can be used within
82 -- the after fetch triggers for RXi reports to retrieve the value.
83 --
84 -- Modification History
85 -- KMIZUTA 02-APR-99 Created.
86 --
87 -------------------------------------------------------------------------
88 function get_value(
89 p_application_id in number,
90 p_id_flex_code in varchar2,
91 p_id_flex_num in number default NULL,
92 p_qualifier in varchar2,
93 p_ccid in number) return varchar2;
94
95 -------------------------------------------------------------------------
96 --
97 -- FUNCTION get_description
98 --
99 -- Parameters
100 -- p_application_id Application ID of key flexfield
101 -- p_id_flex_code Flexfield code
102 -- p_id_flex_num Flexfield structure num
103 -- p_qualifier Flexfield qualifier or segment number
104 -- p_data Flexfield Segments
105 --
106 -- Returns VARCHAR2
107 -- Returns the concatenated description of the key flexfield
108 --
109 -- Description
110 -- This function mimics the functionality of the userexit FLEXIDVAL.
111 -- Given the parameters, this function is equivalent to:
112 -- FND FLEXIDVAL
113 -- CODE=":p_id_flex_code"
114 -- APPL_SHORT_NAME="Short name from :p_application_id"
115 -- DATA=":p_data"
116 -- NUM=":p_id_flex_num"
117 -- DISPLAY=":p_qualifier"
118 -- IDISPLAY=":p_qualifier"
119 -- DESCRIPTION=":This is the return value"
120 --
121 -- Restrictions
122 -- No support for SHOWDEPSEG parameter
123 -- No support for VALUE, APROMPT, LPROMPT, PADDED_VALUE, SECURITY parameter
124 -- p_qualifier must be 'ALL' or a valid qualifier name or segment number.
125 -- DISPLAY and IDISPLAY are always the same p_qualifier value.
126 --
127 -- Modification History
128 -- KMIZUTA 02-APR-99 Created.
129 --
130 -------------------------------------------------------------------------
131 function get_description(
132 p_application_id in number,
133 p_id_flex_code in varchar2,
134 p_id_flex_num in number default NULL,
135 p_qualifier in varchar2,
136 p_data in varchar2) return varchar2;
137
138
139 ----------------------
140 -- The following exception is raised if any
141 -- of the arguments are invalid for any of the
142 -- functions in this package
143 ----------------------
144 invalid_argument exception;
145 ----------------------
146
147 -- lgandhi added cache handling mechanism bug2951118
148
149 TYPE fa_rx_flex_desc_rec_type IS RECORD (
150 application_id fnd_id_flex_structures.application_id%type,
151 id_flex_code fnd_id_flex_structures.id_flex_code%type,
152 id_flex_num number,
153 qualifier fnd_segment_attribute_types.segment_attribute_type%type,
154 data varchar2(2000),
155 concatenated_description varchar2(2000)
156 );
157
158
159 TYPE fa_rx_flex_desc_table_type IS
160 TABLE OF fa_rx_flex_desc_rec_type
161 INDEX BY BINARY_INTEGER;
162
163 fa_rx_flex_desc_t fa_rx_flex_desc_table_type ;
164
165 TYPE fa_rx_flex_val_rec_type IS RECORD (
166 application_id fnd_id_flex_structures.application_id%type,
167 id_flex_code fnd_id_flex_structures.id_flex_code%type,
168 id_flex_num number,
169 qualifier fnd_segment_attribute_types.segment_attribute_type%type,
170 ccid number ,
171 buffer varchar2(2000)
172 );
173
174
175 TYPE fa_rx_flex_val_table_type IS
176 TABLE OF fa_rx_flex_val_rec_type
177 INDEX BY BINARY_INTEGER;
178
179 fa_rx_flex_val_t fa_rx_flex_val_table_type ;
180
181 TYPE fa_rx_flex_par_seg_rec_type IS RECORD (
182 fap_application_id FND_ID_FLEX_SEGMENTS.application_id%type,
183 fap_id_flex_code FND_ID_FLEX_SEGMENTS.id_flex_code%type,
184 fap_id_flex_num FND_ID_FLEX_SEGMENTS.id_flex_num%type,
185 fap_flex_value_set_id FND_ID_FLEX_SEGMENTS.flex_value_set_id%type,
186 fap_parent_segment_num FND_ID_FLEX_SEGMENTS.segment_num%type
187 );
188
189
190 TYPE fa_rx_flex_par_seg_table_type IS
191 TABLE OF fa_rx_flex_par_seg_rec_type
192 INDEX BY BINARY_INTEGER;
193
194 fa_rx_flex_par_seg_t fa_rx_flex_par_seg_table_type ;
195
196 end fa_rx_flex_pkg;