42: * status and message.
43: ******************************************************************/
44:
45: PROCEDURE Log_Error
46: ( p_Mesg_Token_tbl IN Error_Handler.Mesg_Token_Tbl_Type
47: := Error_Handler.G_MISS_MESG_TOKEN_TBL
48: , p_error_status IN VARCHAR2
49: , p_error_scope IN VARCHAR2 := NULL
50: , p_other_message IN VARCHAR2 := NULL
43: ******************************************************************/
44:
45: PROCEDURE Log_Error
46: ( p_Mesg_Token_tbl IN Error_Handler.Mesg_Token_Tbl_Type
47: := Error_Handler.G_MISS_MESG_TOKEN_TBL
48: , p_error_status IN VARCHAR2
49: , p_error_scope IN VARCHAR2 := NULL
50: , p_other_message IN VARCHAR2 := NULL
51: , p_other_mesg_appid IN VARCHAR2 := 'EGO'
49: , p_error_scope IN VARCHAR2 := NULL
50: , p_other_message IN VARCHAR2 := NULL
51: , p_other_mesg_appid IN VARCHAR2 := 'EGO'
52: , p_other_status IN VARCHAR2 := NULL
53: , p_other_token_tbl IN Error_Handler.Token_Tbl_Type
54: := Error_Handler.G_MISS_TOKEN_TBL
55: , p_error_level IN NUMBER
56: , p_entity_index IN NUMBER := 1 -- := NULL
57: )
50: , p_other_message IN VARCHAR2 := NULL
51: , p_other_mesg_appid IN VARCHAR2 := 'EGO'
52: , p_other_status IN VARCHAR2 := NULL
53: , p_other_token_tbl IN Error_Handler.Token_Tbl_Type
54: := Error_Handler.G_MISS_TOKEN_TBL
55: , p_error_level IN NUMBER
56: , p_entity_index IN NUMBER := 1 -- := NULL
57: )
58: IS
76: -- Error Table.
77: --
78: **************************************************/
79:
80: Error_Handler.Write_Debug('Within the Log Error Procedure . . .');
81: Error_Handler.Write_Debug('Scope: ' || l_error_scope);
82: Error_Handler.Write_Debug('Entity Index: ' || to_char(p_entity_index));
83: Error_Handler.Write_Debug('Error Level: ' || to_char(p_error_level));
84: Error_Handler.Write_Debug('Error Status: ' || l_error_status);
77: --
78: **************************************************/
79:
80: Error_Handler.Write_Debug('Within the Log Error Procedure . . .');
81: Error_Handler.Write_Debug('Scope: ' || l_error_scope);
82: Error_Handler.Write_Debug('Entity Index: ' || to_char(p_entity_index));
83: Error_Handler.Write_Debug('Error Level: ' || to_char(p_error_level));
84: Error_Handler.Write_Debug('Error Status: ' || l_error_status);
85: Error_Handler.Write_Debug('Other Status: ' || p_other_status);
78: **************************************************/
79:
80: Error_Handler.Write_Debug('Within the Log Error Procedure . . .');
81: Error_Handler.Write_Debug('Scope: ' || l_error_scope);
82: Error_Handler.Write_Debug('Entity Index: ' || to_char(p_entity_index));
83: Error_Handler.Write_Debug('Error Level: ' || to_char(p_error_level));
84: Error_Handler.Write_Debug('Error Status: ' || l_error_status);
85: Error_Handler.Write_Debug('Other Status: ' || p_other_status);
86: Error_Handler.Write_Debug('Other Message: ' || p_other_message);
79:
80: Error_Handler.Write_Debug('Within the Log Error Procedure . . .');
81: Error_Handler.Write_Debug('Scope: ' || l_error_scope);
82: Error_Handler.Write_Debug('Entity Index: ' || to_char(p_entity_index));
83: Error_Handler.Write_Debug('Error Level: ' || to_char(p_error_level));
84: Error_Handler.Write_Debug('Error Status: ' || l_error_status);
85: Error_Handler.Write_Debug('Other Status: ' || p_other_status);
86: Error_Handler.Write_Debug('Other Message: ' || p_other_message);
87:
80: Error_Handler.Write_Debug('Within the Log Error Procedure . . .');
81: Error_Handler.Write_Debug('Scope: ' || l_error_scope);
82: Error_Handler.Write_Debug('Entity Index: ' || to_char(p_entity_index));
83: Error_Handler.Write_Debug('Error Level: ' || to_char(p_error_level));
84: Error_Handler.Write_Debug('Error Status: ' || l_error_status);
85: Error_Handler.Write_Debug('Other Status: ' || p_other_status);
86: Error_Handler.Write_Debug('Other Message: ' || p_other_message);
87:
88: Error_Handler.Translate_And_Insert_Messages
81: Error_Handler.Write_Debug('Scope: ' || l_error_scope);
82: Error_Handler.Write_Debug('Entity Index: ' || to_char(p_entity_index));
83: Error_Handler.Write_Debug('Error Level: ' || to_char(p_error_level));
84: Error_Handler.Write_Debug('Error Status: ' || l_error_status);
85: Error_Handler.Write_Debug('Other Status: ' || p_other_status);
86: Error_Handler.Write_Debug('Other Message: ' || p_other_message);
87:
88: Error_Handler.Translate_And_Insert_Messages
89: ( p_mesg_token_Tbl => p_mesg_token_tbl
82: Error_Handler.Write_Debug('Entity Index: ' || to_char(p_entity_index));
83: Error_Handler.Write_Debug('Error Level: ' || to_char(p_error_level));
84: Error_Handler.Write_Debug('Error Status: ' || l_error_status);
85: Error_Handler.Write_Debug('Other Status: ' || p_other_status);
86: Error_Handler.Write_Debug('Other Message: ' || p_other_message);
87:
88: Error_Handler.Translate_And_Insert_Messages
89: ( p_mesg_token_Tbl => p_mesg_token_tbl
90: , p_error_level => p_error_level
84: Error_Handler.Write_Debug('Error Status: ' || l_error_status);
85: Error_Handler.Write_Debug('Other Status: ' || p_other_status);
86: Error_Handler.Write_Debug('Other Message: ' || p_other_message);
87:
88: Error_Handler.Translate_And_Insert_Messages
89: ( p_mesg_token_Tbl => p_mesg_token_tbl
90: , p_error_level => p_error_level
91: , p_entity_index => p_entity_index
92: );
90: , p_error_level => p_error_level
91: , p_entity_index => p_entity_index
92: );
93:
94: Error_Handler.Write_Debug('Finished logging messages . . . ');
95:
96: /**********************************************************
97: --
98: -- Get the other message text and token and retrieve the
134: l_other_message := fnd_message.get;
135:
136: END IF; -- Other Token Tbl Count <> 0 Ends
137:
138: Error_Handler.Write_Debug('Finished extracting other message . . . ');
139: Error_Handler.Write_Debug('Other Message generated: ' || l_other_message);
140:
141:
142: /**********************************************************
135:
136: END IF; -- Other Token Tbl Count <> 0 Ends
137:
138: Error_Handler.Write_Debug('Finished extracting other message . . . ');
139: Error_Handler.Write_Debug('Other Message generated: ' || l_other_message);
140:
141:
142: /**********************************************************
143: --
144: -- If the Error Level is Business Object
145: -- then set the Error Level = Catalog Group
146: --
147: ************************************************************/
148: IF l_error_level = Error_Handler.G_BO_LEVEL
149: THEN
150: l_error_level := EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL;
151:
152: Error_Handler.Write_Debug('Error Level is Business Object . . . ');
148: IF l_error_level = Error_Handler.G_BO_LEVEL
149: THEN
150: l_error_level := EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL;
151:
152: Error_Handler.Write_Debug('Error Level is Business Object . . . ');
153:
154: END IF;
155: /**********************************************************
156: --
157: -- If the error_status is UNEXPECTED then set the error scope
158: -- to ALL, if WARNING then set the scope to RECORD.
159: --
160: ************************************************************/
161: IF l_error_status = Error_Handler.G_STATUS_UNEXPECTED
162: THEN
163: Error_Handler.Write_Debug('Status unexpected and scope is All . . .');
164: l_error_scope := Error_Handler.G_SCOPE_ALL;
165: ELSIF l_error_status = Error_Handler.G_STATUS_WARNING
159: --
160: ************************************************************/
161: IF l_error_status = Error_Handler.G_STATUS_UNEXPECTED
162: THEN
163: Error_Handler.Write_Debug('Status unexpected and scope is All . . .');
164: l_error_scope := Error_Handler.G_SCOPE_ALL;
165: ELSIF l_error_status = Error_Handler.G_STATUS_WARNING
166: THEN
167: l_error_scope := Error_Handler.G_SCOPE_RECORD;
160: ************************************************************/
161: IF l_error_status = Error_Handler.G_STATUS_UNEXPECTED
162: THEN
163: Error_Handler.Write_Debug('Status unexpected and scope is All . . .');
164: l_error_scope := Error_Handler.G_SCOPE_ALL;
165: ELSIF l_error_status = Error_Handler.G_STATUS_WARNING
166: THEN
167: l_error_scope := Error_Handler.G_SCOPE_RECORD;
168: l_error_status := FND_API.G_RET_STS_SUCCESS;
161: IF l_error_status = Error_Handler.G_STATUS_UNEXPECTED
162: THEN
163: Error_Handler.Write_Debug('Status unexpected and scope is All . . .');
164: l_error_scope := Error_Handler.G_SCOPE_ALL;
165: ELSIF l_error_status = Error_Handler.G_STATUS_WARNING
166: THEN
167: l_error_scope := Error_Handler.G_SCOPE_RECORD;
168: l_error_status := FND_API.G_RET_STS_SUCCESS;
169: Error_Handler.Write_Debug('Status is warning . . .');
163: Error_Handler.Write_Debug('Status unexpected and scope is All . . .');
164: l_error_scope := Error_Handler.G_SCOPE_ALL;
165: ELSIF l_error_status = Error_Handler.G_STATUS_WARNING
166: THEN
167: l_error_scope := Error_Handler.G_SCOPE_RECORD;
168: l_error_status := FND_API.G_RET_STS_SUCCESS;
169: Error_Handler.Write_Debug('Status is warning . . .');
170:
171: END IF;
165: ELSIF l_error_status = Error_Handler.G_STATUS_WARNING
166: THEN
167: l_error_scope := Error_Handler.G_SCOPE_RECORD;
168: l_error_status := FND_API.G_RET_STS_SUCCESS;
169: Error_Handler.Write_Debug('Status is warning . . .');
170:
171: END IF;
172:
173: --
181: *************************************************************/
182: IF l_error_level = EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
183: THEN
184:
185: Error_Handler.Write_Debug('Error Level is Catalog Group. . .');
186:
187: --
188: -- Set the Bill Header record status to p_error_status
189: -- This will also take care of the scope RECORD.
190: --
191:
192: EGO_Globals.G_Catalog_Group_Rec.return_status := l_error_status;
193:
194: IF l_error_scope = error_handler.G_SCOPE_ALL OR
195: l_error_scope = error_handler.G_SCOPE_CHILDREN OR
196: l_error_scope = error_handler.G_SCOPE_SIBLINGS
197: THEN
198: --
191:
192: EGO_Globals.G_Catalog_Group_Rec.return_status := l_error_status;
193:
194: IF l_error_scope = error_handler.G_SCOPE_ALL OR
195: l_error_scope = error_handler.G_SCOPE_CHILDREN OR
196: l_error_scope = error_handler.G_SCOPE_SIBLINGS
197: THEN
198: --
199: -- Since catalog group entity does not have children all error scopes will
192: EGO_Globals.G_Catalog_Group_Rec.return_status := l_error_status;
193:
194: IF l_error_scope = error_handler.G_SCOPE_ALL OR
195: l_error_scope = error_handler.G_SCOPE_CHILDREN OR
196: l_error_scope = error_handler.G_SCOPE_SIBLINGS
197: THEN
198: --
199: -- Since catalog group entity does not have children all error scopes will
200: -- affect only the current record.
202: null;
203: END IF;
204: END IF;
205:
206: Error_Handler.Write_To_DebugFile;
207:
208: END Log_Error;
209:
210: