163: WHEN NO_DATA_FOUND THEN
164: DPP_UTILITY_PVT.debug_message(FND_LOG.LEVEL_EXCEPTION, l_module,'Invalid User');
165: RAISE FND_API.G_EXC_ERROR;
166: WHEN OTHERS THEN
167: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
168: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
169: fnd_message.set_token('ERRNO', sqlcode);
170: fnd_message.set_token('REASON', sqlerrm);
171: FND_MSG_PUB.add;
164: DPP_UTILITY_PVT.debug_message(FND_LOG.LEVEL_EXCEPTION, l_module,'Invalid User');
165: RAISE FND_API.G_EXC_ERROR;
166: WHEN OTHERS THEN
167: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
168: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
169: fnd_message.set_token('ERRNO', sqlcode);
170: fnd_message.set_token('REASON', sqlerrm);
171: FND_MSG_PUB.add;
172: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
165: RAISE FND_API.G_EXC_ERROR;
166: WHEN OTHERS THEN
167: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
168: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
169: fnd_message.set_token('ERRNO', sqlcode);
170: fnd_message.set_token('REASON', sqlerrm);
171: FND_MSG_PUB.add;
172: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
173: END;
166: WHEN OTHERS THEN
167: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
168: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
169: fnd_message.set_token('ERRNO', sqlcode);
170: fnd_message.set_token('REASON', sqlerrm);
171: FND_MSG_PUB.add;
172: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
173: END;
174: --Getting a valid Price Protection Responsibility at the User Level Profile Options
239: EXCEPTION
240: WHEN NO_DATA_FOUND THEN
241: l_responsibility_id := -1;
242: WHEN OTHERS THEN
243: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
244: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
245: fnd_message.set_token('ERRNO', sqlcode);
246: fnd_message.set_token('REASON', sqlerrm);
247: FND_MSG_PUB.add;
240: WHEN NO_DATA_FOUND THEN
241: l_responsibility_id := -1;
242: WHEN OTHERS THEN
243: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
244: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
245: fnd_message.set_token('ERRNO', sqlcode);
246: fnd_message.set_token('REASON', sqlerrm);
247: FND_MSG_PUB.add;
248: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
241: l_responsibility_id := -1;
242: WHEN OTHERS THEN
243: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
244: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
245: fnd_message.set_token('ERRNO', sqlcode);
246: fnd_message.set_token('REASON', sqlerrm);
247: FND_MSG_PUB.add;
248: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
249: END;
242: WHEN OTHERS THEN
243: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
244: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
245: fnd_message.set_token('ERRNO', sqlcode);
246: fnd_message.set_token('REASON', sqlerrm);
247: FND_MSG_PUB.add;
248: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
249: END;
250: WHEN OTHERS THEN
247: FND_MSG_PUB.add;
248: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
249: END;
250: WHEN OTHERS THEN
251: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
252: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
253: fnd_message.set_token('ERRNO', sqlcode);
254: fnd_message.set_token('REASON', sqlerrm);
255: FND_MSG_PUB.add;
248: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
249: END;
250: WHEN OTHERS THEN
251: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
252: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
253: fnd_message.set_token('ERRNO', sqlcode);
254: fnd_message.set_token('REASON', sqlerrm);
255: FND_MSG_PUB.add;
256: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
249: END;
250: WHEN OTHERS THEN
251: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
252: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
253: fnd_message.set_token('ERRNO', sqlcode);
254: fnd_message.set_token('REASON', sqlerrm);
255: FND_MSG_PUB.add;
256: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
257: END;
250: WHEN OTHERS THEN
251: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
252: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
253: fnd_message.set_token('ERRNO', sqlcode);
254: fnd_message.set_token('REASON', sqlerrm);
255: FND_MSG_PUB.add;
256: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
257: END;
258: --Getting a valid Price Protection Responsibility at the Responsibility Level Profile Options
323: EXCEPTION
324: WHEN NO_DATA_FOUND THEN
325: l_responsibility_id := -1;
326: WHEN OTHERS THEN
327: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
328: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
329: fnd_message.set_token('ERRNO', sqlcode);
330: fnd_message.set_token('REASON', sqlerrm);
331: FND_MSG_PUB.add;
324: WHEN NO_DATA_FOUND THEN
325: l_responsibility_id := -1;
326: WHEN OTHERS THEN
327: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
328: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
329: fnd_message.set_token('ERRNO', sqlcode);
330: fnd_message.set_token('REASON', sqlerrm);
331: FND_MSG_PUB.add;
332: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
325: l_responsibility_id := -1;
326: WHEN OTHERS THEN
327: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
328: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
329: fnd_message.set_token('ERRNO', sqlcode);
330: fnd_message.set_token('REASON', sqlerrm);
331: FND_MSG_PUB.add;
332: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
333: END;
326: WHEN OTHERS THEN
327: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
328: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
329: fnd_message.set_token('ERRNO', sqlcode);
330: fnd_message.set_token('REASON', sqlerrm);
331: FND_MSG_PUB.add;
332: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
333: END;
334: WHEN OTHERS THEN
331: FND_MSG_PUB.add;
332: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
333: END;
334: WHEN OTHERS THEN
335: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
336: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
337: fnd_message.set_token('ERRNO', sqlcode);
338: fnd_message.set_token('REASON', sqlerrm);
339: FND_MSG_PUB.add;
332: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
333: END;
334: WHEN OTHERS THEN
335: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
336: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
337: fnd_message.set_token('ERRNO', sqlcode);
338: fnd_message.set_token('REASON', sqlerrm);
339: FND_MSG_PUB.add;
340: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
333: END;
334: WHEN OTHERS THEN
335: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
336: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
337: fnd_message.set_token('ERRNO', sqlcode);
338: fnd_message.set_token('REASON', sqlerrm);
339: FND_MSG_PUB.add;
340: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
341: END;
334: WHEN OTHERS THEN
335: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
336: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
337: fnd_message.set_token('ERRNO', sqlcode);
338: fnd_message.set_token('REASON', sqlerrm);
339: FND_MSG_PUB.add;
340: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
341: END;
342: END IF;
408: EXCEPTION
409: WHEN NO_DATA_FOUND THEN
410: l_responsibility_id := -1;
411: WHEN OTHERS THEN
412: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
413: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
414: fnd_message.set_token('ERRNO', sqlcode);
415: fnd_message.set_token('REASON', sqlerrm);
416: FND_MSG_PUB.add;
409: WHEN NO_DATA_FOUND THEN
410: l_responsibility_id := -1;
411: WHEN OTHERS THEN
412: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
413: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
414: fnd_message.set_token('ERRNO', sqlcode);
415: fnd_message.set_token('REASON', sqlerrm);
416: FND_MSG_PUB.add;
417: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
410: l_responsibility_id := -1;
411: WHEN OTHERS THEN
412: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
413: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
414: fnd_message.set_token('ERRNO', sqlcode);
415: fnd_message.set_token('REASON', sqlerrm);
416: FND_MSG_PUB.add;
417: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
418: END;
411: WHEN OTHERS THEN
412: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
413: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
414: fnd_message.set_token('ERRNO', sqlcode);
415: fnd_message.set_token('REASON', sqlerrm);
416: FND_MSG_PUB.add;
417: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
418: END;
419: WHEN OTHERS THEN
416: FND_MSG_PUB.add;
417: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
418: END;
419: WHEN OTHERS THEN
420: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
421: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
422: fnd_message.set_token('ERRNO', sqlcode);
423: fnd_message.set_token('REASON', sqlerrm);
424: FND_MSG_PUB.add;
417: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
418: END;
419: WHEN OTHERS THEN
420: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
421: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
422: fnd_message.set_token('ERRNO', sqlcode);
423: fnd_message.set_token('REASON', sqlerrm);
424: FND_MSG_PUB.add;
425: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
418: END;
419: WHEN OTHERS THEN
420: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
421: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
422: fnd_message.set_token('ERRNO', sqlcode);
423: fnd_message.set_token('REASON', sqlerrm);
424: FND_MSG_PUB.add;
425: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
426: END;
419: WHEN OTHERS THEN
420: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
421: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
422: fnd_message.set_token('ERRNO', sqlcode);
423: fnd_message.set_token('REASON', sqlerrm);
424: FND_MSG_PUB.add;
425: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
426: END;
427: END IF;
493: EXCEPTION
494: WHEN NO_DATA_FOUND THEN
495: l_responsibility_id := -1;
496: WHEN OTHERS THEN
497: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
498: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
499: fnd_message.set_token('ERRNO', sqlcode);
500: fnd_message.set_token('REASON', sqlerrm);
501: FND_MSG_PUB.add;
494: WHEN NO_DATA_FOUND THEN
495: l_responsibility_id := -1;
496: WHEN OTHERS THEN
497: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
498: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
499: fnd_message.set_token('ERRNO', sqlcode);
500: fnd_message.set_token('REASON', sqlerrm);
501: FND_MSG_PUB.add;
502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
495: l_responsibility_id := -1;
496: WHEN OTHERS THEN
497: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
498: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
499: fnd_message.set_token('ERRNO', sqlcode);
500: fnd_message.set_token('REASON', sqlerrm);
501: FND_MSG_PUB.add;
502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
503: END;
496: WHEN OTHERS THEN
497: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
498: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
499: fnd_message.set_token('ERRNO', sqlcode);
500: fnd_message.set_token('REASON', sqlerrm);
501: FND_MSG_PUB.add;
502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
503: END;
504: WHEN OTHERS THEN
501: FND_MSG_PUB.add;
502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
503: END;
504: WHEN OTHERS THEN
505: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
506: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
507: fnd_message.set_token('ERRNO', sqlcode);
508: fnd_message.set_token('REASON', sqlerrm);
509: FND_MSG_PUB.add;
502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
503: END;
504: WHEN OTHERS THEN
505: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
506: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
507: fnd_message.set_token('ERRNO', sqlcode);
508: fnd_message.set_token('REASON', sqlerrm);
509: FND_MSG_PUB.add;
510: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
503: END;
504: WHEN OTHERS THEN
505: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
506: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
507: fnd_message.set_token('ERRNO', sqlcode);
508: fnd_message.set_token('REASON', sqlerrm);
509: FND_MSG_PUB.add;
510: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
511: END;
504: WHEN OTHERS THEN
505: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
506: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT');
507: fnd_message.set_token('ERRNO', sqlcode);
508: fnd_message.set_token('REASON', sqlerrm);
509: FND_MSG_PUB.add;
510: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
511: END;
512: END IF;
511: END;
512: END IF;
513: --Check if the responsibility id s -1
514: IF l_responsibility_id = -1 THEN
515: FND_MESSAGE.set_name('DPP', 'DPP_INVALID_RESP');
516: FND_MESSAGE.set_token('USER', l_user_name);
517: FND_MSG_PUB.add;
518:
519: DPP_UTILITY_PVT.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Price Protection responsibility not available for Last updated user'||l_user_name);
512: END IF;
513: --Check if the responsibility id s -1
514: IF l_responsibility_id = -1 THEN
515: FND_MESSAGE.set_name('DPP', 'DPP_INVALID_RESP');
516: FND_MESSAGE.set_token('USER', l_user_name);
517: FND_MSG_PUB.add;
518:
519: DPP_UTILITY_PVT.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Price Protection responsibility not available for Last updated user'||l_user_name);
520:
671: dbms_xmlquery.closeContext(l_queryCtx);
672: EXCEPTION
673: WHEN OTHERS THEN
674: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
675: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
676: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT.Update_PurchasePrice-XML Generation');
677: fnd_message.set_token('ERRNO', sqlcode);
678: fnd_message.set_token('REASON', sqlerrm);
679: FND_MSG_PUB.add;
672: EXCEPTION
673: WHEN OTHERS THEN
674: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
675: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
676: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT.Update_PurchasePrice-XML Generation');
677: fnd_message.set_token('ERRNO', sqlcode);
678: fnd_message.set_token('REASON', sqlerrm);
679: FND_MSG_PUB.add;
680: END;
673: WHEN OTHERS THEN
674: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
675: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
676: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT.Update_PurchasePrice-XML Generation');
677: fnd_message.set_token('ERRNO', sqlcode);
678: fnd_message.set_token('REASON', sqlerrm);
679: FND_MSG_PUB.add;
680: END;
681:
674: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
675: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
676: fnd_message.set_token('ROUTINE', 'DPP_PURCHASEPRICE_PVT.Update_PurchasePrice-XML Generation');
677: fnd_message.set_token('ERRNO', sqlcode);
678: fnd_message.set_token('REASON', sqlerrm);
679: FND_MSG_PUB.add;
680: END;
681:
682: l_exe_update_rec.Transaction_Header_ID := l_item_price_rec.Transaction_Header_ID;
754:
755: WHEN OTHERS THEN
756: ROLLBACK TO UPDATE_PURCHASEPRICE_PVT;
757: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
758: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
759: fnd_message.set_token('ROUTINE', l_full_name);
760: fnd_message.set_token('ERRNO', sqlcode);
761: fnd_message.set_token('REASON', sqlerrm);
762: FND_MSG_PUB.add;
755: WHEN OTHERS THEN
756: ROLLBACK TO UPDATE_PURCHASEPRICE_PVT;
757: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
758: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
759: fnd_message.set_token('ROUTINE', l_full_name);
760: fnd_message.set_token('ERRNO', sqlcode);
761: fnd_message.set_token('REASON', sqlerrm);
762: FND_MSG_PUB.add;
763: -- Standard call to get message count and if count=1, get the message
756: ROLLBACK TO UPDATE_PURCHASEPRICE_PVT;
757: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
758: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
759: fnd_message.set_token('ROUTINE', l_full_name);
760: fnd_message.set_token('ERRNO', sqlcode);
761: fnd_message.set_token('REASON', sqlerrm);
762: FND_MSG_PUB.add;
763: -- Standard call to get message count and if count=1, get the message
764: FND_MSG_PUB.Count_And_Get (
757: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
758: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
759: fnd_message.set_token('ROUTINE', l_full_name);
760: fnd_message.set_token('ERRNO', sqlcode);
761: fnd_message.set_token('REASON', sqlerrm);
762: FND_MSG_PUB.add;
763: -- Standard call to get message count and if count=1, get the message
764: FND_MSG_PUB.Count_And_Get (
765: p_encoded => FND_API.G_FALSE,
1090: IF l_po_notify_item_tbl(i).inventory_item_id IS NULL THEN
1091: IF g_debug THEN
1092: DPP_Utility_PVT.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Inventory Item ID cannot be NULL');
1093: END IF;
1094: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
1095: FND_MESSAGE.set_token('ID', 'Inventory Item ID');
1096: FND_MSG_PUB.add;
1097: -- Initializing Nested Table
1098: IF NOT l_po_details_tbl.EXISTS(1) THEN
1091: IF g_debug THEN
1092: DPP_Utility_PVT.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Inventory Item ID cannot be NULL');
1093: END IF;
1094: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
1095: FND_MESSAGE.set_token('ID', 'Inventory Item ID');
1096: FND_MSG_PUB.add;
1097: -- Initializing Nested Table
1098: IF NOT l_po_details_tbl.EXISTS(1) THEN
1099: l_po_details_tbl(1).Document_Number := NULL;
1166: END IF;
1167:
1168: WHEN OTHERS THEN
1169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1170: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1171: fnd_message.set_token('ROUTINE', l_full_name);
1172: fnd_message.set_token('ERRNO', sqlcode);
1173: fnd_message.set_token('REASON', sqlerrm);
1174: FND_MSG_PUB.add;
1167:
1168: WHEN OTHERS THEN
1169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1170: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1171: fnd_message.set_token('ROUTINE', l_full_name);
1172: fnd_message.set_token('ERRNO', sqlcode);
1173: fnd_message.set_token('REASON', sqlerrm);
1174: FND_MSG_PUB.add;
1175: -- Standard call to get message count and if count=1, get the message
1168: WHEN OTHERS THEN
1169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1170: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1171: fnd_message.set_token('ROUTINE', l_full_name);
1172: fnd_message.set_token('ERRNO', sqlcode);
1173: fnd_message.set_token('REASON', sqlerrm);
1174: FND_MSG_PUB.add;
1175: -- Standard call to get message count and if count=1, get the message
1176: FND_MSG_PUB.Count_And_Get (
1169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1170: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
1171: fnd_message.set_token('ROUTINE', l_full_name);
1172: fnd_message.set_token('ERRNO', sqlcode);
1173: fnd_message.set_token('REASON', sqlerrm);
1174: FND_MSG_PUB.add;
1175: -- Standard call to get message count and if count=1, get the message
1176: FND_MSG_PUB.Count_And_Get (
1177: p_encoded => FND_API.G_FALSE,