1 PACKAGE JTF_IH_CORE_UTIL_PVT AUTHID CURRENT_USER AS
2 /* $Header: JTFIHCRS.pls 120.1 2005/07/02 02:05:47 appldev ship $ */
3
4 ------------------------------------------------------------------------------
5 -- PARAM_REC_TYPE
6 -- param_rec_type is the structure that captures arguments to error message and their foll details:
7 -- token_name VARCHAR2(30) Required (argument placeholder name)
8 -- token_value VARCHAR2(30) Required (argument value)
9 -- Bug# 3779487
10 ------------------------------------------------------------------------------
11 TYPE param_rec_type IS RECORD
12 (
13 token_name VARCHAR2(30), -- name of placeholder in the msg
14 token_value VARCHAR2(30) -- value to substitute in the token - Eg. 'activity_id'
15 );
16
17 ------------------------------------------------------------------------------
18 -- PARAM_TBL_TYPE
19 -- param_tbl_type is a table of record - PARAM_REC_TYPE
20 -- that captures ALL arguments that need to be passed to an invalid
21 -- arguments error message:
22 -- Bug# 3779487
23 ------------------------------------------------------------------------------
24 TYPE param_tbl_type is table of param_rec_type index by BINARY_INTEGER;
25
26 ------------------------------------------------------------------------------
27 -- Procedure : Add_Duplicate_Value_Msg
28 -- Description : Add the IH_API_ALL_DUPLICATE_VALUE message to the message
29 -- list.
30 -- Parameters :
31 -- IN : p_token_an IN VARCHAR2 Required
32 -- Value of the API_NAME token.
33 -- p_token_p IN VARCHAR2 Required
34 -- Value of the DUPLICATE_VAL_PARAM token.
35 ------------------------------------------------------------------------------
36
37 PROCEDURE Add_Duplicate_Value_Msg
38 ( p_token_an IN VARCHAR2,
39 p_token_p IN VARCHAR2 );
40
41 ------------------------------------------------------------------------------
42 -- Procedure : Add_Invalid_Argument_Msg
43 -- Description : Add the IH_API_ALL_INVALID_ARGUMENT message to the message
44 -- list.
45 -- Parameters :
46 -- IN : p_token_an IN VARCHAR2 Required
47 -- Value of the API_NAME token.
48 -- p_token_v IN VARCHAR2 Required
49 -- Value of the VALUE token.
50 -- p_token_p IN VARCHAR2 Required
51 -- Value of the PARAMETER token.
52 ------------------------------------------------------------------------------
53
54 PROCEDURE Add_Invalid_Argument_Msg
55 ( p_token_an IN VARCHAR2,
56 p_token_v IN VARCHAR2,
57 p_token_p IN VARCHAR2 );
58
59 ------------------------------------------------------------------------------
60 -- Procedure : Add_Invalid_Argument_Msg_Gen
61 -- Description : Generic procedure to IH_API_ALL_INVALID_ARGUMENT message to the message
62 -- list.
63 -- Parameters :
64 -- IN : p_msg_code IN VARCHAR2 Required
65 -- message name.
66 -- : p_msg_param IN VARCHAR2 Required
67 -- Table of records containing the token name and token value.
68 ------------------------------------------------------------------------------
69 PROCEDURE Add_Invalid_Argument_Msg_Gen
70 (
71 p_msg_code IN VARCHAR2,
72 p_msg_param IN param_tbl_type
73 );
74
75 ------------------------------------------------------------------------------
76 -- Procedure : Add_Missing_Param_Msg
77 -- Description : Add the IH_API_ALL_MISSING_PARAM message to the message
78 -- list.
79 -- Parameters :
80 -- p_token_an IN VARCHAR2 Required
81 -- Value of the API_NAME token.
82 -- p_token_mp IN VARCHAR2 Required
83 -- Value of the MISSING_PARAM token.
84 ------------------------------------------------------------------------------
85
86 PROCEDURE Add_Missing_Param_Msg
87 ( p_token_an IN VARCHAR2,
88 p_token_mp IN VARCHAR2 );
89
90 ------------------------------------------------------------------------------
91 -- Procedure : Add_Null_Parameter_Msg
92 -- Description : Add the IH_API_ALL_NULL_PARAMETER message to the message
93 -- list.
94 -- Parameters :
95 -- IN : p_token_an IN VARCHAR2 Required
96 -- Value of the API_NAME token.
97 -- p_token_np IN VARCHAR2 Required
98 -- Value of the NULL_PARAM token.
99 ------------------------------------------------------------------------------
100
101 PROCEDURE Add_Null_Parameter_Msg
102 ( p_token_an IN VARCHAR2,
103 p_token_np IN VARCHAR2 );
104
105 ------------------------------------------------------------------------------
106 -- Procedure : Add_Param_Ignored_Msg
107 -- Description : Add the IH_API_ALL_PARAM_IGNORED message to the message
108 -- list.
109 -- Parameters :
110 -- IN : p_token_an IN VARCHAR2 Required
111 -- Value of the API_NAME token.
112 -- p_token_ip IN VARCHAR2 Required
113 -- Value of the IGNORED_PARAM token.
114 ------------------------------------------------------------------------------
115
116 PROCEDURE Add_Param_Ignored_Msg
117 ( p_token_an IN VARCHAR2,
118 p_token_ip IN VARCHAR2 );
119
120 ------------------------------------------------------------------------------
121 -- Procedure : Add_Same_Val_Update_Msg
122 -- Description : Add the IH_API_ALL_SAME_VAL_UPDATE message to the message
123 -- list.
124 -- Parameters :
125 -- IN : p_token_an IN VARCHAR2 Required
126 -- Value of the API_NAME token.
127 -- p_token_p IN VARCHAR2 Required
128 -- Value of the SAME_VAL_PARAM token.
129 ------------------------------------------------------------------------------
130
131 PROCEDURE Add_Same_Val_Update_Msg
132 ( p_token_an IN VARCHAR2,
133 p_token_p IN VARCHAR2 );
134
135
136
137
138 ------------------------------------------------------------------------------
139 -- Procedure : Convert_Lookup_To_Code
140 -- Description : Convert a lookup meaning into the corresponding internal
141 -- code.
142 -- Parameters :
143 -- IN : p_api_name IN VARCHAR2(30) Required
144 -- Name of the calling API (used for messages)
145 -- p_parameter_name IN VARCHAR2(30) Required
146 -- Name of the value-based parameter in the calling API
147 -- p_meaning IN VARCHAR2(30) Required
148 -- Value of the lookup meaning to be converted
149 -- p_lookup_type IN VARCHAR2(30) Required
150 -- OUT : x_lookup_code OUT VARCHAR2(30)
151 -- x_return_status OUT VARCHAR2(1)
152 -- FND_API.G_RET_STS_SUCCESS => conversion success
153 -- FND_API.G_RET_STS_ERROR => conversion failure
154 ------------------------------------------------------------------------------
155
156 PROCEDURE Convert_Lookup_To_Code
157 ( p_api_name IN VARCHAR2,
158 p_parameter_name IN VARCHAR2,
159 p_meaning IN VARCHAR2,
160 p_lookup_type IN VARCHAR2,
161 x_lookup_code OUT NOCOPY VARCHAR2,
162 x_return_status OUT NOCOPY VARCHAR2 );
163
164
165 ------------------------------------------------------------------------------
166 -- Procedure : Default_Common_Attributes
167 -- Description : Default application ID, responsibility ID, user ID, login
168 -- ID, operating unit ID and inventory organization ID.
169 -- If the parameter is FND_API.G_MISS_NUM, then the default
170 -- value for that attribute is returned. Else the passed value
171 -- is returned.
172 -- Parameters :
173 -- IN : p_api_name IN VARCHAR2(30) Required
174 -- Name of the calling API (used for messages)
175 -- IN OUT : p_resp_appl_id IN OUT NUMBER Required
176 -- p_resp_id IN OUT NUMBER Required
177 -- p_user_id IN OUT NUMBER Required
178 -- p_login_id IN OUT NUMBER Required
179 -- p_org_id IN OUT NUMBER Required
180 -- p_inventory_org_id IN OUT NUMBER Required
181 ------------------------------------------------------------------------------
182
183 PROCEDURE Default_Common_Attributes
184 ( p_api_name IN VARCHAR2,
185 p_resp_appl_id IN OUT NOCOPY NUMBER,
186 p_resp_id IN OUT NOCOPY NUMBER,
187 p_user_id IN OUT NOCOPY NUMBER,
188 p_login_id IN OUT NOCOPY NUMBER,
189 p_org_id IN OUT NOCOPY NUMBER,
190 p_inventory_org_id IN OUT NOCOPY NUMBER );
191
192 ------------------------------------------------------------------------------
193 -- Function : Is_MultiOrg_Enabled
194 -- Description : Checks if the Multi-Org feature is enabled.
195 -- Parameters : None.
196 -- Return : BOOLEAN
197 -- Returns TRUE if Multi-Org is enabled; FALSE otherwise
198 ------------------------------------------------------------------------------
199
200 FUNCTION Is_MultiOrg_Enabled RETURN BOOLEAN;
201
202 ------------------------------------------------------------------------------
203 -- Procedure : Trunc_String_Length
204 -- Description : Verify that the string is shorter than the defined width of
205 -- the column. If the character value is longer than the
206 -- defined width of the VARCHAR2 column, truncate the value.
207 -- Parameters :
208 -- IN : p_api_name IN VARCHAR2(30) Required
209 -- Name of the calling API (used for messages)
210 -- p_parameter_name IN VARCHAR2(30) Required
211 -- Name of the parameter in the calling API
212 -- (e.g. 'p_notes')
213 -- p_str IN VARCHAR2 Required
214 -- Value of the VARCHAR2 parameter
215 -- p_len IN NUMBER Required
216 -- Length of the corresponding database column
217 -- OUT : x_str OUT VARCHAR2 Required
218 -- Value of the VARCHAR2 parameter (may be truncated)
219 ------------------------------------------------------------------------------
220
221 PROCEDURE Trunc_String_length
222 ( p_api_name IN VARCHAR2,
223 p_parameter_name IN VARCHAR2,
224 p_str IN VARCHAR2,
225 p_len IN NUMBER,
226 x_str OUT NOCOPY VARCHAR2 );
227
228
229
230 ------------------------------------------------------------------------------
231 -- Procedure : Validate_Desc_Flex
232 -- Description : Validate descriptive flexfield information. Verify that none
233 -- of the values are invalid, disabled, expired or not
234 -- available for the current user because of value security
235 -- rules.
236 -- Parameters :
237 -- IN : p_api_name IN VARCHAR2(30) Required
238 -- Name of the calling API (used for messages)
239 -- p_desc_flex_name IN VARCHAR2(30) Required
240 -- Name of the descriptive flexfield
241 -- p_column_name1-15 IN VARCHAR2(30) Required
242 -- Names of the 15 descriptive flexfield columns
243 -- p_column_value1-15 IN VARCHAR2(150) Required
244 -- Values of the 15 descriptive flexfield segments
245 -- p_context_value IN VARCHAR2(30) Required
246 -- Value of the descriptive flexfield structure defining
247 -- column
248 -- p_resp_appl_id IN NUMBER Optional
249 -- Application identifier
250 -- p_resp_id IN NUMBER Optional
251 -- Responsibility identifier
252 -- OUT : x_return_status OUT VARCHAR2(1)
253 -- FND_API.G_RET_STS_SUCCESS => values are valid
254 -- FND_API.G_RET_STS_ERROR => values are invalid
255 ------------------------------------------------------------------------------
256
257 PROCEDURE Validate_Desc_Flex
258 ( p_api_name IN VARCHAR2,
259 p_desc_flex_name IN VARCHAR2,
260 p_column_name1 IN VARCHAR2,
261 p_column_name2 IN VARCHAR2,
262 p_column_name3 IN VARCHAR2,
263 p_column_name4 IN VARCHAR2,
264 p_column_name5 IN VARCHAR2,
265 p_column_name6 IN VARCHAR2,
266 p_column_name7 IN VARCHAR2,
267 p_column_name8 IN VARCHAR2,
268 p_column_name9 IN VARCHAR2,
269 p_column_name10 IN VARCHAR2,
270 p_column_name11 IN VARCHAR2,
271 p_column_name12 IN VARCHAR2,
272 p_column_name13 IN VARCHAR2,
273 p_column_name14 IN VARCHAR2,
274 p_column_name15 IN VARCHAR2,
275 p_column_value1 IN VARCHAR2,
276 p_column_value2 IN VARCHAR2,
277 p_column_value3 IN VARCHAR2,
278 p_column_value4 IN VARCHAR2,
279 p_column_value5 IN VARCHAR2,
280 p_column_value6 IN VARCHAR2,
281 p_column_value7 IN VARCHAR2,
282 p_column_value8 IN VARCHAR2,
283 p_column_value9 IN VARCHAR2,
284 p_column_value10 IN VARCHAR2,
285 p_column_value11 IN VARCHAR2,
286 p_column_value12 IN VARCHAR2,
287 p_column_value13 IN VARCHAR2,
288 p_column_value14 IN VARCHAR2,
289 p_column_value15 IN VARCHAR2,
290 p_context_value IN VARCHAR2,
291 p_resp_appl_id IN NUMBER := NULL,
292 p_resp_id IN NUMBER := NULL,
293 x_return_status OUT NOCOPY VARCHAR2 );
294
295
296 ------------------------------------------------------------------------------
297 -- Procedure : Validate_Later_Date
298 -- Description : Verify that the later date is later than the earlier date.
299 -- Parameters :
300 -- IN : p_api_name IN VARCHAR2 Required
301 -- Name of the calling API (used for messages)
302 -- p_parameter_name IN VARCHAR2 Required
303 -- Name of the parameter in the calling API
304 -- p_later_date IN DATE Required
305 -- p_earlier_date IN DATE Required
306 -- OUT : x_return_status OUT VARCHAR2(1)
307 -- FND_API.G_RET_STS_SUCCESS => date is valid
308 -- FND_API.G_RET_STS_ERROR => date is invalid
309 ------------------------------------------------------------------------------
310
311 PROCEDURE Validate_Later_Date
312 ( p_api_name IN VARCHAR2,
313 p_parameter_name IN VARCHAR2,
314 p_later_date IN DATE,
315 p_earlier_date IN DATE,
316 x_return_status OUT NOCOPY VARCHAR2 );
317
318 ------------------------------------------------------------------------------
319 -- Procedure : Validate_Lookup_Code
320 -- Description : Validate that the lookup code is valid, enabled and active.
321 -- Parameters :
322 -- IN : p_api_name IN VARCHAR2 Required
323 -- Name of the calling API (used for messages)
324 -- p_parameter_name IN VARCHAR2 Required
325 -- Name of the parameter in the calling API
326 -- p_lookup_code IN VARCHAR2 Required
327 -- Lookup code to be validated
328 -- p_lookup_type IN VARCHAR2 Required
329 -- Type of the lookup code
330 -- OUT : x_return_status OUT VARCHAR2(1)
331 -- FND_API.G_RET_STS_SUCCESS => code is valid
332 -- FND_API.G_RET_STS_ERROR => code is invalid
333 ------------------------------------------------------------------------------
334
335 PROCEDURE Validate_Lookup_Code
336 ( p_api_name IN VARCHAR2,
337 p_parameter_name IN VARCHAR2,
338 p_lookup_code IN VARCHAR2,
339 p_lookup_type IN VARCHAR2,
340 x_return_status OUT NOCOPY VARCHAR2 );
341
342
343
344 ------------------------------------------------------------------------------
345 -- Procedure : Validate_Who_Info
346 -- Description : Verify that the user and login session are valid and active
347 -- Parameters :
348 -- IN : p_api_name IN VARCHAR2 Required
349 -- Name of the calling API (used for messages)
350 -- p_parameter_name_usr IN VARCHAR2 Required
351 -- Name of the user id parameter in the calling API
352 -- (e.g. 'p_user_id')
353 -- p_parameter_name_log IN VARCHAR2 Required
354 -- Name of the login id parameter in the calling API
355 -- (e.g. 'p_login_id')
356 -- p_user_id IN NUMBER
357 -- p_login_id IN NUMBER
358 -- p_resp_id IN NUMBER Optional
359 -- p_resp_appl_id IN NUMBER Optional
360 -- OUT : x_return_status OUT VARCHAR2(1)
361 -- FND_API.G_RET_STS_SUCCESS => IDs are valid
362 -- FND_API.G_RET_STS_ERROR => IDs are invalid
363 ------------------------------------------------------------------------------
364
365 PROCEDURE Validate_Who_Info
366 ( p_api_name IN VARCHAR2,
367 p_parameter_name_usr IN VARCHAR2,
368 p_parameter_name_log IN VARCHAR2,
369 p_user_id IN NUMBER,
370 p_login_id IN NUMBER,
371 p_resp_id IN NUMBER := NULL,
372 p_resp_appl_id IN NUMBER := NULL,
373 x_return_status OUT NOCOPY VARCHAR2 );
374
375 END JTF_IH_CORE_UTIL_PVT;