269: END;
270: -- Bug4382865: End SQL Literal Fix
271:
272: IF l_count = 0 THEN
273: RETURN FND_API.g_false;
274: ELSE
275: RETURN FND_API.g_true;
276: END IF;
277:
271:
272: IF l_count = 0 THEN
273: RETURN FND_API.g_false;
274: ELSE
275: RETURN FND_API.g_true;
276: END IF;
277:
278: END check_fk_exists;
279:
324: WHEN NO_DATA_FOUND THEN
325: l_count := 0;
326: END;
327: IF l_count = 0 THEN
328: RETURN FND_API.g_false;
329: ELSE
330: RETURN FND_API.g_true;
331: END IF;
332: END IF;
326: END;
327: IF l_count = 0 THEN
328: RETURN FND_API.g_false;
329: ELSE
330: RETURN FND_API.g_true;
331: END IF;
332: END IF;
333:
334: END check_lookup_exists;
378: FETCH cur_check_lookup_exists INTO l_count;
379: CLOSE cur_check_lookup_exists;
380:
381: IF l_count = 0 THEN
382: RETURN FND_API.g_false;
383: ELSE
384: RETURN FND_API.g_true;
385: END IF;
386:
380:
381: IF l_count = 0 THEN
382: RETURN FND_API.g_false;
383: ELSE
384: RETURN FND_API.g_true;
385: END IF;
386:
387: END check_lookup_exists;
388:
461: l_count := 0;
462: END;
463:
464: IF l_count = 0 THEN
465: RETURN FND_API.g_true;
466: ELSE
467: RETURN FND_API.g_false;
468: END IF;
469:
463:
464: IF l_count = 0 THEN
465: RETURN FND_API.g_true;
466: ELSE
467: RETURN FND_API.g_false;
468: END IF;
469:
470: END check_uniqueness;
471:
483: RETURN VARCHAR2
484: IS
485: BEGIN
486: IF p_value = 'Y' or p_value = 'N' THEN
487: RETURN FND_API.g_true;
488: ELSE
489: RETURN FND_API.g_false;
490: END IF;
491: END is_Y_or_N;
485: BEGIN
486: IF p_value = 'Y' or p_value = 'N' THEN
487: RETURN FND_API.g_true;
488: ELSE
489: RETURN FND_API.g_false;
490: END IF;
491: END is_Y_or_N;
492:
493:
512: )
513: IS
514: BEGIN
515: FND_MESSAGE.set_name('OZF', 'OZF_API_DEBUG_MESSAGE');
516: FND_MESSAGE.set_token('TEXT', REPLACE (p_message_text, FND_API.G_MISS_CHAR, 'G_MISS_CHAR'));
517: FND_MSG_PUB.add;
518: END debug_message;
519:
520:
555: l_msg VARCHAR2(2000);
556: BEGIN
557: l_count := FND_MSG_PUB.count_msg;
558: FOR i IN 1 .. l_count LOOP
559: l_msg := FND_MSG_PUB.get(i, FND_API.g_false);
560: -- holiu: remove since adchkdrv does not like it
561: -- DBMS_OUTPUT.put_line('(' || i || ') ' || l_msg);
562: END LOOP;
563: END display_messages;
606: -- Standard Start of API savepoint
607: SAVEPOINT Create_act_log;
608:
609: -- Initialize API return status to success
610: x_return_status := FND_API.G_RET_STS_SUCCESS;
611:
612: --
613: -- API body
614: --
663:
664: OPEN c_log(l_act_log_id);
665: FETCH c_log INTO x_rowid;
666: IF (c_log%NOTFOUND) THEN
667: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
668: END IF;
669: CLOSE c_log;
670:
671: --
676: EXCEPTION
677:
678: WHEN OTHERS THEN
679: ROLLBACK TO create_act_log;
680: x_return_status := FND_API.g_ret_sts_unexp_error;
681:
682: END create_log;
683:
684:
712: )
713: IS
714: BEGIN
715: -- initialize return status
716: x_return_status := FND_API.G_RET_STS_SUCCESS;
717:
718: IF (p_sys_qual ='CSCH') THEN
719: -- Start of code modified by ptendulk on 30-Jan-2001
720: --x_table_name := 'AMS_CAMPAIGN_SCHEDULES';
791: x_table_name := 'OZF_DLG_FLOW_COMPS_B';
792: x_pk_name := 'FLOW_COMPONENT_ID';
793: ELSE
794: OZF_Utility_PVT.error_message ('OZF_INVALID_SYS_QUAL', 'SYS_QUALIFIER', p_sys_qual);
795: x_return_status := FND_API.g_ret_sts_unexp_error;
796: x_table_name := NULL;
797: x_pk_name := NULL;
798: END IF;
799:
824:
825:
826:
827: IF SQL%NOTFOUND THEN
828: x_return_status := FND_API.G_FALSE;
829: ELSE
830: x_return_status := FND_API.G_TRUE;
831: END IF;
832:
826:
827: IF SQL%NOTFOUND THEN
828: x_return_status := FND_API.G_FALSE;
829: ELSE
830: x_return_status := FND_API.G_TRUE;
831: END IF;
832:
833:
834: EXCEPTION
835:
836: WHEN OTHERS THEN
837: x_source_code := NULL;
838: x_source_id := NULL;
839: x_return_status := FND_API.G_FALSE;
840:
841: End;
842:
843:
980: l_conversion_type VARCHAR2(30); -- Currency conversion type; see API documention for details.
981: l_conv_date DATE;
982: BEGIN
983: -- Initialize return status.
984: x_return_status := FND_API.G_RET_STS_SUCCESS;
985:
986: -- Get the currency conversion type from profile option
987: l_conversion_type := FND_PROFILE.Value (L_CONVERSION_TYPE_PROFILE);
988:
986: -- Get the currency conversion type from profile option
987: l_conversion_type := FND_PROFILE.Value (L_CONVERSION_TYPE_PROFILE);
988:
989: --bug 8532055
990: IF p_conv_date = FND_API.G_MISS_DATE OR p_conv_date IS NULL THEN
991: l_conv_date := SYSDATE;
992: ELSE
993: l_conv_date := p_conv_date;
994: END IF;
1014: FND_MESSAGE.Set_Token ('CURRENCY_FROM', p_from_currency);
1015: FND_MESSAGE.Set_Token ('CURRENCY_TO', p_to_currency);
1016: FND_MSG_PUB.Add;
1017: END IF;
1018: x_return_status := FND_API.G_RET_STS_ERROR;
1019: WHEN GL_Currency_API.INVALID_CURRENCY THEN
1020: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1021: FND_MESSAGE.Set_Name ('OZF', 'OZF_INVALID_CURR');
1022: FND_MESSAGE.Set_Token ('CURRENCY_FROM', p_from_currency);
1022: FND_MESSAGE.Set_Token ('CURRENCY_FROM', p_from_currency);
1023: FND_MESSAGE.Set_Token ('CURRENCY_TO', p_to_currency);
1024: FND_MSG_PUB.Add;
1025: END IF;
1026: x_return_status := FND_API.G_RET_STS_ERROR;
1027: END Convert_Currency;
1028:
1029: ---------------------------------------------------------------------
1030: -- PROCEDURE
1055: OPEN c_meaning;
1056: FETCH c_meaning INTO x_meaning;
1057: IF c_meaning%NOTFOUND THEN
1058: CLOSE c_meaning;
1059: x_return_status := FND_API.G_RET_STS_ERROR;
1060: x_meaning:= NULL;
1061: ELSE
1062: CLOSE c_meaning;
1063: x_return_status := FND_API.G_RET_STS_SUCCESS;
1059: x_return_status := FND_API.G_RET_STS_ERROR;
1060: x_meaning:= NULL;
1061: ELSE
1062: CLOSE c_meaning;
1063: x_return_status := FND_API.G_RET_STS_SUCCESS;
1064: END IF;
1065: EXCEPTION
1066: WHEN OTHERS THEN
1067: IF c_meaning%ISOPEN THEN
1066: WHEN OTHERS THEN
1067: IF c_meaning%ISOPEN THEN
1068: CLOSE c_meaning;
1069: END IF;
1070: x_return_status := FND_API.G_RET_STS_ERROR;
1071: x_meaning := NULL;
1072: END get_lookup_meaning;
1073:
1074:
1097: where TIMEZONE_ID = l_time_id;
1098:
1099: BEGIN
1100: -- Initialize API return status to success
1101: x_return_status := FND_API.G_RET_STS_SUCCESS;
1102: l_sys_time_id := FND_PROFILE.VALUE('SERVER_TIMEZONE_ID');
1103: OPEN c_get_name(l_sys_time_id);
1104: FETCH c_get_name into l_sys_name;
1105: IF (c_get_name%NOTFOUND) THEN
1103: OPEN c_get_name(l_sys_time_id);
1104: FETCH c_get_name into l_sys_name;
1105: IF (c_get_name%NOTFOUND) THEN
1106: CLOSE c_get_name;
1107: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1108: return;
1109: END IF;
1110: CLOSE c_get_name;
1111:
1115: WHEN NO_DATA_FOUND THEN
1116: IF (c_get_name%ISOPEN) THEN
1117: CLOSE c_get_name;
1118: END IF;
1119: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1120: END get_System_Timezone;
1121:
1122: ---------------------------------------------------------------------
1123: -- PROCEDURE
1144: where TIMEZONE_ID = l_time_id;
1145:
1146: BEGIN
1147: -- Initialize API return status to success
1148: x_return_status := FND_API.G_RET_STS_SUCCESS;
1149: l_user_time_id := FND_PROFILE.VALUE('CLIENT_TIMEZONE_ID');
1150: OPEN get_name(l_user_time_id);
1151: FETCH get_name into l_user_time_name;
1152: IF (get_name%NOTFOUND) THEN
1150: OPEN get_name(l_user_time_id);
1151: FETCH get_name into l_user_time_name;
1152: IF (get_name%NOTFOUND) THEN
1153: CLOSE get_name;
1154: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1155: return;
1156: END IF;
1157: CLOSE get_name;
1158:
1162: WHEN NO_DATA_FOUND THEN
1163: IF (get_name%ISOPEN) THEN
1164: CLOSE get_name;
1165: END IF;
1166: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1167: END get_User_Timezone;
1168:
1169: -------------------------------------------------------------------------------------------------
1170: -- PROCEDURE
1181: -- converted into system timezone else it will be
1182: -- converted to user timezone .
1183: ---------------------------------------------------------------------------------------------------
1184: PROCEDURE Convert_Timezone(
1185: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1186: x_return_status OUT NOCOPY VARCHAR2,
1187: x_msg_count OUT NOCOPY NUMBER,
1188: x_msg_data OUT NOCOPY VARCHAR2,
1189:
1204: l_to_timezone_id NUMBEr ;
1205: BEGIN
1206:
1207: -- Initialize API return status to success
1208: x_return_status := FND_API.G_RET_STS_SUCCESS;
1209:
1210: get_System_Timezone(
1211: l_return_status,
1212: l_sys_time_id,
1211: l_return_status,
1212: l_sys_time_id,
1213: l_sys_time_name);
1214:
1215: IF (l_return_status = FND_API.G_RET_STS_ERROR OR
1216: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR )
1217: THEN
1218: x_return_status := l_return_status;
1219: RETURN;
1212: l_sys_time_id,
1213: l_sys_time_name);
1214:
1215: IF (l_return_status = FND_API.G_RET_STS_ERROR OR
1216: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR )
1217: THEN
1218: x_return_status := l_return_status;
1219: RETURN;
1220: END IF;
1228: x_user_time_name => l_user_time_name
1229: ) ;
1230: END IF;
1231:
1232: IF (l_return_status = FND_API.G_RET_STS_ERROR OR
1233: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR )
1234: THEN
1235: x_return_status := l_return_status;
1236: RETURN;
1229: ) ;
1230: END IF;
1231:
1232: IF (l_return_status = FND_API.G_RET_STS_ERROR OR
1233: l_return_status = FND_API.G_RET_STS_UNEXP_ERROR )
1234: THEN
1235: x_return_status := l_return_status;
1236: RETURN;
1237: END IF;
1310: -- operator.
1311: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1312: FND_MESSAGE.set_name('OZF', 'OZF_UTIL_NO_WHERE_OPERATOR');
1313: FND_MSG_PUB.add;
1314: RAISE FND_API.g_exc_unexpected_error;
1315: END IF;
1316: ELSIF l_eq_pos > 0 AND l_not_pos = 0 THEN
1317: l_curr_pos := l_eq_pos;
1318: x_col_val_tbl(i).col_op := '=';
1680: IF p_text IS NULL THEN
1681: l_count := FND_MSG_PUB.count_msg;
1682: FOR l_cnt IN 1 .. l_count
1683: LOOP
1684: l_msg := FND_MSG_PUB.get(l_cnt, FND_API.g_false);
1685: FND_FILE.PUT_LINE(FND_FILE.LOG, '(' || l_cnt || ') ' || l_msg);
1686: END LOOP;
1687: ELSE
1688: FND_FILE.PUT_LINE(FND_FILE.LOG, p_text );
1827: AND next_status_code = l_new_status_code;
1828:
1829: BEGIN
1830:
1831: x_return_status := FND_API.g_ret_sts_success;
1832: x_approval_type := NULL;
1833:
1834: l_status_type := get_system_status_type(p_object_type);
1835: l_old_status_code := get_system_status_code(p_old_status_id);
1841:
1842: OPEN c_approval_flag;
1843: FETCH c_approval_flag INTO l_theme_flag, l_budget_flag;
1844: IF c_approval_flag%NOTFOUND THEN
1845: x_return_status := FND_API.g_ret_sts_error;
1846: OZF_Utility_PVT.error_message('OZF_CAMP_BAD_STATUS_CHANGE');
1847: END IF;
1848: CLOSE c_approval_flag;
1849:
1848: CLOSE c_approval_flag;
1849:
1850: IF l_budget_flag = 'Y' THEN
1851: IF AMS_ObjectAttribute_PVT.check_object_attribute(
1852: p_object_type, p_object_id, 'BAPL') = FND_API.g_true
1853: THEN
1854: x_approval_type := 'BUDGET';
1855: END IF;
1856: ELSIF l_theme_flag = 'Y' THEN
1854: x_approval_type := 'BUDGET';
1855: END IF;
1856: ELSIF l_theme_flag = 'Y' THEN
1857: IF AMS_ObjectAttribute_PVT.check_object_attribute(
1858: p_object_type, p_object_id, 'TAPL') = FND_API.g_true
1859: THEN
1860: x_approval_type := 'THEME';
1861: END IF;
1862: END IF;
1934: AND next_status_code = l_new_status_code;
1935:
1936: BEGIN
1937:
1938: x_return_status := FND_API.g_ret_sts_success;
1939: x_approval_type := NULL;
1940:
1941: l_status_type := get_system_status_type(p_object_type);
1942: l_old_status_code := get_system_status_code(p_old_status_id);
1948:
1949: OPEN c_approval_flag;
1950: FETCH c_approval_flag INTO l_theme_flag, l_budget_flag;
1951: IF c_approval_flag%NOTFOUND THEN
1952: x_return_status := FND_API.g_ret_sts_error;
1953: OZF_Utility_PVT.error_message('OZF_CAMP_BAD_STATUS_CHANGE');
1954: END IF;
1955: CLOSE c_approval_flag;
1956:
2039: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2040: fnd_message.set_name('OZF', 'OZF_ORG_ID_NOTFOUND');
2041: fnd_msg_pub.add;
2042: END IF;
2043: RAISE fnd_api.g_exc_error;
2044: END IF;
2045:
2046: OPEN c_get_gl_info(l_org_id);
2047: FETCH c_get_gl_info INTO l_sob, l_to_currency;
2051: fnd_message.set_name('OZF', 'OZF_GL_SOB_NOTFOUND');
2052: fnd_msg_pub.add;
2053: END IF;
2054:
2055: RAISE fnd_api.g_exc_error;
2056: END IF;
2057: CLOSE c_get_gl_info;
2058:
2059: --ER 8399134
2078: ,x_rate => x_rate);
2079: --
2080:
2081: EXCEPTION
2082: WHEN fnd_api.g_exc_error THEN
2083: x_return_status := fnd_api.g_ret_sts_error;
2084: WHEN gl_currency_api.no_rate THEN
2085: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2086: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2079: --
2080:
2081: EXCEPTION
2082: WHEN fnd_api.g_exc_error THEN
2083: x_return_status := fnd_api.g_ret_sts_error;
2084: WHEN gl_currency_api.no_rate THEN
2085: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2086: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2087: fnd_msg_pub.add;
2086: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2087: fnd_msg_pub.add;
2088: END IF;
2089:
2090: x_return_status := fnd_api.g_ret_sts_error;
2091: WHEN gl_currency_api.invalid_currency THEN
2092: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2093: fnd_message.set_name('OZF', 'OZF_INVALID_CURR');
2094: fnd_msg_pub.add;
2093: fnd_message.set_name('OZF', 'OZF_INVALID_CURR');
2094: fnd_msg_pub.add;
2095: END IF;
2096:
2097: x_return_status := fnd_api.g_ret_sts_error;
2098: WHEN OTHERS THEN
2099: RAISE;
2100: x_return_status := fnd_api.g_ret_sts_unexp_error;
2101: END convert_currency;
2096:
2097: x_return_status := fnd_api.g_ret_sts_error;
2098: WHEN OTHERS THEN
2099: RAISE;
2100: x_return_status := fnd_api.g_ret_sts_unexp_error;
2101: END convert_currency;
2102:
2103: ---------------------------------------------------------------------
2104: -- PROCEDURE
2217: AND NVL(org.org_id, -99) = NVL(p_org_id, -99);
2218:
2219: BEGIN
2220: -- Initialize return status.
2221: x_return_status := fnd_api.g_ret_sts_success;
2222:
2223: --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
2224: -- Mumu Pande 09/20/2000 Updated the following
2225: -- Get the currency conversion type from profile option
2234: fnd_message.set_name('OZF', 'OZF_NO_EXCHANGE_TYPE');
2235: fnd_msg_pub.add;
2236: END IF;
2237:
2238: x_return_status := fnd_api.g_ret_sts_error;
2239: RETURN;
2240: ELSE
2241: IF ozf_utility_pvt.check_fk_exists('GL_DAILY_CONVERSION_TYPES',
2242: 'CONVERSION_TYPE'
2239: RETURN;
2240: ELSE
2241: IF ozf_utility_pvt.check_fk_exists('GL_DAILY_CONVERSION_TYPES',
2242: 'CONVERSION_TYPE'
2243: ,l_conversion_type) = fnd_api.g_false
2244: THEN
2245: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2246: fnd_message.set_name('OZF', 'OZF_WRONG_CONVERSION_TYPE');
2247: fnd_msg_pub.add;
2245: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2246: fnd_message.set_name('OZF', 'OZF_WRONG_CONVERSION_TYPE');
2247: fnd_msg_pub.add;
2248: END IF;
2249: x_return_status := fnd_api.g_ret_sts_error;
2250: RETURN;
2251: END IF;
2252: END IF;
2253:
2265: fnd_message.set_name('OZF', 'OZF_ORG_ID_NOTFOUND');
2266: fnd_msg_pub.add;
2267: END IF;
2268:
2269: RAISE fnd_api.g_exc_error;
2270: END IF;
2271:
2272:
2273: END IF;
2285: fnd_message.set_name('OZF', 'OZF_GL_SOB_NOTFOUND');
2286: fnd_msg_pub.add;
2287: END IF;
2288:
2289: RAISE fnd_api.g_exc_error;
2290: END IF;
2291:
2292: CLOSE c_get_gl_info;
2293: -- Call the proper GL API to convert the amount.
2307: x_exchange_rate_type := l_conversion_type;
2308: --
2309:
2310: EXCEPTION
2311: WHEN fnd_api.g_exc_error THEN
2312: x_return_status := fnd_api.g_ret_sts_error;
2313: WHEN gl_currency_api.no_rate THEN
2314: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2315: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2308: --
2309:
2310: EXCEPTION
2311: WHEN fnd_api.g_exc_error THEN
2312: x_return_status := fnd_api.g_ret_sts_error;
2313: WHEN gl_currency_api.no_rate THEN
2314: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2315: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2316: fnd_msg_pub.add;
2315: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2316: fnd_msg_pub.add;
2317: END IF;
2318:
2319: x_return_status := fnd_api.g_ret_sts_error;
2320: WHEN gl_currency_api.invalid_currency THEN
2321: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2322: fnd_message.set_name('OZF', 'OZF_INVALID_CURR');
2323: fnd_msg_pub.add;
2322: fnd_message.set_name('OZF', 'OZF_INVALID_CURR');
2323: fnd_msg_pub.add;
2324: END IF;
2325:
2326: x_return_status := fnd_api.g_ret_sts_error;
2327: WHEN OTHERS THEN
2328: x_return_status := fnd_api.g_ret_sts_unexp_error;
2329:
2330: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2324: END IF;
2325:
2326: x_return_status := fnd_api.g_ret_sts_error;
2327: WHEN OTHERS THEN
2328: x_return_status := fnd_api.g_ret_sts_unexp_error;
2329:
2330: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2331: fnd_msg_pub.add_exc_msg('OZF_UTLITY_PVT', 'Convert_functional_curency');
2332: END IF;
2367: CLOSE c_fund_ledger;
2368:
2369: --07-APR-09 kdass bug 8402334 -- defaulted org_id to NULL for budget
2370: x_org_id := NULL;
2371: x_return_status := fnd_api.g_ret_sts_success;
2372: RETURN;
2373:
2374: EXCEPTION
2375: WHEN OTHERS THEN
2372: RETURN;
2373:
2374: EXCEPTION
2375: WHEN OTHERS THEN
2376: x_return_status := fnd_api.g_ret_sts_unexp_error;
2377:
2378: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2379: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
2380: fnd_message.set_token('ROUTINE', 'OZF_UTLITY_PVT');
2468: IF OZF_DEBUG_HIGH_ON THEN
2469: ozf_utility_pvt.debug_message ('get_object_org_ledger() org_id for fund =' || x_org_id
2470: || ' ledger_id=' || x_ledger_id);
2471: END IF;
2472: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2473: RAISE FND_API.g_exc_unexpected_error;
2474: END IF;
2475: END IF;
2476:
2469: ozf_utility_pvt.debug_message ('get_object_org_ledger() org_id for fund =' || x_org_id
2470: || ' ledger_id=' || x_ledger_id);
2471: END IF;
2472: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2473: RAISE FND_API.g_exc_unexpected_error;
2474: END IF;
2475: END IF;
2476:
2477: ozf_utility_pvt.write_conc_log ('get_object_org_ledger() x_org_id: ' || x_org_id);
2520: ozf_utility_pvt.debug_message ('get_object_org_ledger() final org_id =' || x_org_id
2521: || ' ledger_id=' || x_ledger_id);
2522: END IF;
2523: ozf_utility_pvt.write_conc_log ('get_object_org_ledger() final org_id: ' || x_org_id || ' ledger_id: ' || x_ledger_id);
2524: x_return_status := fnd_api.g_ret_sts_success;
2525:
2526: EXCEPTION
2527: WHEN OTHERS THEN
2528: x_return_status := fnd_api.g_ret_sts_unexp_error;
2524: x_return_status := fnd_api.g_ret_sts_success;
2525:
2526: EXCEPTION
2527: WHEN OTHERS THEN
2528: x_return_status := fnd_api.g_ret_sts_unexp_error;
2529:
2530: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2531: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
2532: fnd_message.set_token('ROUTINE', 'OZF_UTLITY_PVT');
2578: WHERE ledger_id = p_ledger_id;
2579:
2580: BEGIN
2581: -- Initialize return status.
2582: x_return_status := fnd_api.g_ret_sts_success;
2583:
2584: IF x_exchange_rate_type IS NULL OR x_exchange_rate_type=FND_API.G_MISS_CHAR THEN
2585: l_conversion_type := fnd_profile.VALUE(l_conversion_type_profile);
2586: ELSE
2580: BEGIN
2581: -- Initialize return status.
2582: x_return_status := fnd_api.g_ret_sts_success;
2583:
2584: IF x_exchange_rate_type IS NULL OR x_exchange_rate_type=FND_API.G_MISS_CHAR THEN
2585: l_conversion_type := fnd_profile.VALUE(l_conversion_type_profile);
2586: ELSE
2587: l_conversion_type := x_exchange_rate_type;
2588: END IF;
2587: l_conversion_type := x_exchange_rate_type;
2588: END IF;
2589:
2590: --bug 8532055
2591: IF p_conv_date = FND_API.G_MISS_DATE OR p_conv_date IS NULL THEN
2592: l_conv_date := SYSDATE;
2593: ELSE
2594: l_conv_date := p_conv_date;
2595: END IF;
2599: fnd_message.set_name('OZF', 'OZF_NO_EXCHANGE_TYPE');
2600: fnd_msg_pub.add;
2601: END IF;
2602:
2603: x_return_status := fnd_api.g_ret_sts_error;
2604: RETURN;
2605: ELSE
2606: IF ozf_utility_pvt.check_fk_exists('GL_DAILY_CONVERSION_TYPES',
2607: 'CONVERSION_TYPE'
2604: RETURN;
2605: ELSE
2606: IF ozf_utility_pvt.check_fk_exists('GL_DAILY_CONVERSION_TYPES',
2607: 'CONVERSION_TYPE'
2608: ,l_conversion_type) = fnd_api.g_false
2609: THEN
2610: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2611: fnd_message.set_name('OZF', 'OZF_WRONG_CONVERSION_TYPE');
2612: fnd_msg_pub.add;
2610: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2611: fnd_message.set_name('OZF', 'OZF_WRONG_CONVERSION_TYPE');
2612: fnd_msg_pub.add;
2613: END IF;
2614: x_return_status := fnd_api.g_ret_sts_error;
2615: RETURN;
2616: END IF;
2617: END IF;
2618:
2638:
2639: x_exchange_rate_type := l_conversion_type;
2640:
2641: EXCEPTION
2642: WHEN fnd_api.g_exc_error THEN
2643: x_return_status := fnd_api.g_ret_sts_error;
2644: WHEN gl_currency_api.no_rate THEN
2645: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2646: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2639: x_exchange_rate_type := l_conversion_type;
2640:
2641: EXCEPTION
2642: WHEN fnd_api.g_exc_error THEN
2643: x_return_status := fnd_api.g_ret_sts_error;
2644: WHEN gl_currency_api.no_rate THEN
2645: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2646: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2647: fnd_msg_pub.add;
2646: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2647: fnd_msg_pub.add;
2648: END IF;
2649:
2650: x_return_status := fnd_api.g_ret_sts_error;
2651: WHEN gl_currency_api.invalid_currency THEN
2652: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2653: fnd_message.set_name('OZF', 'OZF_INVALID_CURR');
2654: fnd_msg_pub.add;
2653: fnd_message.set_name('OZF', 'OZF_INVALID_CURR');
2654: fnd_msg_pub.add;
2655: END IF;
2656:
2657: x_return_status := fnd_api.g_ret_sts_error;
2658: WHEN OTHERS THEN
2659: x_return_status := fnd_api.g_ret_sts_unexp_error;
2660:
2661: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2655: END IF;
2656:
2657: x_return_status := fnd_api.g_ret_sts_error;
2658: WHEN OTHERS THEN
2659: x_return_status := fnd_api.g_ret_sts_unexp_error;
2660:
2661: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2662: fnd_msg_pub.add_exc_msg('OZF_UTLITY_PVT', 'Convert_functional_curency');
2663: END IF;
2686:
2687: PROCEDURE convert_currency(
2688: p_from_currency IN VARCHAR2
2689: ,p_to_currency IN VARCHAR2
2690: ,p_conv_type IN VARCHAR2 DEFAULT FND_API.G_MISS_CHAR
2691: ,p_conv_rate IN NUMBER DEFAULT FND_API.G_MISS_NUM
2692: ,p_conv_date IN DATE DEFAULT SYSDATE
2693: ,p_from_amount IN NUMBER
2694: ,x_return_status OUT NOCOPY VARCHAR2
2687: PROCEDURE convert_currency(
2688: p_from_currency IN VARCHAR2
2689: ,p_to_currency IN VARCHAR2
2690: ,p_conv_type IN VARCHAR2 DEFAULT FND_API.G_MISS_CHAR
2691: ,p_conv_rate IN NUMBER DEFAULT FND_API.G_MISS_NUM
2692: ,p_conv_date IN DATE DEFAULT SYSDATE
2693: ,p_from_amount IN NUMBER
2694: ,x_return_status OUT NOCOPY VARCHAR2
2695: ,x_to_amount OUT NOCOPY NUMBER
2707: l_conversion_type VARCHAR2(30); -- Curr conversion type; see API doc for details.
2708: l_conv_date DATE;
2709: BEGIN
2710: -- Initialize return status.
2711: x_return_status := fnd_api.g_ret_sts_success;
2712:
2713: -- condition added to pass conversion types
2714: IF p_conv_type = FND_API.G_MISS_CHAR OR p_conv_type IS NULL THEN --Added for bug 7030415
2715: -- Get the currency conversion type from profile option
2710: -- Initialize return status.
2711: x_return_status := fnd_api.g_ret_sts_success;
2712:
2713: -- condition added to pass conversion types
2714: IF p_conv_type = FND_API.G_MISS_CHAR OR p_conv_type IS NULL THEN --Added for bug 7030415
2715: -- Get the currency conversion type from profile option
2716: l_conversion_type := fnd_profile.VALUE(l_conversion_type_profile);
2717: -- Conversion type cannot be null in profile
2718: IF l_conversion_type IS NULL THEN
2719: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2720: fnd_message.set_name('OZF', 'OZF_NO_EXCHANGE_TYPE');
2721: fnd_msg_pub.add;
2722: END IF;
2723: x_return_status := fnd_api.g_ret_sts_error;
2724: RETURN;
2725: END IF;
2726: ELSE
2727: l_conversion_type := p_conv_type;
2727: l_conversion_type := p_conv_type;
2728: END IF;
2729:
2730: --bug 8532055
2731: IF p_conv_date = FND_API.G_MISS_DATE OR p_conv_date IS NULL THEN
2732: l_conv_date := SYSDATE;
2733: ELSE
2734: l_conv_date := p_conv_date;
2735: END IF;
2755: fnd_message.set_name('OZF', 'OZF_NO_RATE');
2756: fnd_msg_pub.add;
2757: END IF;
2758:
2759: x_return_status := fnd_api.g_ret_sts_error;
2760: WHEN gl_currency_api.invalid_currency THEN
2761: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2762: fnd_message.set_name('OZF', 'OZF_INVALID_CURR');
2763: fnd_msg_pub.add;
2762: fnd_message.set_name('OZF', 'OZF_INVALID_CURR');
2763: fnd_msg_pub.add;
2764: END IF;
2765:
2766: x_return_status := fnd_api.g_ret_sts_error;
2767: WHEN OTHERS THEN
2768: x_return_status := fnd_api.g_ret_sts_unexp_error;
2769:
2770: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2764: END IF;
2765:
2766: x_return_status := fnd_api.g_ret_sts_error;
2767: WHEN OTHERS THEN
2768: x_return_status := fnd_api.g_ret_sts_unexp_error;
2769:
2770: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2771: fnd_msg_pub.add_exc_msg('OZF_UTLITY_PVT', 'Convert_curency');
2772: END IF;
2805: l_person_id number;
2806: l_user_id number;
2807: l_category varchar2(30);
2808: BEGIN
2809: x_return_status := FND_API.G_RET_STS_SUCCESS;
2810: OPEN c_resource ;
2811: FETCH c_resource INTO l_person_id , l_user_id, l_category;
2812: IF c_resource%NOTFOUND THEN
2813: CLOSE c_resource ;
2810: OPEN c_resource ;
2811: FETCH c_resource INTO l_person_id , l_user_id, l_category;
2812: IF c_resource%NOTFOUND THEN
2813: CLOSE c_resource ;
2814: x_return_status := FND_API.G_RET_STS_ERROR;
2815: OZF_Utility_PVT.error_message ('OZF_APPR_INVALID_RESOURCE_ID');
2816: return;
2817: END IF;
2818: CLOSE c_resource ;
2824: p_name => x_role_name,
2825: p_display_name => x_role_display_name
2826: );
2827: IF x_role_name is null then
2828: x_return_status := FND_API.G_RET_STS_ERROR;
2829: OZF_Utility_PVT.error_message ('OZF_APPR_INVALID_ROLE');
2830: return;
2831: END IF;
2832: ELSE
2836: p_name => x_role_name,
2837: p_display_name => x_role_display_name
2838: );
2839: IF x_role_name is null then
2840: x_return_status := FND_API.G_RET_STS_ERROR;
2841: OZF_Utility_PVT.error_message ('OZF_APPR_INVALID_ROLE');
2842: return;
2843: END IF;
2844: END IF;
2843: END IF;
2844: END IF;
2845: EXCEPTION
2846: WHEN OTHERS THEN
2847: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2848: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2849: fnd_msg_pub.add_exc_msg('OZF_UTLITY_PVT', 'Get_Resource_Role');
2850: END IF;
2851: RAISE;
2899: l_display_role_name VARCHAR2(240);
2900: l_notif_id NUMBER;
2901:
2902: BEGIN
2903: x_return_status := FND_API.G_RET_STS_SUCCESS;
2904: IF p_send_to_role_name IS NULL THEN
2905: OZF_UTILITY_PVT.get_resource_role
2906: ( p_resource_id => p_send_to_res_id,
2907: x_role_name => l_role_name,
2907: x_role_name => l_role_name,
2908: x_role_display_name => l_display_role_name,
2909: x_return_status => x_return_status
2910: );
2911: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2912: return;
2913: END IF;
2914: END IF;
2915: l_notif_id := WF_NOTIFICATION.Send
2938: -- Check_Status_Change
2939: --
2940: -- PURPOSE
2941: -- Created to check if the status change is valid or not.
2942: -- Returns FND_API.G_TRUE if it is valid status change
2943: -- or will return FND_API.G_FALSE
2944: --
2945: -- HISTORY
2946: -- 09-Jul-2001 ptendulk Create.
2939: --
2940: -- PURPOSE
2941: -- Created to check if the status change is valid or not.
2942: -- Returns FND_API.G_TRUE if it is valid status change
2943: -- or will return FND_API.G_FALSE
2944: --
2945: -- HISTORY
2946: -- 09-Jul-2001 ptendulk Create.
2947: --======================================================================
2965: FETCH c_stat_det INTO l_dummy ;
2966: CLOSE c_stat_det;
2967:
2968: IF l_dummy IS NULL THEN
2969: RETURN FND_API.G_FALSE ;
2970: ELSE
2971: RETURN FND_API.G_TRUE ;
2972: END IF ;
2973: END Check_Status_Change;
2967:
2968: IF l_dummy IS NULL THEN
2969: RETURN FND_API.G_FALSE ;
2970: ELSE
2971: RETURN FND_API.G_TRUE ;
2972: END IF ;
2973: END Check_Status_Change;
2974: --======================================================================
2975: -- FUNCTION
3062:
3063: BEGIN
3064:
3065: If p_association_type_code = 'OZF_DELV' then
3066: x_return_status := FND_API.G_RET_STS_SUCCESS;
3067:
3068: OPEN Cur_Delv(p_associated_object_val1);
3069: FETCH Cur_Delv INTO x_object_name;
3070: CLOSE Cur_Delv;
3073: END IF;
3074: -- here you can add processing for other association type as the else part
3075:
3076: EXCEPTION
3077: WHEN FND_API.G_EXC_ERROR THEN
3078: x_return_status := FND_API.G_RET_STS_ERROR;
3079: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
3080: p_data => x_msg_data);
3081: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3074: -- here you can add processing for other association type as the else part
3075:
3076: EXCEPTION
3077: WHEN FND_API.G_EXC_ERROR THEN
3078: x_return_status := FND_API.G_RET_STS_ERROR;
3079: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
3080: p_data => x_msg_data);
3081: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3082: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3077: WHEN FND_API.G_EXC_ERROR THEN
3078: x_return_status := FND_API.G_RET_STS_ERROR;
3079: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
3080: p_data => x_msg_data);
3081: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3082: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3083: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
3084: p_data => x_msg_data);
3085: WHEN OTHERS THEN
3078: x_return_status := FND_API.G_RET_STS_ERROR;
3079: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
3080: p_data => x_msg_data);
3081: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3082: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3083: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
3084: p_data => x_msg_data);
3085: WHEN OTHERS THEN
3086: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3082: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3083: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
3084: p_data => x_msg_data);
3085: WHEN OTHERS THEN
3086: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3087: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
3088: THEN
3089: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
3090: END IF;
3273: -- FUNCTION
3274: -- Has_Sales_Rep_Role
3275: --
3276: -- PURPOSE
3277: -- This api returns FND_API.g_true if the given user has the "Sales
3278: -- Representative" role. It returns FND_API.g_false otherwise.
3279: --
3280: -- HISTORY
3281: -- 23-Feb-2004 yizhang Create.
3274: -- Has_Sales_Rep_Role
3275: --
3276: -- PURPOSE
3277: -- This api returns FND_API.g_true if the given user has the "Sales
3278: -- Representative" role. It returns FND_API.g_false otherwise.
3279: --
3280: -- HISTORY
3281: -- 23-Feb-2004 yizhang Create.
3282: --======================================================================
3302: OPEN csr_sales_rep(p_resource_id);
3303: FETCH csr_sales_rep INTO l_role_id;
3304: IF csr_sales_rep%NOTFOUND THEN
3305: CLOSE csr_sales_rep;
3306: RETURN FND_API.g_false;
3307: END IF;
3308: CLOSE csr_sales_rep;
3309:
3310: RETURN FND_API.g_true;
3306: RETURN FND_API.g_false;
3307: END IF;
3308: CLOSE csr_sales_rep;
3309:
3310: RETURN FND_API.g_true;
3311: END;
3312:
3313: --======================================================================
3314: -- FUNCTION
3840: END IF;
3841:
3842: EXCEPTION
3843: WHEN error_no_rollback THEN
3844: x_return_status := FND_API.G_RET_STS_ERROR;
3845: FND_MSG_PUB.Count_And_Get (
3846: p_encoded => FND_API.G_FALSE,
3847: p_count => x_msg_count,
3848: p_data => x_msg_data
3842: EXCEPTION
3843: WHEN error_no_rollback THEN
3844: x_return_status := FND_API.G_RET_STS_ERROR;
3845: FND_MSG_PUB.Count_And_Get (
3846: p_encoded => FND_API.G_FALSE,
3847: p_count => x_msg_count,
3848: p_data => x_msg_data
3849: );
3850: WHEN FND_API.g_exc_error THEN
3846: p_encoded => FND_API.G_FALSE,
3847: p_count => x_msg_count,
3848: p_data => x_msg_data
3849: );
3850: WHEN FND_API.g_exc_error THEN
3851: ROLLBACK TO UPDATE_OZF_ACT_BUDGETS;
3852: x_return_status := FND_API.G_RET_STS_ERROR;
3853: FND_MSG_PUB.Count_And_Get (
3854: p_encoded => FND_API.G_FALSE,
3848: p_data => x_msg_data
3849: );
3850: WHEN FND_API.g_exc_error THEN
3851: ROLLBACK TO UPDATE_OZF_ACT_BUDGETS;
3852: x_return_status := FND_API.G_RET_STS_ERROR;
3853: FND_MSG_PUB.Count_And_Get (
3854: p_encoded => FND_API.G_FALSE,
3855: p_count => x_msg_count,
3856: p_data => x_msg_data
3850: WHEN FND_API.g_exc_error THEN
3851: ROLLBACK TO UPDATE_OZF_ACT_BUDGETS;
3852: x_return_status := FND_API.G_RET_STS_ERROR;
3853: FND_MSG_PUB.Count_And_Get (
3854: p_encoded => FND_API.G_FALSE,
3855: p_count => x_msg_count,
3856: p_data => x_msg_data
3857: );
3858: WHEN FND_API.g_exc_unexpected_error THEN
3854: p_encoded => FND_API.G_FALSE,
3855: p_count => x_msg_count,
3856: p_data => x_msg_data
3857: );
3858: WHEN FND_API.g_exc_unexpected_error THEN
3859: ROLLBACK TO UPDATE_OZF_ACT_BUDGETS;
3860: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3861: FND_MSG_PUB.Count_And_Get (
3862: p_encoded => FND_API.G_FALSE,
3856: p_data => x_msg_data
3857: );
3858: WHEN FND_API.g_exc_unexpected_error THEN
3859: ROLLBACK TO UPDATE_OZF_ACT_BUDGETS;
3860: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3861: FND_MSG_PUB.Count_And_Get (
3862: p_encoded => FND_API.G_FALSE,
3863: p_count => x_msg_count,
3864: p_data => x_msg_data
3858: WHEN FND_API.g_exc_unexpected_error THEN
3859: ROLLBACK TO UPDATE_OZF_ACT_BUDGETS;
3860: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3861: FND_MSG_PUB.Count_And_Get (
3862: p_encoded => FND_API.G_FALSE,
3863: p_count => x_msg_count,
3864: p_data => x_msg_data
3865: );
3866: WHEN OTHERS THEN
3864: p_data => x_msg_data
3865: );
3866: WHEN OTHERS THEN
3867: ROLLBACK TO UPDATE_OZF_ACT_BUDGETS;
3868: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3869: IF OZF_UNEXP_ERROR THEN
3870: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3871: END IF;
3872: FND_MSG_PUB.Count_And_Get (
3869: IF OZF_UNEXP_ERROR THEN
3870: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3871: END IF;
3872: FND_MSG_PUB.Count_And_Get (
3873: p_encoded => FND_API.G_FALSE,
3874: p_count => x_msg_count,
3875: p_data => x_msg_data
3876: );
3877:
3902: IS
3903: l_api_name CONSTANT VARCHAR2(30) := 'UPDATE_OZF_FUNDS_ALL_B';
3904: l_api_version_number CONSTANT NUMBER := 1.0;
3905: l_api_version CONSTANT NUMBER := 1.0;
3906: l_return_status VARCHAR2 (1) := fnd_api.g_ret_sts_success;
3907: x_msg_count NUMBER;
3908: x_msg_data VARCHAR2(50);
3909:
3910: G_DEBUG BOOLEAN := FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_debug_high);
4113: END IF;
4114:
4115: ozf_funds_pvt.update_rollup_amount(
4116: p_api_version => l_api_version
4117: ,p_init_msg_list => fnd_api.g_false
4118: ,p_commit => fnd_api.g_false
4119: ,p_validation_level => fnd_api.g_valid_level_full
4120: ,x_return_status => l_return_status
4121: ,x_msg_count => x_msg_count
4114:
4115: ozf_funds_pvt.update_rollup_amount(
4116: p_api_version => l_api_version
4117: ,p_init_msg_list => fnd_api.g_false
4118: ,p_commit => fnd_api.g_false
4119: ,p_validation_level => fnd_api.g_valid_level_full
4120: ,x_return_status => l_return_status
4121: ,x_msg_count => x_msg_count
4122: ,x_msg_data => x_msg_data
4115: ozf_funds_pvt.update_rollup_amount(
4116: p_api_version => l_api_version
4117: ,p_init_msg_list => fnd_api.g_false
4118: ,p_commit => fnd_api.g_false
4119: ,p_validation_level => fnd_api.g_valid_level_full
4120: ,x_return_status => l_return_status
4121: ,x_msg_count => x_msg_count
4122: ,x_msg_data => x_msg_data
4123: ,p_fund_rec => l_fund_rec
4122: ,x_msg_data => x_msg_data
4123: ,p_fund_rec => l_fund_rec
4124: );
4125:
4126: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4127: insrt_flag := 'Y';
4128: GOTO START_INSERTING;
4129: END IF;
4130:
4152: END IF;
4153:
4154: ozf_mc_transactions_pvt.update_mc_transactions(
4155: p_api_version => l_api_version
4156: ,p_init_msg_list => fnd_api.g_false
4157: ,p_commit => fnd_api.g_false
4158: ,p_org_id => l_org_id
4159: ,x_return_status => l_return_status
4160: ,x_msg_count => x_msg_count
4153:
4154: ozf_mc_transactions_pvt.update_mc_transactions(
4155: p_api_version => l_api_version
4156: ,p_init_msg_list => fnd_api.g_false
4157: ,p_commit => fnd_api.g_false
4158: ,p_org_id => l_org_id
4159: ,x_return_status => l_return_status
4160: ,x_msg_count => x_msg_count
4161: ,x_msg_data => x_msg_data
4160: ,x_msg_count => x_msg_count
4161: ,x_msg_data => x_msg_data
4162: ,p_mc_transactions_rec => l_mc_transaction_rec);
4163:
4164: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4165: insrt_flag := 'Y';
4166: GOTO START_INSERTING;
4167: END IF;
4168:
4267: END IF;
4268:
4269: EXCEPTION
4270: WHEN error_no_rollback THEN
4271: x_return_status := FND_API.G_RET_STS_ERROR;
4272: FND_MSG_PUB.Count_And_Get (
4273: p_encoded => FND_API.G_FALSE,
4274: p_count => x_msg_count,
4275: p_data => x_msg_data
4269: EXCEPTION
4270: WHEN error_no_rollback THEN
4271: x_return_status := FND_API.G_RET_STS_ERROR;
4272: FND_MSG_PUB.Count_And_Get (
4273: p_encoded => FND_API.G_FALSE,
4274: p_count => x_msg_count,
4275: p_data => x_msg_data
4276: );
4277: WHEN FND_API.g_exc_error THEN
4273: p_encoded => FND_API.G_FALSE,
4274: p_count => x_msg_count,
4275: p_data => x_msg_data
4276: );
4277: WHEN FND_API.g_exc_error THEN
4278: ROLLBACK TO UPDATE_OZF_FUNDS_ALL_B;
4279: x_return_status := FND_API.G_RET_STS_ERROR;
4280: FND_MSG_PUB.Count_And_Get (
4281: p_encoded => FND_API.G_FALSE,
4275: p_data => x_msg_data
4276: );
4277: WHEN FND_API.g_exc_error THEN
4278: ROLLBACK TO UPDATE_OZF_FUNDS_ALL_B;
4279: x_return_status := FND_API.G_RET_STS_ERROR;
4280: FND_MSG_PUB.Count_And_Get (
4281: p_encoded => FND_API.G_FALSE,
4282: p_count => x_msg_count,
4283: p_data => x_msg_data
4277: WHEN FND_API.g_exc_error THEN
4278: ROLLBACK TO UPDATE_OZF_FUNDS_ALL_B;
4279: x_return_status := FND_API.G_RET_STS_ERROR;
4280: FND_MSG_PUB.Count_And_Get (
4281: p_encoded => FND_API.G_FALSE,
4282: p_count => x_msg_count,
4283: p_data => x_msg_data
4284: );
4285: WHEN FND_API.g_exc_unexpected_error THEN
4281: p_encoded => FND_API.G_FALSE,
4282: p_count => x_msg_count,
4283: p_data => x_msg_data
4284: );
4285: WHEN FND_API.g_exc_unexpected_error THEN
4286: ROLLBACK TO UPDATE_OZF_FUNDS_ALL_B;
4287: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4288: FND_MSG_PUB.Count_And_Get (
4289: p_encoded => FND_API.G_FALSE,
4283: p_data => x_msg_data
4284: );
4285: WHEN FND_API.g_exc_unexpected_error THEN
4286: ROLLBACK TO UPDATE_OZF_FUNDS_ALL_B;
4287: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4288: FND_MSG_PUB.Count_And_Get (
4289: p_encoded => FND_API.G_FALSE,
4290: p_count => x_msg_count,
4291: p_data => x_msg_data
4285: WHEN FND_API.g_exc_unexpected_error THEN
4286: ROLLBACK TO UPDATE_OZF_FUNDS_ALL_B;
4287: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4288: FND_MSG_PUB.Count_And_Get (
4289: p_encoded => FND_API.G_FALSE,
4290: p_count => x_msg_count,
4291: p_data => x_msg_data
4292: );
4293: WHEN OTHERS THEN
4291: p_data => x_msg_data
4292: );
4293: WHEN OTHERS THEN
4294: ROLLBACK TO UPDATE_OZF_FUNDS_ALL_B;
4295: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4296: IF OZF_UNEXP_ERROR THEN
4297: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4298: END IF;
4299: FND_MSG_PUB.Count_And_Get (
4296: IF OZF_UNEXP_ERROR THEN
4297: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4298: END IF;
4299: FND_MSG_PUB.Count_And_Get (
4300: p_encoded => FND_API.G_FALSE,
4301: p_count => x_msg_count,
4302: p_data => x_msg_data
4303: );
4304:
4312: ---------------------------------------------------------------------
4313: FUNCTION convert_currency(
4314: p_from_currency IN VARCHAR2
4315: ,p_to_currency IN VARCHAR2
4316: ,p_conv_type IN VARCHAR2 DEFAULT FND_API.G_MISS_CHAR
4317: ,p_conv_rate IN NUMBER DEFAULT FND_API.G_MISS_NUM
4318: ,p_conv_date IN DATE DEFAULT SYSDATE
4319: ,p_from_amount IN NUMBER
4320: )
4313: FUNCTION convert_currency(
4314: p_from_currency IN VARCHAR2
4315: ,p_to_currency IN VARCHAR2
4316: ,p_conv_type IN VARCHAR2 DEFAULT FND_API.G_MISS_CHAR
4317: ,p_conv_rate IN NUMBER DEFAULT FND_API.G_MISS_NUM
4318: ,p_conv_date IN DATE DEFAULT SYSDATE
4319: ,p_from_amount IN NUMBER
4320: )
4321: RETURN NUMBER
4334: l_conv_amt NUMBER;
4335: BEGIN
4336:
4337: -- condition added to pass conversion types
4338: IF p_conv_type = FND_API.G_MISS_CHAR OR p_conv_type IS NULL THEN --Added for bug 7030415
4339: -- Get the currency conversion type from profile option
4340: l_conversion_type := fnd_profile.VALUE(l_conversion_type_profile);
4341: -- Conversion type cannot be null in profile
4342: ELSE
4343: l_conversion_type := p_conv_type;
4344: END IF;
4345:
4346: --bug 8532055
4347: IF p_conv_date = FND_API.G_MISS_DATE OR p_conv_date IS NULL THEN
4348: l_conv_date := SYSDATE;
4349: ELSE
4350: l_conv_date := p_conv_date;
4351: END IF;