1 PACKAGE FND_MSG_PUB AUTHID CURRENT_USER AS
2 /* $Header: AFASMSGS.pls 120.2 2005/11/03 15:47:48 tmorrow ship $ */
3
4 -- Global constants used by the Get function/procedure to
5 -- determine which message to get.
6
7 G_FIRST CONSTANT NUMBER := -1 ;
8 G_NEXT CONSTANT NUMBER := -2 ;
9 G_LAST CONSTANT NUMBER := -3 ;
10 G_PREVIOUS CONSTANT NUMBER := -4 ;
11
12 -- global that holds the value of the message level profile option.
13
14 G_msg_level_threshold NUMBER := 9.99E125;
15
16 -- Procedure Initialize
17 --
18 -- Usage Used by API callers and developers to intialize the
19 -- global message table.
20 -- Desc Clears the G_msg_tbl and resets all its global
21 -- variables. Except for the message level threshold.
22 --
23
24 PROCEDURE Initialize;
25
26 -- FUNCTION Count_Msg
27 --
28 -- Usage Used by API callers and developers to find the count
29 -- of messages in the message list.
30 -- Desc Returns the value of G_msg_count
31 --
32 -- Parameters None
33 --
34 -- Return NUMBER
35
36 FUNCTION Count_Msg RETURN NUMBER;
37
38 -- PROCEDURE Count_And_Get
39 --
40 -- Usage Used by API developers to find the count of messages
41 -- in the message table. If there is only one message in
42 -- the table it retrieves this message.
43 --
44 -- Desc This procedure is a cover that calls the function
45 -- Count_Msg and if the count of messages is 1. It calls the
46 -- procedure Get. It serves as a shortcut for API
47 -- developers. to make one call instead of making a call
48 -- to count, a check, and then another call to get.
49 --
50 -- Parameters p_encoded IN VARCHAR2(1) := 'T' Optional
51 -- If TRUE the message is returned in an encoded
52 -- format, else it is translated and returned.
53 -- p_count OUT NUMBER
54 -- Message count.
55 -- p_data OUT VARCHAR2(2000)
56 -- Message data.
57 --
58
59 PROCEDURE Count_And_Get
60 ( p_encoded IN VARCHAR2 := 'T' ,
61 p_count OUT NOCOPY NUMBER ,
62 p_data OUT NOCOPY VARCHAR2
63 );
64
65 -- PROCEDURE Add
66 --
67 -- Usage Used to add messages to the global message table.
68 --
69 -- Desc Reads a message off the message dictionary stack and
70 -- writes it in an encoded format to the global PL/SQL
71 -- message table.
72 -- The message is appended at the bottom of the message
73 -- table.
74 --
75
76 PROCEDURE Add;
77
78 -- PROCEDURE Delete_Msg
79 --
80 -- Usage Used to delete a specific message from the message
81 -- list, or clear the whole message list.
82 --
83 -- Desc If instructed to delete a specific message, the
84 -- message is removed from the message table and the
85 -- table is compressed by moving the messages coming
86 -- after the deleted messages up one entry in the message
87 -- table.
88 -- If there is no entry found the Delete procedure does
89 -- nothing, and no exception is raised.
90 -- If delete is passed no parameters it deletes the whole
91 -- message table.
92 --
93 -- Prameters p_msg_index IN NUMBER := NULL Optional
94 -- holds the index of the message to be deleted.
95 --
96
97 PROCEDURE Delete_Msg
98 ( p_msg_index IN NUMBER := NULL
99 );
100
101 -- PROCEDURE Get
102 --
103 -- Usage Used to get message info from the global message table.
104 --
105 -- Desc Gets the next message from the message table.
106 -- This procedure utilizes the G_msg_index to keep track
107 -- of the last message fetched from the global table and
108 -- then fetches the next.
109 --
110 -- Parameters p_msg_index IN NUMBER := G_NEXT
111 -- Index of message to be fetched. the default is to
112 -- fetch the next message starting by the first
113 -- message. Possible values are :
114 --
115 -- G_FIRST
116 -- G_NEXT
117 -- G_LAST
118 -- G_PREVIOUS
119 -- Specific message index.
120 --
121 -- p_encoded IN VARCHAR2(1) := G_TRUE Optional
122 -- When set to TRUE retieves the message in an
123 -- encoded format. If FALSE, the function calls the
124 -- message dictionary utilities to translate the
125 -- message and do the token substitution, the message
126 -- text is then returned.
127 --
128 -- p_msg_data OUT VARCHAR2(2000)
129 -- p_msg_index_out OUT NUMBER
130
131 PROCEDURE Get
132 ( p_msg_index IN NUMBER := G_NEXT ,
133 p_encoded IN VARCHAR2 := 'T' ,
134 p_data OUT NOCOPY VARCHAR2 ,
135 p_msg_index_out OUT NOCOPY NUMBER
136 );
137
138 -- FUNCTION Get
139 --
140 -- Usage Used to get message info from the message table.
141 --
142 -- Desc Gets the next message from the message table.
143 -- This procedure utilizes the G_msg_index to keep track
144 -- of the last message fetched from the table and
145 -- then fetches the next or previous message depending on
146 -- the mode the function is being called in..
147 --
148 -- Parameters p_msg_index IN NUMBER := G_NEXT
149 -- Index of message to be fetched. the default is to
150 -- fetch the next message starting by the first
151 -- message. Possible values are :
152 --
153 -- G_FIRST
154 -- G_NEXT
155 -- G_LAST
156 -- G_PREVIOUS
157 -- Specific message index.
158 --
159 -- p_encoded IN VARCHAR2(1) := 'T' Optional
160 -- When set to TRUE Get retrieves the message in an
161 -- encoded format. If FALSE, the function calls the
162 -- message dictionary utilities to translate the
163 -- message and do the token substitution, the message
164 -- text is then returned.
165 --
166 -- Return VARCHAR2(2000) message data.
167 -- If there are no more messages it returns NULL.
168 --
169 -- Notes The function name Get is overloaded with another
170 -- procedure Get that performs the exact same function as
171 -- the function, the only difference is that the
172 -- procedure returns the message data as well as its
173 -- index i the message list.
174
175 FUNCTION Get
176 ( p_msg_index IN NUMBER := G_NEXT ,
177 p_encoded IN VARCHAR2 := 'T'
178 )
179 RETURN VARCHAR2;
180
181 -- PROCEDURE Reset
182 --
183 -- Usage Used to reset the message table index used in reading
184 -- messages to point to the top of the message table or
185 -- the botom of the message table.
186 --
187 -- Desc Sets G_msg_index to 0 or G_msg_count+1 depending on
188 -- the reset mode.
189 --
190 -- Parameters p_mode IN NUMBER := G_FIRST Optional
191 -- possible values are :
192 -- G_FIRST resets index to the begining of msg tbl
193 -- G_LAST resets index to the end of msg tbl
194 --
195 -- Exceptions G_EXC_UNEXPECTED_ERROR if it is passed an
196 -- invalid mode.
197
198 PROCEDURE Reset
199 ( p_mode IN NUMBER := G_FIRST );
200
201 -- Pre-defined API message levels
202 --
203 -- Valid values for message levels are from 1-50.
204 -- 1 being least severe and 50 highest.
205 --
206 -- The pre-defined levels correspond to standard API
207 -- return status. Debug levels are used to control the amount of
208 -- debug information a program writes to the PL/SQL message table.
209
210 G_MSG_LVL_UNEXP_ERROR CONSTANT NUMBER := 60;
211 G_MSG_LVL_ERROR CONSTANT NUMBER := 50;
212 G_MSG_LVL_SUCCESS CONSTANT NUMBER := 40;
213 G_MSG_LVL_DEBUG_HIGH CONSTANT NUMBER := 30;
214 G_MSG_LVL_DEBUG_MEDIUM CONSTANT NUMBER := 20;
215 G_MSG_LVL_DEBUG_LOW CONSTANT NUMBER := 10;
216
217 -- FUNCTION Check_Msg_Level
218 --
219 -- Usage Used by API developers to check if the level of the
220 -- message they want to write to the message table is
221 -- higher or equal to the message level threshold or not.
222 -- If the function returns TRUE the developer should go
223 -- ahead and write the message to the message table else
224 -- he/she should skip writing this message.
225 -- Desc Accepts a message level as input fetches the value of
226 -- the message threshold profile option and compares it
227 -- to the input level.
228 -- Return TRUE if the level is equal to or higher than the
229 -- threshold. Otherwise, it returns FALSE.
230 --
231
232 FUNCTION Check_Msg_Level
233 ( p_message_level IN NUMBER := G_MSG_LVL_SUCCESS
234 )
235 RETURN BOOLEAN;
236
237 -- PROCEDURE Build_Exc_Msg()
238 --
239 -- USAGE Used by APIs to issue a standard message when
240 -- encountering an unexpected error.
241 -- Desc The IN parameters are used as tokens to a standard
242 -- message 'FND_API_UNEXP_ERROR'.
243 -- Parameters p_pkg_name IN VARCHAR2(30) Optional
244 -- p_procedure_name IN VARCHAR2(30) Optional
245 -- p_error_text IN VARCHAR2(240) Optional
246 -- If p_error_text is missing SQLERRM is used.
247
248 PROCEDURE Build_Exc_Msg
249 ( p_pkg_name IN VARCHAR2 :=null ,
250 p_procedure_name IN VARCHAR2 :=null ,
251 p_error_text IN VARCHAR2 :=null
252 );
253
254 -- PROCEDURE Add_Exc_Msg()
255 --
256 -- USAGE Same as Build_Exc_Msg but in addition to constructing
257 -- the messages the procedure Adds it to the global
258 -- mesage table.
259
260 PROCEDURE Add_Exc_Msg
261 ( p_pkg_name IN VARCHAR2 :=null ,
262 p_procedure_name IN VARCHAR2 :=null ,
263 p_error_text IN VARCHAR2 :=null
264 );
265
266 -- PROCEDURE Dump_Msg and Dump_List are used for debugging purposes.
267 --
268
269 PROCEDURE Dump_Msg
270 ( p_msg_index IN NUMBER );
271
272 PROCEDURE Dump_List
273 ( p_messages IN BOOLEAN := FALSE );
274
275
276 -- global constants to hold message type
277
278 G_ERROR_MSG constant varchar2(1) := 'E';
279 G_WARNING_MSG constant varchar2(1) := 'W';
280 G_INFORMATION_MSG constant varchar2(1) := 'I';
281 G_DEPENDENCY_MSG constant varchar2(1) := 'D';
282
283 -- Constants used to set token names for associated columns
284 -- and message type
285
286 G_ASSOCIATED_COLS_TOKEN_NAME CONSTANT VARCHAR2(30) := 'FND_ERROR_LOCATION_FIELD';
287 G_MESSAGE_TYPE_TOKEN_NAME CONSTANT VARCHAR2(30) := 'FND_MESSAGE_TYPE';
288
289 -- PROCEDURE Add_Detail
290 --
291 -- Usage: Allows an Error, Warning or Information message to be added to the
292 -- Multiple Message List. The caller can optionally provide
293 -- details of which TABLE.COLUMN (or API control parameter) the error is
294 -- associated. In this case either the p_associated_column1 to 5
295 -- parameters should be populated with 'TABLE_NAME.COLUMN_NAME' or
296 -- the p_same_associated_columns parameter should be explicitly set to 'Y'.
297 -- The p_same_associated_columns parameter is defaulted to 'N' indicating
298 -- the p_associated_column1 to 5 parameter set in this function call
299 -- should be used. To use the p_associated_column1 to 5 parameter values
300 -- past into the most recent "verify" function call
301 -- (no_all_inclusive_error, no_exclusive_error or no_error_message)
302 -- then explicitly set p_same_associated_columns to 'Y'. Where a "verify"
303 -- function has been called, setting p_same_associated_columns to 'Y'
304 -- will avoid having to maintain the associated column information more
305 -- than once.
306 --
307 -- In Parameters:
308 -- Name Reqd Type Description
309 -- p_associated_column1 No varchar2 Database column or
310 -- API control parameter
311 -- name.
312 -- p_associated_column2 No varchar2 Database column or
313 -- API control parameter
314 -- name.
315 -- p_associated_column3 No varchar2 Database column or
316 -- API control parameter
317 -- name.
318 -- p_associated_column4 No varchar2 Database column or
319 -- API control parameter
320 -- name.
321 -- p_associated_column5 No varchar2 Database column or
322 -- API control parameter
323 -- name.
324 -- p_same_associated_columns No varchar2 Set to 'T' or 'F'.
325 -- p_message_type No varchar2 Set to one of the
326 -- FND_MSG_PUB package
327 -- message type constants.
328
329
330
331
332 PROCEDURE Add_Detail
333 ( p_associated_column1 IN VARCHAR2 default null
334 ,p_associated_column2 IN VARCHAR2 default null
335 ,p_associated_column3 IN VARCHAR2 default null
336 ,p_associated_column4 IN VARCHAR2 default null
337 ,p_associated_column5 IN VARCHAR2 default null
338 ,p_same_associated_columns IN VARCHAR2 default 'F'
339 ,p_message_type IN VARCHAR2 default FND_MSG_PUB.G_ERROR_MSG
340 );
341
342
343 -- FUNCTION No_All_Inclusive_Error
344 -- Usage: For finding out if there are any known messages
345 -- associated, with any column in a set of
346 -- TABLE.COLUMN values (or set of API control parameters).
347 -- i.e. Search the message lists for each TABLE.COLUMN.
348 -- If any message contains that TABLE.COLUMN then
349 -- a match has been found.
350 -- Details:
351 -- Returns 'T' for TRUE when any p_check_column%
352 -- parameter (TABLE.COLUMN) value is NOT
353 -- associated with an existing error message in the
354 -- either the Multiple Message List or the internal
355 -- Dependency Chain List. Returns 'F' for FALSE
356 -- when at least one of the p_check_column1 to 5
357 -- parameter values is associated with an existing
358 -- error message in either list. If the
359 -- p_assoicated_column% parameter has also been set
360 -- then a message will be added to the Dependency
361 -- Chain List and will be associated with the
362 -- p_associated_column% values.
363 --
364 -- For example, say the message list contains two entries:
365 -- Message_1 associated with TABLE_A.COLUMN_1
366 -- Message_2 associated with TABLE_A.COLUMN_2 and TABLE_A.COLUMN_3
367 --
368 -- Calls to this function and results:
369 -- a) p_check_column1 parameter set to 'TABLE_A.COLUMN_4'
370 -- TRUE will be returned.
371 -- b) p_check_column1 parameter set to 'TABLE_A.COLUMN_1'
372 -- FALSE will be returned.
373 -- c) p_check_column1 parameter set to 'TABLE_A.COLUMN_2'
374 -- FALSE will be returned.
375 -- d) p_check_column1 parameter set to 'TABLE_A.COLUMN_1' and
376 -- p_check_column2 parameter set to 'TABLE_A.COLUMN_2'
377 -- FALSE will be returned.
378 -- e) p_check_column1 parameter set to 'TABLE_A.COLUMN_2' and
379 -- p_check_column2 parameter set to 'TABLE_A.COLUMN_3'
380 -- FALSE will be returned.
381 -- f) p_check_column1 parameter set to 'TABLE_A.COLUMN_2' and
382 -- p_check_column2 parameter set to 'TABLE_A.COLUMN_4'
383 -- FALSE will be returned.
384 --
385 -- In Parameters:
386 -- Name Reqd Type Description
387 -- p_check_column1 Yes varchar2 Column or API control
388 -- parameter name to
389 -- verify in the message
390 -- list.
391 -- p_check_column2 No varchar2 Column or API control
392 -- parameter name to
393 -- verify in the message
397 -- verify in the message
394 -- list.
395 -- p_check_column3 No varchar2 Column or API control
396 -- parameter name to
398 -- list.
399 -- p_check_column4 No varchar2 Column or API control
400 -- parameter name to
401 -- verify in the message
402 -- list.
403 -- p_check_column5 No varchar2 Column or API control
404 -- parameter name to
405 -- verify in the message
406 -- list.
407 -- p_associated_column1 No varchar2 Dependent database
408 -- column or API
409 -- control parameter
410 -- name. Only used if
411 -- an existing message
412 -- is found.
413 -- p_associated_column2 No varchar2 Dependent database
414 -- column or API
415 -- control parameter
416 -- name. Only used if
417 -- an existing message
418 -- is found.
419 -- p_associated_column3 No varchar2 Dependent database
420 -- column or API
421 -- control parameter
422 -- name. Only used if
423 -- an existing message
424 -- is found.
425 -- p_associated_column4 No varchar2 Dependent database
426 -- column or API
427 -- control parameter
428 -- name. Only used if
429 -- an existing message
430 -- is found.
431 -- p_associated_column5 No varchar2 Dependent database
432 -- column or API
433 -- control parameter
434 -- name. Only used if
435 -- an existing message
436 -- is found.
437
438
439 FUNCTION No_All_Inclusive_Error
440 ( p_check_column1 IN VARCHAR2
441 ,p_check_column2 IN VARCHAR2 default null
442 ,p_check_column3 IN VARCHAR2 default null
443 ,p_check_column4 IN VARCHAR2 default null
444 ,p_check_column5 IN VARCHAR2 default null
445 ,p_associated_column1 IN VARCHAR2 default null
446 ,p_associated_column2 IN VARCHAR2 default null
447 ,p_associated_column3 IN VARCHAR2 default null
448 ,p_associated_column4 IN VARCHAR2 default null
449 ,p_associated_column5 IN VARCHAR2 default null
450 ) return varchar2;
451
452 -- FUNCTION No_Exclusive_Error
453 -- Usage: For finding out if there are any known single
454 -- column messages for a set of up to five
455 -- TABLE.COLUMN values. Any messages for more
456 -- than one column will not included in the
457 -- search. Useful when about to execute a
458 -- "combination style" validation check between a
459 -- group of columns. Alternatively messages can
460 -- be associated with API control parameters
461 -- rather than table columns.
462 --
463 -- For example, a validation check needs to verify
464 -- that the COLUMN_A and COLUMN_B column values
465 -- are compatible. This validation should only
466 -- go ahead if the individual COLUMN_A and
467 -- individual COLUMN_B values is not known to
468 -- be error. But need to ignore any errors
469 -- which have been raised by other combination
470 -- style checks such as COLUMN_A-COLUMN_C.
471 -- Details:
472 -- Returns 'T' for TRUE when each of the
473 -- p_check_column1 to 5 parameter values are NOT
474 -- exclusively associated with an existing error
475 -- message in the either the Multiple Message List
476 -- or the internal Dependency Chain List.
477 -- Returns 'F' for FALSE when at least one of the
478 -- p_check_column1 to 5 parameter values is
479 -- exclusively associated with an existing error
480 -- message in either list. If any of the
481 -- p_assoicated_column% parameters have also
482 -- been set then an entry will be added to the
483 -- Dependency Chain List and will be associated
484 -- with the p_assoicated_column1 to 5 values.
485 --
486 -- Example: say the message list contains two entries:
487 -- Message_1 associated with TABLE_A.COLUMN_1
488 -- Message_2 associated with TABLE_A.COLUMN_2 and TABLE_A.COLUMN_3
489 --
490 -- Calls to this function and results:
491 -- a) p_check_column1 parameter set to 'TABLE_A.COLUMN_4'
492 -- TRUE will be returned.
496 -- TRUE will be returned.
493 -- b) p_check_column1 parameter set to 'TABLE_A.COLUMN_1'
494 -- FALSE will be returned.
495 -- c) p_check_column1 parameter set to 'TABLE_A.COLUMN_2'
497 -- d) p_check_column1 parameter set to 'TABLE_A.COLUMN_1' and
498 -- p_check_column2 parameter set to 'TABLE_A.COLUMN_2'
499 -- FALSE will be returned.
500 -- e) p_check_column1 parameter set to 'TABLE_A.COLUMN_2' and
501 -- p_check_column2 parameter set to 'TABLE_A.COLUMN_3'
502 -- TRUE will be returned.
503 -- f) p_check_column1 parameter set to 'TABLE_A.COLUMN_2' and
504 -- p_check_column2 parameter set to 'TABLE_A.COLUMN_4'
505 -- TRUE will be returned.
506 --
507 -- In Parameters:
508 -- Name Reqd Type Description
509 -- p_check_column1 Yes varchar2 Column or API control
510 -- parameter name to
511 -- verify in the message
512 -- list.
513 -- p_check_column2 No varchar2 Column or API control
514 -- parameter name to
515 -- verify in the message
516 -- list.
517 -- p_check_column3 No varchar2 Column or API control
518 -- parameter name to
519 -- verify in the message
520 -- list.
521 -- p_check_column4 No varchar2 Column or API control
522 -- parameter name to
523 -- verify in the message
524 -- list.
525 -- p_check_column5 No varchar2 Column or API control
526 -- parameter name to
527 -- verify in the message
528 -- list.
529 -- p_associated_column1 No varchar2 Dependent database
530 -- column or API
531 -- control parameter
532 -- name. Only used if
533 -- an existing message
534 -- is found.
535 -- p_associated_column2 No varchar2 Dependent database
536 -- column or API
537 -- control parameter
538 -- name. Only used if
539 -- an existing message
540 -- is found.
541 -- p_associated_column3 No varchar2 Dependent database
542 -- column or API
543 -- control parameter
544 -- name. Only used if
545 -- an existing message
546 -- is found.
547 -- p_associated_column4 No varchar2 Dependent database
548 -- column or API
549 -- control parameter
550 -- name. Only used if
551 -- an existing message
552 -- is found.
553 -- p_associated_column5 No varchar2 Dependent database
554 -- column or API
555 -- control parameter
556 -- name. Only used if
557 -- an existing message
558 -- is found.
559
560
561
562 FUNCTION No_Exclusive_Error
563 ( p_check_column1 IN VARCHAR2
564 ,p_check_column2 IN VARCHAR2 default null
565 ,p_check_column3 IN VARCHAR2 default null
566 ,p_check_column4 IN VARCHAR2 default null
567 ,p_check_column5 IN VARCHAR2 default null
568 ,p_associated_column1 IN VARCHAR2 default null
569 ,p_associated_column2 IN VARCHAR2 default null
570 ,p_associated_column3 IN VARCHAR2 default null
571 ,p_associated_column4 IN VARCHAR2 default null
572 ,p_associated_column5 IN VARCHAR2 default null
573 ) return varchar2;
574
575 -- FUNCTION No_Error_Message
576 -- Usage: Returns 'T' for TRUE when none of the
577 -- p_check_message_name1 to 5 parameter message
578 -- name values do not exist in the Multiple
579 -- Message List.
580 -- Returns 'F' for FALSE when at least one of the
581 -- p_check_message_name1 to 5 parameter message
582 -- names is found to exist in the list. If the
583 -- p_associated_column% parameter has also been set
584 -- then a message will be added to the Dependency
585 -- Chain List and will be associated with the
586 -- p_associated_column% values.
587 --
588 -- For example, say the message list contains two entries:
589 -- Message_1 associated with TABLE_A.COLUMN_1
593 -- a) p_check_message_name1 parameter set to 'Message_3'
590 -- Message_2 associated with TABLE_A.COLUMN_2 and TABLE_A.COLUMN_3
591 --
592 -- Calls to this function and results:
594 -- TRUE will be returned.
595 -- b) p_check_message_name1 parameter set to 'Message_1'
596 -- FALSE will be returned.
597 -- c) p_check_message_name1 parameter set to 'Message_1' and
598 -- p_check_message_name2 parameter set to 'Message_2'
599 -- FALSE will be returned.
600 -- d) p_check_message_name1 parameter set to 'Message_2' and
601 -- p_check_message_name2 parameter set to 'Message_3'
602 -- FALSE will be returned.
603 --
604 -- In Parameters:
605 -- Name Reqd Type Description
606 -- p_check_message_name1 Yes varchar2 Application Error
607 -- Message Name to
608 -- verify in the list.
609 -- p_check_message_name2 No varchar2 Application Error
610 -- Message Name to
611 -- verify in the list.
612 -- p_check_message_name3 No varchar2 Application Error
613 -- Message Name to
614 -- verify in the list.
615 -- p_check_message_name4 No varchar2 Application Error
616 -- Message Name to
617 -- verify in the list.
618 -- p_check_message_name5 No varchar2 Application Error
619 -- Message Name to
620 -- verify in the list.
621 -- p_associated_column1 No varchar2 Dependent database
622 -- column or API
623 -- control parameter
624 -- name. Only used if
625 -- an existing error
626 -- is found.
627 -- p_associated_column2 No varchar2 Dependent database
628 -- column or API
629 -- control parameter
630 -- name. Only used if
631 -- an existing error
632 -- is found.
633 -- p_associated_column3 No varchar2 Dependent database
634 -- column or API
635 -- control parameter
636 -- name. Only used if
637 -- an existing error
638 -- is found.
639 -- p_associated_column4 No varchar2 Dependent database
640 -- column or API
641 -- control parameter
642 -- name. Only used if
643 -- an existing error
644 -- is found.
645 -- p_associated_column5 No varchar2 Dependent database
646 -- column or API
647 -- control parameter
648 -- name. Only used if
649 -- an existing error
650 -- is found.
651 --
652
653 FUNCTION No_Error_Message
654 ( p_check_message_name1 IN VARCHAR2
655 ,p_check_message_name2 IN VARCHAR2 default null
656 ,p_check_message_name3 IN VARCHAR2 default null
657 ,p_check_message_name4 IN VARCHAR2 default null
658 ,p_check_message_name5 IN VARCHAR2 default null
659 ,p_associated_column1 IN VARCHAR2 default null
660 ,p_associated_column2 IN VARCHAR2 default null
661 ,p_associated_column3 IN VARCHAR2 default null
662 ,p_associated_column4 IN VARCHAR2 default null
663 ,p_associated_column5 IN VARCHAR2 default null
664 ) return varchar2;
665
666 -- PROCEDURE Set_Search_Name
667 --
668 -- Usage: To register the message name search criteria
669 -- to be used when the Delete_Msg or Change_Msg
670 -- functions are called. Refer to those two
671 -- function specifications for example calls.
672 -- Values will not be used by the existing
673 -- Delete_Msg(p_msg_index) procedure.
674
675 PROCEDURE Set_Search_Name
676 ( p_application IN VARCHAR2
677 ,p_message_name IN VARCHAR2
678 );
679
680 -- PROCEDURE Set_Search_Token
681 -- Usage: To register a message token name and value
682 -- search criteria, to be used when the Delete_Msg
683 -- or Change_Msg functions are called. Refer to the
684 -- those two function specifications for example
685 -- calls. Values will not be used by the existing
686 -- Delete_Msg procedure. It is optional to call
687 -- this procedure. When used must be called after
691 --
688 -- Set_Search_Name. Can be called multiple times
689 -- when more than one token needs to be set in the
690 -- search criteria.
692
693 PROCEDURE Set_Search_Token
694 ( p_token in varchar2
695 ,p_value in varchar2
696 ,p_translate in boolean default false
697 );
698
699 -- FUNCTION Delete_Msg
700 --
701 -- Usage: Provide similar functionality to the existing
702 -- Delete_Msg procedure, except allows removal of
703 -- a message when the caller knows the name of the
704 -- message but not the position in the list.
705 -- Details of the message to search for must first
706 -- be set by calling Set_Search_Message and
707 -- optionally calling Set_Search_Token. This
708 -- function will return 'T' for TRUE or 'F' for
709 -- FALSE to indicate if the specified message had
710 -- actually been found and removed.
711 --
712 -- Example: To remove the 'MESSAGE1' message or the
713 -- 'MESSAGE2' message with
714 -- certain token values from anywhere in the list.
715 --
716 -- fnd_msg_pub.set_search_name
717 -- ('FND' ,'MESSAGE1');
718 -- l_found := fnd_msg_pub.delete_msg;
719 -- fnd_msg_pub.set_search_name
720 -- ('FND', 'MESSAGE2');
721 -- fnd_msg_pub.set_search_token
722 -- ('TOKEN1', 'VALUE1');
723 -- fnd_msg_pub.set_search_token
724 -- ('TOKEN2', 'VALUE2');
725 -- fnd_msg_pub.Delete_Msg;
726 --
727 --
728 --
729 --
730
731 FUNCTION Delete_Msg return varchar2;
732
733 -- FUNCTION Change_Msg
734 --
735 -- Usage: Allows an existing message in the Multiple
736 -- Message list to be changed for a different
737 -- message name. Provides a useful utility,
738 -- so the caller does have to explicitly delete a
739 -- message and create a new entry. Details of the
740 -- message to search for must first be set by
741 -- calling Set_Search_Message and optionally
742 -- Set_Search_Token. Details of the replacement
743 -- message must first be set by calling
744 -- fnd_message.set_message and optionally
745 -- fnd_message.set_token. This function will return
746 -- 'T' for TRUE or 'F' for FALSE to indicate if the
747 -- specified message had actually been found and
748 -- changed. Any associated_column and error type
749 -- details will not be altered. If the message to
750 -- be replaced is not found in the list no error is
751 -- raised and fnd_message.clear is called
752 --
753 -- Example: If the 'MESSAGE1' message exists change it to
754 -- 'MESSAGE2'.
755 --
756 -- fnd_msg_pub.set_search_name
757 -- ('FND', 'MESSAGE1');
758 -- fnd_message.set_name
759 -- ('FND','MESSAGE2');
760 -- fnd_msg_pub.change_msg;
761 --
762 --
763
764 FUNCTION Change_Msg return varchar2;
765
766 -- FUNCTION Get_Detail
767 -- Usage: Used by the OAFramework Java Helper classes
768 -- to retrieve the message details from the
769 -- DataServer tier to the Middle tier.
770 -- This functionreturns all the details
771 -- for each entry in the Multiple Error Message
772 -- List. Where provided Associated column and
773 -- message type information will be incorporated as
774 -- token values in the encoded message. Using token
775 -- names G_ASSOCIATED_COLS_TOKEN_NAME and
776 -- G_MESSAGE_TYPE_TOKEN_NAME. Entries in the Dependency
777 -- Chain List are not returned.
778 --
779 -- Parameters: p_msg_index IN NUMBER default G_NEXT
780 -- p_encoded IN VARCHAR2 default 'T'
781 --
782 --
783
784 FUNCTION Get_Detail
785 ( p_msg_index IN NUMBER := G_NEXT
786 ,p_encoded IN VARCHAR2 := 'T'
787 ) return varchar2;
788
789
790
791
792
793 END FND_MSG_PUB ;