76: END LOOP;
77:
78: exception
79: when others then
80: Fnd_Message.Set_Name('FND', 'CP-Generic oracle error');
81: Fnd_Message.Set_Token('ERROR', substr(SQLERRM, 1, 80), FALSE);
82: Fnd_Message.Set_Token('ROUTINE','DPP_ITEMCOST_PVT.wait_for_rec_processing', FALSE);
83: FND_MSG_PUB.add;
84: return FALSE;
77:
78: exception
79: when others then
80: Fnd_Message.Set_Name('FND', 'CP-Generic oracle error');
81: Fnd_Message.Set_Token('ERROR', substr(SQLERRM, 1, 80), FALSE);
82: Fnd_Message.Set_Token('ROUTINE','DPP_ITEMCOST_PVT.wait_for_rec_processing', FALSE);
83: FND_MSG_PUB.add;
84: return FALSE;
85: end wait_for_rec_processing;
78: exception
79: when others then
80: Fnd_Message.Set_Name('FND', 'CP-Generic oracle error');
81: Fnd_Message.Set_Token('ERROR', substr(SQLERRM, 1, 80), FALSE);
82: Fnd_Message.Set_Token('ROUTINE','DPP_ITEMCOST_PVT.wait_for_rec_processing', FALSE);
83: FND_MSG_PUB.add;
84: return FALSE;
85: end wait_for_rec_processing;
86:
240: -- API body
241: --
242: -- check for mandatory input parameters --
243: IF l_txn_hdr_rec.org_id IS NULL THEN
244: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
245: FND_MESSAGE.set_token('ID', 'Org ID');
246: FND_MSG_PUB.add;
247: RAISE FND_API.G_EXC_ERROR;
248: ELSIF l_txn_hdr_rec.last_updated_by IS NULL THEN
241: --
242: -- check for mandatory input parameters --
243: IF l_txn_hdr_rec.org_id IS NULL THEN
244: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
245: FND_MESSAGE.set_token('ID', 'Org ID');
246: FND_MSG_PUB.add;
247: RAISE FND_API.G_EXC_ERROR;
248: ELSIF l_txn_hdr_rec.last_updated_by IS NULL THEN
249: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
245: FND_MESSAGE.set_token('ID', 'Org ID');
246: FND_MSG_PUB.add;
247: RAISE FND_API.G_EXC_ERROR;
248: ELSIF l_txn_hdr_rec.last_updated_by IS NULL THEN
249: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
250: FND_MESSAGE.set_token('ID', 'User ID - Last_Updated_By');
251: FND_MSG_PUB.add;
252: RAISE FND_API.G_EXC_ERROR;
253: ELSIF l_txn_hdr_rec.cost_adjustment_account IS NULL THEN
246: FND_MSG_PUB.add;
247: RAISE FND_API.G_EXC_ERROR;
248: ELSIF l_txn_hdr_rec.last_updated_by IS NULL THEN
249: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
250: FND_MESSAGE.set_token('ID', 'User ID - Last_Updated_By');
251: FND_MSG_PUB.add;
252: RAISE FND_API.G_EXC_ERROR;
253: ELSIF l_txn_hdr_rec.cost_adjustment_account IS NULL THEN
254: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
250: FND_MESSAGE.set_token('ID', 'User ID - Last_Updated_By');
251: FND_MSG_PUB.add;
252: RAISE FND_API.G_EXC_ERROR;
253: ELSIF l_txn_hdr_rec.cost_adjustment_account IS NULL THEN
254: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
255: FND_MESSAGE.set_token('ID', 'Cost Adjustment Account');
256: FND_MSG_PUB.add;
257: RAISE FND_API.G_EXC_ERROR;
258: ELSIF l_txn_hdr_rec.transaction_header_id IS NULL THEN
251: FND_MSG_PUB.add;
252: RAISE FND_API.G_EXC_ERROR;
253: ELSIF l_txn_hdr_rec.cost_adjustment_account IS NULL THEN
254: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
255: FND_MESSAGE.set_token('ID', 'Cost Adjustment Account');
256: FND_MSG_PUB.add;
257: RAISE FND_API.G_EXC_ERROR;
258: ELSIF l_txn_hdr_rec.transaction_header_id IS NULL THEN
259: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
255: FND_MESSAGE.set_token('ID', 'Cost Adjustment Account');
256: FND_MSG_PUB.add;
257: RAISE FND_API.G_EXC_ERROR;
258: ELSIF l_txn_hdr_rec.transaction_header_id IS NULL THEN
259: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
260: FND_MESSAGE.set_token('ID', 'Transaction Header ID');
261: FND_MSG_PUB.add;
262: RAISE FND_API.G_EXC_ERROR;
263: ELSIF l_txn_hdr_rec.execution_detail_id IS NULL THEN
256: FND_MSG_PUB.add;
257: RAISE FND_API.G_EXC_ERROR;
258: ELSIF l_txn_hdr_rec.transaction_header_id IS NULL THEN
259: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
260: FND_MESSAGE.set_token('ID', 'Transaction Header ID');
261: FND_MSG_PUB.add;
262: RAISE FND_API.G_EXC_ERROR;
263: ELSIF l_txn_hdr_rec.execution_detail_id IS NULL THEN
264: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
260: FND_MESSAGE.set_token('ID', 'Transaction Header ID');
261: FND_MSG_PUB.add;
262: RAISE FND_API.G_EXC_ERROR;
263: ELSIF l_txn_hdr_rec.execution_detail_id IS NULL THEN
264: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
265: FND_MESSAGE.set_token('ID', 'Execution Detail ID');
266: FND_MSG_PUB.add;
267: RAISE FND_API.G_EXC_ERROR;
268: ELSIF l_txn_hdr_rec.transaction_number IS NULL THEN
261: FND_MSG_PUB.add;
262: RAISE FND_API.G_EXC_ERROR;
263: ELSIF l_txn_hdr_rec.execution_detail_id IS NULL THEN
264: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
265: FND_MESSAGE.set_token('ID', 'Execution Detail ID');
266: FND_MSG_PUB.add;
267: RAISE FND_API.G_EXC_ERROR;
268: ELSIF l_txn_hdr_rec.transaction_number IS NULL THEN
269: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
265: FND_MESSAGE.set_token('ID', 'Execution Detail ID');
266: FND_MSG_PUB.add;
267: RAISE FND_API.G_EXC_ERROR;
268: ELSIF l_txn_hdr_rec.transaction_number IS NULL THEN
269: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
270: FND_MESSAGE.set_token('ID', 'Transaction Number');
271: FND_MSG_PUB.add;
272: RAISE FND_API.G_EXC_ERROR;
273: END IF;
266: FND_MSG_PUB.add;
267: RAISE FND_API.G_EXC_ERROR;
268: ELSIF l_txn_hdr_rec.transaction_number IS NULL THEN
269: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
270: FND_MESSAGE.set_token('ID', 'Transaction Number');
271: FND_MSG_PUB.add;
272: RAISE FND_API.G_EXC_ERROR;
273: END IF;
274:
288: WHEN NO_DATA_FOUND THEN
289: DPP_UTILITY_PVT.debug_message('Invalid User');
290: RAISE FND_API.G_EXC_ERROR;
291: WHEN OTHERS THEN
292: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
293: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
294: fnd_message.set_token('ERRNO', sqlcode);
295: fnd_message.set_token('REASON', sqlerrm);
296: FND_MSG_PUB.add;
289: DPP_UTILITY_PVT.debug_message('Invalid User');
290: RAISE FND_API.G_EXC_ERROR;
291: WHEN OTHERS THEN
292: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
293: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
294: fnd_message.set_token('ERRNO', sqlcode);
295: fnd_message.set_token('REASON', sqlerrm);
296: FND_MSG_PUB.add;
297: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
290: RAISE FND_API.G_EXC_ERROR;
291: WHEN OTHERS THEN
292: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
293: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
294: fnd_message.set_token('ERRNO', sqlcode);
295: fnd_message.set_token('REASON', sqlerrm);
296: FND_MSG_PUB.add;
297: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
298: END;
291: WHEN OTHERS THEN
292: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
293: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
294: fnd_message.set_token('ERRNO', sqlcode);
295: fnd_message.set_token('REASON', sqlerrm);
296: FND_MSG_PUB.add;
297: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
298: END;
299:
365: EXCEPTION
366: WHEN NO_DATA_FOUND THEN
367: l_responsibility_id := -1;
368: WHEN OTHERS THEN
369: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
370: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
371: fnd_message.set_token('ERRNO', sqlcode);
372: fnd_message.set_token('REASON', sqlerrm);
373: FND_MSG_PUB.add;
366: WHEN NO_DATA_FOUND THEN
367: l_responsibility_id := -1;
368: WHEN OTHERS THEN
369: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
370: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
371: fnd_message.set_token('ERRNO', sqlcode);
372: fnd_message.set_token('REASON', sqlerrm);
373: FND_MSG_PUB.add;
374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
367: l_responsibility_id := -1;
368: WHEN OTHERS THEN
369: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
370: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
371: fnd_message.set_token('ERRNO', sqlcode);
372: fnd_message.set_token('REASON', sqlerrm);
373: FND_MSG_PUB.add;
374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
375: END;
368: WHEN OTHERS THEN
369: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
370: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
371: fnd_message.set_token('ERRNO', sqlcode);
372: fnd_message.set_token('REASON', sqlerrm);
373: FND_MSG_PUB.add;
374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
375: END;
376: WHEN OTHERS THEN
373: FND_MSG_PUB.add;
374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
375: END;
376: WHEN OTHERS THEN
377: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
378: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
379: fnd_message.set_token('ERRNO', sqlcode);
380: fnd_message.set_token('REASON', sqlerrm);
381: FND_MSG_PUB.add;
374: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
375: END;
376: WHEN OTHERS THEN
377: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
378: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
379: fnd_message.set_token('ERRNO', sqlcode);
380: fnd_message.set_token('REASON', sqlerrm);
381: FND_MSG_PUB.add;
382: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
375: END;
376: WHEN OTHERS THEN
377: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
378: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
379: fnd_message.set_token('ERRNO', sqlcode);
380: fnd_message.set_token('REASON', sqlerrm);
381: FND_MSG_PUB.add;
382: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
383: END;
376: WHEN OTHERS THEN
377: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
378: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
379: fnd_message.set_token('ERRNO', sqlcode);
380: fnd_message.set_token('REASON', sqlerrm);
381: FND_MSG_PUB.add;
382: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
383: END;
384:
450: EXCEPTION
451: WHEN NO_DATA_FOUND THEN
452: l_responsibility_id := -1;
453: WHEN OTHERS THEN
454: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
455: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
456: fnd_message.set_token('ERRNO', sqlcode);
457: fnd_message.set_token('REASON', sqlerrm);
458: FND_MSG_PUB.add;
451: WHEN NO_DATA_FOUND THEN
452: l_responsibility_id := -1;
453: WHEN OTHERS THEN
454: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
455: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
456: fnd_message.set_token('ERRNO', sqlcode);
457: fnd_message.set_token('REASON', sqlerrm);
458: FND_MSG_PUB.add;
459: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
452: l_responsibility_id := -1;
453: WHEN OTHERS THEN
454: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
455: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
456: fnd_message.set_token('ERRNO', sqlcode);
457: fnd_message.set_token('REASON', sqlerrm);
458: FND_MSG_PUB.add;
459: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
460: END;
453: WHEN OTHERS THEN
454: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
455: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
456: fnd_message.set_token('ERRNO', sqlcode);
457: fnd_message.set_token('REASON', sqlerrm);
458: FND_MSG_PUB.add;
459: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
460: END;
461: WHEN OTHERS THEN
458: FND_MSG_PUB.add;
459: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
460: END;
461: WHEN OTHERS THEN
462: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
463: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
464: fnd_message.set_token('ERRNO', sqlcode);
465: fnd_message.set_token('REASON', sqlerrm);
466: FND_MSG_PUB.add;
459: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
460: END;
461: WHEN OTHERS THEN
462: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
463: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
464: fnd_message.set_token('ERRNO', sqlcode);
465: fnd_message.set_token('REASON', sqlerrm);
466: FND_MSG_PUB.add;
467: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
460: END;
461: WHEN OTHERS THEN
462: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
463: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
464: fnd_message.set_token('ERRNO', sqlcode);
465: fnd_message.set_token('REASON', sqlerrm);
466: FND_MSG_PUB.add;
467: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
468: END;
461: WHEN OTHERS THEN
462: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
463: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
464: fnd_message.set_token('ERRNO', sqlcode);
465: fnd_message.set_token('REASON', sqlerrm);
466: FND_MSG_PUB.add;
467: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
468: END;
469: END IF;
536: EXCEPTION
537: WHEN NO_DATA_FOUND THEN
538: l_responsibility_id := -1;
539: WHEN OTHERS THEN
540: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
541: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
542: fnd_message.set_token('ERRNO', sqlcode);
543: fnd_message.set_token('REASON', sqlerrm);
544: FND_MSG_PUB.add;
537: WHEN NO_DATA_FOUND THEN
538: l_responsibility_id := -1;
539: WHEN OTHERS THEN
540: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
541: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
542: fnd_message.set_token('ERRNO', sqlcode);
543: fnd_message.set_token('REASON', sqlerrm);
544: FND_MSG_PUB.add;
545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
538: l_responsibility_id := -1;
539: WHEN OTHERS THEN
540: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
541: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
542: fnd_message.set_token('ERRNO', sqlcode);
543: fnd_message.set_token('REASON', sqlerrm);
544: FND_MSG_PUB.add;
545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
546: END;
539: WHEN OTHERS THEN
540: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
541: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
542: fnd_message.set_token('ERRNO', sqlcode);
543: fnd_message.set_token('REASON', sqlerrm);
544: FND_MSG_PUB.add;
545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
546: END;
547: WHEN OTHERS THEN
544: FND_MSG_PUB.add;
545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
546: END;
547: WHEN OTHERS THEN
548: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
549: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
550: fnd_message.set_token('ERRNO', sqlcode);
551: fnd_message.set_token('REASON', sqlerrm);
552: FND_MSG_PUB.add;
545: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
546: END;
547: WHEN OTHERS THEN
548: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
549: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
550: fnd_message.set_token('ERRNO', sqlcode);
551: fnd_message.set_token('REASON', sqlerrm);
552: FND_MSG_PUB.add;
553: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
546: END;
547: WHEN OTHERS THEN
548: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
549: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
550: fnd_message.set_token('ERRNO', sqlcode);
551: fnd_message.set_token('REASON', sqlerrm);
552: FND_MSG_PUB.add;
553: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
554: END;
547: WHEN OTHERS THEN
548: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
549: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
550: fnd_message.set_token('ERRNO', sqlcode);
551: fnd_message.set_token('REASON', sqlerrm);
552: FND_MSG_PUB.add;
553: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
554: END;
555: END IF;
623: EXCEPTION
624: WHEN NO_DATA_FOUND THEN
625: l_responsibility_id := -1;
626: WHEN OTHERS THEN
627: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
628: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
629: fnd_message.set_token('ERRNO', sqlcode);
630: fnd_message.set_token('REASON', sqlerrm);
631: FND_MSG_PUB.add;
624: WHEN NO_DATA_FOUND THEN
625: l_responsibility_id := -1;
626: WHEN OTHERS THEN
627: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
628: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
629: fnd_message.set_token('ERRNO', sqlcode);
630: fnd_message.set_token('REASON', sqlerrm);
631: FND_MSG_PUB.add;
632: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
625: l_responsibility_id := -1;
626: WHEN OTHERS THEN
627: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
628: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
629: fnd_message.set_token('ERRNO', sqlcode);
630: fnd_message.set_token('REASON', sqlerrm);
631: FND_MSG_PUB.add;
632: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
633: END;
626: WHEN OTHERS THEN
627: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
628: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
629: fnd_message.set_token('ERRNO', sqlcode);
630: fnd_message.set_token('REASON', sqlerrm);
631: FND_MSG_PUB.add;
632: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
633: END;
634: WHEN OTHERS THEN
631: FND_MSG_PUB.add;
632: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
633: END;
634: WHEN OTHERS THEN
635: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
636: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
637: fnd_message.set_token('ERRNO', sqlcode);
638: fnd_message.set_token('REASON', sqlerrm);
639: FND_MSG_PUB.add;
632: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
633: END;
634: WHEN OTHERS THEN
635: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
636: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
637: fnd_message.set_token('ERRNO', sqlcode);
638: fnd_message.set_token('REASON', sqlerrm);
639: FND_MSG_PUB.add;
640: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
633: END;
634: WHEN OTHERS THEN
635: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
636: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
637: fnd_message.set_token('ERRNO', sqlcode);
638: fnd_message.set_token('REASON', sqlerrm);
639: FND_MSG_PUB.add;
640: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
641: END;
634: WHEN OTHERS THEN
635: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
636: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
637: fnd_message.set_token('ERRNO', sqlcode);
638: fnd_message.set_token('REASON', sqlerrm);
639: FND_MSG_PUB.add;
640: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
641: END;
642: END IF;
642: END IF;
643:
644: --Check if the responsibility id is -1
645: IF l_responsibility_id = -1 THEN
646: FND_MESSAGE.set_name('DPP', 'DPP_INVALID_RESP');
647: FND_MESSAGE.set_token('USER', l_user_name);
648: FND_MSG_PUB.add;
649: IF g_debug THEN
650: DPP_UTILITY_PVT.debug_message('Price Protection responsibility not available for Last updated user'||l_user_name);
643:
644: --Check if the responsibility id is -1
645: IF l_responsibility_id = -1 THEN
646: FND_MESSAGE.set_name('DPP', 'DPP_INVALID_RESP');
647: FND_MESSAGE.set_token('USER', l_user_name);
648: FND_MSG_PUB.add;
649: IF g_debug THEN
650: DPP_UTILITY_PVT.debug_message('Price Protection responsibility not available for Last updated user'||l_user_name);
651: END IF;
1514: EXCEPTION
1515: WHEN OTHERS THEN
1516: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1517: -- IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1518: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1519: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-SLA Tables Insertion');
1520: fnd_message.set_token('ERRNO', sqlcode);
1521: fnd_message.set_token('REASON', sqlerrm);
1522: FND_MSG_PUB.add;
1515: WHEN OTHERS THEN
1516: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1517: -- IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1518: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1519: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-SLA Tables Insertion');
1520: fnd_message.set_token('ERRNO', sqlcode);
1521: fnd_message.set_token('REASON', sqlerrm);
1522: FND_MSG_PUB.add;
1523: -- END IF;
1516: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1517: -- IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1518: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1519: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-SLA Tables Insertion');
1520: fnd_message.set_token('ERRNO', sqlcode);
1521: fnd_message.set_token('REASON', sqlerrm);
1522: FND_MSG_PUB.add;
1523: -- END IF;
1524: DPP_UTILITY_PVT.debug_message('Error in SLA Tables Insertion:' || sqlerrm);
1517: -- IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1518: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1519: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-SLA Tables Insertion');
1520: fnd_message.set_token('ERRNO', sqlcode);
1521: fnd_message.set_token('REASON', sqlerrm);
1522: FND_MSG_PUB.add;
1523: -- END IF;
1524: DPP_UTILITY_PVT.debug_message('Error in SLA Tables Insertion:' || sqlerrm);
1525: END;
1566:
1567: EXCEPTION
1568: WHEN OTHERS THEN
1569: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1570: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1571: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-XML Generation');
1572: fnd_message.set_token('ERRNO', sqlcode);
1573: fnd_message.set_token('REASON', sqlerrm);
1574: FND_MSG_PUB.add;
1567: EXCEPTION
1568: WHEN OTHERS THEN
1569: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1570: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1571: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-XML Generation');
1572: fnd_message.set_token('ERRNO', sqlcode);
1573: fnd_message.set_token('REASON', sqlerrm);
1574: FND_MSG_PUB.add;
1575: END;
1568: WHEN OTHERS THEN
1569: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1570: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1571: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-XML Generation');
1572: fnd_message.set_token('ERRNO', sqlcode);
1573: fnd_message.set_token('REASON', sqlerrm);
1574: FND_MSG_PUB.add;
1575: END;
1576:
1569: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1570: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1571: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-XML Generation');
1572: fnd_message.set_token('ERRNO', sqlcode);
1573: fnd_message.set_token('REASON', sqlerrm);
1574: FND_MSG_PUB.add;
1575: END;
1576:
1577: IF g_debug THEN
1662:
1663: WHEN OTHERS THEN
1664: ROLLBACK TO UPDATE_ITEMCOST_PVT;
1665: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1666: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1667: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost');
1668: fnd_message.set_token('ERRNO', sqlcode);
1669: fnd_message.set_token('REASON', sqlerrm);
1670: FND_MSG_PUB.add;
1663: WHEN OTHERS THEN
1664: ROLLBACK TO UPDATE_ITEMCOST_PVT;
1665: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1666: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1667: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost');
1668: fnd_message.set_token('ERRNO', sqlcode);
1669: fnd_message.set_token('REASON', sqlerrm);
1670: FND_MSG_PUB.add;
1671:
1664: ROLLBACK TO UPDATE_ITEMCOST_PVT;
1665: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1666: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1667: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost');
1668: fnd_message.set_token('ERRNO', sqlcode);
1669: fnd_message.set_token('REASON', sqlerrm);
1670: FND_MSG_PUB.add;
1671:
1672: -- Standard call to get message count and if count=1, get the message
1665: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1666: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1667: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost');
1668: fnd_message.set_token('ERRNO', sqlcode);
1669: fnd_message.set_token('REASON', sqlerrm);
1670: FND_MSG_PUB.add;
1671:
1672: -- Standard call to get message count and if count=1, get the message
1673: FND_MSG_PUB.Count_And_Get (