62: l_dummy INTEGER;
63: BEGIN
64: SAVEPOINT search_message_pvt;
65: -- Standard call to check for call compatibility.
66: IF NOT FND_API.Compatible_API_Call (l_api_version_number,
67: p_api_version_number,
68: l_api_name,
69: G_PKG_NAME)
70: THEN
67: p_api_version_number,
68: l_api_name,
69: G_PKG_NAME)
70: THEN
71: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
72: END IF;
73: -- Initialize message list if p_init_msg_list is set to TRUE.
74: IF FND_API.to_Boolean( p_init_msg_list )
75: THEN
70: THEN
71: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
72: END IF;
73: -- Initialize message list if p_init_msg_list is set to TRUE.
74: IF FND_API.to_Boolean( p_init_msg_list )
75: THEN
76: FND_MSG_PUB.initialize;
77: END IF;
78:
76: FND_MSG_PUB.initialize;
77: END IF;
78:
79: -- Initialize API return status to SUCCESS
80: x_return_status := FND_API.G_RET_STS_SUCCESS;
81:
82: -- detemine sort column
83: if (p_sort_column = 0) then
84: l_sort_column := 'from_address';
300:
301: DBMS_SQL.CLOSE_CURSOR(l_cursorID);
302:
303: -- Standard Check Of p_commit.
304: IF FND_API.To_Boolean(p_commit) THEN
305: COMMIT WORK;
306: END IF;
307: -- Standard callto get message count and if count is 1, get message info.
308: FND_MSG_PUB.Count_And_Get
310: p_data => x_msg_data
311: );
312: EXCEPTION
313:
314: WHEN FND_API.G_EXC_ERROR THEN
315: ROLLBACK TO search_message_pvt;
316: x_return_status := FND_API.G_RET_STS_ERROR ;
317: FND_MSG_PUB.Count_And_Get
318: ( p_count => x_msg_count,
312: EXCEPTION
313:
314: WHEN FND_API.G_EXC_ERROR THEN
315: ROLLBACK TO search_message_pvt;
316: x_return_status := FND_API.G_RET_STS_ERROR ;
317: FND_MSG_PUB.Count_And_Get
318: ( p_count => x_msg_count,
319: p_data => x_msg_data
320: );
317: FND_MSG_PUB.Count_And_Get
318: ( p_count => x_msg_count,
319: p_data => x_msg_data
320: );
321: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
322: ROLLBACK TO search_message_pvt;
323: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
324: FND_MSG_PUB.Count_And_Get
325: ( p_count => x_msg_count,
319: p_data => x_msg_data
320: );
321: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
322: ROLLBACK TO search_message_pvt;
323: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
324: FND_MSG_PUB.Count_And_Get
325: ( p_count => x_msg_count,
326: p_data => x_msg_data
327: );
326: p_data => x_msg_data
327: );
328: WHEN OTHERS THEN
329: ROLLBACK TO search_message_pvt;
330: x_return_status := FND_API.G_RET_STS_ERROR;
331: IF FND_MSG_PUB.Check_Msg_Level
332: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
333: THEN
334: FND_MSG_PUB.Add_Exc_Msg
394: BEGIN
395:
396: SAVEPOINT get_total_count_pvt;
397: -- Standard call to check for call compatibility.
398: IF NOT FND_API.Compatible_API_Call (l_api_version_number,
399: p_api_version_number,
400: l_api_name,
401: G_PKG_NAME)
402: THEN
399: p_api_version_number,
400: l_api_name,
401: G_PKG_NAME)
402: THEN
403: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
404: END IF;
405: -- Initialize message list if p_init_msg_list is set to TRUE.
406: IF FND_API.to_Boolean( p_init_msg_list )
407: THEN
402: THEN
403: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
404: END IF;
405: -- Initialize message list if p_init_msg_list is set to TRUE.
406: IF FND_API.to_Boolean( p_init_msg_list )
407: THEN
408: FND_MSG_PUB.initialize;
409: END IF;
410:
408: FND_MSG_PUB.initialize;
409: END IF;
410:
411: -- Initialize API return status to SUCCESS
412: x_return_status := FND_API.G_RET_STS_SUCCESS;
413:
414: if (p_customer_name is not null and p_group_id <> -1) then
415: l_query_string1 := 'select count(*)
416: from iem_rt_proc_emails a, iem_route_classifications b, hz_parties c
507:
508:
509: DBMS_SQL.CLOSE_CURSOR(l_cursorID);
510: -- Standard Check Of p_commit.
511: IF FND_API.To_Boolean(p_commit) THEN
512: COMMIT WORK;
513: END IF;
514: -- Standard callto get message count and if count is 1, get message info.
515: FND_MSG_PUB.Count_And_Get
517: p_data => x_msg_data
518: );
519: EXCEPTION
520:
521: WHEN FND_API.G_EXC_ERROR THEN
522: ROLLBACK TO get_total_count_pvt;
523: x_return_status := FND_API.G_RET_STS_ERROR ;
524: FND_MSG_PUB.Count_And_Get
525: ( p_count => x_msg_count,
519: EXCEPTION
520:
521: WHEN FND_API.G_EXC_ERROR THEN
522: ROLLBACK TO get_total_count_pvt;
523: x_return_status := FND_API.G_RET_STS_ERROR ;
524: FND_MSG_PUB.Count_And_Get
525: ( p_count => x_msg_count,
526: p_data => x_msg_data
527: );
524: FND_MSG_PUB.Count_And_Get
525: ( p_count => x_msg_count,
526: p_data => x_msg_data
527: );
528: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
529: ROLLBACK TO get_total_count_pvt;
530: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
531: FND_MSG_PUB.Count_And_Get
532: ( p_count => x_msg_count,
526: p_data => x_msg_data
527: );
528: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
529: ROLLBACK TO get_total_count_pvt;
530: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
531: FND_MSG_PUB.Count_And_Get
532: ( p_count => x_msg_count,
533: p_data => x_msg_data
534: );
533: p_data => x_msg_data
534: );
535: WHEN OTHERS THEN
536: ROLLBACK TO get_total_count_pvt;
537: x_return_status := FND_API.G_RET_STS_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
586: BEGIN
587:
588: SAVEPOINT show_agent_list_pvt;
589: -- Standard call to check for call compatibility.
590: IF NOT FND_API.Compatible_API_Call (l_api_version_number,
591: p_api_version_number,
592: l_api_name,
593: G_PKG_NAME)
594: THEN
591: p_api_version_number,
592: l_api_name,
593: G_PKG_NAME)
594: THEN
595: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
596: END IF;
597: -- Initialize message list if p_init_msg_list is set to TRUE.
598: IF FND_API.to_Boolean( p_init_msg_list )
599: THEN
594: THEN
595: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
596: END IF;
597: -- Initialize message list if p_init_msg_list is set to TRUE.
598: IF FND_API.to_Boolean( p_init_msg_list )
599: THEN
600: FND_MSG_PUB.initialize;
601: END IF;
602:
600: FND_MSG_PUB.initialize;
601: END IF;
602:
603: -- Initialize API return status to SUCCESS
604: x_return_status := FND_API.G_RET_STS_SUCCESS;
605:
606: -- determine sort state
607: if (p_sort_state = 'ascending') then
608: l_sort_order := 'desc';
800:
801: DBMS_SQL.CLOSE_CURSOR(l_cursorID);
802:
803: -- Standard Check Of p_commit.
804: IF FND_API.To_Boolean(p_commit) THEN
805: COMMIT WORK;
806: END IF;
807: -- Standard callto get message count and if count is 1, get message info.
808: FND_MSG_PUB.Count_And_Get
810: p_data => x_msg_data
811: );
812: EXCEPTION
813:
814: WHEN FND_API.G_EXC_ERROR THEN
815: ROLLBACK TO show_agent_list_pvt;
816: x_return_status := FND_API.G_RET_STS_ERROR ;
817: FND_MSG_PUB.Count_And_Get
818: ( p_count => x_msg_count,
812: EXCEPTION
813:
814: WHEN FND_API.G_EXC_ERROR THEN
815: ROLLBACK TO show_agent_list_pvt;
816: x_return_status := FND_API.G_RET_STS_ERROR ;
817: FND_MSG_PUB.Count_And_Get
818: ( p_count => x_msg_count,
819: p_data => x_msg_data
820: );
817: FND_MSG_PUB.Count_And_Get
818: ( p_count => x_msg_count,
819: p_data => x_msg_data
820: );
821: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
822: ROLLBACK TO show_agent_list_pvt;
823: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
824: FND_MSG_PUB.Count_And_Get
825: ( p_count => x_msg_count,
819: p_data => x_msg_data
820: );
821: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
822: ROLLBACK TO show_agent_list_pvt;
823: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
824: FND_MSG_PUB.Count_And_Get
825: ( p_count => x_msg_count,
826: p_data => x_msg_data
827: );
826: p_data => x_msg_data
827: );
828: WHEN OTHERS THEN
829: ROLLBACK TO show_agent_list_pvt;
830: x_return_status := FND_API.G_RET_STS_ERROR;
831: IF FND_MSG_PUB.Check_Msg_Level
832: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
833: THEN
834: FND_MSG_PUB.Add_Exc_Msg
876:
877: BEGIN
878: SAVEPOINT show_resource_group_list_pvt;
879: -- Standard call to check for call compatibility.
880: IF NOT FND_API.Compatible_API_Call (l_api_version_number,
881: p_api_version_number,
882: l_api_name,
883: G_PKG_NAME)
884: THEN
881: p_api_version_number,
882: l_api_name,
883: G_PKG_NAME)
884: THEN
885: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
886: END IF;
887: -- Initialize message list if p_init_msg_list is set to TRUE.
888: IF FND_API.to_Boolean( p_init_msg_list )
889: THEN
884: THEN
885: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
886: END IF;
887: -- Initialize message list if p_init_msg_list is set to TRUE.
888: IF FND_API.to_Boolean( p_init_msg_list )
889: THEN
890: FND_MSG_PUB.initialize;
891: END IF;
892:
890: FND_MSG_PUB.initialize;
891: END IF;
892:
893: -- Initialize API return status to SUCCESS
894: x_return_status := FND_API.G_RET_STS_SUCCESS;
895:
896: -- determine sort state
897: if (p_sort_state = 'ascending') then
898: l_sort_order := 'desc';
1074: DBMS_SQL.CLOSE_CURSOR(l_cursorID);
1075:
1076:
1077: -- Standard Check Of p_commit.
1078: IF FND_API.To_Boolean(p_commit) THEN
1079: COMMIT WORK;
1080: END IF;
1081: -- Standard callto get message count and if count is 1, get message info.
1082: FND_MSG_PUB.Count_And_Get
1084: p_data => x_msg_data
1085: );
1086: EXCEPTION
1087:
1088: WHEN FND_API.G_EXC_ERROR THEN
1089: ROLLBACK TO show_resource_group_list_pvt;
1090: x_return_status := FND_API.G_RET_STS_ERROR ;
1091: FND_MSG_PUB.Count_And_Get
1092: ( p_count => x_msg_count,
1086: EXCEPTION
1087:
1088: WHEN FND_API.G_EXC_ERROR THEN
1089: ROLLBACK TO show_resource_group_list_pvt;
1090: x_return_status := FND_API.G_RET_STS_ERROR ;
1091: FND_MSG_PUB.Count_And_Get
1092: ( p_count => x_msg_count,
1093: p_data => x_msg_data
1094: );
1091: FND_MSG_PUB.Count_And_Get
1092: ( p_count => x_msg_count,
1093: p_data => x_msg_data
1094: );
1095: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1096: ROLLBACK TO show_resource_group_list_pvt;
1097: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1098: FND_MSG_PUB.Count_And_Get
1099: ( p_count => x_msg_count,
1093: p_data => x_msg_data
1094: );
1095: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1096: ROLLBACK TO show_resource_group_list_pvt;
1097: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1098: FND_MSG_PUB.Count_And_Get
1099: ( p_count => x_msg_count,
1100: p_data => x_msg_data
1101: );
1100: p_data => x_msg_data
1101: );
1102: WHEN OTHERS THEN
1103: ROLLBACK TO show_resource_group_list_pvt;
1104: x_return_status := FND_API.G_RET_STS_ERROR;
1105: IF FND_MSG_PUB.Check_Msg_Level
1106: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1107: THEN
1108: FND_MSG_PUB.Add_Exc_Msg