DBA Data[Home] [Help]

APPS.OKC_OPPORTUNITY_PVT dependencies on OKC_API

Line 30: x_return_status := okc_api.g_ret_sts_success;

26: IF (l_debug = 'Y') THEN
27: okc_debug.Set_Indentation('Create_Opportunity');
28: okc_debug.log('1000: Entering okc_opportunity_pvt.create_opportunity', 2);
29: END IF;
30: x_return_status := okc_api.g_ret_sts_success;
31: --
32: IF (l_debug = 'Y') THEN
33: okc_debug.log('1010: Before is_opp_creation_allowed');
34: END IF;

Line 38: If l_return_status <> okc_api.g_ret_sts_success Then

34: END IF;
35: Is_Opp_Creation_Allowed(p_context,
36: p_contract_id,
37: l_return_status);
38: If l_return_status <> okc_api.g_ret_sts_success Then
39: Raise g_exception_halt_validation;
40: End If;
41: --
42: IF (l_debug = 'Y') THEN

Line 59: If l_return_status <> okc_api.g_ret_sts_success Then

55: p_init_msg_list,
56: l_msg_data,
57: l_msg_count,
58: l_return_status);
59: If l_return_status <> okc_api.g_ret_sts_success Then
60: IF (l_debug = 'Y') THEN
61: okc_debug.log('1030: Opp Header Creation Return Status - ' || l_return_status);
62: END IF;
63: Raise g_exception_halt_validation;

Line 83: If l_return_status <> okc_api.g_ret_sts_success Then

79: l_return_status);
80: IF (l_debug = 'Y') THEN
81: okc_debug.log('1060: After create_opp_lines');
82: END IF;
83: If l_return_status <> okc_api.g_ret_sts_success Then
84: IF (l_debug = 'Y') THEN
85: okc_debug.log('1060: Opp Lines Creation Return Status - ' || l_return_status);
86: END IF;
87: Raise g_exception_halt_validation;

Line 104: okc_api.Set_Message(p_app_name => g_app_name,

100: okc_debug.log('1970: Exiting okc_opportunity_pvt.create_opportunity', 2);
101: okc_debug.Reset_Indentation;
102: END IF;
103: When Others Then
104: okc_api.Set_Message(p_app_name => g_app_name,
105: p_msg_name => g_unexpected_error,
106: p_token1 => g_sqlcode_token,
107: p_token1_value => sqlcode,
108: p_token2 => g_sqlerrm_token,

Line 110: x_return_status := okc_api.g_ret_sts_unexp_error;

106: p_token1 => g_sqlcode_token,
107: p_token1_value => sqlcode,
108: p_token2 => g_sqlerrm_token,
109: p_token2_value => sqlerrm);
110: x_return_status := okc_api.g_ret_sts_unexp_error;
111: IF (l_debug = 'Y') THEN
112: okc_debug.log('1990: Exiting okc_opportunity_pvt.create_opportunity', 2);
113: okc_debug.Reset_Indentation;
114: END IF;

Line 233: x_return_status := okc_api.g_ret_sts_success;

229: IF (l_debug = 'Y') THEN
230: okc_debug.Set_Indentation('Create_Opp_Header');
231: okc_debug.log('3000: Entering okc_opportunity_pvt.create_opp_header', 2);
232: END IF;
233: x_return_status := okc_api.g_ret_sts_success;
234: --
235: IF (l_debug = 'Y') THEN
236: okc_debug.log('3010: Before Get_Opp_Defaults');
237: END IF;

Line 243: If l_return_status <> okc_api.g_ret_sts_success Then

239: p_contract_id,
240: l_win_probability,
241: l_expected_close_days,
242: l_return_status);
243: If l_return_status <> okc_api.g_ret_sts_success Then
244: IF (l_debug = 'Y') THEN
245: okc_debug.log('3019: Get_Opp_Defaults Return Status - ' || l_return_status);
246: END IF;
247: Raise g_exception_halt_validation;

Line 295: IF nvl(fnd_profile.value('AS_OPP_ADDRESS_REQUIRED'), okc_api.g_miss_char) = 'Y' THEN

291: Close c5;
292:
293:
294: --TEMP okc_util.init_trace();
295: IF nvl(fnd_profile.value('AS_OPP_ADDRESS_REQUIRED'), okc_api.g_miss_char) = 'Y' THEN
296:
297: Open c5('STO'); --get the site_use_id of the ship_to_party_site_id
298: Fetch c5 Into c51_rec;
299: IF c5%NOTFOUND OR c51_rec.object1_id1 IS NULL THEN

Line 300: okc_api.Set_Message(p_app_name => g_app_name,

296:
297: Open c5('STO'); --get the site_use_id of the ship_to_party_site_id
298: Fetch c5 Into c51_rec;
299: IF c5%NOTFOUND OR c51_rec.object1_id1 IS NULL THEN
300: okc_api.Set_Message(p_app_name => g_app_name,
301: p_msg_name => 'OKC_OPP_NO_SHIP_ADDRESS'
302: );
303: l_return_status := OKC_API.G_RET_STS_ERROR;
304: raise g_exception_halt_validation;

Line 303: l_return_status := OKC_API.G_RET_STS_ERROR;

299: IF c5%NOTFOUND OR c51_rec.object1_id1 IS NULL THEN
300: okc_api.Set_Message(p_app_name => g_app_name,
301: p_msg_name => 'OKC_OPP_NO_SHIP_ADDRESS'
302: );
303: l_return_status := OKC_API.G_RET_STS_ERROR;
304: raise g_exception_halt_validation;
305: END IF;
306: Open c6(c51_rec.object1_id1,'SHIP_TO'); --get the party_site_id
307: Fetch c6 Into c6_rec;

Line 309: okc_api.Set_Message(p_app_name => g_app_name,

305: END IF;
306: Open c6(c51_rec.object1_id1,'SHIP_TO'); --get the party_site_id
307: Fetch c6 Into c6_rec;
308: IF c6%NOTFOUND OR c6_rec.party_site_id IS NULL THEN
309: okc_api.Set_Message(p_app_name => g_app_name,
310: p_msg_name => 'OKC_OPP_NO_PARTY_SITE_ID',
311: p_token1 => 'SITE_USE_ID',
312: p_token1_value => c51_rec.object1_id1
313: );

Line 314: l_return_status := OKC_API.G_RET_STS_ERROR;

310: p_msg_name => 'OKC_OPP_NO_PARTY_SITE_ID',
311: p_token1 => 'SITE_USE_ID',
312: p_token1_value => c51_rec.object1_id1
313: );
314: l_return_status := OKC_API.G_RET_STS_ERROR;
315: raise g_exception_halt_validation;
316: END IF;
317: l_party_site_id := nvl(to_number(c6_rec.party_site_id), okc_api.g_miss_num);
318: Close c5;

Line 317: l_party_site_id := nvl(to_number(c6_rec.party_site_id), okc_api.g_miss_num);

313: );
314: l_return_status := OKC_API.G_RET_STS_ERROR;
315: raise g_exception_halt_validation;
316: END IF;
317: l_party_site_id := nvl(to_number(c6_rec.party_site_id), okc_api.g_miss_num);
318: Close c5;
319: Close c6;
320:
321: END IF;

Line 354: l_header_rec.win_probability := NVL(to_number(Fnd_Profile.Value('AS_OPP_WIN_PROBABILITY')), OKC_API.G_MISS_NUM);

350: IF p_context = 'EXPIRE' THEN
351: --Bug 2034318
352: --Action assembler defaults the win probability parameter to 50 when calling
353: --opportunity. This value may not be valid so we are defaulting it from profile option
354: l_header_rec.win_probability := NVL(to_number(Fnd_Profile.Value('AS_OPP_WIN_PROBABILITY')), OKC_API.G_MISS_NUM);
355: ELSE
356: --proceed as usual
357: l_header_rec.win_probability := l_win_probability;
358: END IF;

Line 374: l_header_rec.sales_stage_id := NVL(l_sales_stage_id, OKC_API.G_MISS_NUM);

370: begin --get sales_stage_id
371: OPEN c7(l_win_probability); --get sales_stage_id
372: FETCH c7 INTO l_sales_stage_id;
373: CLOSE c7;
374: l_header_rec.sales_stage_id := NVL(l_sales_stage_id, OKC_API.G_MISS_NUM);
375: --TEMP okc_util.print_trace(9,'l_sales_stage_id : ' || l_sales_stage_id);
376: IF (l_debug = 'Y') THEN
377: okc_debug.log('l_sales_stage_id : ' || TO_CHAR(l_sales_stage_id));
378: END IF;

Line 385: IF nvl(TO_NUMBER(fnd_profile.value('OKC_DEFAULT_OPP_CODE')), okc_api.g_miss_num) = OKC_API.G_MISS_NUM

381: null;
382: end;
383:
384: --get value for AMS_P_SOURCE_CODES_V.SOURCE_CODE_ID
385: IF nvl(TO_NUMBER(fnd_profile.value('OKC_DEFAULT_OPP_CODE')), okc_api.g_miss_num) = OKC_API.G_MISS_NUM
386: AND
387: nvl(fnd_profile.value('AS_OPP_SOURCE_CODE_REQUIRED'), okc_api.g_miss_char) = 'Y'
388: THEN
389: okc_api.Set_Message(p_app_name => g_app_name,

Line 387: nvl(fnd_profile.value('AS_OPP_SOURCE_CODE_REQUIRED'), okc_api.g_miss_char) = 'Y'

383:
384: --get value for AMS_P_SOURCE_CODES_V.SOURCE_CODE_ID
385: IF nvl(TO_NUMBER(fnd_profile.value('OKC_DEFAULT_OPP_CODE')), okc_api.g_miss_num) = OKC_API.G_MISS_NUM
386: AND
387: nvl(fnd_profile.value('AS_OPP_SOURCE_CODE_REQUIRED'), okc_api.g_miss_char) = 'Y'
388: THEN
389: okc_api.Set_Message(p_app_name => g_app_name,
390: p_msg_name => 'OKC_OPP_NO_DEFLT_OPP_CODE'
391: );

Line 389: okc_api.Set_Message(p_app_name => g_app_name,

385: IF nvl(TO_NUMBER(fnd_profile.value('OKC_DEFAULT_OPP_CODE')), okc_api.g_miss_num) = OKC_API.G_MISS_NUM
386: AND
387: nvl(fnd_profile.value('AS_OPP_SOURCE_CODE_REQUIRED'), okc_api.g_miss_char) = 'Y'
388: THEN
389: okc_api.Set_Message(p_app_name => g_app_name,
390: p_msg_name => 'OKC_OPP_NO_DEFLT_OPP_CODE'
391: );
392: l_return_status := OKC_API.G_RET_STS_ERROR;
393: raise g_exception_halt_validation;

Line 392: l_return_status := OKC_API.G_RET_STS_ERROR;

388: THEN
389: okc_api.Set_Message(p_app_name => g_app_name,
390: p_msg_name => 'OKC_OPP_NO_DEFLT_OPP_CODE'
391: );
392: l_return_status := OKC_API.G_RET_STS_ERROR;
393: raise g_exception_halt_validation;
394: END IF;
395: l_header_rec.source_promotion_id := nvl(TO_NUMBER(fnd_profile.value('OKC_DEFAULT_OPP_CODE')), okc_api.g_miss_num);
396: --TEMP okc_util.print_trace(9,'l_header_rec.source_promotion_id: ' || l_header_rec.source_promotion_id);

Line 395: l_header_rec.source_promotion_id := nvl(TO_NUMBER(fnd_profile.value('OKC_DEFAULT_OPP_CODE')), okc_api.g_miss_num);

391: );
392: l_return_status := OKC_API.G_RET_STS_ERROR;
393: raise g_exception_halt_validation;
394: END IF;
395: l_header_rec.source_promotion_id := nvl(TO_NUMBER(fnd_profile.value('OKC_DEFAULT_OPP_CODE')), okc_api.g_miss_num);
396: --TEMP okc_util.print_trace(9,'l_header_rec.source_promotion_id: ' || l_header_rec.source_promotion_id);
397: IF (l_debug = 'Y') THEN
398: okc_debug.log('l_header_rec.source_promotion_id: ' || TO_CHAR(l_header_rec.source_promotion_id));
399: END IF;

Line 401: l_header_rec.address_id := nvl(to_number(l_party_site_id), okc_api.g_miss_num);

397: IF (l_debug = 'Y') THEN
398: okc_debug.log('l_header_rec.source_promotion_id: ' || TO_CHAR(l_header_rec.source_promotion_id));
399: END IF;
400:
401: l_header_rec.address_id := nvl(to_number(l_party_site_id), okc_api.g_miss_num);
402: --TEMP okc_util.print_trace(9,'l_header_rec.address_id: ' || l_header_rec.address_id);
403: IF (l_debug = 'Y') THEN
404: okc_debug.log('l_header_rec.address_id: ' || TO_CHAR(l_header_rec.address_id));
405: END IF;

Line 438: If l_return_status <> okc_api.g_ret_sts_success Then

434: --TEMP okc_util.print_trace(9, 'x_lead_id returned: ' || l_lead_id);
435: IF (l_debug = 'Y') THEN
436: okc_debug.log('x_lead_id returned: ' || TO_CHAR(l_lead_id));
437: END IF;
438: If l_return_status <> okc_api.g_ret_sts_success Then
439: IF (l_debug = 'Y') THEN
440: okc_debug.log('3520: Return Status from Opp header Creation - ' || l_return_status);
441: END IF;
442: Raise g_exception_halt_validation;

Line 461: p_init_msg_list => p_init_msg_list, --okc_api.g_false,

457: END IF;
458: -- Call the rel object api
459: okc_k_rel_objs_pub.Create_Row(
460: p_api_version => 1.0, --p_api_version,--1.0,
461: p_init_msg_list => p_init_msg_list, --okc_api.g_false,
462: x_return_status => l_return_status,
463: x_msg_count => l_msg_count,
464: x_msg_data => l_msg_data,
465: p_crjv_tbl => l_in_crjv_tbl,

Line 470: If l_return_status <> okc_api.g_ret_sts_success Then

466: x_crjv_tbl => l_out_crjv_tbl);
467: IF (l_debug = 'Y') THEN
468: okc_debug.log('3540: After creating relation objects');
469: END IF;
470: If l_return_status <> okc_api.g_ret_sts_success Then
471: IF (l_debug = 'Y') THEN
472: okc_debug.log('3550: Return Status from Rel Objects Creation - ' || l_return_status);
473: END IF;
474: Raise g_exception_halt_validation;

Line 512: If l_return_status <> okc_api.g_ret_sts_success Then

508:
509: IF (l_debug = 'Y') THEN
510: okc_debug.log('3570: After creating note');
511: END IF;
512: If l_return_status <> okc_api.g_ret_sts_success Then
513: IF (l_debug = 'Y') THEN
514: okc_debug.log('3580: Return Status from Note Creation - ' || l_return_status);
515: END IF;
516: Raise g_exception_halt_validation;

Line 537: okc_api.Set_Message(p_app_name => g_app_name,

533: okc_debug.log('3980: Exiting okc_opportunity_pvt.create_opp_header', 2);
534: okc_debug.Reset_Indentation;
535: END IF;
536: When Others Then
537: okc_api.Set_Message(p_app_name => g_app_name,
538: p_msg_name => g_unexpected_error,
539: p_token1 => g_sqlcode_token,
540: p_token1_value => sqlcode,
541: p_token2 => g_sqlerrm_token,

Line 543: x_return_status := okc_api.g_ret_sts_unexp_error;

539: p_token1 => g_sqlcode_token,
540: p_token1_value => sqlcode,
541: p_token2 => g_sqlerrm_token,
542: p_token2_value => sqlerrm);
543: x_return_status := okc_api.g_ret_sts_unexp_error;
544: IF (l_debug = 'Y') THEN
545: okc_debug.log('3990: Exiting okc_opportunity_pvt.create_opp_header', 2);
546: okc_debug.Reset_Indentation;
547: END IF;

Line 771: x_return_status := okc_api.g_ret_sts_success;

767: okc_debug.log(' p_contract_id = '||p_contract_id);
768: okc_debug.log(' p_lead_id = '||p_lead_id);
769: okc_debug.log(' g_rty_code = '||g_rty_code);
770: END IF;
771: x_return_status := okc_api.g_ret_sts_success;
772: -- Set the org_id for the curernt contract
773: l_org_id := okc_context.get_okc_org_id;
774: -- set the opp header id
775: l_header_rec.lead_id := p_lead_id;

Line 960: If l_return_status <> okc_api.g_ret_sts_success Then

956: --
957: IF (l_debug = 'Y') THEN
958: okc_debug.log('5048: After calling as_opportunity_pub.create_opp_lines');
959: END IF;
960: If l_return_status <> okc_api.g_ret_sts_success Then
961: IF (l_debug = 'Y') THEN
962: okc_debug.log('5049: Opp Lines Return Status - ' || l_return_status);
963: END IF;
964: Raise g_exception_halt_validation;

Line 998: If l_return_status <> okc_api.g_ret_sts_success Then

994: --
995: IF (l_debug = 'Y') THEN
996: okc_debug.log('5068: After calling as_opportunity_pub.Delete_Opp_Header');
997: END IF;
998: If l_return_status <> okc_api.g_ret_sts_success Then
999: IF (l_debug = 'Y') THEN
1000: okc_debug.log('5069: Opp Lines Return Status - ' || l_return_status);
1001: END IF;
1002: Raise g_exception_halt_validation;

Line 1025: If l_line_out_tbl(l_index).return_status = okc_api.g_ret_sts_success Then

1021: If l_rel_lead_line_id_tbl(i) IS NULL Then
1022: IF (l_debug = 'Y') THEN
1023: okc_debug.log('5080: Processed Line Status - ' || l_line_out_tbl(l_index).return_status);
1024: END IF;
1025: If l_line_out_tbl(l_index).return_status = okc_api.g_ret_sts_success Then
1026: l_rel_lead_line_id_tbl(i) := l_line_out_tbl(l_index).lead_line_id;
1027: IF (l_debug = 'Y') THEN
1028: okc_debug.log('5081: Opportunity for the line was created successfully');
1029: END IF;

Line 1077: If l_return_status <> okc_api.g_ret_sts_success Then

1073: IF (l_debug = 'Y') THEN
1074: okc_debug.log('5095: After creating relation objects');
1075: okc_debug.log('5096: '||l_out_crjv_tbl.count||' relation lines were created ');
1076: END IF;
1077: If l_return_status <> okc_api.g_ret_sts_success Then
1078: IF (l_debug = 'Y') THEN
1079: okc_debug.log('5099: Return Status from Rel Objects Creation - ' || l_return_status);
1080: END IF;
1081: Raise g_exception_halt_validation;

Line 1091: l_return_status := okc_api.g_ret_sts_error;

1087: -- line_csr and rel_csr cursor in is_opp_creation_allowed itself.
1088: IF (l_debug = 'Y') THEN
1089: okc_debug.log('5100: No lines selected for opp creation');
1090: END IF;
1091: l_return_status := okc_api.g_ret_sts_error;
1092: Raise g_exception_halt_validation;
1093: End If;*/
1094: --
1095:

Line 1111: okc_api.Set_Message(p_app_name => g_app_name,

1107: okc_debug.log('5980: Exiting okc_opportunity_pvt.create_opp_lines', 2);
1108: okc_debug.Reset_Indentation;
1109: END IF;
1110: When Others Then
1111: okc_api.Set_Message(p_app_name => g_app_name,
1112: p_msg_name => g_unexpected_error,
1113: p_token1 => g_sqlcode_token,
1114: p_token1_value => sqlcode,
1115: p_token2 => g_sqlerrm_token,

Line 1117: x_return_status := okc_api.g_ret_sts_unexp_error;

1113: p_token1 => g_sqlcode_token,
1114: p_token1_value => sqlcode,
1115: p_token2 => g_sqlerrm_token,
1116: p_token2_value => sqlerrm);
1117: x_return_status := okc_api.g_ret_sts_unexp_error;
1118: IF (l_debug = 'Y') THEN
1119: okc_debug.log('5990: Exiting okc_opportunity_pvt.create_opp_lines', 2);
1120: okc_debug.Reset_Indentation;
1121: END IF;

Line 1210: x_return_status := okc_api.g_ret_sts_success;

1206: IF (l_debug = 'Y') THEN
1207: okc_debug.Set_Indentation('Is_Opp_Creation_Allowed');
1208: okc_debug.log('7000: Entering okc_opportunity_pvt.is_opp_creation_allowed', 2);
1209: END IF;
1210: x_return_status := okc_api.g_ret_sts_success;
1211: -- Get contract's details
1212: Open k_csr;
1213: Fetch k_csr Into k_rec;
1214: l_row_notfound := k_csr%NOTFOUND;

Line 1225: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_INVALID_CHR');

1221: -- Please refer to Bug 2074526
1222: -- ************
1223: If l_row_notfound Then
1224: ----If p_context = 'AUTHORING' Then
1225: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_INVALID_CHR');
1226: ----End If;
1227: Raise g_exception_halt_validation;
1228: End If;
1229: -- Contract's category must allow the opp creation

Line 1234: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_INVALID_CATEGORY');

1230: If Nvl(k_rec.create_opp_yn, '*') <> 'Y' Then
1231: If p_context = 'AUTHORING' Then --we need to check context here because we don't want this
1232: --check for RENEW and EXPIRE processes where we may not want to
1233: --create opportunities
1234: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_INVALID_CATEGORY');
1235: End If;
1236: Raise g_exception_halt_validation;
1237: End If;
1238: -- Templates cannot be created into opportunities

Line 1241: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_TEMPLATE_CHR');

1237: End If;
1238: -- Templates cannot be created into opportunities
1239: If k_rec.template_yn = 'Y' Then
1240: ----If p_context = 'AUTHORING' Then
1241: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_TEMPLATE_CHR');
1242: ----End If;
1243: Raise g_exception_halt_validation;
1244: End If;
1245: -- Opportunites can be created only for Sell contracts

Line 1248: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_SELL_CHR');

1244: End If;
1245: -- Opportunites can be created only for Sell contracts
1246: If Nvl(k_rec.buy_or_sell, '*') <> 'S' Then
1247: ----If p_context = 'AUTHORING' Then
1248: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_SELL_CHR');
1249: ----End If;
1250: Raise g_exception_halt_validation;
1251: End If;
1252: -- Not allowed if it is already terminated

Line 1255: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_CHR_TERMINATED');

1251: End If;
1252: -- Not allowed if it is already terminated
1253: If k_rec.ste_code In ('TERMINATED') Then
1254: ----If p_context = 'AUTHORING' Then
1255: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_CHR_TERMINATED');
1256: ----End If;
1257: Raise g_exception_halt_validation;
1258: End If;
1259:

Line 1276: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_INVALID_STATUS');

1272: okc_debug.log('7300: Invalid contract status for the context' );
1273: okc_debug.log('7310: p_context='||p_context||', ste_code='||k_rec.ste_code );
1274: END IF;
1275: ----If p_context = 'AUTHORING' Then
1276: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_INVALID_STATUS');
1277: ----End If;
1278: Raise g_exception_halt_validation;
1279: End If;
1280: -- Contract must have a Customer assigned to it

Line 1287: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_CUSTOMER');

1283: l_row_notfound := cpl_csr%NOTFOUND;
1284: Close cpl_csr;
1285: If l_row_notfound Then
1286: ----If p_context = 'AUTHORING' Then
1287: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_CUSTOMER');
1288: ----End If;
1289: Raise g_exception_halt_validation;
1290: End If;
1291: -- Also make sure there is a Salesrep

Line 1298: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_SALESREP');

1294: l_row_notfound := ctc_csr%NOTFOUND;
1295: Close ctc_csr;
1296: If l_row_notfound Then
1297: ----If p_context = 'AUTHORING' Then
1298: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_SALESREP');
1299: ----End If;
1300: Raise g_exception_halt_validation;
1301: End If;
1302: -- There must be at least one inventory line item

Line 1309: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_INV_ITEM');

1305: l_row_notfound := itm_csr%NOTFOUND;
1306: Close itm_csr;
1307: If l_row_notfound Then
1308: ----If p_context = 'AUTHORING' Then
1309: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_INV_ITEM');
1310: ----End If;
1311: Raise g_exception_halt_validation;
1312: End If;
1313: -- If opp creation is done from auth or renewal, it should pick

Line 1331: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_ACTIVE_LINES');

1327: l_row_notfound := line_csr%NOTFOUND;
1328: Close line_csr;
1329: If l_row_notfound Then
1330: ----If p_context = 'AUTHORING' Then
1331: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_ACTIVE_LINES');
1332: ----End If;
1333: Raise g_exception_halt_validation;
1334: End If;
1335: End If;

Line 1343: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_LINES');

1339: l_row_notfound := rel_csr%NOTFOUND;
1340: Close rel_csr;
1341: If l_row_notfound Then
1342: ----If p_context = 'AUTHORING' Then
1343: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_NO_LINES');
1344: ----End If;
1345: Raise g_exception_halt_validation;
1346: End If;
1347: -- If the contract is evergreen, no opp can be created

Line 1354: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_EVERGREEN_CONTRACT');

1350: l_row_found := rul_csr%FOUND;
1351: Close rul_csr;
1352: If l_row_found Then
1353: ----If p_context = 'AUTHORING' Then
1354: okc_api.Set_Message(G_APP_NAME, 'OKC_OPP_EVERGREEN_CONTRACT');
1355: ----End If;
1356: Raise g_exception_halt_validation;
1357: End If;
1358: --

Line 1366: x_return_status := okc_api.g_ret_sts_error;

1362: okc_debug.Reset_Indentation;
1363: END IF;
1364: Exception
1365: When g_exception_halt_validation Then
1366: x_return_status := okc_api.g_ret_sts_error;
1367: IF (l_debug = 'Y') THEN
1368: okc_debug.log('7600: Opportunity Creation is not allowed');
1369: okc_debug.log('7980: Exiting okc_opportunity_pvt.is_opp_creation_allowed', 2);
1370: okc_debug.Reset_Indentation;

Line 1373: okc_api.Set_Message(p_app_name => g_app_name,

1369: okc_debug.log('7980: Exiting okc_opportunity_pvt.is_opp_creation_allowed', 2);
1370: okc_debug.Reset_Indentation;
1371: END IF;
1372: When Others Then
1373: okc_api.Set_Message(p_app_name => g_app_name,
1374: p_msg_name => g_unexpected_error,
1375: p_token1 => g_sqlcode_token,
1376: p_token1_value => sqlcode,
1377: p_token2 => g_sqlerrm_token,

Line 1379: x_return_status := okc_api.g_ret_sts_unexp_error;

1375: p_token1 => g_sqlcode_token,
1376: p_token1_value => sqlcode,
1377: p_token2 => g_sqlerrm_token,
1378: p_token2_value => sqlerrm);
1379: x_return_status := okc_api.g_ret_sts_unexp_error;
1380: IF (l_debug = 'Y') THEN
1381: okc_debug.log('7990: Exiting okc_opportunity_pvt.is_opp_creation_allowed', 2);
1382: okc_debug.Reset_Indentation;
1383: END IF;

Line 1410: x_return_status := okc_api.g_ret_sts_success;

1406: okc_debug.Set_Indentation('Get_Opp_Defaults');
1407: okc_debug.log('9000: Entering okc_opportunity_pvt.get_opp_defaults', 2);
1408: okc_debug.log('9010: Calling Mode - ' || p_context);
1409: END IF;
1410: x_return_status := okc_api.g_ret_sts_success;
1411: --
1412: If p_context = 'RENEW' Then
1413: Open c1('REN');
1414: Fetch c1 Into c1_rec;

Line 1453: okc_api.Set_Message(p_app_name => g_app_name,

1449: okc_debug.Reset_Indentation;
1450: END IF;
1451: Exception
1452: When Others Then
1453: okc_api.Set_Message(p_app_name => g_app_name,
1454: p_msg_name => g_unexpected_error,
1455: p_token1 => g_sqlcode_token,
1456: p_token1_value => sqlcode,
1457: p_token2 => g_sqlerrm_token,

Line 1459: x_return_status := okc_api.g_ret_sts_unexp_error;

1455: p_token1 => g_sqlcode_token,
1456: p_token1_value => sqlcode,
1457: p_token2 => g_sqlerrm_token,
1458: p_token2_value => sqlerrm);
1459: x_return_status := okc_api.g_ret_sts_unexp_error;
1460: IF (l_debug = 'Y') THEN
1461: okc_debug.log('9990: Exiting okc_opportunity_pvt.get_opp_defaults', 2);
1462: okc_debug.Reset_Indentation;
1463: END IF;