250: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
251: END IF;
252: -- Initialize message list if p_init_msg_list is set to TRUE.
253: IF FND_API.to_Boolean( p_init_msg_list ) THEN
254: FND_MSG_PUB.initialize;
255: END IF;
256: -- Initialize API return status to success
257: x_return_status := FND_API.G_RET_STS_SUCCESS;
258: x_msg_count := 0;
511: COMMIT WORK;
512: END IF;
513:
514: -- Standard call to get message count and if count is 1, get message info.
515: FND_MSG_PUB.Count_And_Get
516: ( p_count => x_msg_count ,
517: p_data => x_msg_data
518: );
519: EXCEPTION
518: );
519: EXCEPTION
520: WHEN FND_API.G_EXC_ERROR THEN
521: x_return_status := FND_API.G_RET_STS_ERROR ;
522: FND_MSG_PUB.Count_And_Get
523: ( p_count => x_msg_count ,
524: p_data => x_msg_data
525: );
526:
526:
527:
528: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
529: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
530: FND_MSG_PUB.Count_And_Get
531: (
532: p_count => x_msg_count,
533: p_data => x_msg_data
534: );
534: );
535:
536: WHEN OTHERS THEN
537: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
538: IF FND_MSG_PUB.Check_Msg_Level
539: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
540: THEN
541: FND_MSG_PUB.Add_Exc_Msg
542: ( G_PKG_NAME,
535:
536: WHEN OTHERS THEN
537: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
538: IF FND_MSG_PUB.Check_Msg_Level
539: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
540: THEN
541: FND_MSG_PUB.Add_Exc_Msg
542: ( G_PKG_NAME,
543: l_api_name||'('||l_stmt_num||')'
537: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
538: IF FND_MSG_PUB.Check_Msg_Level
539: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
540: THEN
541: FND_MSG_PUB.Add_Exc_Msg
542: ( G_PKG_NAME,
543: l_api_name||'('||l_stmt_num||')'
544: );
545: END IF;
542: ( G_PKG_NAME,
543: l_api_name||'('||l_stmt_num||')'
544: );
545: END IF;
546: FND_MSG_PUB.Count_And_Get
547: ( p_count => x_msg_count,
548: p_data => x_msg_data
549: );
550:
619: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
620: END IF;
621: -- Initialize message list if p_init_msg_list is set to TRUE.
622: IF FND_API.to_Boolean( p_init_msg_list ) THEN
623: FND_MSG_PUB.initialize;
624: END IF;
625: -- Initialize API return status to success
626: x_return_status := FND_API.G_RET_STS_SUCCESS;
627: -- API body
719: END IF;
720: EXCEPTION
721: WHEN OTHERS THEN
722:
723: FND_MSG_PUB.Add_Exc_Msg
724: ( G_PKG_NAME,
725: l_api_name||'('||l_stmt_num||')'
726: );
727:
849: --dbms_output.put_line('committing');
850: COMMIT WORK;
851: END IF;
852: -- Standard call to get message count and if count is 1, get message info.
853: FND_MSG_PUB.Count_And_Get
854: ( p_count => x_msg_count ,
855: p_data => x_msg_data
856: );
857:
859: EXCEPTION
860:
861: WHEN FND_API.G_EXC_ERROR THEN
862: x_return_status := FND_API.G_RET_STS_ERROR ;
863: FND_MSG_PUB.Count_And_Get
864: ( p_count => x_msg_count ,
865: p_data => x_msg_data
866: );
867:
867:
868:
869: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
870: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
871: FND_MSG_PUB.Count_And_Get
872: (
873: p_count => x_msg_count,
874: p_data => x_msg_data
875: );
875: );
876:
877: WHEN OTHERS THEN
878: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
879: IF FND_MSG_PUB.Check_Msg_Level
880: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
881: THEN
882: FND_MSG_PUB.Add_Exc_Msg
883: ( G_PKG_NAME,
876:
877: WHEN OTHERS THEN
878: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
879: IF FND_MSG_PUB.Check_Msg_Level
880: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
881: THEN
882: FND_MSG_PUB.Add_Exc_Msg
883: ( G_PKG_NAME,
884: l_api_name||'('||l_stmt_num||')'
878: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
879: IF FND_MSG_PUB.Check_Msg_Level
880: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
881: THEN
882: FND_MSG_PUB.Add_Exc_Msg
883: ( G_PKG_NAME,
884: l_api_name||'('||l_stmt_num||')'
885: );
886: END IF;
883: ( G_PKG_NAME,
884: l_api_name||'('||l_stmt_num||')'
885: );
886: END IF;
887: FND_MSG_PUB.Count_And_Get
888: ( p_count => x_msg_count,
889: p_data => x_msg_data
890: );
891: