156: IF l_pl_notify_hdr_rec.vendor_id IS NULL THEN
157: IF g_debug THEN
158: DPP_Utility_PVT.debug_message('Vendor ID cannot be NULL');
159: END IF;
160: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
161: FND_MESSAGE.set_token('ID', 'Vendor ID');
162: FND_MSG_PUB.add;
163: RAISE FND_API.G_EXC_ERROR;
164: ELSIF l_pl_notify_hdr_rec.vendor_site_id IS NULL THEN
157: IF g_debug THEN
158: DPP_Utility_PVT.debug_message('Vendor ID cannot be NULL');
159: END IF;
160: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
161: FND_MESSAGE.set_token('ID', 'Vendor ID');
162: FND_MSG_PUB.add;
163: RAISE FND_API.G_EXC_ERROR;
164: ELSIF l_pl_notify_hdr_rec.vendor_site_id IS NULL THEN
165: IF g_debug THEN
164: ELSIF l_pl_notify_hdr_rec.vendor_site_id IS NULL THEN
165: IF g_debug THEN
166: DPP_Utility_PVT.debug_message('Vendor Site ID cannot be NULL');
167: END IF;
168: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
169: FND_MESSAGE.set_token('ID', 'Vendor Site ID');
170: FND_MSG_PUB.add;
171: RAISE FND_API.G_EXC_ERROR;
172: ELSE
165: IF g_debug THEN
166: DPP_Utility_PVT.debug_message('Vendor Site ID cannot be NULL');
167: END IF;
168: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
169: FND_MESSAGE.set_token('ID', 'Vendor Site ID');
170: FND_MSG_PUB.add;
171: RAISE FND_API.G_EXC_ERROR;
172: ELSE
173: FOR get_vendor_rec IN get_vendor_csr(p_pl_notify_hdr_rec.vendor_id)
201: IF l_pl_notify_line_tbl(i).inventory_item_id IS NULL THEN
202: IF g_debug THEN
203: DPP_Utility_PVT.debug_message('Inventory Item ID cannot be NULL');
204: END IF;
205: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
206: FND_MESSAGE.set_token('ID', 'Inventory Item ID');
207: FND_MSG_PUB.add;
208: RAISE FND_API.G_EXC_ERROR;
209:
202: IF g_debug THEN
203: DPP_Utility_PVT.debug_message('Inventory Item ID cannot be NULL');
204: END IF;
205: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
206: FND_MESSAGE.set_token('ID', 'Inventory Item ID');
207: FND_MSG_PUB.add;
208: RAISE FND_API.G_EXC_ERROR;
209:
210: ELSE
286: WHEN OTHERS THEN
287:
288: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
289: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
290: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
291: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_OutboundPricelists');
292: fnd_message.set_token('ERRNO', sqlcode);
293: fnd_message.set_token('REASON', sqlerrm);
294: END IF;
287:
288: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
289: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
290: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
291: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_OutboundPricelists');
292: fnd_message.set_token('ERRNO', sqlcode);
293: fnd_message.set_token('REASON', sqlerrm);
294: END IF;
295: -- Standard call to get message count and if count=1, get the message
288: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
289: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
290: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
291: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_OutboundPricelists');
292: fnd_message.set_token('ERRNO', sqlcode);
293: fnd_message.set_token('REASON', sqlerrm);
294: END IF;
295: -- Standard call to get message count and if count=1, get the message
296: FND_MSG_PUB.Count_And_Get (
289: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
290: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
291: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_OutboundPricelists');
292: fnd_message.set_token('ERRNO', sqlcode);
293: fnd_message.set_token('REASON', sqlerrm);
294: END IF;
295: -- Standard call to get message count and if count=1, get the message
296: FND_MSG_PUB.Count_And_Get (
297: p_encoded => FND_API.G_FALSE,
463: IF l_pl_notify_hdr_rec.vendor_id IS NULL THEN
464: IF g_debug THEN
465: DPP_Utility_PVT.debug_message('Vendor ID cannot be NULL');
466: END IF;
467: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
468: FND_MESSAGE.set_token('ID', 'Vendor ID');
469: FND_MSG_PUB.add;
470: RAISE FND_API.G_EXC_ERROR;
471: ELSIF l_pl_notify_hdr_rec.vendor_site_id IS NULL THEN
464: IF g_debug THEN
465: DPP_Utility_PVT.debug_message('Vendor ID cannot be NULL');
466: END IF;
467: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
468: FND_MESSAGE.set_token('ID', 'Vendor ID');
469: FND_MSG_PUB.add;
470: RAISE FND_API.G_EXC_ERROR;
471: ELSIF l_pl_notify_hdr_rec.vendor_site_id IS NULL THEN
472: IF g_debug THEN
471: ELSIF l_pl_notify_hdr_rec.vendor_site_id IS NULL THEN
472: IF g_debug THEN
473: DPP_Utility_PVT.debug_message('Vendor Site ID cannot be NULL');
474: END IF;
475: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
476: FND_MESSAGE.set_token('ID', 'Vendor Site ID');
477: FND_MSG_PUB.add;
478: RAISE FND_API.G_EXC_ERROR;
479: ELSE
472: IF g_debug THEN
473: DPP_Utility_PVT.debug_message('Vendor Site ID cannot be NULL');
474: END IF;
475: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
476: FND_MESSAGE.set_token('ID', 'Vendor Site ID');
477: FND_MSG_PUB.add;
478: RAISE FND_API.G_EXC_ERROR;
479: ELSE
480: FOR get_vendor_rec IN get_vendor_csr(p_pl_notify_hdr_rec.vendor_id)
506: IF l_pl_notify_line_tbl(i).inventory_item_id IS NULL THEN
507: IF g_debug THEN
508: DPP_Utility_PVT.debug_message('Inventory Item ID cannot be NULL');
509: END IF;
510: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
511: FND_MESSAGE.set_token('ID', 'Inventory Item ID');
512: FND_MSG_PUB.add;
513: RAISE FND_API.G_EXC_ERROR;
514:
507: IF g_debug THEN
508: DPP_Utility_PVT.debug_message('Inventory Item ID cannot be NULL');
509: END IF;
510: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
511: FND_MESSAGE.set_token('ID', 'Inventory Item ID');
512: FND_MSG_PUB.add;
513: RAISE FND_API.G_EXC_ERROR;
514:
515: ELSE
590:
591: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
592: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
593: THEN
594: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
595: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_InboundPricelists');
596: fnd_message.set_token('ERRNO', sqlcode);
597: fnd_message.set_token('REASON', sqlerrm);
598: FND_MSG_PUB.ADD;
591: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
592: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
593: THEN
594: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
595: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_InboundPricelists');
596: fnd_message.set_token('ERRNO', sqlcode);
597: fnd_message.set_token('REASON', sqlerrm);
598: FND_MSG_PUB.ADD;
599: DPP_UTILITY_PVT.debug_message('Error in notify inbound pricelists: '||SQLERRM);
592: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
593: THEN
594: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
595: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_InboundPricelists');
596: fnd_message.set_token('ERRNO', sqlcode);
597: fnd_message.set_token('REASON', sqlerrm);
598: FND_MSG_PUB.ADD;
599: DPP_UTILITY_PVT.debug_message('Error in notify inbound pricelists: '||SQLERRM);
600: END IF;
593: THEN
594: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
595: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_InboundPricelists');
596: fnd_message.set_token('ERRNO', sqlcode);
597: fnd_message.set_token('REASON', sqlerrm);
598: FND_MSG_PUB.ADD;
599: DPP_UTILITY_PVT.debug_message('Error in notify inbound pricelists: '||SQLERRM);
600: END IF;
601: -- Standard call to get message count and if count=1, get the message
776: IF l_pl_notify_hdr_rec.vendor_id IS NULL THEN
777: IF g_debug THEN
778: DPP_Utility_PVT.debug_message('Vendor ID cannot be NULL');
779: END IF;
780: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
781: FND_MESSAGE.set_token('ID', 'Vendor ID');
782: FND_MSG_PUB.add;
783: RAISE FND_API.G_EXC_ERROR;
784: ELSIF l_pl_notify_hdr_rec.vendor_site_id IS NULL THEN
777: IF g_debug THEN
778: DPP_Utility_PVT.debug_message('Vendor ID cannot be NULL');
779: END IF;
780: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
781: FND_MESSAGE.set_token('ID', 'Vendor ID');
782: FND_MSG_PUB.add;
783: RAISE FND_API.G_EXC_ERROR;
784: ELSIF l_pl_notify_hdr_rec.vendor_site_id IS NULL THEN
785: IF g_debug THEN
784: ELSIF l_pl_notify_hdr_rec.vendor_site_id IS NULL THEN
785: IF g_debug THEN
786: DPP_Utility_PVT.debug_message('Vendor Site ID cannot be NULL');
787: END IF;
788: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
789: FND_MESSAGE.set_token('ID', 'Vendor Site ID');
790: FND_MSG_PUB.add;
791: RAISE FND_API.G_EXC_ERROR;
792: ELSIF l_pl_notify_hdr_rec.org_id IS NULL THEN
785: IF g_debug THEN
786: DPP_Utility_PVT.debug_message('Vendor Site ID cannot be NULL');
787: END IF;
788: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
789: FND_MESSAGE.set_token('ID', 'Vendor Site ID');
790: FND_MSG_PUB.add;
791: RAISE FND_API.G_EXC_ERROR;
792: ELSIF l_pl_notify_hdr_rec.org_id IS NULL THEN
793: IF g_debug THEN
792: ELSIF l_pl_notify_hdr_rec.org_id IS NULL THEN
793: IF g_debug THEN
794: DPP_Utility_PVT.debug_message('Org ID cannot be NULL');
795: END IF;
796: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
797: FND_MESSAGE.set_token('ID', 'Org ID');
798: FND_MSG_PUB.add;
799: RAISE FND_API.G_EXC_ERROR;
800: ELSE
793: IF g_debug THEN
794: DPP_Utility_PVT.debug_message('Org ID cannot be NULL');
795: END IF;
796: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
797: FND_MESSAGE.set_token('ID', 'Org ID');
798: FND_MSG_PUB.add;
799: RAISE FND_API.G_EXC_ERROR;
800: ELSE
801: FOR get_vendor_rec IN get_vendor_csr(p_pl_notify_hdr_rec.vendor_id) LOOP
816: IF l_pl_notify_line_tbl(i).inventory_item_id IS NULL THEN
817: IF g_debug THEN
818: DPP_Utility_PVT.debug_message('Inventory Item ID cannot be NULL');
819: END IF;
820: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
821: FND_MESSAGE.set_token('ID', 'Inventory Item ID');
822: FND_MSG_PUB.add;
823: RAISE FND_API.G_EXC_ERROR;
824: ELSE
817: IF g_debug THEN
818: DPP_Utility_PVT.debug_message('Inventory Item ID cannot be NULL');
819: END IF;
820: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
821: FND_MESSAGE.set_token('ID', 'Inventory Item ID');
822: FND_MSG_PUB.add;
823: RAISE FND_API.G_EXC_ERROR;
824: ELSE
825: FOR get_item_number_rec IN get_item_number_csr(l_pl_notify_line_tbl(i).Inventory_Item_ID) LOOP
841: ELSE
842: IF g_debug THEN
843: DPP_Utility_PVT.debug_message('Line detals cannot be NULL');
844: END IF;
845: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
846: FND_MESSAGE.set_token('ID', 'Line Details');
847: FND_MSG_PUB.add;
848: RAISE FND_API.G_EXC_ERROR;
849: END IF;
842: IF g_debug THEN
843: DPP_Utility_PVT.debug_message('Line detals cannot be NULL');
844: END IF;
845: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
846: FND_MESSAGE.set_token('ID', 'Line Details');
847: FND_MSG_PUB.add;
848: RAISE FND_API.G_EXC_ERROR;
849: END IF;
850: END IF;
901:
902: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
903: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
904: THEN
905: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
906: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_Promotions');
907: fnd_message.set_token('ERRNO', sqlcode);
908: fnd_message.set_token('REASON', sqlerrm);
909: FND_MSG_PUB.ADD;
902: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
903: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
904: THEN
905: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
906: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_Promotions');
907: fnd_message.set_token('ERRNO', sqlcode);
908: fnd_message.set_token('REASON', sqlerrm);
909: FND_MSG_PUB.ADD;
910: DPP_UTILITY_PVT.debug_message('Error in notify promotions: '||SQLERRM);
903: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
904: THEN
905: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
906: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_Promotions');
907: fnd_message.set_token('ERRNO', sqlcode);
908: fnd_message.set_token('REASON', sqlerrm);
909: FND_MSG_PUB.ADD;
910: DPP_UTILITY_PVT.debug_message('Error in notify promotions: '||SQLERRM);
911: END IF;
904: THEN
905: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
906: fnd_message.set_token('ROUTINE', 'DPP_PRICING_PVT.Notify_Promotions');
907: fnd_message.set_token('ERRNO', sqlcode);
908: fnd_message.set_token('REASON', sqlerrm);
909: FND_MSG_PUB.ADD;
910: DPP_UTILITY_PVT.debug_message('Error in notify promotions: '||SQLERRM);
911: END IF;
912: -- Standard call to get message count and if count=1, get the message