1 package body CTO_MSG_PUB as
2 /* $Header: CTOUMSGB.pls 120.1 2005/06/02 12:55:40 appldev $*/
3
4 /*----------------------------------------------------------------------------+
5 | Copyright (c) 1993 Oracle Corporation Belmont, California, USA
6 | All rights reserved.
7 | Oracle Manufacturing
8 |
9 |FILE NAME : CTOUMSGB.pls
10 |
11 |DESCRIPTION : Contains APIs to :
12 | control the error message handling
13 |
14 |HISTORY : Created on 18-JAN-2002 by Shashi Bhaskaran
15 | Modified 25-MAR-2002 by Shashi Bhaskaran
16 | Added p_token as a new argument to cto_message to
17 | handle tokens.
18 |
19 |
20 +-----------------------------------------------------------------------------*/
21
22
23
24 PROCEDURE cto_message (
25 p_appln_short_name IN VARCHAR2,
26 p_message IN VARCHAR2,
27 p_token IN CTO_MSG_PUB.token_tbl default CTO_MSG_PUB.G_MISS_TOKEN_TBL) is
28
29 i number;
30
31 BEGIN
32
33 --
34 -- First set the message for FND's message stack
35 --
36
37 fnd_message.set_name(p_appln_short_name, p_message);
38
39 --
40 -- set the token if any
41 --
42 i := p_token.first;
43
44 --oe_debug_pub.add ('p_token(1).token_name = '||p_token(1).token_name);
45 --oe_debug_pub.add ('p_token(1).token_value = '||p_token(1).token_value);
46
47 while i is not null
48 loop
49 --oe_debug_pub.add ('p_token('||i||').token_name = '||p_token(i).token_name);
50 --oe_debug_pub.add ('p_token('||i||').token_value = '||p_token(i).token_value);
51
52 fnd_message.set_token(p_token(i).token_name, p_token(i).token_value);
53 i := p_token.next(i);
54 end loop;
55 fnd_msg_pub.add;
56
57
58
59
60 --
61 -- We need to do the same to put the details in OM's message stack
62 --
63
64 fnd_message.set_name(p_appln_short_name, p_message);
65
66
67 --
68 -- set the token if any
69 --
70
71 i := p_token.first;
72
73 while i is not null
74 loop
75 --oe_debug_pub.add ('p_token('||i||').token_name = '||p_token(i).token_name);
76 --oe_debug_pub.add ('p_token('||i||').token_value = '||p_token(i).token_value);
77
78 fnd_message.set_token(p_token(i).token_name,p_token(i).token_value);
79 i := p_token.next(i);
80 end loop;
81 oe_msg_pub.add;
82
83 END cto_message;
84
85
86
87
88 PROCEDURE count_and_get ( p_msg_count OUT NOCOPY NUMBER,
89 p_msg_data OUT NOCOPY VARCHAR2 ) is
90 BEGIN
91
92 fnd_msg_pub.Count_And_Get (p_count => p_msg_count,
93 p_data => p_msg_data);
94 oe_msg_pub.Count_And_Get(p_count=> p_msg_count,
95 p_data => p_msg_data);
96
97 END count_and_get;
98
99
100 END CTO_MSG_PUB;