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:
286: WHEN NO_DATA_FOUND THEN
287: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Invalid User');
288: RAISE FND_API.G_EXC_ERROR;
289: WHEN OTHERS THEN
290: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
291: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
292: fnd_message.set_token('ERRNO', sqlcode);
293: fnd_message.set_token('REASON', sqlerrm);
294: FND_MSG_PUB.add;
287: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Invalid User');
288: RAISE FND_API.G_EXC_ERROR;
289: WHEN OTHERS THEN
290: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
291: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
292: fnd_message.set_token('ERRNO', sqlcode);
293: fnd_message.set_token('REASON', sqlerrm);
294: FND_MSG_PUB.add;
295: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
288: RAISE FND_API.G_EXC_ERROR;
289: WHEN OTHERS THEN
290: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
291: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
292: fnd_message.set_token('ERRNO', sqlcode);
293: fnd_message.set_token('REASON', sqlerrm);
294: FND_MSG_PUB.add;
295: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
296: END;
289: WHEN OTHERS THEN
290: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
291: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
292: fnd_message.set_token('ERRNO', sqlcode);
293: fnd_message.set_token('REASON', sqlerrm);
294: FND_MSG_PUB.add;
295: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
296: END;
297:
363: EXCEPTION
364: WHEN NO_DATA_FOUND THEN
365: l_responsibility_id := -1;
366: WHEN OTHERS THEN
367: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
368: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
369: fnd_message.set_token('ERRNO', sqlcode);
370: fnd_message.set_token('REASON', sqlerrm);
371: FND_MSG_PUB.add;
364: WHEN NO_DATA_FOUND THEN
365: l_responsibility_id := -1;
366: WHEN OTHERS THEN
367: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
368: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
369: fnd_message.set_token('ERRNO', sqlcode);
370: fnd_message.set_token('REASON', sqlerrm);
371: FND_MSG_PUB.add;
372: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
365: l_responsibility_id := -1;
366: WHEN OTHERS THEN
367: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
368: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
369: fnd_message.set_token('ERRNO', sqlcode);
370: fnd_message.set_token('REASON', sqlerrm);
371: FND_MSG_PUB.add;
372: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
373: END;
366: WHEN OTHERS THEN
367: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
368: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
369: fnd_message.set_token('ERRNO', sqlcode);
370: fnd_message.set_token('REASON', sqlerrm);
371: FND_MSG_PUB.add;
372: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
373: END;
374: WHEN OTHERS THEN
371: FND_MSG_PUB.add;
372: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
373: END;
374: WHEN OTHERS THEN
375: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
376: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
377: fnd_message.set_token('ERRNO', sqlcode);
378: fnd_message.set_token('REASON', sqlerrm);
379: FND_MSG_PUB.add;
372: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
373: END;
374: WHEN OTHERS THEN
375: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
376: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
377: fnd_message.set_token('ERRNO', sqlcode);
378: fnd_message.set_token('REASON', sqlerrm);
379: FND_MSG_PUB.add;
380: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
373: END;
374: WHEN OTHERS THEN
375: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
376: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
377: fnd_message.set_token('ERRNO', sqlcode);
378: fnd_message.set_token('REASON', sqlerrm);
379: FND_MSG_PUB.add;
380: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
381: END;
374: WHEN OTHERS THEN
375: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
376: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
377: fnd_message.set_token('ERRNO', sqlcode);
378: fnd_message.set_token('REASON', sqlerrm);
379: FND_MSG_PUB.add;
380: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
381: END;
382:
448: EXCEPTION
449: WHEN NO_DATA_FOUND THEN
450: l_responsibility_id := -1;
451: WHEN OTHERS THEN
452: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
453: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
454: fnd_message.set_token('ERRNO', sqlcode);
455: fnd_message.set_token('REASON', sqlerrm);
456: FND_MSG_PUB.add;
449: WHEN NO_DATA_FOUND THEN
450: l_responsibility_id := -1;
451: WHEN OTHERS THEN
452: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
453: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
454: fnd_message.set_token('ERRNO', sqlcode);
455: fnd_message.set_token('REASON', sqlerrm);
456: FND_MSG_PUB.add;
457: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
450: l_responsibility_id := -1;
451: WHEN OTHERS THEN
452: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
453: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
454: fnd_message.set_token('ERRNO', sqlcode);
455: fnd_message.set_token('REASON', sqlerrm);
456: FND_MSG_PUB.add;
457: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
458: END;
451: WHEN OTHERS THEN
452: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
453: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
454: fnd_message.set_token('ERRNO', sqlcode);
455: fnd_message.set_token('REASON', sqlerrm);
456: FND_MSG_PUB.add;
457: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
458: END;
459: WHEN OTHERS THEN
456: FND_MSG_PUB.add;
457: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
458: END;
459: WHEN OTHERS THEN
460: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
461: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
462: fnd_message.set_token('ERRNO', sqlcode);
463: fnd_message.set_token('REASON', sqlerrm);
464: FND_MSG_PUB.add;
457: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
458: END;
459: WHEN OTHERS THEN
460: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
461: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
462: fnd_message.set_token('ERRNO', sqlcode);
463: fnd_message.set_token('REASON', sqlerrm);
464: FND_MSG_PUB.add;
465: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
458: END;
459: WHEN OTHERS THEN
460: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
461: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
462: fnd_message.set_token('ERRNO', sqlcode);
463: fnd_message.set_token('REASON', sqlerrm);
464: FND_MSG_PUB.add;
465: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
466: END;
459: WHEN OTHERS THEN
460: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
461: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
462: fnd_message.set_token('ERRNO', sqlcode);
463: fnd_message.set_token('REASON', sqlerrm);
464: FND_MSG_PUB.add;
465: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
466: END;
467: END IF;
534: EXCEPTION
535: WHEN NO_DATA_FOUND THEN
536: l_responsibility_id := -1;
537: WHEN OTHERS THEN
538: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
539: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
540: fnd_message.set_token('ERRNO', sqlcode);
541: fnd_message.set_token('REASON', sqlerrm);
542: FND_MSG_PUB.add;
535: WHEN NO_DATA_FOUND THEN
536: l_responsibility_id := -1;
537: WHEN OTHERS THEN
538: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
539: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
540: fnd_message.set_token('ERRNO', sqlcode);
541: fnd_message.set_token('REASON', sqlerrm);
542: FND_MSG_PUB.add;
543: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
536: l_responsibility_id := -1;
537: WHEN OTHERS THEN
538: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
539: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
540: fnd_message.set_token('ERRNO', sqlcode);
541: fnd_message.set_token('REASON', sqlerrm);
542: FND_MSG_PUB.add;
543: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
544: END;
537: WHEN OTHERS THEN
538: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
539: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
540: fnd_message.set_token('ERRNO', sqlcode);
541: fnd_message.set_token('REASON', sqlerrm);
542: FND_MSG_PUB.add;
543: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
544: END;
545: WHEN OTHERS THEN
542: FND_MSG_PUB.add;
543: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
544: END;
545: WHEN OTHERS THEN
546: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
547: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
548: fnd_message.set_token('ERRNO', sqlcode);
549: fnd_message.set_token('REASON', sqlerrm);
550: FND_MSG_PUB.add;
543: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
544: END;
545: WHEN OTHERS THEN
546: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
547: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
548: fnd_message.set_token('ERRNO', sqlcode);
549: fnd_message.set_token('REASON', sqlerrm);
550: FND_MSG_PUB.add;
551: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
544: END;
545: WHEN OTHERS THEN
546: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
547: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
548: fnd_message.set_token('ERRNO', sqlcode);
549: fnd_message.set_token('REASON', sqlerrm);
550: FND_MSG_PUB.add;
551: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
552: END;
545: WHEN OTHERS THEN
546: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
547: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
548: fnd_message.set_token('ERRNO', sqlcode);
549: fnd_message.set_token('REASON', sqlerrm);
550: FND_MSG_PUB.add;
551: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
552: END;
553: END IF;
621: EXCEPTION
622: WHEN NO_DATA_FOUND THEN
623: l_responsibility_id := -1;
624: WHEN OTHERS THEN
625: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
626: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
627: fnd_message.set_token('ERRNO', sqlcode);
628: fnd_message.set_token('REASON', sqlerrm);
629: FND_MSG_PUB.add;
622: WHEN NO_DATA_FOUND THEN
623: l_responsibility_id := -1;
624: WHEN OTHERS THEN
625: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
626: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
627: fnd_message.set_token('ERRNO', sqlcode);
628: fnd_message.set_token('REASON', sqlerrm);
629: FND_MSG_PUB.add;
630: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
623: l_responsibility_id := -1;
624: WHEN OTHERS THEN
625: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
626: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
627: fnd_message.set_token('ERRNO', sqlcode);
628: fnd_message.set_token('REASON', sqlerrm);
629: FND_MSG_PUB.add;
630: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
631: END;
624: WHEN OTHERS THEN
625: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
626: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
627: fnd_message.set_token('ERRNO', sqlcode);
628: fnd_message.set_token('REASON', sqlerrm);
629: FND_MSG_PUB.add;
630: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
631: END;
632: WHEN OTHERS THEN
629: FND_MSG_PUB.add;
630: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
631: END;
632: WHEN OTHERS THEN
633: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
634: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
635: fnd_message.set_token('ERRNO', sqlcode);
636: fnd_message.set_token('REASON', sqlerrm);
637: FND_MSG_PUB.add;
630: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
631: END;
632: WHEN OTHERS THEN
633: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
634: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
635: fnd_message.set_token('ERRNO', sqlcode);
636: fnd_message.set_token('REASON', sqlerrm);
637: FND_MSG_PUB.add;
638: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
631: END;
632: WHEN OTHERS THEN
633: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
634: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
635: fnd_message.set_token('ERRNO', sqlcode);
636: fnd_message.set_token('REASON', sqlerrm);
637: FND_MSG_PUB.add;
638: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
639: END;
632: WHEN OTHERS THEN
633: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
634: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT');
635: fnd_message.set_token('ERRNO', sqlcode);
636: fnd_message.set_token('REASON', sqlerrm);
637: FND_MSG_PUB.add;
638: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
639: END;
640: END IF;
640: END IF;
641:
642: --Check if the responsibility id is -1
643: IF l_responsibility_id = -1 THEN
644: FND_MESSAGE.set_name('DPP', 'DPP_INVALID_RESP');
645: FND_MESSAGE.set_token('USER', l_user_name);
646: FND_MSG_PUB.add;
647:
648: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Price Protection responsibility not available for Last updated user'||l_user_name);
641:
642: --Check if the responsibility id is -1
643: IF l_responsibility_id = -1 THEN
644: FND_MESSAGE.set_name('DPP', 'DPP_INVALID_RESP');
645: FND_MESSAGE.set_token('USER', l_user_name);
646: FND_MSG_PUB.add;
647:
648: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Price Protection responsibility not available for Last updated user'||l_user_name);
649:
1478: EXCEPTION
1479: WHEN OTHERS THEN
1480: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1481: -- IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1482: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1483: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-SLA Tables Insertion');
1484: fnd_message.set_token('ERRNO', sqlcode);
1485: fnd_message.set_token('REASON', sqlerrm);
1486: FND_MSG_PUB.add;
1479: WHEN OTHERS THEN
1480: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1481: -- IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1482: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1483: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-SLA Tables Insertion');
1484: fnd_message.set_token('ERRNO', sqlcode);
1485: fnd_message.set_token('REASON', sqlerrm);
1486: FND_MSG_PUB.add;
1487: -- END IF;
1480: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1481: -- IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1482: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1483: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-SLA Tables Insertion');
1484: fnd_message.set_token('ERRNO', sqlcode);
1485: fnd_message.set_token('REASON', sqlerrm);
1486: FND_MSG_PUB.add;
1487: -- END IF;
1488: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Error in SLA Tables Insertion:' || sqlerrm);
1481: -- IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1482: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1483: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-SLA Tables Insertion');
1484: fnd_message.set_token('ERRNO', sqlcode);
1485: fnd_message.set_token('REASON', sqlerrm);
1486: FND_MSG_PUB.add;
1487: -- END IF;
1488: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Error in SLA Tables Insertion:' || sqlerrm);
1489: END;
1526:
1527: EXCEPTION
1528: WHEN OTHERS THEN
1529: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1530: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1531: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-XML Generation');
1532: fnd_message.set_token('ERRNO', sqlcode);
1533: fnd_message.set_token('REASON', sqlerrm);
1534: FND_MSG_PUB.add;
1527: EXCEPTION
1528: WHEN OTHERS THEN
1529: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1530: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1531: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-XML Generation');
1532: fnd_message.set_token('ERRNO', sqlcode);
1533: fnd_message.set_token('REASON', sqlerrm);
1534: FND_MSG_PUB.add;
1535: END;
1528: WHEN OTHERS THEN
1529: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1530: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1531: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-XML Generation');
1532: fnd_message.set_token('ERRNO', sqlcode);
1533: fnd_message.set_token('REASON', sqlerrm);
1534: FND_MSG_PUB.add;
1535: END;
1536:
1529: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1530: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1531: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost-XML Generation');
1532: fnd_message.set_token('ERRNO', sqlcode);
1533: fnd_message.set_token('REASON', sqlerrm);
1534: FND_MSG_PUB.add;
1535: END;
1536:
1537: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Status before calling update API: ' || l_return_status);
1618:
1619: WHEN OTHERS THEN
1620: ROLLBACK TO UPDATE_ITEMCOST_PVT;
1621: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1622: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1623: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost');
1624: fnd_message.set_token('ERRNO', sqlcode);
1625: fnd_message.set_token('REASON', sqlerrm);
1626: FND_MSG_PUB.add;
1619: WHEN OTHERS THEN
1620: ROLLBACK TO UPDATE_ITEMCOST_PVT;
1621: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1622: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1623: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost');
1624: fnd_message.set_token('ERRNO', sqlcode);
1625: fnd_message.set_token('REASON', sqlerrm);
1626: FND_MSG_PUB.add;
1627:
1620: ROLLBACK TO UPDATE_ITEMCOST_PVT;
1621: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1622: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1623: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost');
1624: fnd_message.set_token('ERRNO', sqlcode);
1625: fnd_message.set_token('REASON', sqlerrm);
1626: FND_MSG_PUB.add;
1627:
1628: -- Standard call to get message count and if count=1, get the message
1621: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1622: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1623: fnd_message.set_token('ROUTINE', 'DPP_ITEMCOST_PVT.Update_ItemCost');
1624: fnd_message.set_token('ERRNO', sqlcode);
1625: fnd_message.set_token('REASON', sqlerrm);
1626: FND_MSG_PUB.add;
1627:
1628: -- Standard call to get message count and if count=1, get the message
1629: FND_MSG_PUB.Count_And_Get (