DBA Data[Home] [Help]

APPS.CSF_RESOURCE_PUB dependencies on FND_API

Line 973: l_distance := fnd_api.g_miss_num;

969:
970: IF l_res_position IS NOT NULL AND l_res_position.x <> -9999 AND l_res_position.y <> -9999 THEN
971: l_distance := geo_distance(l_task_lon, l_task_lat, l_res_position.x, l_res_position.y);
972: ELSE
973: l_distance := fnd_api.g_miss_num;
974: END IF;
975:
976: l_res_dist_tbl.EXTEND;
977: l_res_dist_tbl(i) :=

Line 1062: , p_init_msg_list => fnd_api.g_true

1058: END LOOP;
1059:
1060: jtf_calendar_pub.get_resource_shifts(
1061: p_api_version => 1
1062: , p_init_msg_list => fnd_api.g_true
1063: , x_return_status => l_return_status
1064: , x_msg_count => l_msg_count
1065: , x_msg_data => l_msg_data
1066: , p_resource_id => p_res_tbl(i).resource_id

Line 1074: IF l_return_status = fnd_api.g_ret_sts_success OR l_shift_tbl.COUNT > 0 THEN

1070: , x_shift => l_shift_tbl
1071: );
1072:
1073:
1074: IF l_return_status = fnd_api.g_ret_sts_success OR l_shift_tbl.COUNT > 0 THEN
1075: j := j + 1;
1076: l_out_tbl(j) := p_res_tbl(i);
1077: EXIT WHEN j = l_max_resources;
1078: END IF;

Line 1320: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

1316: BEGIN
1317:
1318: debug( fnd_log.level_statement, l_api_name, 'Get Resources To Schedule API Started');
1319:
1320: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1321: RAISE fnd_api.g_exc_unexpected_error;
1322: END IF;
1323:
1324: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1321: RAISE fnd_api.g_exc_unexpected_error;

1317:
1318: debug( fnd_log.level_statement, l_api_name, 'Get Resources To Schedule API Started');
1319:
1320: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1321: RAISE fnd_api.g_exc_unexpected_error;
1322: END IF;
1323:
1324: IF fnd_api.to_boolean(p_init_msg_list) THEN
1325: fnd_msg_pub.initialize;

Line 1324: IF fnd_api.to_boolean(p_init_msg_list) THEN

1320: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1321: RAISE fnd_api.g_exc_unexpected_error;
1322: END IF;
1323:
1324: IF fnd_api.to_boolean(p_init_msg_list) THEN
1325: fnd_msg_pub.initialize;
1326: END IF;
1327:
1328: x_return_status := fnd_api.g_ret_sts_success;

Line 1328: x_return_status := fnd_api.g_ret_sts_success;

1324: IF fnd_api.to_boolean(p_init_msg_list) THEN
1325: fnd_msg_pub.initialize;
1326: END IF;
1327:
1328: x_return_status := fnd_api.g_ret_sts_success;
1329:
1330: IF csf_util_pvt.g_timing_activated THEN
1331: csf_util_pvt.add_timer(105, 'Get resources to schedule (init)', 0, NULL);
1332: END IF;

Line 1385: RAISE fnd_api.g_exc_error;

1381: -- If none of the other Flags are set we have an error situation
1382: IF l_contracts_flag = 'N' AND l_ib_flag = 'N' AND l_territory_flag = 'N' AND NOT l_has_suggested_res THEN
1383: fnd_message.set_name('CSF', 'CSF_NO_TASK_SKILL_RES');
1384: fnd_msg_pub.ADD;
1385: RAISE fnd_api.g_exc_error;
1386: END IF;
1387: END IF;
1388: END IF;
1389:

Line 1486: , p_init_msg_list => fnd_api.g_false

1482: END IF;
1483:
1484: jtf_assign_pub.get_assign_resources(
1485: p_api_version => 1.0
1486: , p_init_msg_list => fnd_api.g_false
1487: , p_commit => fnd_api.g_false
1488: , x_return_status => x_return_status
1489: , x_msg_count => x_msg_count
1490: , x_msg_data => x_msg_data

Line 1487: , p_commit => fnd_api.g_false

1483:
1484: jtf_assign_pub.get_assign_resources(
1485: p_api_version => 1.0
1486: , p_init_msg_list => fnd_api.g_false
1487: , p_commit => fnd_api.g_false
1488: , x_return_status => x_return_status
1489: , x_msg_count => x_msg_count
1490: , x_msg_data => x_msg_data
1491: , p_sr_task_rec => l_sr_task_rec

Line 1508: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

1504: , p_business_process_id => l_business_process_id
1505: , x_assign_resources_tbl => l_contracts_ib_res_tbl
1506: );
1507:
1508: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1509: RAISE fnd_api.g_exc_unexpected_error;
1510: END IF;
1511:
1512: debug( fnd_log.level_statement, l_api_name, 'The Number of Resources found using Contracts/IB:' || l_contracts_ib_res_tbl.COUNT);

Line 1509: RAISE fnd_api.g_exc_unexpected_error;

1505: , x_assign_resources_tbl => l_contracts_ib_res_tbl
1506: );
1507:
1508: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1509: RAISE fnd_api.g_exc_unexpected_error;
1510: END IF;
1511:
1512: debug( fnd_log.level_statement, l_api_name, 'The Number of Resources found using Contracts/IB:' || l_contracts_ib_res_tbl.COUNT);
1513:

Line 1546: , p_init_msg_list => fnd_api.g_false

1542:
1543:
1544: jtf_assign_pub.get_assign_resources(
1545: p_api_version => 1.0
1546: , p_init_msg_list => fnd_api.g_false
1547: , p_commit => fnd_api.g_false
1548: , x_return_status => x_return_status
1549: , x_msg_count => x_msg_count
1550: , x_msg_data => x_msg_data

Line 1547: , p_commit => fnd_api.g_false

1543:
1544: jtf_assign_pub.get_assign_resources(
1545: p_api_version => 1.0
1546: , p_init_msg_list => fnd_api.g_false
1547: , p_commit => fnd_api.g_false
1548: , x_return_status => x_return_status
1549: , x_msg_count => x_msg_count
1550: , x_msg_data => x_msg_data
1551: , p_sr_task_rec => l_sr_task_rec

Line 1568: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

1564: , x_assign_resources_tbl => l_territory_res_tbl
1565: );
1566:
1567:
1568: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1569: RAISE fnd_api.g_exc_unexpected_error;
1570: END IF;
1571:
1572: debug( fnd_log.level_statement, l_api_name, 'The Number of Resources found using Territories:' || l_territory_res_tbl.COUNT);

Line 1569: RAISE fnd_api.g_exc_unexpected_error;

1565: );
1566:
1567:
1568: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
1569: RAISE fnd_api.g_exc_unexpected_error;
1570: END IF;
1571:
1572: debug( fnd_log.level_statement, l_api_name, 'The Number of Resources found using Territories:' || l_territory_res_tbl.COUNT);
1573:

Line 1717: x_return_status := fnd_api.g_ret_sts_error;

1713: csf_util_pvt.add_timer(114, 'reduce sorted resources list', 1, NULL);
1714: END IF;
1715: EXCEPTION
1716: WHEN e_no_res THEN
1717: x_return_status := fnd_api.g_ret_sts_error;
1718: fnd_message.set_name('CSF', get_assign_error_msg(l_stic));
1719: fnd_msg_pub.ADD;
1720: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1721: WHEN fnd_api.g_exc_error THEN

Line 1721: WHEN fnd_api.g_exc_error THEN

1717: x_return_status := fnd_api.g_ret_sts_error;
1718: fnd_message.set_name('CSF', get_assign_error_msg(l_stic));
1719: fnd_msg_pub.ADD;
1720: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1721: WHEN fnd_api.g_exc_error THEN
1722: x_return_status := fnd_api.g_ret_sts_error;
1723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1724: WHEN fnd_api.g_exc_unexpected_error THEN
1725: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1722: x_return_status := fnd_api.g_ret_sts_error;

1718: fnd_message.set_name('CSF', get_assign_error_msg(l_stic));
1719: fnd_msg_pub.ADD;
1720: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1721: WHEN fnd_api.g_exc_error THEN
1722: x_return_status := fnd_api.g_ret_sts_error;
1723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1724: WHEN fnd_api.g_exc_unexpected_error THEN
1725: x_return_status := fnd_api.g_ret_sts_unexp_error;
1726: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 1724: WHEN fnd_api.g_exc_unexpected_error THEN

1720: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1721: WHEN fnd_api.g_exc_error THEN
1722: x_return_status := fnd_api.g_ret_sts_error;
1723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1724: WHEN fnd_api.g_exc_unexpected_error THEN
1725: x_return_status := fnd_api.g_ret_sts_unexp_error;
1726: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1727: WHEN OTHERS THEN
1728: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1725: x_return_status := fnd_api.g_ret_sts_unexp_error;

1721: WHEN fnd_api.g_exc_error THEN
1722: x_return_status := fnd_api.g_ret_sts_error;
1723: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1724: WHEN fnd_api.g_exc_unexpected_error THEN
1725: x_return_status := fnd_api.g_ret_sts_unexp_error;
1726: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1727: WHEN OTHERS THEN
1728: x_return_status := fnd_api.g_ret_sts_unexp_error;
1729: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 1728: x_return_status := fnd_api.g_ret_sts_unexp_error;

1724: WHEN fnd_api.g_exc_unexpected_error THEN
1725: x_return_status := fnd_api.g_ret_sts_unexp_error;
1726: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1727: WHEN OTHERS THEN
1728: x_return_status := fnd_api.g_ret_sts_unexp_error;
1729: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1730: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1731: END IF;
1732: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 1772: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

1768: l_assign_resource_tbl jtf_assign_pub.assignresources_tbl_type;
1769: j PLS_INTEGER;
1770: k PLS_INTEGER;
1771: BEGIN
1772: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1773: RAISE fnd_api.g_exc_unexpected_error;
1774: END IF;
1775:
1776: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1773: RAISE fnd_api.g_exc_unexpected_error;

1769: j PLS_INTEGER;
1770: k PLS_INTEGER;
1771: BEGIN
1772: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1773: RAISE fnd_api.g_exc_unexpected_error;
1774: END IF;
1775:
1776: IF fnd_api.to_boolean(p_init_msg_list) THEN
1777: fnd_msg_pub.initialize;

Line 1776: IF fnd_api.to_boolean(p_init_msg_list) THEN

1772: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1773: RAISE fnd_api.g_exc_unexpected_error;
1774: END IF;
1775:
1776: IF fnd_api.to_boolean(p_init_msg_list) THEN
1777: fnd_msg_pub.initialize;
1778: END IF;
1779:
1780: x_return_status := fnd_api.g_ret_sts_success;

Line 1780: x_return_status := fnd_api.g_ret_sts_success;

1776: IF fnd_api.to_boolean(p_init_msg_list) THEN
1777: fnd_msg_pub.initialize;
1778: END IF;
1779:
1780: x_return_status := fnd_api.g_ret_sts_success;
1781:
1782:
1783:
1784:

Line 1787: , p_init_msg_list => fnd_api.g_false

1783:
1784:
1785: get_resources_to_schedule(
1786: p_api_version => 1
1787: , p_init_msg_list => fnd_api.g_false
1788: , x_return_status => x_return_status
1789: , x_msg_count => x_msg_count
1790: , x_msg_data => x_msg_data
1791: , p_task_id => p_task_id

Line 1819: IF x_return_status = fnd_api.g_ret_sts_success AND l_assign_resource_tbl.COUNT > 0 THEN

1815: --start with an empty table so that previous value are deleted
1816: x_res_tbl.delete;
1817:
1818: -- if qualified resoucres are found, add them to the output list
1819: IF x_return_status = fnd_api.g_ret_sts_success AND l_assign_resource_tbl.COUNT > 0 THEN
1820:
1821: j := l_assign_resource_tbl.FIRST;
1822: WHILE j IS NOT NULL LOOP
1823: x_res_tbl.EXTEND;

Line 1862: WHEN fnd_api.g_exc_error THEN

1858: END IF;
1859:
1860:
1861: EXCEPTION
1862: WHEN fnd_api.g_exc_error THEN
1863: x_return_status := fnd_api.g_ret_sts_error;
1864: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1865: WHEN fnd_api.g_exc_unexpected_error THEN
1866: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1863: x_return_status := fnd_api.g_ret_sts_error;

1859:
1860:
1861: EXCEPTION
1862: WHEN fnd_api.g_exc_error THEN
1863: x_return_status := fnd_api.g_ret_sts_error;
1864: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1865: WHEN fnd_api.g_exc_unexpected_error THEN
1866: x_return_status := fnd_api.g_ret_sts_unexp_error;
1867: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 1865: WHEN fnd_api.g_exc_unexpected_error THEN

1861: EXCEPTION
1862: WHEN fnd_api.g_exc_error THEN
1863: x_return_status := fnd_api.g_ret_sts_error;
1864: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1865: WHEN fnd_api.g_exc_unexpected_error THEN
1866: x_return_status := fnd_api.g_ret_sts_unexp_error;
1867: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1868: WHEN OTHERS THEN
1869: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1866: x_return_status := fnd_api.g_ret_sts_unexp_error;

1862: WHEN fnd_api.g_exc_error THEN
1863: x_return_status := fnd_api.g_ret_sts_error;
1864: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1865: WHEN fnd_api.g_exc_unexpected_error THEN
1866: x_return_status := fnd_api.g_ret_sts_unexp_error;
1867: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1868: WHEN OTHERS THEN
1869: x_return_status := fnd_api.g_ret_sts_unexp_error;
1870: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 1869: x_return_status := fnd_api.g_ret_sts_unexp_error;

1865: WHEN fnd_api.g_exc_unexpected_error THEN
1866: x_return_status := fnd_api.g_ret_sts_unexp_error;
1867: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1868: WHEN OTHERS THEN
1869: x_return_status := fnd_api.g_ret_sts_unexp_error;
1870: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1871: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1872: END IF;
1873: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 1919: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

1915: WHERE r.resource_id = tr.resource_id
1916: AND r.resource_type = tr.resource_type
1917: AND t.terr_id (+) = tr.terr_id;
1918: BEGIN
1919: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1920: RAISE fnd_api.g_exc_unexpected_error;
1921: END IF;
1922:
1923: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 1920: RAISE fnd_api.g_exc_unexpected_error;

1916: AND r.resource_type = tr.resource_type
1917: AND t.terr_id (+) = tr.terr_id;
1918: BEGIN
1919: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1920: RAISE fnd_api.g_exc_unexpected_error;
1921: END IF;
1922:
1923: IF fnd_api.to_boolean(p_init_msg_list) THEN
1924: fnd_msg_pub.initialize;

Line 1923: IF fnd_api.to_boolean(p_init_msg_list) THEN

1919: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
1920: RAISE fnd_api.g_exc_unexpected_error;
1921: END IF;
1922:
1923: IF fnd_api.to_boolean(p_init_msg_list) THEN
1924: fnd_msg_pub.initialize;
1925: END IF;
1926:
1927: x_return_status := fnd_api.g_ret_sts_success;

Line 1927: x_return_status := fnd_api.g_ret_sts_success;

1923: IF fnd_api.to_boolean(p_init_msg_list) THEN
1924: fnd_msg_pub.initialize;
1925: END IF;
1926:
1927: x_return_status := fnd_api.g_ret_sts_success;
1928:
1929: OPEN c_task_info;
1930: FETCH c_task_info INTO l_task_info;
1931: CLOSE c_task_info;

Line 1935: , p_init_msg_list => fnd_api.g_false

1931: CLOSE c_task_info;
1932:
1933: get_resources_to_schedule(
1934: p_api_version => 1
1935: , p_init_msg_list => fnd_api.g_false
1936: , x_return_status => x_return_status
1937: , x_msg_count => x_msg_count
1938: , x_msg_data => x_msg_data
1939: , p_task_id => p_task_id

Line 1965: IF x_return_status = fnd_api.g_ret_sts_success AND l_assign_resource_tbl.COUNT > 0 THEN

1961: --start with an empty table so that previous value are deleted
1962: x_res_tbl.delete;
1963:
1964: -- if qualified resoucres are found, add them to the output list
1965: IF x_return_status = fnd_api.g_ret_sts_success AND l_assign_resource_tbl.COUNT > 0 THEN
1966:
1967: j := l_assign_resource_tbl.FIRST;
1968: WHILE j IS NOT NULL LOOP
1969: x_res_tbl.EXTEND;

Line 2014: WHEN fnd_api.g_exc_error THEN

2010: x_res_tbl(v_resource_info.resource_index).terr_name := v_resource_info.terr_name;
2011: END LOOP;
2012: END IF;
2013: EXCEPTION
2014: WHEN fnd_api.g_exc_error THEN
2015: x_return_status := fnd_api.g_ret_sts_error;
2016: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2017: WHEN fnd_api.g_exc_unexpected_error THEN
2018: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2015: x_return_status := fnd_api.g_ret_sts_error;

2011: END LOOP;
2012: END IF;
2013: EXCEPTION
2014: WHEN fnd_api.g_exc_error THEN
2015: x_return_status := fnd_api.g_ret_sts_error;
2016: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2017: WHEN fnd_api.g_exc_unexpected_error THEN
2018: x_return_status := fnd_api.g_ret_sts_unexp_error;
2019: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 2017: WHEN fnd_api.g_exc_unexpected_error THEN

2013: EXCEPTION
2014: WHEN fnd_api.g_exc_error THEN
2015: x_return_status := fnd_api.g_ret_sts_error;
2016: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2017: WHEN fnd_api.g_exc_unexpected_error THEN
2018: x_return_status := fnd_api.g_ret_sts_unexp_error;
2019: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2020: WHEN OTHERS THEN
2021: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2018: x_return_status := fnd_api.g_ret_sts_unexp_error;

2014: WHEN fnd_api.g_exc_error THEN
2015: x_return_status := fnd_api.g_ret_sts_error;
2016: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2017: WHEN fnd_api.g_exc_unexpected_error THEN
2018: x_return_status := fnd_api.g_ret_sts_unexp_error;
2019: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2020: WHEN OTHERS THEN
2021: x_return_status := fnd_api.g_ret_sts_unexp_error;
2022: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 2021: x_return_status := fnd_api.g_ret_sts_unexp_error;

2017: WHEN fnd_api.g_exc_unexpected_error THEN
2018: x_return_status := fnd_api.g_ret_sts_unexp_error;
2019: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2020: WHEN OTHERS THEN
2021: x_return_status := fnd_api.g_ret_sts_unexp_error;
2022: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2023: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2024: END IF;
2025: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 2044: , p_init_msg_list => fnd_api.g_true

2040: l_res_tbl csf_resource_tbl;
2041: BEGIN
2042: get_resources_to_schedule(
2043: p_api_version => 1.0
2044: , p_init_msg_list => fnd_api.g_true
2045: , x_return_status => l_return_status
2046: , x_msg_count => l_msg_count
2047: , x_msg_data => l_msg_data
2048: , p_task_id => p_task_id

Line 2249: IF l_return_status <> fnd_api.g_ret_sts_success THEN

2245: , p_res_shift_add => g_res_add_prof
2246: , x_address_rec => l_res_cache_info.address
2247: );
2248:
2249: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2250: RETURN NULL;
2251: END IF;
2252:
2253: l_found := FALSE;

Line 2366: * 'T' (FND_API.G_TRUE) to make it return the other way round.

2362: * or vice versa.
2363: *
2364: * By default, the given date is assumed to be in Resource Timezone and the
2365: * date returned is Server Timezone. Set p_server_to_resource parameter as
2366: * 'T' (FND_API.G_TRUE) to make it return the other way round.
2367: *
2368: * Note that the API doesnt support RS_TEAM or RS_GROUP resources.
2369: *
2370: * @param p_api_version API Version (1.0)

Line 2403: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, 'CSF_TASKS_PUB') THEN

2399: WHERE resource_id = p_resource_id
2400: AND p_resource_type NOT IN('RS_GROUP', 'RS_TEAM');
2401: BEGIN
2402: -- Standard call to check for call compatibility
2403: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, 'CSF_TASKS_PUB') THEN
2404: RAISE fnd_api.g_exc_unexpected_error;
2405: END IF;
2406:
2407: -- Initialize message list if p_init_msg_list is set to TRUE

Line 2404: RAISE fnd_api.g_exc_unexpected_error;

2400: AND p_resource_type NOT IN('RS_GROUP', 'RS_TEAM');
2401: BEGIN
2402: -- Standard call to check for call compatibility
2403: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, 'CSF_TASKS_PUB') THEN
2404: RAISE fnd_api.g_exc_unexpected_error;
2405: END IF;
2406:
2407: -- Initialize message list if p_init_msg_list is set to TRUE
2408: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 2408: IF fnd_api.to_boolean(p_init_msg_list) THEN

2404: RAISE fnd_api.g_exc_unexpected_error;
2405: END IF;
2406:
2407: -- Initialize message list if p_init_msg_list is set to TRUE
2408: IF fnd_api.to_boolean(p_init_msg_list) THEN
2409: fnd_msg_pub.initialize;
2410: END IF;
2411:
2412: -- Initialize API return status to success

Line 2413: x_return_status := fnd_api.g_ret_sts_success;

2409: fnd_msg_pub.initialize;
2410: END IF;
2411:
2412: -- Initialize API return status to success
2413: x_return_status := fnd_api.g_ret_sts_success;
2414:
2415: -- Start actual processing
2416: fnd_profile.get('SERVER_TIMEZONE_ID', l_dest_tz_id);
2417:

Line 2423: IF fnd_api.to_boolean(p_server_to_resource) THEN

2419: FETCH c_resource INTO l_source_tz_id;
2420: CLOSE c_resource;
2421:
2422: -- Reverse conversion when requested
2423: IF fnd_api.to_boolean(p_server_to_resource) THEN
2424: l_temp_tz_id := l_source_tz_id;
2425: l_source_tz_id := l_dest_tz_id;
2426: l_dest_tz_id := l_source_tz_id;
2427: END IF;

Line 2433: , p_init_msg_list => fnd_api.g_false

2429: -- Only try conversion when source and destination timezones are found
2430: IF l_source_tz_id IS NOT NULL AND l_dest_tz_id IS NOT NULL THEN
2431: hz_timezone_pub.get_time(
2432: p_api_version => 1.0
2433: , p_init_msg_list => fnd_api.g_false
2434: , p_source_tz_id => l_source_tz_id
2435: , p_dest_tz_id => l_dest_tz_id
2436: , p_source_day_time => x_datetime
2437: , x_dest_day_time => x_datetime

Line 2445: WHEN fnd_api.g_exc_error THEN

2441: );
2442: END IF;
2443:
2444: EXCEPTION
2445: WHEN fnd_api.g_exc_error THEN
2446: x_return_status := fnd_api.g_ret_sts_error;
2447: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2448: WHEN fnd_api.g_exc_unexpected_error THEN
2449: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2446: x_return_status := fnd_api.g_ret_sts_error;

2442: END IF;
2443:
2444: EXCEPTION
2445: WHEN fnd_api.g_exc_error THEN
2446: x_return_status := fnd_api.g_ret_sts_error;
2447: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2448: WHEN fnd_api.g_exc_unexpected_error THEN
2449: x_return_status := fnd_api.g_ret_sts_unexp_error;
2450: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 2448: WHEN fnd_api.g_exc_unexpected_error THEN

2444: EXCEPTION
2445: WHEN fnd_api.g_exc_error THEN
2446: x_return_status := fnd_api.g_ret_sts_error;
2447: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2448: WHEN fnd_api.g_exc_unexpected_error THEN
2449: x_return_status := fnd_api.g_ret_sts_unexp_error;
2450: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2451: WHEN OTHERS THEN
2452: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2449: x_return_status := fnd_api.g_ret_sts_unexp_error;

2445: WHEN fnd_api.g_exc_error THEN
2446: x_return_status := fnd_api.g_ret_sts_error;
2447: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2448: WHEN fnd_api.g_exc_unexpected_error THEN
2449: x_return_status := fnd_api.g_ret_sts_unexp_error;
2450: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2451: WHEN OTHERS THEN
2452: x_return_status := fnd_api.g_ret_sts_unexp_error;
2453: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 2452: x_return_status := fnd_api.g_ret_sts_unexp_error;

2448: WHEN fnd_api.g_exc_unexpected_error THEN
2449: x_return_status := fnd_api.g_ret_sts_unexp_error;
2450: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2451: WHEN OTHERS THEN
2452: x_return_status := fnd_api.g_ret_sts_unexp_error;
2453: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2454: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2455: END IF;
2456: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 2525: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

2521: i PLS_INTEGER; -- Iterator for JTF's Shift Table
2522: j PLS_INTEGER; -- Iterator for CSF's Shift Table
2523:
2524: BEGIN
2525: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2526: RAISE fnd_api.g_exc_unexpected_error;
2527: END IF;
2528:
2529: IF fnd_api.to_boolean(p_init_msg_list) THEN

Line 2526: RAISE fnd_api.g_exc_unexpected_error;

2522: j PLS_INTEGER; -- Iterator for CSF's Shift Table
2523:
2524: BEGIN
2525: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2526: RAISE fnd_api.g_exc_unexpected_error;
2527: END IF;
2528:
2529: IF fnd_api.to_boolean(p_init_msg_list) THEN
2530: fnd_msg_pub.initialize;

Line 2529: IF fnd_api.to_boolean(p_init_msg_list) THEN

2525: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
2526: RAISE fnd_api.g_exc_unexpected_error;
2527: END IF;
2528:
2529: IF fnd_api.to_boolean(p_init_msg_list) THEN
2530: fnd_msg_pub.initialize;
2531: END IF;
2532:
2533: x_return_status := fnd_api.g_ret_sts_success;

Line 2533: x_return_status := fnd_api.g_ret_sts_success;

2529: IF fnd_api.to_boolean(p_init_msg_list) THEN
2530: fnd_msg_pub.initialize;
2531: END IF;
2532:
2533: x_return_status := fnd_api.g_ret_sts_success;
2534:
2535: jtf_calendar_pub.get_resource_shifts(
2536: p_api_version => 1.0
2537: , p_resource_id => p_resource_id

Line 2547: IF x_return_status <> fnd_api.g_ret_sts_success OR l_multiday_shifts.COUNT = 0 THEN

2543: , x_msg_data => x_msg_data
2544: , x_shift => l_multiday_shifts
2545: );
2546:
2547: IF x_return_status <> fnd_api.g_ret_sts_success OR l_multiday_shifts.COUNT = 0 THEN
2548: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
2549: RAISE fnd_api.g_exc_unexpected_error;
2550: END IF;
2551: RAISE fnd_api.g_exc_error;

Line 2548: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

2544: , x_shift => l_multiday_shifts
2545: );
2546:
2547: IF x_return_status <> fnd_api.g_ret_sts_success OR l_multiday_shifts.COUNT = 0 THEN
2548: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
2549: RAISE fnd_api.g_exc_unexpected_error;
2550: END IF;
2551: RAISE fnd_api.g_exc_error;
2552: END IF;

Line 2549: RAISE fnd_api.g_exc_unexpected_error;

2545: );
2546:
2547: IF x_return_status <> fnd_api.g_ret_sts_success OR l_multiday_shifts.COUNT = 0 THEN
2548: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
2549: RAISE fnd_api.g_exc_unexpected_error;
2550: END IF;
2551: RAISE fnd_api.g_exc_error;
2552: END IF;
2553:

Line 2551: RAISE fnd_api.g_exc_error;

2547: IF x_return_status <> fnd_api.g_ret_sts_success OR l_multiday_shifts.COUNT = 0 THEN
2548: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
2549: RAISE fnd_api.g_exc_unexpected_error;
2550: END IF;
2551: RAISE fnd_api.g_exc_error;
2552: END IF;
2553:
2554: i := l_multiday_shifts.FIRST;
2555: j := 0;

Line 2587: WHEN fnd_api.g_exc_error THEN

2583: i := l_multiday_shifts.NEXT(i);
2584: END LOOP;
2585:
2586: EXCEPTION
2587: WHEN fnd_api.g_exc_error THEN
2588: x_return_status := fnd_api.g_ret_sts_error;
2589: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2590: WHEN fnd_api.g_exc_unexpected_error THEN
2591: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2588: x_return_status := fnd_api.g_ret_sts_error;

2584: END LOOP;
2585:
2586: EXCEPTION
2587: WHEN fnd_api.g_exc_error THEN
2588: x_return_status := fnd_api.g_ret_sts_error;
2589: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2590: WHEN fnd_api.g_exc_unexpected_error THEN
2591: x_return_status := fnd_api.g_ret_sts_unexp_error;
2592: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 2590: WHEN fnd_api.g_exc_unexpected_error THEN

2586: EXCEPTION
2587: WHEN fnd_api.g_exc_error THEN
2588: x_return_status := fnd_api.g_ret_sts_error;
2589: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2590: WHEN fnd_api.g_exc_unexpected_error THEN
2591: x_return_status := fnd_api.g_ret_sts_unexp_error;
2592: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2593: WHEN OTHERS THEN
2594: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2591: x_return_status := fnd_api.g_ret_sts_unexp_error;

2587: WHEN fnd_api.g_exc_error THEN
2588: x_return_status := fnd_api.g_ret_sts_error;
2589: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2590: WHEN fnd_api.g_exc_unexpected_error THEN
2591: x_return_status := fnd_api.g_ret_sts_unexp_error;
2592: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2593: WHEN OTHERS THEN
2594: x_return_status := fnd_api.g_ret_sts_unexp_error;
2595: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 2594: x_return_status := fnd_api.g_ret_sts_unexp_error;

2590: WHEN fnd_api.g_exc_unexpected_error THEN
2591: x_return_status := fnd_api.g_ret_sts_unexp_error;
2592: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2593: WHEN OTHERS THEN
2594: x_return_status := fnd_api.g_ret_sts_unexp_error;
2595: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2596: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
2597: END IF;
2598: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);

Line 2639: x_return_status := fnd_api.g_ret_sts_success;

2635: WHERE a.resource_id = p_resource_id
2636: AND a.resource_type = p_resource_type
2637: AND NVL(p_date, SYSDATE) BETWEEN a.start_date_active AND NVL(a.end_date_active, SYSDATE + 1);
2638: BEGIN
2639: x_return_status := fnd_api.g_ret_sts_success;
2640:
2641: OPEN c_device_res_map_exists;
2642: FETCH c_device_res_map_exists INTO l_mapping_count;
2643: CLOSE c_device_res_map_exists;

Line 2720: x_return_status := fnd_api.g_ret_sts_unexp_error;

2716: );
2717: END IF;
2718: EXCEPTION
2719: WHEN OTHERS THEN
2720: x_return_status := fnd_api.g_ret_sts_unexp_error;
2721: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2722: fnd_msg_pub.add_exc_msg(g_pkg_name, 'GET_LOCATION');
2723: END IF;
2724: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);