14: , x_msg_count OUT NOCOPY NUMBER
15: )
16: IS
17: l_Table_Index NUMBER;
18: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
19: l_other_token_tbl Error_Handler.Token_Tbl_Type;
20: l_other_message VARCHAR2(2000);
21: l_err_text VARCHAR2(2000);
22: l_valid BOOLEAN := TRUE;
15: )
16: IS
17: l_Table_Index NUMBER;
18: l_Mesg_Token_Tbl Error_Handler.Mesg_Token_Tbl_Type;
19: l_other_token_tbl Error_Handler.Token_Tbl_Type;
20: l_other_message VARCHAR2(2000);
21: l_err_text VARCHAR2(2000);
22: l_valid BOOLEAN := TRUE;
23: l_Return_Status VARCHAR2(1);
28: -- Business Object starts with a status of Success
29:
30: l_bo_return_status := 'S';
31:
32: Error_Handler.Write_Debug('Starting PVT processing in Process_Catalog_Groups ');
33: -- dbms_output.put_line('Starting PVT processing in Process_Catalog_Groups ');
34:
35: -- begin processing the catalog group table
36:
107: --
108: -- Transaction Type Validity
109: --
110:
111: Error_Handler.Write_Debug('Performing trasaction type validity ');
112: -- dbms_output.put_line('Performing trasaction type validity ');
113:
114: EGO_Globals.Transaction_Type_Validity
115: ( p_Entity_Id => EGO_Globals.G_ITEM_CATALOG_GROUP
130:
131: --
132: -- Process Flow step 4.a - User Unique Index to Unique index conversion - I
133: --
134: Error_Handler.Write_Debug('Performing UUI-UI conversion ');
135: -- dbms_output.put_line('Performing UUI-UI conversion ');
136: EGO_ItemCat_Val_To_Id.EGO_ItemCatalog_UUI_To_UI
137: ( x_return_status => l_return_status
138: , x_mesg_token_tbl => l_mesg_token_tbl
137: ( x_return_status => l_return_status
138: , x_mesg_token_tbl => l_mesg_token_tbl
139: );
140:
141: Error_Handler.Write_Debug('UUI conversion returned . . .');
142: IF l_return_status = Error_Handler.G_STATUS_ERROR
143: THEN
144: Error_Handler.Write_Debug('Raising exception . . .QUIT_RECORD');
145: -- dbms_output.put_line('Raising exception . . .QUIT_RECORD');
138: , x_mesg_token_tbl => l_mesg_token_tbl
139: );
140:
141: Error_Handler.Write_Debug('UUI conversion returned . . .');
142: IF l_return_status = Error_Handler.G_STATUS_ERROR
143: THEN
144: Error_Handler.Write_Debug('Raising exception . . .QUIT_RECORD');
145: -- dbms_output.put_line('Raising exception . . .QUIT_RECORD');
146: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
140:
141: Error_Handler.Write_Debug('UUI conversion returned . . .');
142: IF l_return_status = Error_Handler.G_STATUS_ERROR
143: THEN
144: Error_Handler.Write_Debug('Raising exception . . .QUIT_RECORD');
145: -- dbms_output.put_line('Raising exception . . .QUIT_RECORD');
146: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
147: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
148: THEN
143: THEN
144: Error_Handler.Write_Debug('Raising exception . . .QUIT_RECORD');
145: -- dbms_output.put_line('Raising exception . . .QUIT_RECORD');
146: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
147: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
148: THEN
149: l_other_message := 'EGO_CATG_UUI_UNEXP_SKIP';
150: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
151: l_other_token_tbl(1).token_value :=
161:
162: --
163: -- Process Flow step 5: Verify existence
164: --
165: Error_Handler.Write_Debug('Performing check existence ');
166: -- dbms_output.put_line('Performing check existence ');
167: Ego_Validate_Catalog_Group.Check_Existence
168: ( x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
169: , x_return_status => l_Return_Status
168: ( x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
169: , x_return_status => l_Return_Status
170: );
171:
172: IF l_return_status = Error_Handler.G_STATUS_ERROR
173: THEN
174: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
175: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
176: THEN
171:
172: IF l_return_status = Error_Handler.G_STATUS_ERROR
173: THEN
174: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
175: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
176: THEN
177: l_other_message := 'EGO_CATGRP_EXS_UNEXP_SKIP';
178: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
179: l_other_token_tbl(1).token_value :=
199: -- Process Flow Step 8: Check Access.
200: -- Check if the user has access to create the catalog group.
201: --
202:
203: Error_Handler.Write_Debug('Performing check access');
204: -- dbms_output.put_line('Performing check access');
205:
206: Ego_Validate_Catalog_Group.Check_Access
207: ( x_return_status => l_return_status
207: ( x_return_status => l_return_status
208: , x_mesg_token_tbl => l_mesg_token_tbl
209: );
210:
211: IF l_return_status = Error_Handler.G_STATUS_ERROR
212: THEN
213: l_other_message := 'EGO_CATGRP_ACC_FAT_FATAL';
214: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
215: l_other_token_tbl(1).token_value :=
215: l_other_token_tbl(1).token_value :=
216: Ego_Globals.G_Catalog_Group_rec.Catalog_Group_Name;
217: l_return_status := 'F';
218: RAISE EGO_Globals.G_EXC_FAT_QUIT_SIBLINGS;
219: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
220: THEN
221: l_other_message := 'BOM_CATGRP_ACC_UNEXP_SKIP';
222: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
223: l_other_token_tbl(1).token_value :=
232:
233: IF EGO_Globals.G_Catalog_Group_Rec.transaction_type IN
234: (Ego_Globals.G_OPR_UPDATE, Ego_Globals.G_OPR_CREATE)
235: THEN
236: Error_Handler.Write_Debug('Performing check attributes');
237: -- dbms_output.put_line('Performing check attributes');
238: EGO_Validate_Catalog_Group.Check_Attributes
239: ( x_return_status => l_return_status
240: , x_mesg_token_tbl => l_mesg_token_tbl
239: ( x_return_status => l_return_status
240: , x_mesg_token_tbl => l_mesg_token_tbl
241: );
242:
243: IF l_return_status = Error_Handler.G_STATUS_ERROR
244: THEN
245: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
246: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
247: THEN
242:
243: IF l_return_status = Error_Handler.G_STATUS_ERROR
244: THEN
245: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
246: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
247: THEN
248: RAISE EGO_Globals.G_EXC_UNEXP_SKIP_OBJECT;
249: END IF;
250:
257:
258: IF EGO_Globals.G_Catalog_Group_Rec.transaction_type IN
259: (EGO_Globals.G_OPR_UPDATE, EGO_Globals.G_OPR_DELETE)
260: THEN
261: Error_Handler.Write_Debug('Populate NULL columns . . .');
262:
263: Ego_Default_Catalog_Group.Populate_Null_Columns;
264:
265: -- Bug 3324531
265: -- Bug 3324531
266: -- changed the global Bom_Globals.G_OPR_CREATE to EGO_Globals.G_OPR_CREATE
267: ELSIF EGO_Globals.G_Catalog_Group_Rec.transaction_type = EGO_Globals.G_OPR_CREATE
268: THEN
269: Error_Handler.Write_Debug('Attribute Defaulting . . .');
270:
271: Ego_Default_Catalog_Group.Attribute_Defaulting
272: ( x_return_status => l_return_status
273: , x_mesg_token_tbl => l_mesg_token_tbl
272: ( x_return_status => l_return_status
273: , x_mesg_token_tbl => l_mesg_token_tbl
274: );
275:
276: IF l_return_status = Error_Handler.G_STATUS_ERROR
277: THEN
278: l_other_message := 'EGO_CATGRP_ATTDEF_CSEV_SKIP';
279: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
280: l_other_token_tbl(1).token_value :=
279: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
280: l_other_token_tbl(1).token_value :=
281: EGO_Globals.G_Catalog_Group_Rec.Catalog_Group_Name;
282: RAISE EGO_Globals.G_EXC_SEV_SKIP_BRANCH;
283: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
284: THEN
285: l_other_message := 'EGO_CATGRP_ATTDEF_UNEXP_SKIP';
286: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
287: l_other_token_tbl(1).token_value :=
289: RAISE EGO_Globals.G_EXC_UNEXP_SKIP_OBJECT;
290: END IF;
291: END IF;
292:
293: Error_Handler.write_debug('Finished with attribute defaulting . . .');
294: Error_Handler.write_debug('Proceeding with entity validations . . .');
295: -- dbms_output.put_line('Proceeding with entity validations . . .');
296:
297: IF EGO_Globals.G_Catalog_Group_Rec.transaction_type <> EGO_Globals.G_OPR_DELETE
290: END IF;
291: END IF;
292:
293: Error_Handler.write_debug('Finished with attribute defaulting . . .');
294: Error_Handler.write_debug('Proceeding with entity validations . . .');
295: -- dbms_output.put_line('Proceeding with entity validations . . .');
296:
297: IF EGO_Globals.G_Catalog_Group_Rec.transaction_type <> EGO_Globals.G_OPR_DELETE
298: THEN
300: ( x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
301: , x_return_status => l_Return_Status
302: );
303:
304: IF l_return_status = Error_Handler.G_STATUS_ERROR
305: THEN
306: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
307: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
308: THEN
303:
304: IF l_return_status = Error_Handler.G_STATUS_ERROR
305: THEN
306: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
307: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
308: THEN
309: l_other_message := 'EGO_CATGRP_ENTVAL_UNEXP_SKIP';
310: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
311: l_other_token_tbl(1).token_value :=
320: );
321:
322: -- dbms_output.put_line('Return Status is . . .'||l_return_status);
323:
324: IF l_return_status = Error_Handler.G_STATUS_ERROR
325: THEN
326: -- dbms_output.put_line('Raising exception in delete');
327: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
328: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
324: IF l_return_status = Error_Handler.G_STATUS_ERROR
325: THEN
326: -- dbms_output.put_line('Raising exception in delete');
327: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
328: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
329: THEN
330: l_other_message := 'EGO_CATGRP_ENTVAL_UNEXP_SKIP';
331: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
332: l_other_token_tbl(1).token_value :=
340: --
341: -- Process Flow step 13 : Database Writes
342: --
343:
344: Error_Handler.Write_Debug('Writing to the database');
345: -- dbms_output.put_line('Writing to the database');
346:
347: Ego_Catalog_Group_Util.Perform_Writes
348: ( x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
348: ( x_Mesg_Token_Tbl => l_Mesg_Token_Tbl
349: , x_return_status => l_return_status
350: );
351:
352: IF l_return_status = Error_Handler.G_STATUS_ERROR
353: THEN
354: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
355: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
356: THEN
351:
352: IF l_return_status = Error_Handler.G_STATUS_ERROR
353: THEN
354: RAISE EGO_Globals.G_EXC_SEV_QUIT_RECORD;
355: ELSIF l_return_status = Error_Handler.G_STATUS_UNEXPECTED
356: THEN
357: l_other_message := 'EGO_CATGRP_ENTVAL_UNEXP_SKIP';
358: l_other_token_tbl(1).token_name := 'CATALOG_GROUP_NAME';
359: l_other_token_tbl(1).token_value :=
366: EGO_Globals.G_Catalog_Group_Tbl(l_Table_Index) := EGO_Globals.G_Catalog_Group_Rec;
367:
368: x_return_status := l_bo_return_status;
369:
370: Error_Handler.Write_Debug('Process Completed');
371:
372: EXCEPTION
373: WHEN EGO_Globals.G_EXC_SEV_QUIT_RECORD THEN
374: Error_Handler.Write_Debug('Handling exception G_EXC_SEV_QUIT_RECORD');
370: Error_Handler.Write_Debug('Process Completed');
371:
372: EXCEPTION
373: WHEN EGO_Globals.G_EXC_SEV_QUIT_RECORD THEN
374: Error_Handler.Write_Debug('Handling exception G_EXC_SEV_QUIT_RECORD');
375: -- dbms_output.put_line('Handling exception G_EXC_SEV_QUIT_RECORD');
376: EGO_Catalog_Group_Err_Handler.Log_Error
377: ( p_mesg_token_tbl => l_mesg_token_tbl
378: , p_error_status => Error_Handler.G_STATUS_ERROR
374: Error_Handler.Write_Debug('Handling exception G_EXC_SEV_QUIT_RECORD');
375: -- dbms_output.put_line('Handling exception G_EXC_SEV_QUIT_RECORD');
376: EGO_Catalog_Group_Err_Handler.Log_Error
377: ( p_mesg_token_tbl => l_mesg_token_tbl
378: , p_error_status => Error_Handler.G_STATUS_ERROR
379: , p_error_scope => Error_Handler.G_SCOPE_RECORD
380: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
381: , p_entity_index => l_Table_Index
382: );
375: -- dbms_output.put_line('Handling exception G_EXC_SEV_QUIT_RECORD');
376: EGO_Catalog_Group_Err_Handler.Log_Error
377: ( p_mesg_token_tbl => l_mesg_token_tbl
378: , p_error_status => Error_Handler.G_STATUS_ERROR
379: , p_error_scope => Error_Handler.G_SCOPE_RECORD
380: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
381: , p_entity_index => l_Table_Index
382: );
383:
390:
391: WHEN EGO_Globals.G_EXC_SEV_QUIT_BRANCH THEN
392: EGO_Catalog_Group_Err_Handler.Log_Error
393: ( p_mesg_token_tbl => l_mesg_token_tbl
394: , p_error_status => Error_Handler.G_STATUS_ERROR
395: , p_error_scope => Error_Handler.G_SCOPE_CHILDREN
396: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
397: , p_entity_index => l_Table_Index
398: );
391: WHEN EGO_Globals.G_EXC_SEV_QUIT_BRANCH THEN
392: EGO_Catalog_Group_Err_Handler.Log_Error
393: ( p_mesg_token_tbl => l_mesg_token_tbl
394: , p_error_status => Error_Handler.G_STATUS_ERROR
395: , p_error_scope => Error_Handler.G_SCOPE_CHILDREN
396: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
397: , p_entity_index => l_Table_Index
398: );
399:
406:
407: WHEN EGO_Globals.G_EXC_SEV_QUIT_SIBLINGS THEN
408: EGO_Catalog_Group_Err_Handler.Log_Error
409: ( p_mesg_token_tbl => l_mesg_token_tbl
410: , p_error_status => Error_Handler.G_STATUS_ERROR
411: , p_error_scope => Error_Handler.G_SCOPE_SIBLINGS
412: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
413: , p_entity_index => l_Table_Index
414: );
407: WHEN EGO_Globals.G_EXC_SEV_QUIT_SIBLINGS THEN
408: EGO_Catalog_Group_Err_Handler.Log_Error
409: ( p_mesg_token_tbl => l_mesg_token_tbl
410: , p_error_status => Error_Handler.G_STATUS_ERROR
411: , p_error_scope => Error_Handler.G_SCOPE_SIBLINGS
412: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
413: , p_entity_index => l_Table_Index
414: );
415:
422:
423: WHEN EGO_Globals.G_EXC_FAT_QUIT_SIBLINGS THEN
424: EGO_Catalog_Group_Err_Handler.Log_Error
425: ( p_mesg_token_tbl => l_mesg_token_tbl
426: , p_error_status => Error_Handler.G_STATUS_FATAL
427: , p_error_scope => Error_Handler.G_SCOPE_SIBLINGS
428: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
429: , p_entity_index => l_Table_Index
430: );
423: WHEN EGO_Globals.G_EXC_FAT_QUIT_SIBLINGS THEN
424: EGO_Catalog_Group_Err_Handler.Log_Error
425: ( p_mesg_token_tbl => l_mesg_token_tbl
426: , p_error_status => Error_Handler.G_STATUS_FATAL
427: , p_error_scope => Error_Handler.G_SCOPE_SIBLINGS
428: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
429: , p_entity_index => l_Table_Index
430: );
431:
438:
439: WHEN EGO_Globals.G_EXC_FAT_QUIT_OBJECT THEN
440: EGO_Catalog_Group_Err_Handler.Log_Error
441: ( p_mesg_token_tbl => l_mesg_token_tbl
442: , p_error_status => Error_Handler.G_STATUS_FATAL
443: , p_error_scope => Error_Handler.G_SCOPE_ALL
444: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
445: , p_entity_index => l_Table_Index
446: );
439: WHEN EGO_Globals.G_EXC_FAT_QUIT_OBJECT THEN
440: EGO_Catalog_Group_Err_Handler.Log_Error
441: ( p_mesg_token_tbl => l_mesg_token_tbl
442: , p_error_status => Error_Handler.G_STATUS_FATAL
443: , p_error_scope => Error_Handler.G_SCOPE_ALL
444: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
445: , p_entity_index => l_Table_Index
446: );
447:
454:
455: WHEN EGO_Globals.G_EXC_UNEXP_SKIP_OBJECT THEN
456: EGO_Catalog_Group_Err_Handler.Log_Error
457: ( p_mesg_token_tbl => l_mesg_token_tbl
458: , p_error_status => Error_Handler.G_STATUS_UNEXPECTED
459: , p_other_status => Error_Handler.G_STATUS_NOT_PICKED
460: , p_other_message => l_other_message
461: , p_other_token_tbl => l_other_token_tbl
462: , p_error_scope => Error_Handler.G_SCOPE_ALL
455: WHEN EGO_Globals.G_EXC_UNEXP_SKIP_OBJECT THEN
456: EGO_Catalog_Group_Err_Handler.Log_Error
457: ( p_mesg_token_tbl => l_mesg_token_tbl
458: , p_error_status => Error_Handler.G_STATUS_UNEXPECTED
459: , p_other_status => Error_Handler.G_STATUS_NOT_PICKED
460: , p_other_message => l_other_message
461: , p_other_token_tbl => l_other_token_tbl
462: , p_error_scope => Error_Handler.G_SCOPE_ALL
463: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
458: , p_error_status => Error_Handler.G_STATUS_UNEXPECTED
459: , p_other_status => Error_Handler.G_STATUS_NOT_PICKED
460: , p_other_message => l_other_message
461: , p_other_token_tbl => l_other_token_tbl
462: , p_error_scope => Error_Handler.G_SCOPE_ALL
463: , p_error_level => EGO_Globals.G_ITEM_CATALOG_GROUP_LEVEL
464: , p_entity_index => l_Table_Index
465: );
466: