657: IS
658: BEGIN
659: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
660: THEN
661: fnd_message.set_name('JTF', 'JTF_API_ALL_INVALID_ARGUMENT');
662: fnd_message.set_token('API_NAME', p_token_an);
663: fnd_message.set_token('VALUE', p_token_v);
664: fnd_message.set_token('PARAMETER', p_token_p);
665: fnd_msg_pub.add;
658: BEGIN
659: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
660: THEN
661: fnd_message.set_name('JTF', 'JTF_API_ALL_INVALID_ARGUMENT');
662: fnd_message.set_token('API_NAME', p_token_an);
663: fnd_message.set_token('VALUE', p_token_v);
664: fnd_message.set_token('PARAMETER', p_token_p);
665: fnd_msg_pub.add;
666: END IF;
659: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
660: THEN
661: fnd_message.set_name('JTF', 'JTF_API_ALL_INVALID_ARGUMENT');
662: fnd_message.set_token('API_NAME', p_token_an);
663: fnd_message.set_token('VALUE', p_token_v);
664: fnd_message.set_token('PARAMETER', p_token_p);
665: fnd_msg_pub.add;
666: END IF;
667: END Add_Invalid_Argument_Msg;
660: THEN
661: fnd_message.set_name('JTF', 'JTF_API_ALL_INVALID_ARGUMENT');
662: fnd_message.set_token('API_NAME', p_token_an);
663: fnd_message.set_token('VALUE', p_token_v);
664: fnd_message.set_token('PARAMETER', p_token_p);
665: fnd_msg_pub.add;
666: END IF;
667: END Add_Invalid_Argument_Msg;
668:
677: IS
678: BEGIN
679: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
680: THEN
681: fnd_message.set_name('JTF', 'JTF_API_ALL_NULL_PARAMETER');
682: fnd_message.set_token('API_NAME', p_token_an);
683: fnd_message.set_token('NULL_PARAM', p_token_np);
684: fnd_msg_pub.add;
685: END IF;
678: BEGIN
679: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
680: THEN
681: fnd_message.set_name('JTF', 'JTF_API_ALL_NULL_PARAMETER');
682: fnd_message.set_token('API_NAME', p_token_an);
683: fnd_message.set_token('NULL_PARAM', p_token_np);
684: fnd_msg_pub.add;
685: END IF;
686: END Add_Null_Parameter_Msg;
679: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
680: THEN
681: fnd_message.set_name('JTF', 'JTF_API_ALL_NULL_PARAMETER');
682: fnd_message.set_token('API_NAME', p_token_an);
683: fnd_message.set_token('NULL_PARAM', p_token_np);
684: fnd_msg_pub.add;
685: END IF;
686: END Add_Null_Parameter_Msg;
687:
703: IF (l_len > p_len)
704: THEN
705: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_success)
706: THEN
707: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
708: fnd_message.set_token('API_NAME', p_api_name);
709: fnd_message.set_token('TRUNCATED_PARAM', p_parameter_name);
710: fnd_message.set_token('VAL_LEN', l_len);
711: fnd_message.set_token('DB_LEN', p_len);
704: THEN
705: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_success)
706: THEN
707: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
708: fnd_message.set_token('API_NAME', p_api_name);
709: fnd_message.set_token('TRUNCATED_PARAM', p_parameter_name);
710: fnd_message.set_token('VAL_LEN', l_len);
711: fnd_message.set_token('DB_LEN', p_len);
712: fnd_msg_pub.add;
705: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_success)
706: THEN
707: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
708: fnd_message.set_token('API_NAME', p_api_name);
709: fnd_message.set_token('TRUNCATED_PARAM', p_parameter_name);
710: fnd_message.set_token('VAL_LEN', l_len);
711: fnd_message.set_token('DB_LEN', p_len);
712: fnd_msg_pub.add;
713: END IF;
706: THEN
707: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
708: fnd_message.set_token('API_NAME', p_api_name);
709: fnd_message.set_token('TRUNCATED_PARAM', p_parameter_name);
710: fnd_message.set_token('VAL_LEN', l_len);
711: fnd_message.set_token('DB_LEN', p_len);
712: fnd_msg_pub.add;
713: END IF;
714: x_str := substrb(p_str, 1, p_len);
707: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
708: fnd_message.set_token('API_NAME', p_api_name);
709: fnd_message.set_token('TRUNCATED_PARAM', p_parameter_name);
710: fnd_message.set_token('VAL_LEN', l_len);
711: fnd_message.set_token('DB_LEN', p_len);
712: fnd_msg_pub.add;
713: END IF;
714: x_str := substrb(p_str, 1, p_len);
715: ELSE
729: IS
730: BEGIN
731: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
732: THEN
733: fnd_message.set_name('JTF', 'JTF_API_ALL_MISSING_PARAM');
734: fnd_message.set_token('API_NAME', p_token_an);
735: fnd_message.set_token('MISSING_PARAM', p_token_mp);
736: fnd_msg_pub.add;
737: END IF;
730: BEGIN
731: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
732: THEN
733: fnd_message.set_name('JTF', 'JTF_API_ALL_MISSING_PARAM');
734: fnd_message.set_token('API_NAME', p_token_an);
735: fnd_message.set_token('MISSING_PARAM', p_token_mp);
736: fnd_msg_pub.add;
737: END IF;
738: END Add_MIssing_Param_Msg;
731: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error)
732: THEN
733: fnd_message.set_name('JTF', 'JTF_API_ALL_MISSING_PARAM');
734: fnd_message.set_token('API_NAME', p_token_an);
735: fnd_message.set_token('MISSING_PARAM', p_token_mp);
736: fnd_msg_pub.add;
737: END IF;
738: END Add_MIssing_Param_Msg;
739:
917: FETCH c_entered_by INTO x_entered_by;
918:
919: IF (c_entered_by%NOTFOUND)
920: THEN
921: fnd_message.set_name('JTF', 'JTF_API_ALL_INVALID_ARGUMENT');
922: fnd_message.set_token('API_NAME', 'JTF_NOTES_PUB.CREATE_NOTE');
923: fnd_message.set_token('PARAMETER', 'p_entered_by');
924: fnd_message.set_token('VALUE', p_entered_by);
925: fnd_msg_pub.ADD;
918:
919: IF (c_entered_by%NOTFOUND)
920: THEN
921: fnd_message.set_name('JTF', 'JTF_API_ALL_INVALID_ARGUMENT');
922: fnd_message.set_token('API_NAME', 'JTF_NOTES_PUB.CREATE_NOTE');
923: fnd_message.set_token('PARAMETER', 'p_entered_by');
924: fnd_message.set_token('VALUE', p_entered_by);
925: fnd_msg_pub.ADD;
926: x_return_status := fnd_api.g_ret_sts_unexp_error;
919: IF (c_entered_by%NOTFOUND)
920: THEN
921: fnd_message.set_name('JTF', 'JTF_API_ALL_INVALID_ARGUMENT');
922: fnd_message.set_token('API_NAME', 'JTF_NOTES_PUB.CREATE_NOTE');
923: fnd_message.set_token('PARAMETER', 'p_entered_by');
924: fnd_message.set_token('VALUE', p_entered_by);
925: fnd_msg_pub.ADD;
926: x_return_status := fnd_api.g_ret_sts_unexp_error;
927:
920: THEN
921: fnd_message.set_name('JTF', 'JTF_API_ALL_INVALID_ARGUMENT');
922: fnd_message.set_token('API_NAME', 'JTF_NOTES_PUB.CREATE_NOTE');
923: fnd_message.set_token('PARAMETER', 'p_entered_by');
924: fnd_message.set_token('VALUE', p_entered_by);
925: fnd_msg_pub.ADD;
926: x_return_status := fnd_api.g_ret_sts_unexp_error;
927:
928: IF (c_entered_by%ISOPEN)
1051: -- If there's an error push it onto the stack
1052: --
1053: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
1054: THEN
1055: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
1056: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_DELETE');
1057: FND_MSG_PUB.ADD;
1058: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1059: END IF;
1052: --
1053: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
1054: THEN
1055: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
1056: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_DELETE');
1057: FND_MSG_PUB.ADD;
1058: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1059: END IF;
1060:
1062: -- If the create function was not granted throw an error
1063: --
1064: IF (l_note_delete = 0)
1065: THEN
1066: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
1067: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_DELETE');
1068: FND_MSG_PUB.ADD;
1069: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1070: END IF;
1063: --
1064: IF (l_note_delete = 0)
1065: THEN
1066: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
1067: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_DELETE');
1068: FND_MSG_PUB.ADD;
1069: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1070: END IF;
1071: END IF; -- end of Security validations
1117:
1118: --
1119: -- Get error message from FND stack
1120: --
1121: l_msg_data := FND_MESSAGE.GET;
1122:
1123: --
1124: -- Push message onto CRM stack
1125: --
1338: );
1339:
1340: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
1341: THEN
1342: FND_MESSAGE.Set_Name('JTF', 'JTF_API_ERR_PRE_CUST_USR_HK');
1343: FND_MSG_PUB.Add;
1344: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1345: END IF;
1346: END IF;
1397: );
1398:
1399: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
1400: THEN
1401: FND_MESSAGE.Set_Name('JTF', 'JTF_API_ERR_PRE_VERT_USR_HK');
1402: FND_MSG_PUB.Add;
1403: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1404: END IF;
1405: END IF;
1596: -- If there's an error push it onto the stack
1597: --
1598: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
1599: THEN
1600: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
1601: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_CREATE');
1602: FND_MSG_PUB.ADD;
1603: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1604: END IF;
1597: --
1598: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
1599: THEN
1600: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
1601: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_CREATE');
1602: FND_MSG_PUB.ADD;
1603: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1604: END IF;
1605:
1607: -- If the create function was not granted throw an error
1608: --
1609: IF (l_grant_select = 0)
1610: THEN
1611: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
1612: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_CREATE');
1613: FND_MSG_PUB.ADD;
1614: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1615: END IF;
1608: --
1609: IF (l_grant_select = 0)
1610: THEN
1611: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
1612: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_CREATE');
1613: FND_MSG_PUB.ADD;
1614: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1615: END IF;
1616:
1631: -- If there's an error push it onto the stack
1632: --
1633: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
1634: THEN
1635: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
1636: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_CREATE');
1637: FND_MSG_PUB.ADD;
1638: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1639: END IF;
1632: --
1633: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
1634: THEN
1635: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
1636: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_CREATE');
1637: FND_MSG_PUB.ADD;
1638: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1639: END IF;
1640:
1642: -- user is not allowed to create notes of this type
1643: --
1644: IF (l_grant_select = 0)
1645: THEN
1646: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
1647: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_TYPE_CREATE');
1648: FND_MSG_PUB.ADD;
1649: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1650: END IF;
1643: --
1644: IF (l_grant_select = 0)
1645: THEN
1646: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
1647: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_TYPE_CREATE');
1648: FND_MSG_PUB.ADD;
1649: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1650: END IF;
1651:
1789: );
1790:
1791: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
1792: THEN
1793: FND_MESSAGE.Set_Name('JTF', 'JTF_API_ERR_POST_CUST_USR_HK');
1794: FND_MSG_PUB.Add;
1795: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1796: END IF;
1797: END IF;
1849: , p_jtf_note_id => l_jtf_note_id
1850: );
1851:
1852: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1853: FND_MESSAGE.Set_Name('JTF', 'JTF_ERR_POST_VERT_USR_HK');
1854: FND_MSG_PUB.Add;
1855: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1856: END IF;
1857: END IF;
1932: ROLLBACK TO create_note_pvt;
1933: x_return_status := fnd_api.g_ret_sts_unexp_error;
1934: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1935: THEN
1936: fnd_message.set_name('JTF', 'JTF_API_ALL_MISSING_PARAM');
1937: fnd_message.set_token('API_NAME', g_pkg_name||'.'||l_api_name);
1938: fnd_message.set_token('MISSING_PARAM', l_missing_param);
1939: fnd_msg_pub.ADD;
1940: END IF;
1933: x_return_status := fnd_api.g_ret_sts_unexp_error;
1934: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1935: THEN
1936: fnd_message.set_name('JTF', 'JTF_API_ALL_MISSING_PARAM');
1937: fnd_message.set_token('API_NAME', g_pkg_name||'.'||l_api_name);
1938: fnd_message.set_token('MISSING_PARAM', l_missing_param);
1939: fnd_msg_pub.ADD;
1940: END IF;
1941:
1934: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1935: THEN
1936: fnd_message.set_name('JTF', 'JTF_API_ALL_MISSING_PARAM');
1937: fnd_message.set_token('API_NAME', g_pkg_name||'.'||l_api_name);
1938: fnd_message.set_token('MISSING_PARAM', l_missing_param);
1939: fnd_msg_pub.ADD;
1940: END IF;
1941:
1942: fnd_msg_pub.count_and_get( p_encoded => 'F' -- Not encoding so HTML can use the message
1950: ROLLBACK TO create_note_pvt;
1951: x_return_status := fnd_api.g_ret_sts_unexp_error;
1952: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1953: THEN
1954: fnd_message.set_name('JTF', 'JTF_API_ALL_NULL_PARAMETER');
1955: fnd_message.set_token('API_NAME', g_pkg_name||'.'||l_api_name);
1956: fnd_message.set_token('NULL_PARAM', l_null_param);
1957: fnd_msg_pub.ADD;
1958: END IF;
1951: x_return_status := fnd_api.g_ret_sts_unexp_error;
1952: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1953: THEN
1954: fnd_message.set_name('JTF', 'JTF_API_ALL_NULL_PARAMETER');
1955: fnd_message.set_token('API_NAME', g_pkg_name||'.'||l_api_name);
1956: fnd_message.set_token('NULL_PARAM', l_null_param);
1957: fnd_msg_pub.ADD;
1958: END IF;
1959: fnd_msg_pub.count_and_get( p_encoded => 'F'
1952: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)
1953: THEN
1954: fnd_message.set_name('JTF', 'JTF_API_ALL_NULL_PARAMETER');
1955: fnd_message.set_token('API_NAME', g_pkg_name||'.'||l_api_name);
1956: fnd_message.set_token('NULL_PARAM', l_null_param);
1957: fnd_msg_pub.ADD;
1958: END IF;
1959: fnd_msg_pub.count_and_get( p_encoded => 'F'
1960: , p_count => x_msg_count
2359: );-- 32367
2360:
2361: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_success)
2362: THEN
2363: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
2364: fnd_message.set_token('API_NAME', l_api_name);
2365: fnd_message.set_token('TRUNCATED_PARAM', 'p_notes_detail');
2366: fnd_message.set_token('VAL_LEN', l_total_clob_length);
2367: fnd_message.set_token('DB_LEN', 32767);
2360:
2361: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_success)
2362: THEN
2363: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
2364: fnd_message.set_token('API_NAME', l_api_name);
2365: fnd_message.set_token('TRUNCATED_PARAM', 'p_notes_detail');
2366: fnd_message.set_token('VAL_LEN', l_total_clob_length);
2367: fnd_message.set_token('DB_LEN', 32767);
2368: fnd_msg_pub.add;
2361: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_success)
2362: THEN
2363: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
2364: fnd_message.set_token('API_NAME', l_api_name);
2365: fnd_message.set_token('TRUNCATED_PARAM', 'p_notes_detail');
2366: fnd_message.set_token('VAL_LEN', l_total_clob_length);
2367: fnd_message.set_token('DB_LEN', 32767);
2368: fnd_msg_pub.add;
2369: END IF;
2362: THEN
2363: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
2364: fnd_message.set_token('API_NAME', l_api_name);
2365: fnd_message.set_token('TRUNCATED_PARAM', 'p_notes_detail');
2366: fnd_message.set_token('VAL_LEN', l_total_clob_length);
2367: fnd_message.set_token('DB_LEN', 32767);
2368: fnd_msg_pub.add;
2369: END IF;
2370:
2363: fnd_message.set_name('JTF', 'JTF_API_ALL_VALUE_TRUNCATED');
2364: fnd_message.set_token('API_NAME', l_api_name);
2365: fnd_message.set_token('TRUNCATED_PARAM', 'p_notes_detail');
2366: fnd_message.set_token('VAL_LEN', l_total_clob_length);
2367: fnd_message.set_token('DB_LEN', 32767);
2368: fnd_msg_pub.add;
2369: END IF;
2370:
2371: IF l_notes_detail_truncated IS NOT NULL
2403: );
2404:
2405: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2406: THEN
2407: FND_MESSAGE.Set_Name('JTF', 'JTF_API_ERR_PRE_CUST_USR_HK');
2408: FND_MSG_PUB.Add;
2409: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2410: END IF;
2411: END IF;
2432: );
2433:
2434: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2435: THEN
2436: FND_MESSAGE.Set_Name('JTF', 'JTF_API_ERR_PRE_CUST_USR_HK');
2437: FND_MSG_PUB.Add;
2438: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2439: END IF;
2440: END IF;
2505: -- If there's an error push it onto the stack
2506: --
2507: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2508: THEN
2509: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
2510: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_NOTE');
2511: FND_MSG_PUB.ADD;
2512: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2513: END IF;
2506: --
2507: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2508: THEN
2509: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
2510: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_NOTE');
2511: FND_MSG_PUB.ADD;
2512: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2513: END IF;
2514:
2516: -- If the create function was not granted throw an error
2517: --
2518: IF (l_note_update_primary = 0)
2519: THEN
2520: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
2521: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_NOTE');
2522: FND_MSG_PUB.ADD;
2523: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2524: END IF;
2517: --
2518: IF (l_note_update_primary = 0)
2519: THEN
2520: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
2521: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_NOTE');
2522: FND_MSG_PUB.ADD;
2523: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2524: END IF;
2525: END IF;
2548: -- If there's an error push it onto the stack
2549: --
2550: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2551: THEN
2552: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
2553: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_NOTE_DETAILS');
2554: FND_MSG_PUB.ADD;
2555: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2556: END IF;
2549: --
2550: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2551: THEN
2552: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
2553: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_NOTE_DETAILS');
2554: FND_MSG_PUB.ADD;
2555: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2556: END IF;
2557:
2559: -- If the create function was not granted throw an error
2560: --
2561: IF (l_note_update_primary = 0)
2562: THEN
2563: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
2564: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_NOTE_DETAILS');
2565: FND_MSG_PUB.ADD;
2566: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2567: END IF;
2560: --
2561: IF (l_note_update_primary = 0)
2562: THEN
2563: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
2564: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_NOTE_DETAILS');
2565: FND_MSG_PUB.ADD;
2566: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2567: END IF;
2568: END IF;
2594: -- If there's an error push it onto the stack
2595: --
2596: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2597: THEN
2598: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
2599: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE');
2600: FND_MSG_PUB.ADD;
2601: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2602: END IF;
2595: --
2596: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2597: THEN
2598: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
2599: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE');
2600: FND_MSG_PUB.ADD;
2601: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2602: END IF;
2603:
2605: -- If the create function was not granted throw an error
2606: --
2607: IF (l_note_update_secondary = 0)
2608: THEN
2609: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
2610: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_PRIMARY');
2611: FND_MSG_PUB.ADD;
2612: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2613: ELSE
2606: --
2607: IF (l_note_update_secondary = 0)
2608: THEN
2609: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
2610: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE_PRIMARY');
2611: FND_MSG_PUB.ADD;
2612: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2613: ELSE
2614: --
2628: -- If there's an error push it onto the stack
2629: --
2630: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2631: THEN
2632: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
2633: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE');
2634: FND_MSG_PUB.ADD;
2635: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2636: END IF;
2629: --
2630: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2631: THEN
2632: FND_MESSAGE.SET_NAME('JTF', 'JTF_UNABLE_TO_CHECK_FUNCTION'); -- Unable to verify whether Security &FUNCTION function was granted
2633: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_UPDATE');
2634: FND_MSG_PUB.ADD;
2635: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2636: END IF;
2637:
2639: -- user is not allowed to create notes of this type
2640: --
2641: IF (l_note_select_type = 0)
2642: THEN
2643: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
2644: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_TYPE_UPDATE');
2645: FND_MSG_PUB.ADD;
2646: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2647: END IF;
2640: --
2641: IF (l_note_select_type = 0)
2642: THEN
2643: FND_MESSAGE.SET_NAME('JTF', 'JTF_FUNCTION_NOT_GRANTED'); -- Security &FUNCTION function was not granted
2644: FND_MESSAGE.SET_TOKEN('FUNCTION', 'JTF_NOTE_TYPE_UPDATE');
2645: FND_MSG_PUB.ADD;
2646: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2647: END IF;
2648: END IF;
2768: );
2769:
2770: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2771: THEN
2772: FND_MESSAGE.Set_Name('JTF', 'JTF_API_ERR_POST_CUST_USR_HK');
2773: FND_MSG_PUB.Add;
2774: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2775: END IF;
2776: END IF;
2797: );
2798:
2799: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
2800: THEN
2801: FND_MESSAGE.Set_Name('JTF', 'JTF_API_ERR_POST_VERT_USR_HK');
2802: FND_MSG_PUB.Add;
2803: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2804: END IF;
2805: END IF;
2891:
2892: /**********************************************************
2893: ** Set the error
2894: **********************************************************/
2895: fnd_message.set_name('FND', 'FND_LOCK_RECORD_ERROR');
2896: fnd_msg_pub.add;
2897: fnd_msg_pub.count_and_get( p_encoded => 'F'
2898: , p_count => x_msg_count
2899: , p_data => x_msg_data