99: msc_sch_wb.atp_debug ('----------------------------------------------- ');
100: end if;
101:
102: -- Initialize variables
103: x_return_status := FND_API.G_RET_STS_SUCCESS;
104:
105: -- Error Checking
106: if (p_exception_rec.exception_group <> 5) OR -- Late Sales order
107: -- bug 2795053-reopen (ssurendr): Exception type check changed.
110: msc_sch_wb.atp_debug ('AEX: Only supported exceptions are :');
111: msc_sch_wb.atp_debug ('AEX: Group = 5');
112: msc_sch_wb.atp_debug ('AEX: Type = 68');
113: end if;
114: x_return_status := FND_API.G_RET_STS_ERROR;
115: RAISE FND_API.G_EXC_ERROR;
116: end if;
117:
118: /*
111: msc_sch_wb.atp_debug ('AEX: Group = 5');
112: msc_sch_wb.atp_debug ('AEX: Type = 68');
113: end if;
114: x_return_status := FND_API.G_RET_STS_ERROR;
115: RAISE FND_API.G_EXC_ERROR;
116: end if;
117:
118: /*
119: bug 2795053-reopen (ssurendr): Plan type check removed.
177: msc_sch_wb.atp_debug ('AEX: Unable to add exception details record');
178: msc_sch_wb.atp_debug ('Error is: ' || sqlerrm);
179: msc_sch_wb.atp_debug ('Code : ' || sqlcode);
180: end if;
181: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
182: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
183: END;
184:
185: if (PG_DEBUG in ('Y','C')) then
178: msc_sch_wb.atp_debug ('Error is: ' || sqlerrm);
179: msc_sch_wb.atp_debug ('Code : ' || sqlcode);
180: end if;
181: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
182: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
183: END;
184:
185: if (PG_DEBUG in ('Y','C')) then
186: msc_sch_wb.atp_debug ('AEX: Inserted details record. Now updating item record');
213: msc_sch_wb.atp_debug ('AEX: Unable to add item exception record');
214: msc_sch_wb.atp_debug ('Code : ' || sqlcode);
215: msc_sch_wb.atp_debug ('Error is: ' || sqlerrm);
216: end if;
217: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
218: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
219: END;
220:
221: if (l_insert_item_exception = 1 ) THEN
214: msc_sch_wb.atp_debug ('Code : ' || sqlcode);
215: msc_sch_wb.atp_debug ('Error is: ' || sqlerrm);
216: end if;
217: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
218: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
219: END;
220:
221: if (l_insert_item_exception = 1 ) THEN
222: BEGIN
256: msc_sch_wb.atp_debug('Add_Exception: Error while inserting new exception type');
257: msc_sch_wb.atp_debug('Error is: ' || sqlerrm);
258: msc_sch_wb.atp_debug ('Code : ' || sqlcode);
259: end if;
260: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
261: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
262: END;
263: end if;
264:
257: msc_sch_wb.atp_debug('Error is: ' || sqlerrm);
258: msc_sch_wb.atp_debug ('Code : ' || sqlcode);
259: end if;
260: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
261: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
262: END;
263: end if;
264:
265: EXCEPTION
263: end if;
264:
265: EXCEPTION
266:
267: WHEN FND_API.G_EXC_ERROR THEN
268: if (PG_DEBUG in ('Y','C')) then
269: msc_sch_wb.atp_debug ('Add_Exception: G_EXC_ERROR');
270: msc_sch_wb.atp_debug ('Code : ' || sqlcode);
271: msc_sch_wb.atp_debug ('Error is: ' || sqlerrm);
270: msc_sch_wb.atp_debug ('Code : ' || sqlcode);
271: msc_sch_wb.atp_debug ('Error is: ' || sqlerrm);
272: end if;
273:
274: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
275: if (PG_DEBUG in ('Y','C')) then
276: msc_sch_wb.atp_debug ('Add_Exception: G_EXC_UNEXPECTED_ERROR');
277: msc_sch_wb.atp_debug ('Code : ' || sqlcode);
278: msc_sch_wb.atp_debug ('Error is: ' || sqlerrm);