258: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
259: END IF;
260: -- Initialize message list if p_init_msg_list is set to TRUE.
261: IF FND_API.to_Boolean( p_init_msg_list ) THEN
262: FND_MSG_PUB.initialize;
263: END IF;
264: -- Initialize API return status to success
265: x_return_status := FND_API.G_RET_STS_SUCCESS;
266: x_msg_count := 0;
539: COMMIT WORK;
540: END IF;
541:
542: -- Standard call to get message count and if count is 1, get message info.
543: FND_MSG_PUB.Count_And_Get
544: ( p_count => x_msg_count ,
545: p_data => x_msg_data
546: );
547: EXCEPTION
546: );
547: EXCEPTION
548: WHEN FND_API.G_EXC_ERROR THEN
549: x_return_status := FND_API.G_RET_STS_ERROR ;
550: FND_MSG_PUB.Count_And_Get
551: ( p_count => x_msg_count ,
552: p_data => x_msg_data
553: );
554:
554:
555:
556: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
557: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
558: FND_MSG_PUB.Count_And_Get
559: (
560: p_count => x_msg_count,
561: p_data => x_msg_data
562: );
562: );
563:
564: WHEN OTHERS THEN
565: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
566: IF FND_MSG_PUB.Check_Msg_Level
567: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
568: THEN
569: FND_MSG_PUB.Add_Exc_Msg
570: ( G_PKG_NAME,
563:
564: WHEN OTHERS THEN
565: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
566: IF FND_MSG_PUB.Check_Msg_Level
567: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
568: THEN
569: FND_MSG_PUB.Add_Exc_Msg
570: ( G_PKG_NAME,
571: l_api_name||'('||l_stmt_num||')'
565: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
566: IF FND_MSG_PUB.Check_Msg_Level
567: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
568: THEN
569: FND_MSG_PUB.Add_Exc_Msg
570: ( G_PKG_NAME,
571: l_api_name||'('||l_stmt_num||')'
572: );
573: END IF;
570: ( G_PKG_NAME,
571: l_api_name||'('||l_stmt_num||')'
572: );
573: END IF;
574: FND_MSG_PUB.Count_And_Get
575: ( p_count => x_msg_count,
576: p_data => x_msg_data
577: );
578:
647: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
648: END IF;
649: -- Initialize message list if p_init_msg_list is set to TRUE.
650: IF FND_API.to_Boolean( p_init_msg_list ) THEN
651: FND_MSG_PUB.initialize;
652: END IF;
653: -- Initialize API return status to success
654: x_return_status := FND_API.G_RET_STS_SUCCESS;
655: -- API body
747: END IF;
748: EXCEPTION
749: WHEN OTHERS THEN
750:
751: FND_MSG_PUB.Add_Exc_Msg
752: ( G_PKG_NAME,
753: l_api_name||'('||l_stmt_num||')'
754: );
755:
877: --dbms_output.put_line('committing');
878: COMMIT WORK;
879: END IF;
880: -- Standard call to get message count and if count is 1, get message info.
881: FND_MSG_PUB.Count_And_Get
882: ( p_count => x_msg_count ,
883: p_data => x_msg_data
884: );
885:
887: EXCEPTION
888:
889: WHEN FND_API.G_EXC_ERROR THEN
890: x_return_status := FND_API.G_RET_STS_ERROR ;
891: FND_MSG_PUB.Count_And_Get
892: ( p_count => x_msg_count ,
893: p_data => x_msg_data
894: );
895:
895:
896:
897: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
898: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
899: FND_MSG_PUB.Count_And_Get
900: (
901: p_count => x_msg_count,
902: p_data => x_msg_data
903: );
903: );
904:
905: WHEN OTHERS THEN
906: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
907: IF FND_MSG_PUB.Check_Msg_Level
908: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
909: THEN
910: FND_MSG_PUB.Add_Exc_Msg
911: ( G_PKG_NAME,
904:
905: WHEN OTHERS THEN
906: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
907: IF FND_MSG_PUB.Check_Msg_Level
908: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
909: THEN
910: FND_MSG_PUB.Add_Exc_Msg
911: ( G_PKG_NAME,
912: l_api_name||'('||l_stmt_num||')'
906: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
907: IF FND_MSG_PUB.Check_Msg_Level
908: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
909: THEN
910: FND_MSG_PUB.Add_Exc_Msg
911: ( G_PKG_NAME,
912: l_api_name||'('||l_stmt_num||')'
913: );
914: END IF;
911: ( G_PKG_NAME,
912: l_api_name||'('||l_stmt_num||')'
913: );
914: END IF;
915: FND_MSG_PUB.Count_And_Get
916: ( p_count => x_msg_count,
917: p_data => x_msg_data
918: );
919: