DBA Data[Home] [Help]

APPS.OZF_QP_QUAL_PVT dependencies on FND_API

Line 94: IF aso_party_id IS NULL OR aso_party_id = FND_API.g_miss_num THEN

90: AND r1.subject_id=p_party_id;
91:
92: BEGIN
93:
94: IF aso_party_id IS NULL OR aso_party_id = FND_API.g_miss_num THEN
95: OPEN cur_get_party_id(om_sold_to_org);
96: FETCH cur_get_party_id into p_party_id;
97: CLOSE cur_get_party_id;
98: ELSE

Line 171: IF aso_party_id IS NULL OR aso_party_id = FND_API.g_miss_num THEN

167: BEGIN
168: g_bg_tbl.delete;
169: g_total := 1;
170:
171: IF aso_party_id IS NULL OR aso_party_id = FND_API.g_miss_num THEN
172: OPEN cur_get_party_id(om_sold_to_org);
173: FETCH cur_get_party_id into p_party_id;
174: CLOSE cur_get_party_id;
175: ELSE

Line 236: IF aso_party_id IS NULL OR aso_party_id = FND_API.g_miss_num THEN

232: BEGIN
233: g_bg_tbl.DELETE;
234: g_total := 1;
235:
236: IF aso_party_id IS NULL OR aso_party_id = FND_API.g_miss_num THEN
237: IF om_sold_to_org IS NULL OR om_sold_to_org = FND_API.g_miss_num THEN
238: p_party_id := ic_party_id;
239: ELSE
240: OPEN cur_get_party_id(om_sold_to_org);

Line 237: IF om_sold_to_org IS NULL OR om_sold_to_org = FND_API.g_miss_num THEN

233: g_bg_tbl.DELETE;
234: g_total := 1;
235:
236: IF aso_party_id IS NULL OR aso_party_id = FND_API.g_miss_num THEN
237: IF om_sold_to_org IS NULL OR om_sold_to_org = FND_API.g_miss_num THEN
238: p_party_id := ic_party_id;
239: ELSE
240: OPEN cur_get_party_id(om_sold_to_org);
241: FETCH cur_get_party_id into p_party_id;

Line 302: IF aso_party_id = FND_API.g_miss_num THEN

298: l_total NUMBER := 1 ;
299:
300: BEGIN
301:
302: IF aso_party_id = FND_API.g_miss_num THEN
303: OPEN cur_get_party_id(om_sold_to_org);
304: FETCH cur_get_party_id into p_party_id;
305: CLOSE cur_get_party_id;
306: ELSE

Line 352: IF aso_party_id = FND_API.g_miss_num THEN

348: l_total NUMBER := 1 ;
349:
350: BEGIN
351:
352: IF aso_party_id = FND_API.g_miss_num THEN
353: OPEN cur_get_party_id(om_sold_to_org);
354: FETCH cur_get_party_id into p_party_id;
355: CLOSE cur_get_party_id;
356: ELSE

Line 430: l_return_status := Fnd_Api.g_ret_sts_success;

426:
427: BEGIN
428: -- initializing
429: --apps.FND_MSG_PUB.initialize;
430: l_return_status := Fnd_Api.g_ret_sts_success;
431:
432: -- territory rec
433: l_trans_rec.trans_object_id := JTF_TERR_NUMBER_LIST(null);
434: l_trans_rec.trans_detail_object_id := JTF_TERR_NUMBER_LIST(null);

Line 648: IF p_party_id = Fnd_Api.g_miss_num

644: CLOSE cur_is_terr_setup;
645:
646: IF l_count > 0 THEN
647:
648: IF p_party_id = Fnd_Api.g_miss_num
649: OR p_party_id IS NULL THEN
650: OPEN cur_get_party_id(p_sold_to_org);
651: FETCH cur_get_party_id INTO l_party_id;
652: CLOSE cur_get_party_id;

Line 670: p_init_msg_list => FND_API.G_TRUE,

666: oe_debug_pub.add('Trade MGR: before calling get_winners: party_id ' || l_trans_rec.SQUAL_NUM01(1));
667:
668: JTF_TERR_ASSIGN_PUB.get_winners
669: ( p_api_version_number => l_api_version,
670: p_init_msg_list => FND_API.G_TRUE,
671: p_use_type => 'RESOURCE',
672: p_source_id => -1003,
673: p_trans_id => -1007,
674: p_trans_rec => l_trans_rec,

Line 675: p_resource_type => FND_API.G_MISS_CHAR,

671: p_use_type => 'RESOURCE',
672: p_source_id => -1003,
673: p_trans_id => -1007,
674: p_trans_rec => l_trans_rec,
675: p_resource_type => FND_API.G_MISS_CHAR,
676: p_role => FND_API.G_MISS_CHAR,
677: p_top_level_terr_id => FND_API.G_MISS_NUM,
678: p_num_winners => FND_API.G_MISS_NUM,
679: x_return_status => l_return_status,

Line 676: p_role => FND_API.G_MISS_CHAR,

672: p_source_id => -1003,
673: p_trans_id => -1007,
674: p_trans_rec => l_trans_rec,
675: p_resource_type => FND_API.G_MISS_CHAR,
676: p_role => FND_API.G_MISS_CHAR,
677: p_top_level_terr_id => FND_API.G_MISS_NUM,
678: p_num_winners => FND_API.G_MISS_NUM,
679: x_return_status => l_return_status,
680: x_msg_count => l_msg_count,

Line 677: p_top_level_terr_id => FND_API.G_MISS_NUM,

673: p_trans_id => -1007,
674: p_trans_rec => l_trans_rec,
675: p_resource_type => FND_API.G_MISS_CHAR,
676: p_role => FND_API.G_MISS_CHAR,
677: p_top_level_terr_id => FND_API.G_MISS_NUM,
678: p_num_winners => FND_API.G_MISS_NUM,
679: x_return_status => l_return_status,
680: x_msg_count => l_msg_count,
681: x_msg_data => l_msg_data,

Line 678: p_num_winners => FND_API.G_MISS_NUM,

674: p_trans_rec => l_trans_rec,
675: p_resource_type => FND_API.G_MISS_CHAR,
676: p_role => FND_API.G_MISS_CHAR,
677: p_top_level_terr_id => FND_API.G_MISS_NUM,
678: p_num_winners => FND_API.G_MISS_NUM,
679: x_return_status => l_return_status,
680: x_msg_count => l_msg_count,
681: x_msg_data => l_msg_data,
682: x_winners_rec => l_winner_rec

Line 688: IF l_return_status = Fnd_Api.g_ret_sts_success THEN

684: oe_debug_pub.add('Trade MGR: after calling get_winners: status ' || l_return_status);
685: oe_debug_pub.add('Trade MGR: terr count ' || l_winner_rec.terr_id.COUNT);
686: END IF;
687:
688: IF l_return_status = Fnd_Api.g_ret_sts_success THEN
689: FOR i IN NVL(l_winner_rec.terr_id.FIRST, 1)..NVL(l_winner_rec.terr_id.LAST, 0) LOOP
690: l_multirecord(i) := l_winner_rec.terr_id(i);
691: oe_debug_pub.add('Trade MGR: terr_id(' || i || ') ' || l_multirecord(i));
692: END LOOP;

Line 788: l_return_status := Fnd_Api.g_ret_sts_success;

784: l_count NUMBER;
785: BEGIN
786: -- initializing
787: --apps.FND_MSG_PUB.initialize;
788: l_return_status := Fnd_Api.g_ret_sts_success;
789:
790: -- territory rec
791: l_trx_rec.trans_object_id := JTF_TERR_NUMBER_LIST(null);
792: l_trx_rec.trans_detail_object_id := JTF_TERR_NUMBER_LIST(null);

Line 1006: IF p_party_id = Fnd_Api.g_miss_num

1002: CLOSE cur_is_terr_setup;
1003:
1004: IF l_count > 0 THEN
1005:
1006: IF p_party_id = Fnd_Api.g_miss_num
1007: OR p_party_id IS NULL THEN
1008: OPEN cur_get_party_id(p_sold_to_org);
1009: FETCH cur_get_party_id INTO l_party_id;
1010: CLOSE cur_get_party_id;

Line 1031: IF p_bill_to_org IS NOT NULL AND p_bill_to_org <> fnd_api.g_miss_num THEN

1027: OPEN c_cust_profile(p_sold_to_org, p_ship_to_org, p_bill_to_org);
1028: FETCH c_cust_profile INTO l_trx_rec.squal_num15(1);
1029: CLOSE c_cust_profile;
1030: /*
1031: IF p_bill_to_org IS NOT NULL AND p_bill_to_org <> fnd_api.g_miss_num THEN
1032: l_index := l_index + 1;
1033: l_trx_rec.squal_char17.EXTEND;
1034: OPEN c_site_use_code(p_bill_to_org);
1035: FETCH c_site_use_code INTO l_trx_rec.squal_char17(l_index);

Line 1039: IF p_ship_to_org IS NOT NULL AND p_ship_to_org <> fnd_api.g_miss_num THEN

1035: FETCH c_site_use_code INTO l_trx_rec.squal_char17(l_index);
1036: CLOSE c_site_use_code;
1037: END IF;
1038:
1039: IF p_ship_to_org IS NOT NULL AND p_ship_to_org <> fnd_api.g_miss_num THEN
1040: l_index := l_index + 1;
1041: l_trx_rec.squal_char17.EXTEND;
1042: OPEN c_site_use_code(p_ship_to_org);
1043: FETCH c_site_use_code INTO l_trx_rec.squal_char17(l_index);

Line 1049: p_init_msg_list => FND_API.G_TRUE,

1045: END IF;
1046: */
1047: JTF_TERR_ASSIGN_PUB.get_winners
1048: ( p_api_version_number => l_api_version,
1049: p_init_msg_list => FND_API.G_TRUE,
1050: p_use_type => 'RESOURCE',
1051: p_source_id => -1003,
1052: p_trans_id => -1007,
1053: p_trans_rec => l_trx_rec,

Line 1054: p_resource_type => FND_API.G_MISS_CHAR,

1050: p_use_type => 'RESOURCE',
1051: p_source_id => -1003,
1052: p_trans_id => -1007,
1053: p_trans_rec => l_trx_rec,
1054: p_resource_type => FND_API.G_MISS_CHAR,
1055: p_role => FND_API.G_MISS_CHAR,
1056: p_top_level_terr_id => FND_API.G_MISS_NUM,
1057: p_num_winners => FND_API.G_MISS_NUM,
1058: x_return_status => l_return_status,

Line 1055: p_role => FND_API.G_MISS_CHAR,

1051: p_source_id => -1003,
1052: p_trans_id => -1007,
1053: p_trans_rec => l_trx_rec,
1054: p_resource_type => FND_API.G_MISS_CHAR,
1055: p_role => FND_API.G_MISS_CHAR,
1056: p_top_level_terr_id => FND_API.G_MISS_NUM,
1057: p_num_winners => FND_API.G_MISS_NUM,
1058: x_return_status => l_return_status,
1059: x_msg_count => l_msg_count,

Line 1056: p_top_level_terr_id => FND_API.G_MISS_NUM,

1052: p_trans_id => -1007,
1053: p_trans_rec => l_trx_rec,
1054: p_resource_type => FND_API.G_MISS_CHAR,
1055: p_role => FND_API.G_MISS_CHAR,
1056: p_top_level_terr_id => FND_API.G_MISS_NUM,
1057: p_num_winners => FND_API.G_MISS_NUM,
1058: x_return_status => l_return_status,
1059: x_msg_count => l_msg_count,
1060: x_msg_data => l_msg_data,

Line 1057: p_num_winners => FND_API.G_MISS_NUM,

1053: p_trans_rec => l_trx_rec,
1054: p_resource_type => FND_API.G_MISS_CHAR,
1055: p_role => FND_API.G_MISS_CHAR,
1056: p_top_level_terr_id => FND_API.G_MISS_NUM,
1057: p_num_winners => FND_API.G_MISS_NUM,
1058: x_return_status => l_return_status,
1059: x_msg_count => l_msg_count,
1060: x_msg_data => l_msg_data,
1061: x_winners_rec => l_winner_rec

Line 1065: IF l_return_status = Fnd_Api.g_ret_sts_success THEN

1061: x_winners_rec => l_winner_rec
1062: );
1063: END IF;
1064:
1065: IF l_return_status = Fnd_Api.g_ret_sts_success THEN
1066: FOR i IN 1..l_winner_rec.terr_id.COUNT LOOP
1067: l_multirecord(i) := l_winner_rec.terr_id(i);
1068: END LOOP;
1069: END IF;

Line 1136: l_return_status := Fnd_Api.g_ret_sts_success;

1132:
1133: BEGIN
1134: -- initializing
1135: --apps.FND_MSG_PUB.initialize;
1136: l_return_status := Fnd_Api.g_ret_sts_success;
1137:
1138: -- territory rec
1139: l_trans_rec.trans_object_id := JTF_TERR_NUMBER_LIST(null);
1140: l_trans_rec.trans_detail_object_id := JTF_TERR_NUMBER_LIST(null);

Line 1354: IF p_party_id = Fnd_Api.g_miss_num

1350: CLOSE cur_is_terr_setup;
1351:
1352: IF l_count > 0 THEN
1353:
1354: IF p_party_id = Fnd_Api.g_miss_num
1355: OR p_party_id IS NULL THEN
1356: OPEN cur_get_party_id(p_sold_to_org);
1357: FETCH cur_get_party_id INTO l_party_id;
1358: CLOSE cur_get_party_id;

Line 1375: p_init_msg_list => FND_API.G_TRUE,

1371: oe_debug_pub.add('Trade MGR SA: before calling get_winners: party_id ' || l_trans_rec.SQUAL_NUM01(1));
1372:
1373: JTF_TERR_ASSIGN_PUB.get_winners
1374: ( p_api_version_number => l_api_version,
1375: p_init_msg_list => FND_API.G_TRUE,
1376: p_use_type => 'RESOURCE',
1377: p_source_id => -1001,
1378: p_trans_id => -1002,
1379: p_trans_rec => l_trans_rec,

Line 1380: p_resource_type => FND_API.G_MISS_CHAR,

1376: p_use_type => 'RESOURCE',
1377: p_source_id => -1001,
1378: p_trans_id => -1002,
1379: p_trans_rec => l_trans_rec,
1380: p_resource_type => FND_API.G_MISS_CHAR,
1381: p_role => FND_API.G_MISS_CHAR,
1382: p_top_level_terr_id => FND_API.G_MISS_NUM,
1383: p_num_winners => FND_API.G_MISS_NUM,
1384: x_return_status => l_return_status,

Line 1381: p_role => FND_API.G_MISS_CHAR,

1377: p_source_id => -1001,
1378: p_trans_id => -1002,
1379: p_trans_rec => l_trans_rec,
1380: p_resource_type => FND_API.G_MISS_CHAR,
1381: p_role => FND_API.G_MISS_CHAR,
1382: p_top_level_terr_id => FND_API.G_MISS_NUM,
1383: p_num_winners => FND_API.G_MISS_NUM,
1384: x_return_status => l_return_status,
1385: x_msg_count => l_msg_count,

Line 1382: p_top_level_terr_id => FND_API.G_MISS_NUM,

1378: p_trans_id => -1002,
1379: p_trans_rec => l_trans_rec,
1380: p_resource_type => FND_API.G_MISS_CHAR,
1381: p_role => FND_API.G_MISS_CHAR,
1382: p_top_level_terr_id => FND_API.G_MISS_NUM,
1383: p_num_winners => FND_API.G_MISS_NUM,
1384: x_return_status => l_return_status,
1385: x_msg_count => l_msg_count,
1386: x_msg_data => l_msg_data,

Line 1383: p_num_winners => FND_API.G_MISS_NUM,

1379: p_trans_rec => l_trans_rec,
1380: p_resource_type => FND_API.G_MISS_CHAR,
1381: p_role => FND_API.G_MISS_CHAR,
1382: p_top_level_terr_id => FND_API.G_MISS_NUM,
1383: p_num_winners => FND_API.G_MISS_NUM,
1384: x_return_status => l_return_status,
1385: x_msg_count => l_msg_count,
1386: x_msg_data => l_msg_data,
1387: x_winners_rec => l_winner_rec

Line 1394: IF l_return_status = Fnd_Api.g_ret_sts_success THEN

1390: END IF;
1391: oe_debug_pub.add('Trade MGR SA: after calling get_winners: status ' || l_return_status);
1392: oe_debug_pub.add('Trade MGR SA: terr count ' || l_winner_rec.terr_id.COUNT);
1393:
1394: IF l_return_status = Fnd_Api.g_ret_sts_success THEN
1395: FOR i IN NVL(l_winner_rec.terr_id.FIRST, 1)..NVL(l_winner_rec.terr_id.LAST, 0) LOOP
1396: l_multirecord(i) := l_winner_rec.terr_id(i);
1397: oe_debug_pub.add('Trade MGR SA: terr_id(' || i || ') ' || l_multirecord(i));
1398: END LOOP;

Line 1474: l_return_status := Fnd_Api.g_ret_sts_success;

1470:
1471: BEGIN
1472: -- initializing
1473: --apps.FND_MSG_PUB.initialize;
1474: l_return_status := Fnd_Api.g_ret_sts_success;
1475:
1476: -- territory rec
1477: l_trans_rec.trans_object_id := JTF_TERR_NUMBER_LIST(null);
1478: l_trans_rec.trans_detail_object_id := JTF_TERR_NUMBER_LIST(null);

Line 1692: IF p_party_id = Fnd_Api.g_miss_num

1688: CLOSE cur_is_terr_setup;
1689:
1690: IF l_count > 0 THEN
1691:
1692: IF p_party_id = Fnd_Api.g_miss_num
1693: OR p_party_id IS NULL THEN
1694: OPEN cur_get_party_id(p_sold_to_org);
1695: FETCH cur_get_party_id INTO l_party_id;
1696: CLOSE cur_get_party_id;

Line 1711: p_init_msg_list => FND_API.G_TRUE,

1707: CLOSE c_party_site_id;
1708:
1709: JTF_TERR_ASSIGN_PUB.get_winners
1710: ( p_api_version_number => l_api_version,
1711: p_init_msg_list => FND_API.G_TRUE,
1712: p_use_type => 'RESOURCE',
1713: p_source_id => -1001,
1714: p_trans_id => -1002,
1715: p_trans_rec => l_trans_rec,

Line 1716: p_resource_type => FND_API.G_MISS_CHAR,

1712: p_use_type => 'RESOURCE',
1713: p_source_id => -1001,
1714: p_trans_id => -1002,
1715: p_trans_rec => l_trans_rec,
1716: p_resource_type => FND_API.G_MISS_CHAR,
1717: p_role => FND_API.G_MISS_CHAR,
1718: p_top_level_terr_id => FND_API.G_MISS_NUM,
1719: p_num_winners => FND_API.G_MISS_NUM,
1720: x_return_status => l_return_status,

Line 1717: p_role => FND_API.G_MISS_CHAR,

1713: p_source_id => -1001,
1714: p_trans_id => -1002,
1715: p_trans_rec => l_trans_rec,
1716: p_resource_type => FND_API.G_MISS_CHAR,
1717: p_role => FND_API.G_MISS_CHAR,
1718: p_top_level_terr_id => FND_API.G_MISS_NUM,
1719: p_num_winners => FND_API.G_MISS_NUM,
1720: x_return_status => l_return_status,
1721: x_msg_count => l_msg_count,

Line 1718: p_top_level_terr_id => FND_API.G_MISS_NUM,

1714: p_trans_id => -1002,
1715: p_trans_rec => l_trans_rec,
1716: p_resource_type => FND_API.G_MISS_CHAR,
1717: p_role => FND_API.G_MISS_CHAR,
1718: p_top_level_terr_id => FND_API.G_MISS_NUM,
1719: p_num_winners => FND_API.G_MISS_NUM,
1720: x_return_status => l_return_status,
1721: x_msg_count => l_msg_count,
1722: x_msg_data => l_msg_data,

Line 1719: p_num_winners => FND_API.G_MISS_NUM,

1715: p_trans_rec => l_trans_rec,
1716: p_resource_type => FND_API.G_MISS_CHAR,
1717: p_role => FND_API.G_MISS_CHAR,
1718: p_top_level_terr_id => FND_API.G_MISS_NUM,
1719: p_num_winners => FND_API.G_MISS_NUM,
1720: x_return_status => l_return_status,
1721: x_msg_count => l_msg_count,
1722: x_msg_data => l_msg_data,
1723: x_winners_rec => l_winner_rec

Line 1728: IF l_return_status = Fnd_Api.g_ret_sts_success THEN

1724: );
1725:
1726: END IF;
1727:
1728: IF l_return_status = Fnd_Api.g_ret_sts_success THEN
1729: FOR i IN 1..l_winner_rec.terr_id.COUNT LOOP
1730: l_multirecord(i) := l_winner_rec.terr_id(i);
1731: END LOOP;
1732: END IF;

Line 1750: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN

1746: l_distributor_acct_id NUMBER;
1747: BEGIN
1748: IF p_resale_line_tbl.COUNT > 0 THEN
1749: l_distributor_acct_id := p_resale_line_tbl(1).sold_from_cust_account_id;
1750: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN
1751: l_sales_method := 'I';
1752: ELSE
1753: l_sales_method := 'D';
1754: END IF;

Line 1792: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN

1788: l_distributor_acct_id NUMBER;
1789: BEGIN
1790: IF p_resale_line_tbl.COUNT > 0 THEN
1791: l_distributor_acct_id := p_resale_line_tbl(1).sold_from_cust_account_id;
1792: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN
1793: l_multirecord := get_lists(fnd_api.g_miss_num, l_distributor_acct_id);
1794: END IF;
1795: END IF;
1796:

Line 1793: l_multirecord := get_lists(fnd_api.g_miss_num, l_distributor_acct_id);

1789: BEGIN
1790: IF p_resale_line_tbl.COUNT > 0 THEN
1791: l_distributor_acct_id := p_resale_line_tbl(1).sold_from_cust_account_id;
1792: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN
1793: l_multirecord := get_lists(fnd_api.g_miss_num, l_distributor_acct_id);
1794: END IF;
1795: END IF;
1796:
1797: RETURN l_multirecord;

Line 1812: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN

1808: l_distributor_acct_id NUMBER;
1809: BEGIN
1810: IF p_resale_line_tbl.COUNT > 0 THEN
1811: l_distributor_acct_id := p_resale_line_tbl(1).sold_from_cust_account_id;
1812: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN
1813: l_multirecord := get_segments(fnd_api.g_miss_num, l_distributor_acct_id);
1814: END IF;
1815: END IF;
1816:

Line 1813: l_multirecord := get_segments(fnd_api.g_miss_num, l_distributor_acct_id);

1809: BEGIN
1810: IF p_resale_line_tbl.COUNT > 0 THEN
1811: l_distributor_acct_id := p_resale_line_tbl(1).sold_from_cust_account_id;
1812: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN
1813: l_multirecord := get_segments(fnd_api.g_miss_num, l_distributor_acct_id);
1814: END IF;
1815: END IF;
1816:
1817: RETURN l_multirecord;

Line 1834: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN

1830: BEGIN
1831: IF p_resale_line_tbl.COUNT > 0 THEN
1832: l_distributor_acct_id := p_resale_line_tbl(1).sold_from_cust_account_id;
1833: l_ship_to_org_id := p_resale_line_tbl(1).sold_from_site_id;
1834: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN
1835: l_multirecord := find_tm_territories(fnd_api.g_miss_num, l_distributor_acct_id, l_ship_to_org_id, fnd_api.g_miss_num);
1836: END IF;
1837: END IF;
1838:

Line 1835: l_multirecord := find_tm_territories(fnd_api.g_miss_num, l_distributor_acct_id, l_ship_to_org_id, fnd_api.g_miss_num);

1831: IF p_resale_line_tbl.COUNT > 0 THEN
1832: l_distributor_acct_id := p_resale_line_tbl(1).sold_from_cust_account_id;
1833: l_ship_to_org_id := p_resale_line_tbl(1).sold_from_site_id;
1834: IF l_distributor_acct_id IS NOT NULL AND l_distributor_acct_id <> fnd_api.g_miss_num THEN
1835: l_multirecord := find_tm_territories(fnd_api.g_miss_num, l_distributor_acct_id, l_ship_to_org_id, fnd_api.g_miss_num);
1836: END IF;
1837: END IF;
1838:
1839: RETURN l_multirecord;

Line 2111: IF ((l_call_costing_api OR l_cost_price IS NULL OR l_cost_price = FND_API.G_MISS_NUM)

2107: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_DEBUG_LOW ) THEN
2108: Fnd_Msg_Pub.Add_Exc_Msg( 'l_inv_org_id', l_inv_org_id);
2109: END IF;
2110:
2111: IF ((l_call_costing_api OR l_cost_price IS NULL OR l_cost_price = FND_API.G_MISS_NUM)
2112: AND (l_inv_org_id IS NOT NULL AND l_inv_org_id <> FND_API.G_MISS_NUM )) THEN
2113: l_cost_price := cst_cost_api.get_item_cost
2114: (p_api_version => 1
2115: ,p_inventory_item_id => l_inventory_item_id

Line 2112: AND (l_inv_org_id IS NOT NULL AND l_inv_org_id <> FND_API.G_MISS_NUM )) THEN

2108: Fnd_Msg_Pub.Add_Exc_Msg( 'l_inv_org_id', l_inv_org_id);
2109: END IF;
2110:
2111: IF ((l_call_costing_api OR l_cost_price IS NULL OR l_cost_price = FND_API.G_MISS_NUM)
2112: AND (l_inv_org_id IS NOT NULL AND l_inv_org_id <> FND_API.G_MISS_NUM )) THEN
2113: l_cost_price := cst_cost_api.get_item_cost
2114: (p_api_version => 1
2115: ,p_inventory_item_id => l_inventory_item_id
2116: ,p_organization_id => l_inv_org_id

Line 2135: IF ((l_primary_uom_code IS NOT NULL AND l_primary_uom_code <> FND_API.G_MISS_CHAR)

2131: END IF;
2132:
2133: l_order_uom_code := l_uom_code;
2134:
2135: IF ((l_primary_uom_code IS NOT NULL AND l_primary_uom_code <> FND_API.G_MISS_CHAR)
2136: AND (l_primary_uom_code <> l_order_uom_code AND l_cost_price is not null
2137: AND l_cost_price <> fnd_api.g_miss_num )) THEN
2138: INV_CONVERT.INV_UM_CONVERSION(From_Unit => l_order_uom_code
2139: ,To_Unit => l_primary_uom_code

Line 2137: AND l_cost_price <> fnd_api.g_miss_num )) THEN

2133: l_order_uom_code := l_uom_code;
2134:
2135: IF ((l_primary_uom_code IS NOT NULL AND l_primary_uom_code <> FND_API.G_MISS_CHAR)
2136: AND (l_primary_uom_code <> l_order_uom_code AND l_cost_price is not null
2137: AND l_cost_price <> fnd_api.g_miss_num )) THEN
2138: INV_CONVERT.INV_UM_CONVERSION(From_Unit => l_order_uom_code
2139: ,To_Unit => l_primary_uom_code
2140: ,Item_ID => l_inventory_item_id
2141: ,Uom_Rate => l_uom_rate);

Line 2161: IF l_cost_price_currency IS NOT NULL AND l_cost_price_currency <> FND_API.G_MISS_CHAR

2157: Fnd_Msg_Pub.Add_Exc_Msg( 'l_cost_price_currency', l_cost_price_currency);
2158: Fnd_Msg_Pub.Add_Exc_Msg( 'l_order_currency', l_order_currency);
2159: END IF;
2160:
2161: IF l_cost_price_currency IS NOT NULL AND l_cost_price_currency <> FND_API.G_MISS_CHAR
2162: AND l_cost_price_currency <> l_order_currency THEN
2163:
2164: /* If cost price currency is not equal to order currency (which is batch currency for resale orders.)
2165: then convert cost_price to order currency. As already explained the exchange_rate_type is

Line 2170: IF l_conversion_type_code IS NULL OR l_conversion_type_code = FND_API.G_MISS_CHAR THEN

2166: derived from TM System Paramters for order's OU.
2167: If conversion rate type is not found then we will raise a warning in debugs*/
2168:
2169:
2170: IF l_conversion_type_code IS NULL OR l_conversion_type_code = FND_API.G_MISS_CHAR THEN
2171: --Conversion type not entered in sales order header, unable to perform cost conversion
2172: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_debug_low) THEN
2173: FND_MESSAGE.set_name('OZF', 'OZF_INS_RESALE_LOG_WRG');
2174: FND_MESSAGE.Set_Token('TEXT','Conversion rate type is not defined for OU.'|| l_organization_id);

Line 2199: IF l_qry_str IS NOT NULL AND l_cost_price IS NOT NULL AND l_cost_price <> fnd_api.g_miss_num THEN

2195:
2196: END IF; --IF l_cost_price_currency <> l_order_currency THEN
2197: END IF;
2198:
2199: IF l_qry_str IS NOT NULL AND l_cost_price IS NOT NULL AND l_cost_price <> fnd_api.g_miss_num THEN
2200: EXECUTE IMMEDIATE l_qry_str USING l_cost_price, p_line_id;
2201: END IF;
2202:
2203: RETURN l_sdr_flag;

Line 2206: WHEN Fnd_Api.G_EXC_ERROR THEN

2202:
2203: RETURN l_sdr_flag;
2204:
2205: EXCEPTION
2206: WHEN Fnd_Api.G_EXC_ERROR THEN
2207: Fnd_Msg_Pub.Count_AND_Get
2208: ( p_count => x_msg_count,
2209: p_data => x_msg_data,
2210: p_encoded => Fnd_Api.G_FALSE

Line 2210: p_encoded => Fnd_Api.G_FALSE

2206: WHEN Fnd_Api.G_EXC_ERROR THEN
2207: Fnd_Msg_Pub.Count_AND_Get
2208: ( p_count => x_msg_count,
2209: p_data => x_msg_data,
2210: p_encoded => Fnd_Api.G_FALSE
2211: );
2212: EXECUTE IMMEDIATE l_qry_str USING -1, p_line_id;
2213: RETURN l_sdr_flag;
2214: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

Line 2214: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

2210: p_encoded => Fnd_Api.G_FALSE
2211: );
2212: EXECUTE IMMEDIATE l_qry_str USING -1, p_line_id;
2213: RETURN l_sdr_flag;
2214: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2215: Fnd_Msg_Pub.Count_AND_Get
2216: ( p_count => x_msg_count,
2217: p_data => x_msg_data,
2218: p_encoded => Fnd_Api.G_FALSE

Line 2218: p_encoded => Fnd_Api.G_FALSE

2214: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2215: Fnd_Msg_Pub.Count_AND_Get
2216: ( p_count => x_msg_count,
2217: p_data => x_msg_data,
2218: p_encoded => Fnd_Api.G_FALSE
2219: );
2220: EXECUTE IMMEDIATE l_qry_str USING -1, p_line_id;
2221: RETURN l_sdr_flag;
2222: WHEN OTHERS THEN

Line 2229: p_encoded => Fnd_Api.G_FALSE

2225: END IF;
2226: Fnd_Msg_Pub.Count_AND_Get
2227: ( p_count => x_msg_count,
2228: p_data => x_msg_data,
2229: p_encoded => Fnd_Api.G_FALSE
2230: );
2231: EXECUTE IMMEDIATE l_qry_str USING -1, p_line_id;
2232: RETURN l_sdr_flag;
2233:

Line 2310: WHEN Fnd_Api.G_EXC_ERROR THEN

2306:
2307: RETURN l_qualified_flag;
2308:
2309: /*EXCEPTION
2310: WHEN Fnd_Api.G_EXC_ERROR THEN
2311: Fnd_Msg_Pub.Count_AND_Get
2312: ( p_count => x_msg_count,
2313: p_data => x_msg_data,
2314: p_encoded => Fnd_Api.G_FALSE

Line 2314: p_encoded => Fnd_Api.G_FALSE

2310: WHEN Fnd_Api.G_EXC_ERROR THEN
2311: Fnd_Msg_Pub.Count_AND_Get
2312: ( p_count => x_msg_count,
2313: p_data => x_msg_data,
2314: p_encoded => Fnd_Api.G_FALSE
2315: );
2316: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2317: Fnd_Msg_Pub.Count_AND_Get
2318: ( p_count => x_msg_count,

Line 2316: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN

2312: ( p_count => x_msg_count,
2313: p_data => x_msg_data,
2314: p_encoded => Fnd_Api.G_FALSE
2315: );
2316: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2317: Fnd_Msg_Pub.Count_AND_Get
2318: ( p_count => x_msg_count,
2319: p_data => x_msg_data,
2320: p_encoded => Fnd_Api.G_FALSE

Line 2320: p_encoded => Fnd_Api.G_FALSE

2316: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2317: Fnd_Msg_Pub.Count_AND_Get
2318: ( p_count => x_msg_count,
2319: p_data => x_msg_data,
2320: p_encoded => Fnd_Api.G_FALSE
2321: );
2322:
2323: WHEN OTHERS THEN
2324: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN

Line 2330: p_encoded => Fnd_Api.G_FALSE

2326: END IF;
2327: Fnd_Msg_Pub.Count_AND_Get
2328: ( p_count => x_msg_count,
2329: p_data => x_msg_data,
2330: p_encoded => Fnd_Api.G_FALSE
2331: );
2332:
2333: RETURN l_qualified_flag;*/
2334: END get_additional_qualifiers;