1 package body FND_SYSTEM_EXCEPTION as
2 /* $Header: AFCPFSEB.pls 115.3 2002/02/08 19:44:14 nbhambha noship $ */
3
4 -- Package - FND_SYSTEM_EXCEPTION
5
6 -- Name : Set_Name
7 -- Description:
8 -- This call names the exception event
9 -- By associating a message name (from Fnd_Messages)with the exception
10 -- we will be able to present the System Administrator with
11 -- translated description of the exception condition instead
12 -- of showing it in the language of the session where it
13 -- occurred .
14 -- Arguments:
15 --
16 -- Message_Appl_Short_Name
17 -- - Application short name of the message
18 -- Name - Message name
19 -- Module name - Source Module Name - required
20 -- Severity - ERROR/WARNING/FATAL
21 --
22 -- Returns Event_Id that you need to use with Set_Token calls .
23
24 FUNCTION Set_Name (Message_Appl_Short_Name In Varchar2,
25 Message_Name In Varchar2,
26 Module In Varchar2,
27 Severity In Varchar2 Default 'Warning')
28 return number
29 is
30 BEGIN
31 if (Module is null) then
32 return (0);
33 else
34 return(FND_EVENT.initialize(0, 'O', 0, 0,
35 Message_Appl_Short_Name, Message_Name, Severity, Module));
36 end if;
37 END;
38
39 -- Name : Set_Token
40 -- Description:
41 -- Sets token name and value.
42 -- Call this procedure for everey 'token' in the set message.
43 -- Set_Name has to be called before calling Set_Token
44 -- Arguments:
45 -- Event_Id - event value for which you are setting the token.
46 -- Token - token name
47 -- Value - token value (** Maximum allowed size is 2000**)
48 -- Type - 'C' = Constant. Value is used directly in the token
49 -- substitution.
50 -- 'S' = Select. Value is a SQL statement which
51 -- returns a single varchar2 value.
52 -- (e.g. A translated concurrent manager name.)
53 -- This statement is run when the
54 -- even is retrieved, and the result is used in
55 -- the token substitution.
56 -- (SQL statement cannot be more than 2000 in
57 -- length)
58 -- 'T' = Translate. Value is a message name.
59 -- This message must belong to the same
60 -- application as the message specified
61 -- in the Set_Name function.
62 -- The message text will be used in the token
63 -- substitution.
64
65
66 PROCEDURE Set_Token(Event_Id In Number,
67 Token In Varchar2,
68 Value In Varchar2 Default Null,
69 Type In Varchar2 Default 'C') is
70 BEGIN
71 FND_EVENT.set_token(Event_Id, Token, Value, Type);
72 END;
73
74 -- Name : Post
75 -- Description:
76 -- Call this function after calling Set_Name and optionally
77 -- Set_Token.
78 -- This call also captures the context in which the
79 -- exception occurred.
80 -- If successfull it returns TRUE else returns FALSE.
81 -- Arguments: Event_Id - event_id for which you want to post events.
82
83
84 FUNCTION Post (Event_Id In Number ) return boolean is
85 BEGIN
86 return FND_EVENT.post(Event_Id);
87 END;
88
89
90 end FND_SYSTEM_EXCEPTION;