43: IF (p_depth = 0) THEN
44: RETURN '';
45: END IF;
46:
47: l_depth := fnd_msg_pub.count_msg;
48: IF (p_depth < l_depth) THEN
49: l_depth := p_depth;
50: END IF;
51:
51:
52: FOR i IN 1..l_depth LOOP
53: IF i = 1
54: THEN
55: fnd_msg_pub.get(fnd_msg_pub.g_first, 'F', l_curr, l_msg_index);
56: ELSE
57: fnd_msg_pub.get(fnd_msg_pub.g_next, 'F', l_curr, l_msg_index);
58: END IF;
59: IF ( nvl(p_flush,TRUE)) THEN
53: IF i = 1
54: THEN
55: fnd_msg_pub.get(fnd_msg_pub.g_first, 'F', l_curr, l_msg_index);
56: ELSE
57: fnd_msg_pub.get(fnd_msg_pub.g_next, 'F', l_curr, l_msg_index);
58: END IF;
59: IF ( nvl(p_flush,TRUE)) THEN
60: fnd_msg_pub.delete_msg(l_msg_index);
61: END IF;
56: ELSE
57: fnd_msg_pub.get(fnd_msg_pub.g_next, 'F', l_curr, l_msg_index);
58: END IF;
59: IF ( nvl(p_flush,TRUE)) THEN
60: fnd_msg_pub.delete_msg(l_msg_index);
61: END IF;
62: l_result := l_result || l_curr || fnd_global.newline;
63: END LOOP;
64:
61: END IF;
62: l_result := l_result || l_curr || fnd_global.newline;
63: END LOOP;
64:
65: fnd_msg_pub.get(fnd_msg_pub.g_next, 'F', l_curr, l_msg_index);
66: IF ( nvl(p_flush,TRUE)) THEN
67: fnd_msg_pub.delete_msg(l_msg_index);
68: END IF;
69: l_result := l_result || l_curr;
63: END LOOP;
64:
65: fnd_msg_pub.get(fnd_msg_pub.g_next, 'F', l_curr, l_msg_index);
66: IF ( nvl(p_flush,TRUE)) THEN
67: fnd_msg_pub.delete_msg(l_msg_index);
68: END IF;
69: l_result := l_result || l_curr;
70: RETURN l_result;
71: END concat_msg_stack;