80: ELSIF p_exception_level = G_EXC_OTHERS
81: THEN
82: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
83:
84: FND_MESSAGE.Set_Name('AS', 'Error number ' || to_char(P_SQLCODE));
85: FND_MSG_PUB.Add;
86: FND_MESSAGE.Set_Name('AS', 'Error text ' || P_SQLERRM);
87: FND_MSG_PUB.Add;
88:
82: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
83:
84: FND_MESSAGE.Set_Name('AS', 'Error number ' || to_char(P_SQLCODE));
85: FND_MSG_PUB.Add;
86: FND_MESSAGE.Set_Name('AS', 'Error text ' || P_SQLERRM);
87: FND_MSG_PUB.Add;
88:
89: FND_MSG_PUB.Add_Exc_Msg(p_pkg_name, p_api_name);
90: FND_MSG_PUB.Count_And_Get(
106: or (p_col_choice is NOT NULL and p_col_name is NULL)
107: then
108: if fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
109: then
110: fnd_message.set_name('AS', 'API_MISSING_ORDERBY_ELEMENT');
111: fnd_msg_pub.add;
112: end if;
113: raise fnd_api.g_exc_error;
114: end if;
129: return(l_col_name || ' DESC, ');
130: else
131: if fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
132: then
133: fnd_message.set_name('AS', 'API_INVALID_ORDERBY_CHOICE');
134: fnd_message.set_token('PARAM',p_col_choice, false);
135: fnd_msg_pub.add;
136: end if;
137: raise fnd_api.g_exc_error;
130: else
131: if fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
132: then
133: fnd_message.set_name('AS', 'API_INVALID_ORDERBY_CHOICE');
134: fnd_message.set_token('PARAM',p_col_choice, false);
135: fnd_msg_pub.add;
136: end if;
137: raise fnd_api.g_exc_error;
138: return '';
165: G_PKG_NAME)
166: THEN
167: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
168: THEN
169: FND_MESSAGE.Set_Name('AS', 'API_UNEXP_ERROR_IN_PROCESSING');
170: FND_MESSAGE.Set_Token('ROW', 'TRANSLATE_ORDERBY', TRUE);
171: FND_MSG_PUB.ADD;
172: END IF;
173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
166: THEN
167: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
168: THEN
169: FND_MESSAGE.Set_Name('AS', 'API_UNEXP_ERROR_IN_PROCESSING');
170: FND_MESSAGE.Set_Token('ROW', 'TRANSLATE_ORDERBY', TRUE);
171: FND_MSG_PUB.ADD;
172: END IF;
173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
174: END IF;
192: IF G_User_Id IS NULL
193: THEN
194: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
195: THEN
196: FND_MESSAGE.Set_Name('AS', 'UT_CANNOT_GET_PROFILE_VALUE');
197: FND_MESSAGE.Set_Token('PROFILE', 'USER_ID', FALSE);
198: FND_MSG_PUB.ADD;
199: END IF;
200: END IF;
193: THEN
194: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
195: THEN
196: FND_MESSAGE.Set_Name('AS', 'UT_CANNOT_GET_PROFILE_VALUE');
197: FND_MESSAGE.Set_Token('PROFILE', 'USER_ID', FALSE);
198: FND_MSG_PUB.ADD;
199: END IF;
200: END IF;
201:
294: BEGIN
295: FOR l_count in 1..p_message_count LOOP
296:
297: l_temp_msg := fnd_msg_pub.get(fnd_msg_pub.g_next, fnd_api.g_true);
298: fnd_message.parse_encoded(l_temp_msg, l_appl_short_name, l_message_name);
299: OPEN Get_Appl_Id (l_appl_short_name);
300: FETCH Get_Appl_Id into l_id;
301: CLOSE Get_Appl_Id;
302:
349: THEN
350: /*
351: l_length := length(p_msg);
352:
353: -- FND_MESSAGE doesn't allow message name to be over 30 chars
354: -- chop message name if length > 30
355: WHILE l_length > 30 LOOP
356: l_substring := substr(p_msg, l_start, 30);
357:
354: -- chop message name if length > 30
355: WHILE l_length > 30 LOOP
356: l_substring := substr(p_msg, l_start, 30);
357:
358: FND_MESSAGE.Set_Name('AS', l_substring);
359: -- FND_MESSAGE.Set_Name(p_app_name, l_substring);
360: l_start := l_start + 30;
361: l_length := l_length - 30;
362: FND_MSG_PUB.Add;
355: WHILE l_length > 30 LOOP
356: l_substring := substr(p_msg, l_start, 30);
357:
358: FND_MESSAGE.Set_Name('AS', l_substring);
359: -- FND_MESSAGE.Set_Name(p_app_name, l_substring);
360: l_start := l_start + 30;
361: l_length := l_length - 30;
362: FND_MSG_PUB.Add;
363: END LOOP;
362: FND_MSG_PUB.Add;
363: END LOOP;
364:
365: l_substring := substr(p_msg, l_start);
366: FND_MESSAGE.Set_Name('AS', l_substring);
367: -- dbms_output.put_line('l_substring: ' || l_substring);
368: -- FND_MESSAGE.Set_Name(p_app_name, p_msg);
369: FND_MSG_PUB.Add;
370: */
364:
365: l_substring := substr(p_msg, l_start);
366: FND_MESSAGE.Set_Name('AS', l_substring);
367: -- dbms_output.put_line('l_substring: ' || l_substring);
368: -- FND_MESSAGE.Set_Name(p_app_name, p_msg);
369: FND_MSG_PUB.Add;
370: */
371: l_length := length(p_msg);
372:
369: FND_MSG_PUB.Add;
370: */
371: l_length := length(p_msg);
372:
373: -- FND_MESSAGE doesn't allow message name to be over 30 chars
374: -- chop message name if length > 30
375: IF l_length > 30
376: THEN
377: l_substring := substr(p_msg, l_start, 30);
374: -- chop message name if length > 30
375: IF l_length > 30
376: THEN
377: l_substring := substr(p_msg, l_start, 30);
378: FND_MESSAGE.Set_Name(p_app_name, l_substring);
379: ELSE
380: FND_MESSAGE.Set_Name(p_app_name, p_msg);
381: END IF;
382:
376: THEN
377: l_substring := substr(p_msg, l_start, 30);
378: FND_MESSAGE.Set_Name(p_app_name, l_substring);
379: ELSE
380: FND_MESSAGE.Set_Name(p_app_name, p_msg);
381: END IF;
382:
383: FND_MSG_PUB.Add;
384: END IF;
395: IS
396: BEGIN
397: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
398: THEN
399: FND_MESSAGE.Set_Name('AS', p_msg_name);
400: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
401: FND_MSG_PUB.Add;
402: END IF;
403: END Set_Message;
396: BEGIN
397: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
398: THEN
399: FND_MESSAGE.Set_Name('AS', p_msg_name);
400: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
401: FND_MSG_PUB.Add;
402: END IF;
403: END Set_Message;
404:
414: IS
415: BEGIN
416: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
417: THEN
418: FND_MESSAGE.Set_Name('AS', p_msg_name);
419: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
420: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
421: FND_MSG_PUB.Add;
422: END IF;
415: BEGIN
416: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
417: THEN
418: FND_MESSAGE.Set_Name('AS', p_msg_name);
419: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
420: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
421: FND_MSG_PUB.Add;
422: END IF;
423: END Set_Message;
416: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
417: THEN
418: FND_MESSAGE.Set_Name('AS', p_msg_name);
419: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
420: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
421: FND_MSG_PUB.Add;
422: END IF;
423: END Set_Message;
424:
436: IS
437: BEGIN
438: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
439: THEN
440: FND_MESSAGE.Set_Name('AS', p_msg_name);
441: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
442: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
443: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
444: FND_MSG_PUB.Add;
437: BEGIN
438: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
439: THEN
440: FND_MESSAGE.Set_Name('AS', p_msg_name);
441: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
442: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
443: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
444: FND_MSG_PUB.Add;
445: END IF;
438: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
439: THEN
440: FND_MESSAGE.Set_Name('AS', p_msg_name);
441: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
442: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
443: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
444: FND_MSG_PUB.Add;
445: END IF;
446: END Set_Message;
439: THEN
440: FND_MESSAGE.Set_Name('AS', p_msg_name);
441: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
442: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
443: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
444: FND_MSG_PUB.Add;
445: END IF;
446: END Set_Message;
447:
469: IS
470: BEGIN
471: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
472: THEN
473: FND_MESSAGE.Set_Name('AS', p_msg_name);
474: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
475: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
476: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
477: FND_MESSAGE.Set_Token(p_token4, p_token4_value);
470: BEGIN
471: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
472: THEN
473: FND_MESSAGE.Set_Name('AS', p_msg_name);
474: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
475: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
476: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
477: FND_MESSAGE.Set_Token(p_token4, p_token4_value);
478: FND_MESSAGE.Set_Token(p_token5, p_token5_value);
471: IF FND_MSG_PUB.Check_Msg_Level(p_msg_level)
472: THEN
473: FND_MESSAGE.Set_Name('AS', p_msg_name);
474: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
475: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
476: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
477: FND_MESSAGE.Set_Token(p_token4, p_token4_value);
478: FND_MESSAGE.Set_Token(p_token5, p_token5_value);
479: FND_MESSAGE.Set_Token(p_token6, p_token6_value);
472: THEN
473: FND_MESSAGE.Set_Name('AS', p_msg_name);
474: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
475: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
476: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
477: FND_MESSAGE.Set_Token(p_token4, p_token4_value);
478: FND_MESSAGE.Set_Token(p_token5, p_token5_value);
479: FND_MESSAGE.Set_Token(p_token6, p_token6_value);
480: FND_MESSAGE.Set_Token(p_token7, p_token7_value);
473: FND_MESSAGE.Set_Name('AS', p_msg_name);
474: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
475: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
476: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
477: FND_MESSAGE.Set_Token(p_token4, p_token4_value);
478: FND_MESSAGE.Set_Token(p_token5, p_token5_value);
479: FND_MESSAGE.Set_Token(p_token6, p_token6_value);
480: FND_MESSAGE.Set_Token(p_token7, p_token7_value);
481: FND_MSG_PUB.Add;
474: FND_MESSAGE.Set_Token(p_token1, p_token1_value);
475: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
476: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
477: FND_MESSAGE.Set_Token(p_token4, p_token4_value);
478: FND_MESSAGE.Set_Token(p_token5, p_token5_value);
479: FND_MESSAGE.Set_Token(p_token6, p_token6_value);
480: FND_MESSAGE.Set_Token(p_token7, p_token7_value);
481: FND_MSG_PUB.Add;
482: END IF;
475: FND_MESSAGE.Set_Token(p_token2, p_token2_value);
476: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
477: FND_MESSAGE.Set_Token(p_token4, p_token4_value);
478: FND_MESSAGE.Set_Token(p_token5, p_token5_value);
479: FND_MESSAGE.Set_Token(p_token6, p_token6_value);
480: FND_MESSAGE.Set_Token(p_token7, p_token7_value);
481: FND_MSG_PUB.Add;
482: END IF;
483: END Set_Message;
476: FND_MESSAGE.Set_Token(p_token3, p_token3_value);
477: FND_MESSAGE.Set_Token(p_token4, p_token4_value);
478: FND_MESSAGE.Set_Token(p_token5, p_token5_value);
479: FND_MESSAGE.Set_Token(p_token6, p_token6_value);
480: FND_MESSAGE.Set_Token(p_token7, p_token7_value);
481: FND_MSG_PUB.Add;
482: END IF;
483: END Set_Message;
484: