542: -- with given auction_header_id (p_source_auction_header_id)
543: --
544: -- Parameters:
545: -- IN : p_api_version NUMBER Required
546: -- IN : p_init_msg_list VARCHAR2 DEFAULT FND_API.G_TRUE Optional
547: -- IN : p_is_conc_call VARCHAR2 Required This indicates if the
548: -- procedure is called online or via a concurrent program
549: -- IN : p_source_auction_header_id NUMBER Required, auction_header_id
550: -- of the source negotiation
605: --
606: -- OUT : x_return_status VARCHAR2, flag to indicate if the copy procedure
607: -- was successful or not; It can have
608: -- following values -
609: -- FND_API.G_RET_STS_SUCCESS (Success)
610: -- FND_API.G_RET_STS_ERROR (Success with warning)
611: -- FND_API.G_RET_STS_UNEXP_ERROR (Failed due to error)
612: -- g_ret_conc_req_submitted (if a concurrent request is submitted)
613: --
606: -- OUT : x_return_status VARCHAR2, flag to indicate if the copy procedure
607: -- was successful or not; It can have
608: -- following values -
609: -- FND_API.G_RET_STS_SUCCESS (Success)
610: -- FND_API.G_RET_STS_ERROR (Success with warning)
611: -- FND_API.G_RET_STS_UNEXP_ERROR (Failed due to error)
612: -- g_ret_conc_req_submitted (if a concurrent request is submitted)
613: --
614: -- OUT : x_msg_count NUMBER, the number of warning of error messages due
607: -- was successful or not; It can have
608: -- following values -
609: -- FND_API.G_RET_STS_SUCCESS (Success)
610: -- FND_API.G_RET_STS_ERROR (Success with warning)
611: -- FND_API.G_RET_STS_UNEXP_ERROR (Failed due to error)
612: -- g_ret_conc_req_submitted (if a concurrent request is submitted)
613: --
614: -- OUT : x_msg_count NUMBER, the number of warning of error messages due
615: -- to this procedure call. It will have following
739: -- If it is a concurrent call, then make use of
740: -- p_large_auction_header_id. This is the header id of the
741: -- auction whose header has been created.
742: --
743: if p_is_conc_call = FND_API.G_TRUE
744: then
745:
746: LOG_MESSAGE('copy_negotiation','This is a concurrent call...');
747: l_large_auction_header_id := p_large_auction_header_id;
753: l_is_award_approval_reqd := 'Y';
754: l_retain_attachments := 'Y';
755: g_added_inactv_attr_grp_msg := 'N';
756:
757: g_return_status := FND_API.G_RET_STS_SUCCESS;
758: --
759: --Check for StyleId here
760: --If it is -1, then the styleId of the source auction
761: --has to be retained
789:
790: --
791: -- Standard call to check for call compatibility
792: --
793: IF NOT FND_API.COMPATIBLE_API_CALL ( l_api_version,
794: p_api_version,
795: l_api_name,
796: G_PKG_NAME )
797: THEN
794: p_api_version,
795: l_api_name,
796: G_PKG_NAME )
797: THEN
798: RAISE FND_API.G_EXC_ERROR;
799: END IF;
800:
801: --
802: -- Initialize message list if p_init_msg_list is set to TRUE
803: -- We initialize the list by default. User should pass proper
804: -- value to p_init_msg_list in case this initialization is not
805: -- wanted
806: --
807: IF FND_API.TO_BOOLEAN( p_init_msg_list ) THEN
808: LOG_MESSAGE('copy_negotiation','Initializing the FND_MSG_PUB stack');
809: FND_MSG_PUB.INITIALIZE;
810: LOG_MESSAGE('copy_negotiation','Clearing the FND_MESSAGE stack');
811: FND_MESSAGE.CLEAR;
815: -- Initialize APIto return the status as success initially
816: -- Will be setting it to ERRORs in the exception block
817: -- whenever required
818: --
819: x_return_status := FND_API.G_RET_STS_SUCCESS;
820:
821: --
822: --Check if the source auction is a
823: --super large one or not.
866: LOG_MESSAGE('copy_negotiation','wrong tp contact id');
867:
868: FND_MESSAGE.SET_NAME('PON','PON_INVALID_TP_CONTACT_ID');
869: FND_MSG_PUB.ADD;
870: RAISE FND_API.G_EXC_ERROR;
871: END;
872:
873: --For testing
874: /*FND_MESSAGE.SET_NAME('PON','PON_INVALID_TP_CONTACT_ID');
874: /*FND_MESSAGE.SET_NAME('PON','PON_INVALID_TP_CONTACT_ID');
875: FND_MSG_PUB.ADD;
876: FND_MESSAGE.SET_NAME('PON','PON_INV_COPY_OPTION');
877: FND_MSG_PUB.ADD;
878: RAISE FND_API.G_EXC_ERROR;*/
879: --
880: -- Get the company name for the given trading_partner_id
881: -- The resultant company name will be used in the trading partner
882: --name column of PON_AUCTION_HEADERS_ALL table
894:
895: LOG_MESSAGE('copy_negotiation','wrong tp id');
896: FND_MESSAGE.SET_NAME('PON','PON_INVALID_TP_ID');
897: FND_MSG_PUB.ADD;
898: RAISE FND_API.G_EXC_ERROR;
899: END;
900:
901: --
902: -- Check if the value of the p_is_award_approval_reqd parameter is
932: LOG_MESSAGE('copy_negotiation','wrong copy type');
933:
934: FND_MESSAGE.SET_NAME('PON','PON_INV_COPY_OPTION');
935: FND_MSG_PUB.ADD;
936: RAISE FND_API.G_EXC_ERROR;
937: END IF;
938:
939: g_err_loc := '-1. Doing validation checks prior to copy';
940: --
942: --If creating a header row,
943: --in case of new round or amendment take a DB lock here
944: --
945: IF
946: ((l_is_super_large_auction = 'Y' AND p_is_conc_call = FND_API.G_FALSE) or (l_is_super_large_auction = 'N'))
947: AND
948: (p_copy_type = g_new_rnd_copy OR p_copy_type = g_amend_copy OR p_copy_type = g_conformed_doc_copy)
949: THEN
950:
975: LOG_MESSAGE('copy_negotiation','l_newround_amendment_count : ' || l_newround_amendment_count);
976:
977: if l_newround_amendment_count <> 0 then
978:
979: LOG_MESSAGE('copy_negotiation','Adding error to the FND stack to indicate parallel new rounds creation error and raising FND_API.G_EXC_ERROR');
980: FND_MESSAGE.SET_NAME('PON','PON_MULTI_NEWRND_OR_AMND_ERR');
981: FND_MSG_PUB.ADD;
982: RAISE FND_API.G_EXC_ERROR;
983:
978:
979: LOG_MESSAGE('copy_negotiation','Adding error to the FND stack to indicate parallel new rounds creation error and raising FND_API.G_EXC_ERROR');
980: FND_MESSAGE.SET_NAME('PON','PON_MULTI_NEWRND_OR_AMND_ERR');
981: FND_MSG_PUB.ADD;
982: RAISE FND_API.G_EXC_ERROR;
983:
984: end if;
985:
986: elsif p_copy_type = g_amend_copy then
995: LOG_MESSAGE('copy_negotiation','l_newround_amendment_count : ' || l_newround_amendment_count);
996:
997: if l_newround_amendment_count <> 0 then
998:
999: LOG_MESSAGE('copy_negotiation','Adding error to the FND stack to indicate parallel amendments creation error and raising FND_API.G_EXC_ERROR;');
1000: FND_MESSAGE.SET_NAME('PON','PON_MULTI_NEWRND_OR_AMND_ERR');
1001: FND_MSG_PUB.ADD;
1002: RAISE FND_API.G_EXC_ERROR;
1003:
998:
999: LOG_MESSAGE('copy_negotiation','Adding error to the FND stack to indicate parallel amendments creation error and raising FND_API.G_EXC_ERROR;');
1000: FND_MESSAGE.SET_NAME('PON','PON_MULTI_NEWRND_OR_AMND_ERR');
1001: FND_MSG_PUB.ADD;
1002: RAISE FND_API.G_EXC_ERROR;
1003:
1004: end if;
1005: elsif p_copy_type = g_conformed_doc_copy then
1006:
1016: LOG_MESSAGE('copy_negotiation','l_newround_amendment_count : ' || l_newround_amendment_count);
1017:
1018: if l_newround_amendment_count <> 0 then
1019:
1020: LOG_MESSAGE('copy_negotiation','Adding error to the FND stack to indicate parallel amendments creation error and raising FND_API.G_EXC_ERROR;');
1021: FND_MESSAGE.SET_NAME('PON','PON_MULTI_NEWRND_OR_AMND_ERR');
1022: FND_MSG_PUB.ADD;
1023: RAISE FND_API.G_EXC_ERROR;
1024:
1019:
1020: LOG_MESSAGE('copy_negotiation','Adding error to the FND stack to indicate parallel amendments creation error and raising FND_API.G_EXC_ERROR;');
1021: FND_MESSAGE.SET_NAME('PON','PON_MULTI_NEWRND_OR_AMND_ERR');
1022: FND_MSG_PUB.ADD;
1023: RAISE FND_API.G_EXC_ERROR;
1024:
1025: end if;
1026:
1027:
1027:
1028: end if;
1029:
1030: EXCEPTION
1031: WHEN FND_API.G_EXC_ERROR THEN
1032: ROLLBACK TO PON_NEGOTIATION_COPY_GRP;
1033: x_return_status := FND_API.G_RET_STS_ERROR ;
1034: FND_MSG_PUB.COUNT_AND_GET( p_count => x_msg_count,
1035: p_data => x_msg_data
1029:
1030: EXCEPTION
1031: WHEN FND_API.G_EXC_ERROR THEN
1032: ROLLBACK TO PON_NEGOTIATION_COPY_GRP;
1033: x_return_status := FND_API.G_RET_STS_ERROR ;
1034: FND_MSG_PUB.COUNT_AND_GET( p_count => x_msg_count,
1035: p_data => x_msg_data
1036: );
1037:
1067: -- So, please be aware of that
1068:
1069: FND_MESSAGE.SET_NAME('PON','PON_INVALID_NEG_NUM');
1070: FND_MSG_PUB.ADD;
1071: RAISE FND_API.G_EXC_ERROR;
1072: END;
1073: -- load data for negotiation style
1074: LOG_MESSAGE('copy_negotiation','Call to SET_NEG_STYLE');
1075: SET_NEG_STYLE ( p_source_auction_header_id => p_source_auction_header_id,
1099:
1100:
1101:
1102:
1103: if (l_is_super_large_auction = 'Y' AND p_is_conc_call = FND_API.G_FALSE) or (l_is_super_large_auction = 'N')
1104: then
1105: --
1106: -- Get the new auction_header_id for the new negotiation document
1107: -- from
1284:
1285: end if;
1286:
1287:
1288: if ((l_is_super_large_auction = 'Y' AND p_is_conc_call = FND_API.G_TRUE)
1289: or (l_is_super_large_auction = 'N')
1290: or (l_is_conf_cpy_pub_flow = 'Y')) then
1291: -- control comes here if
1292: -- (1) It is a super large auction and the
1467: --in pon_auction_headers_all for p_auction_header_id
1468: EXCEPTION
1469: WHEN OTHERS THEN
1470: ROLLBACK TO PON_NEGOTIATION_COPY_GRP;
1471: x_return_status := FND_API.G_RET_STS_ERROR;
1472: FND_MSG_PUB.COUNT_AND_GET( p_count => x_msg_count,
1473: p_data => x_msg_data
1474: );
1475: LOG_MESSAGE('copy_negotiation','An error in the procedure. Error at:'||g_err_loc || ' :' || SQLCODE || ' :' || SQLERRM);
1490: -- active neg type.
1491: --
1492: -- Parameters:
1493: -- IN : p_api_version NUMBER Required
1494: -- IN : p_init_msg_list VARCHAR2 DEFAULT FND_API.G_TRUE Optional
1495: -- IN : p_is_conc_call VARCHAR2 Required This indicates if the
1496: -- procedure is called online or via a concurrent program
1497: -- IN : p_source_auction_header_id NUMBER Required, auction_header_id
1498: -- of the source negotiation
1538: --
1539: -- OUT : x_return_status VARCHAR2, flag to indicate if the copy procedure
1540: -- was successful or not; It can have
1541: -- following values -
1542: -- FND_API.G_RET_STS_SUCCESS (Success)
1543: -- FND_API.G_RET_STS_ERROR (Success with warning)
1544: -- FND_API.G_RET_STS_UNEXP_ERROR (Failed due to error)
1545: -- g_ret_conc_req_submitted (if a concurrent request is submitted)
1546: --
1539: -- OUT : x_return_status VARCHAR2, flag to indicate if the copy procedure
1540: -- was successful or not; It can have
1541: -- following values -
1542: -- FND_API.G_RET_STS_SUCCESS (Success)
1543: -- FND_API.G_RET_STS_ERROR (Success with warning)
1544: -- FND_API.G_RET_STS_UNEXP_ERROR (Failed due to error)
1545: -- g_ret_conc_req_submitted (if a concurrent request is submitted)
1546: --
1547: -- OUT : x_msg_count NUMBER, the number of warning of error messages due
1540: -- was successful or not; It can have
1541: -- following values -
1542: -- FND_API.G_RET_STS_SUCCESS (Success)
1543: -- FND_API.G_RET_STS_ERROR (Success with warning)
1544: -- FND_API.G_RET_STS_UNEXP_ERROR (Failed due to error)
1545: -- g_ret_conc_req_submitted (if a concurrent request is submitted)
1546: --
1547: -- OUT : x_msg_count NUMBER, the number of warning of error messages due
1548: -- to this procedure call. It will have following
2237: x_doc_number => l_doc_number,
2238: x_return_status => l_return_status);
2239:
2240: --bug12341914 : Handle error when returning from DEFAULT_DOC_NUMBER_UDA
2241: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
2242: RAISE l_default_doc_number_exception;
2243: END IF;
2244:
2245: LOG_MESSAGE('copy_negotiation','1.1.2.3 document_number returned : '||l_doc_number);
2255: fnd_message.set_token (token => 'PROC_CALLED',
2256: VALUE => 'PO_DOC_NUMBERING_PKG.DEFAULT_DOC_NUMBER_UDA'
2257: );
2258: fnd_msg_pub.ADD;
2259: RAISE FND_API.G_EXC_ERROR;
2260: WHEN OTHERS THEN
2261: LOG_MESSAGE('copy_negotiation','error in defauling doc number');
2262: RAISE l_uda_template_exception;
2263: END;
2287: p_caller => 'SOL',
2288: x_doc_number => l_doc_number,
2289: x_return_status => l_return_status);
2290: --bug12341914 : Handle error when returning from DEFAULT_DOC_NUMBER_UDA
2291: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
2292: RAISE l_default_doc_number_exception;
2293: END IF;
2294:
2295: LOG_MESSAGE('copy_negotiation : active','1.1.2.6 document_number returned : '||l_doc_number);
2303: VALUE => 'PON_NEGOTIATION_COPY_GRP.COPY_HEADER_BASIC');
2304: fnd_message.set_token (token => 'PROC_CALLED',
2305: VALUE => 'PO_DOC_NUMBERING_PKG.DEFAULT_DOC_NUMBER_UDA');
2306: fnd_msg_pub.ADD;
2307: RAISE FND_API.G_EXC_ERROR;
2308: WHEN OTHERS THEN
2309: LOG_MESSAGE('copy_negotiation : active','error in defauling doc number');
2310: RAISE l_uda_template_exception;
2311: END;
2448: EXCEPTION
2449: WHEN OTHERS THEN
2450: FND_MESSAGE.SET_NAME('PON','PON_AUC_NO_DATA_EXISTS');
2451: FND_MSG_PUB.ADD;
2452: RAISE FND_API.G_EXC_ERROR;
2453: END;
2454:
2455: --
2456: -- Staggered Closing is applicable only for AUCTION.
2502:
2503: --
2504: -- Check possible error
2505: --
2506: IF (l_MinBidPriceVal3 <> FND_API.G_RET_STS_SUCCESS) THEN
2507: -- Log Error
2508: LOG_MESSAGE('copy_negotiation','Could not find the default value for enforce min bid price control. Please check the negotiation configuration.');
2509: l_MinBidPriceVal1 := 'N';
2510: END IF;
3369: FND_MESSAGE.SET_NAME('PON','PON_GENERIC_ERR');
3370: FND_MESSAGE.SET_TOKEN('TOKEN','Error during Header UDA Copy '||l_msg_data);
3371: FND_MSG_PUB.ADD;
3372: LOG_MESSAGE('copy header basic','Error while copy header udas:'||l_msg_data||SQLERRM);
3373: RAISE FND_API.G_EXC_ERROR;
3374:
3375: END IF;
3376: END IF;
3377: END;
4670: FND_MESSAGE.SET_NAME('PON','PON_GENERIC_ERR');
4671: FND_MESSAGE.SET_TOKEN('TOKEN','Error during Line UDA Copy '||l_msg_data);
4672: FND_MSG_PUB.ADD;
4673: LOG_MESSAGE('copy_lines','EXCEPTION WHILE COPYING LINE UDA '||SQLERRM);
4674: RAISE FND_API.G_EXC_ERROR;
4675: END;
4676:
4677: LOG_MESSAGE('Copy_Lines','Copy Line UDA Status '||l_return_status||' '||l_line_number(x));
4678: IF ( nvl(l_return_status,'S') <> 'S' ) THEN
4679: FND_MESSAGE.SET_NAME('PON','PON_GENERIC_ERR');
4680: FND_MESSAGE.SET_TOKEN('TOKEN','Error during Line UDA Copy '||l_msg_data);
4681: FND_MSG_PUB.ADD;
4682: LOG_MESSAGE('copy_lines','Error while copy line udas: '||l_msg_data);
4683: RAISE FND_API.G_EXC_ERROR;
4684: END IF;
4685:
4686:
4687: End Loop;
4707:
4708: g_added_inactv_attr_grp_msg := 'Y';
4709:
4710: -- Set the warning flag on
4711: g_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4712:
4713: END IF;
4714:
4715: --
5156: -- Now l_val1 has default Attr_group
5157: --
5158: -- Check possible error
5159: --
5160: IF (l_val3 <> FND_API.G_RET_STS_SUCCESS) THEN
5161: -- Log Error
5162: LOG_MESSAGE('copy_negotiation','Could not find the default line attribute group. Please check the negotiation configuration.');
5163: l_val1 := 'GENERAL';
5164: END IF;
7180: -- give warning for inactive suppliers
7181: FND_MESSAGE.SET_NAME('PON','PON_INACTIVE_SUPP_INVITEE_W'||'_'||g_message_suffix);
7182: FND_MESSAGE.SET_TOKEN('LIST',l_supplier_names);
7183: FND_MSG_PUB.ADD;
7184: g_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7185: --}
7186: END IF;
7187:
7188: --bug 7376924, begin of inactive supplier contact handling logic
7247: -- give warning for inactive suppliers
7248: FND_MESSAGE.SET_NAME('PON','PON_RS_REJECTED_INVITEE_W'||'_'||g_message_suffix);
7249: FND_MESSAGE.SET_TOKEN('LIST',l_supplier_names);
7250: FND_MSG_PUB.ADD;
7251: g_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7252: --}
7253: END IF;
7254: END IF; --}
7255: END;
7653: FND_MESSAGE.SET_TOKEN('LIST',l_inactive_mem);
7654: FND_MSG_PUB.ADD;
7655:
7656: -- Set the status
7657: g_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
7658: --}
7659: END IF;
7660: END;
7661: --} End of COPY_NEG_TEAM
7994: FND_MESSAGE.SET_NAME('PON','PON_INACTIVE_FORMS_COPY_INFO');
7995: FND_MSG_PUB.ADD;
7996:
7997: -- Set the status
7998: g_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
7999: END IF;
8000:
8001: -- Call the COPY_FORM_CHILDREN to copy children
8002: LOG_MESSAGE('copy_negotiation','Copy Form and section children data is starting');
10264: );
10265:
10266: END IF; --CALL_PON_LRG_DRAFT_TO_LRG_PF = 'TRUE'
10267:
10268: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR
10269: THEN
10270: x_return_status := l_return_status;
10271: x_msg_count := 1;
10272: x_msg_data := l_error_msg_update;
10377: FND_MESSAGE.SET_NAME('PON','PON_GENERIC_ERR');
10378: FND_MESSAGE.SET_TOKEN('TOKEN',l_error_code_update||' - '||l_error_msg_update);
10379: FND_MSG_PUB.ADD;
10380: LOG_MESSAGE('copy_lines_and_children','Error while updating source negotiation. Error:'||l_error_msg_update);
10381: RAISE FND_API.G_EXC_ERROR;
10382: END IF;
10383:
10384: END IF;
10385:
10427:
10428: LOG_MESSAGE('copy_lines_and_children','Returning with status:'||x_return_status);
10429:
10430: EXCEPTION
10431: WHEN FND_API.G_EXC_ERROR THEN
10432: ROLLBACK TO PON_NEGOTIATION_COPY_GRP;
10433: x_return_status := FND_API.G_RET_STS_ERROR ;
10434: FND_MSG_PUB.COUNT_AND_GET( p_count => x_msg_count,
10435: p_data => x_msg_data
10429:
10430: EXCEPTION
10431: WHEN FND_API.G_EXC_ERROR THEN
10432: ROLLBACK TO PON_NEGOTIATION_COPY_GRP;
10433: x_return_status := FND_API.G_RET_STS_ERROR ;
10434: FND_MSG_PUB.COUNT_AND_GET( p_count => x_msg_count,
10435: p_data => x_msg_data
10436: );
10437:
10439:
10440: -- Why another block? We can have only one block. Let me see
10441: WHEN OTHERS THEN
10442: ROLLBACK TO PON_NEGOTIATION_COPY_GRP;
10443: x_return_status := FND_API.G_RET_STS_ERROR;
10444: FND_MSG_PUB.COUNT_AND_GET( p_count => x_msg_count,
10445: p_data => x_msg_data
10446: );
10447: LOG_MESSAGE('copy_lines_and_children','An error in the procedure. Error at:'||g_err_loc || ' :' || SQLCODE || ' :' || SQLERRM);
10571: -- The way I am adding this error may get changed in the future.
10572: -- So, please be aware of that
10573: FND_MESSAGE.SET_NAME('PON','PON_AUC_NO_DATA_EXISTS');
10574: FND_MSG_PUB.ADD;
10575: RAISE FND_API.G_EXC_ERROR;
10576: END;
10577:
10578: g_rfi_doctype_id := l_rfi_doctype_id;
10579:
10587: EXCEPTION
10588: WHEN OTHERS THEN
10589: FND_MESSAGE.SET_NAME('PON','PON_AUC_NO_DATA_EXISTS');
10590: FND_MSG_PUB.ADD;
10591: RAISE FND_API.G_EXC_ERROR;
10592: END;
10593:
10594: g_rfq_doctype_id := l_rfq_doctype_id;
10595:
10605: EXCEPTION
10606: WHEN OTHERS THEN
10607: FND_MESSAGE.SET_NAME('PON','PON_AUC_NO_DATA_EXISTS');
10608: FND_MSG_PUB.ADD;
10609: RAISE FND_API.G_EXC_ERROR;
10610: END;
10611:
10612: g_sol_doctype_id := l_sol_doctype_id;
10613: --
10624: EXCEPTION
10625: WHEN OTHERS THEN
10626: FND_MESSAGE.SET_NAME('PON','PON_AUC_NO_DATA_EXISTS');
10627: FND_MSG_PUB.ADD;
10628: RAISE FND_API.G_EXC_ERROR;
10629: END;
10630:
10631: g_auction_doctype_id := l_auction_doctype_id;
10632:
10643: x_pref_meaning => l_pref_unused_1,
10644: x_status => l_pref_unused_2,
10645: x_exception_msg => l_pref_unused_3);
10646:
10647: IF (l_pref_unused_2 <> FND_API.G_RET_STS_SUCCESS) THEN
10648: -- Log Error
10649: LOG_MESSAGE('copy_negotiation','Could not retrieve RETRIEVE_PARTY_PREF_COVER for p_pref_name= RANK_INDICATOR . Exception msg =' || l_pref_unused_3);
10650: l_pref_rank_indicator := 'NONE';
10651: END IF;
10670: x_pref_meaning => l_pref_pf_unused_1,
10671: x_status => l_pref_pf_unused_2,
10672: x_exception_msg => l_pref_pf_unused_3);
10673:
10674: IF (l_pref_pf_unused_2 <> FND_API.G_RET_STS_SUCCESS) THEN
10675: -- Log Error
10676: LOG_MESSAGE('copy_negotiation','Could not retrieve RETRIEVE_PARTY_PREF_COVER for p_pref_name= PF_TYPE_ALLOWED . Exception msg =' || l_pref_pf_unused_3);
10677: l_pref_pf_type := 'NONE';
10678:
11536: -- So, please be aware of that
11537: --
11538: FND_MESSAGE.SET_NAME('PON','PON_INVALID_BIZ_RULE');
11539: FND_MSG_PUB.ADD;
11540: RAISE FND_API.G_EXC_ERROR;
11541: END;
11542:
11543: --
11544: -- If we are copying a draft created from PO then Currency Code can be null
11811: -- So, please be aware of that
11812: FND_MESSAGE.SET_NAME('PON','PON_CONTRACT_COPY_ERR');
11813: FND_MESSAGE.SET_TOKEN('REASON',SUBSTR(l_error_message,1,300));
11814: FND_MSG_PUB.ADD;
11815: RAISE FND_API.G_EXC_ERROR;
11816: RETURN;
11817: END IF;
11818:
11819: LOG_MESSAGE('copy_negotiation','Copy Contracts: 3. Contract Site Id is:' || l_site_id);
11856: -- So, please be aware of that
11857: FND_MESSAGE.SET_NAME('PON','PON_CONTRACT_COPY_ERR');
11858: FND_MESSAGE.SET_TOKEN('REASON','Could not determine contact_id for fnd_user_id ' || fnd_global.user_id());
11859: FND_MSG_PUB.ADD;
11860: RAISE FND_API.G_EXC_ERROR;
11861: RETURN;
11862: END;
11863:
11864: --
11888: mo_global.set_policy_context('S', p_org_id);
11889:
11890: OKC_TERMS_COPY_GRP.COPY_DOC(
11891: p_api_version => 1.0,
11892: p_init_msg_list => FND_API.G_FALSE,
11893: p_commit => FND_API.G_FALSE,
11894: p_source_doc_type => p_contracts_doctype,
11895: p_source_doc_id => l_source_doc_id,
11896: p_target_doc_type => l_contracts_doctype,
11889:
11890: OKC_TERMS_COPY_GRP.COPY_DOC(
11891: p_api_version => 1.0,
11892: p_init_msg_list => FND_API.G_FALSE,
11893: p_commit => FND_API.G_FALSE,
11894: p_source_doc_type => p_contracts_doctype,
11895: p_source_doc_id => l_source_doc_id,
11896: p_target_doc_type => l_contracts_doctype,
11897: p_target_doc_id => l_auction_header_id,
11927: mo_global.set_policy_context(l_old_policy, l_old_org_id);
11928:
11929: LOG_MESSAGE('copy_negotiation',' Policy context is reset');
11930:
11931: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
11932: -- Log Error
11933: LOG_MESSAGE('copy_negotiation','Could not copy contracts for source_id =' || l_source_doc_id || ' to target document number =' || p_document_number );
11934: --
11935: -- The way I am adding this error may get changed in the future.
11937: --
11938: FND_MESSAGE.SET_NAME('PON','PON_CONTRACT_COPY_ERR');
11939: FND_MESSAGE.SET_TOKEN('REASON','Can not copy contracts for source_id =' || l_source_doc_id || '. Error returned by OKC_TERMS_COPY_GRP.COPY_DOC API is - ' || SUBSTR(l_msg_data,1,150));
11940: FND_MSG_PUB.ADD;
11941: RAISE FND_API.G_EXC_ERROR;
11942: RETURN;
11943: END IF;
11944: --}
11945: END IF;
12174: ELSE
12175: FND_MESSAGE.SET_NAME('PON','PON_INVALID_NEG_NUM');
12176: END IF;
12177: FND_MSG_PUB.ADD;
12178: RAISE FND_API.G_EXC_ERROR;
12179: END;
12180:
12181: else
12182:
12200: WHEN NO_DATA_FOUND THEN
12201: LOG_MESSAGE('SET_NEG_STYLE','Invalid Neg Num');
12202: FND_MESSAGE.SET_NAME('PON','PON_INVALID_NEG_NUM');
12203: FND_MSG_PUB.ADD;
12204: RAISE FND_API.G_EXC_ERROR;
12205: END;
12206:
12207: end if;
12208:
12628: PROCEDURE PON_CONC_COPY_SUPER_LARGE_NEG (
12629: EFFBUF OUT NOCOPY VARCHAR2,
12630: RETCODE OUT NOCOPY VARCHAR2,
12631: p_api_version IN NUMBER,
12632: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_TRUE,
12633: p_source_auction_header_id IN NUMBER,
12634: p_trading_partner_id IN NUMBER ,
12635: p_trading_partner_contact_id IN NUMBER ,
12636: p_language IN VARCHAR2,
12673:
12674: COPY_NEGOTIATION(
12675: p_api_version => p_api_version,
12676: p_init_msg_list => p_init_msg_list,
12677: p_is_conc_call => FND_API.G_TRUE,
12678: p_source_auction_header_id => p_source_auction_header_id,
12679: p_trading_partner_id => p_trading_partner_id,
12680: p_trading_partner_contact_id => p_trading_partner_contact_id,
12681: p_language => p_language,
12962: -- Once negotiation is copied, updates the AMENDMENT_FLAG accordingly.
12963: --
12964: -- Parameters:
12965: -- IN : p_api_version NUMBER Required
12966: -- IN : p_init_msg_list VARCHAR2 DEFAULT FND_API.G_TRUE Optional
12967: -- IN : p_is_conc_call VARCHAR2 Required This indicates if the
12968: -- procedure is called online or via a concurrent program
12969: -- IN : p_source_auction_header_id NUMBER Required, auction_header_id
12970: -- of the source negotiation
13025: --
13026: -- OUT : x_return_status VARCHAR2, flag to indicate if the copy procedure
13027: -- was successful or not; It can have
13028: -- following values -
13029: -- FND_API.G_RET_STS_SUCCESS (Success)
13030: -- FND_API.G_RET_STS_ERROR (Success with warning)
13031: -- FND_API.G_RET_STS_UNEXP_ERROR (Failed due to error)
13032: --
13033: -- OUT : x_msg_count NUMBER, the number of warning of error messages due
13026: -- OUT : x_return_status VARCHAR2, flag to indicate if the copy procedure
13027: -- was successful or not; It can have
13028: -- following values -
13029: -- FND_API.G_RET_STS_SUCCESS (Success)
13030: -- FND_API.G_RET_STS_ERROR (Success with warning)
13031: -- FND_API.G_RET_STS_UNEXP_ERROR (Failed due to error)
13032: --
13033: -- OUT : x_msg_count NUMBER, the number of warning of error messages due
13034: -- to this procedure call. It will have following
13027: -- was successful or not; It can have
13028: -- following values -
13029: -- FND_API.G_RET_STS_SUCCESS (Success)
13030: -- FND_API.G_RET_STS_ERROR (Success with warning)
13031: -- FND_API.G_RET_STS_UNEXP_ERROR (Failed due to error)
13032: --
13033: -- OUT : x_msg_count NUMBER, the number of warning of error messages due
13034: -- to this procedure call. It will have following
13035: -- values -
13119: LOG_MESSAGE('FED_CREATE_AMD_COPY_NEG',' OUT PARAMS : x_auction_header_id '
13120: || x_auction_header_id ||
13121: 'x_document_number : ' || x_document_number);
13122:
13123: if x_return_status in (FND_API.G_RET_STS_SUCCESS,'CONC_REQ_SUBMITTED')
13124: and x_auction_header_id is not null then
13125:
13126: LOG_MESSAGE('FED_CREATE_AMD_COPY_NEG','Updating AMENDMENT_FLAG ');
13127: