DBA Data[Home] [Help]

APPS.PO_MULTI_MOD_PVT dependencies on FND_API

Line 21: IF (p_cp_log = FND_API.G_TRUE) THEN

17: IF PO_LOG.d_stmt THEN
18: PO_LOG.stmt(p_module, p_progress, p_msg);
19: END IF;
20: -- Write the message to the concurrent program log file.
21: IF (p_cp_log = FND_API.G_TRUE) THEN
22: FND_FILE.put_line (FND_FILE.LOG, substrb(p_module || p_progress || ': ' || p_msg, 1, 2000));
23: END IF;
24:
25: END DEBUG;

Line 132: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

128: p_pkg_name => d_pkg_name,
129: p_procedure_name => d_api_name || '.' || d_position,
130: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
131: );
132: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
133:
134: END remove_mmod_doc_data;
135:
136: -------------------------------------------------------------------------------

Line 189: x_return_status := FND_API.G_RET_STS_SUCCESS;

185: --remove Contracts data
186: DELETE FROM po_multi_mod_clause_changes
187: WHERE multi_mod_request_id = p_multi_mod_request_id;
188:
189: x_return_status := FND_API.G_RET_STS_SUCCESS;
190: IF (PO_LOG.d_proc) THEN
191: PO_LOG.proc_end(d_module);
192: END IF;
193:

Line 196: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

192: END IF;
193:
194: EXCEPTION
195: WHEN OTHERS THEN
196: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
197: PO_MESSAGE_S.add_exc_msg(
198: p_pkg_name => d_pkg_name,
199: p_procedure_name => d_api_name || '.' || d_position,
200: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)

Line 244: IF l_return_status <> FND_API.G_RET_STS_SUCCESS

240: x_msg_data => l_msg_data
241: );
242:
243: d_position := 10;
244: IF l_return_status <> FND_API.G_RET_STS_SUCCESS
245: THEN
246: debug(d_module, d_position, 'An exception was encountered in PO_CLM_CLO_UTIL.Check_Uda_Enabled: '||l_msg_data, FND_API.G_TRUE);
247: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
248: END IF;

Line 246: debug(d_module, d_position, 'An exception was encountered in PO_CLM_CLO_UTIL.Check_Uda_Enabled: '||l_msg_data, FND_API.G_TRUE);

242:
243: d_position := 10;
244: IF l_return_status <> FND_API.G_RET_STS_SUCCESS
245: THEN
246: debug(d_module, d_position, 'An exception was encountered in PO_CLM_CLO_UTIL.Check_Uda_Enabled: '||l_msg_data, FND_API.G_TRUE);
247: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
248: END IF;
249:
250: d_position := 20;

Line 247: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

243: d_position := 10;
244: IF l_return_status <> FND_API.G_RET_STS_SUCCESS
245: THEN
246: debug(d_module, d_position, 'An exception was encountered in PO_CLM_CLO_UTIL.Check_Uda_Enabled: '||l_msg_data, FND_API.G_TRUE);
247: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
248: END IF;
249:
250: d_position := 20;
251: debug(d_module, d_position, 'Check_Uda_Enabled with x_enabled_flag : ' || l_enabled_flag);

Line 277: -- FND_API.G_RET_STS_SUCCESS if API succeeds

273: --OUT:
274: --p_draft_id
275: -- The draft Id of the newly created Modification
276: --x_return_status
277: -- FND_API.G_RET_STS_SUCCESS if API succeeds
278: -- FND_API.G_RET_STS_ERROR if API fails
279: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
280: --End of Comments
281: -------------------------------------------------------------------------------

Line 278: -- FND_API.G_RET_STS_ERROR if API fails

274: --p_draft_id
275: -- The draft Id of the newly created Modification
276: --x_return_status
277: -- FND_API.G_RET_STS_SUCCESS if API succeeds
278: -- FND_API.G_RET_STS_ERROR if API fails
279: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
280: --End of Comments
281: -------------------------------------------------------------------------------
282: PROCEDURE create_draft_from_txn(p_po_header_id IN NUMBER,

Line 279: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

275: -- The draft Id of the newly created Modification
276: --x_return_status
277: -- FND_API.G_RET_STS_SUCCESS if API succeeds
278: -- FND_API.G_RET_STS_ERROR if API fails
279: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
280: --End of Comments
281: -------------------------------------------------------------------------------
282: PROCEDURE create_draft_from_txn(p_po_header_id IN NUMBER,
283: x_draft_id OUT NOCOPY NUMBER,

Line 301: debug(d_module, d_position, 'Create row in PO_DRAFTS for the new Mod', FND_API.G_TRUE);

297: PO_LOG.proc_begin(d_module,'p_po_header_id',p_po_header_id);
298: END IF;
299:
300: d_position := 10;
301: debug(d_module, d_position, 'Create row in PO_DRAFTS for the new Mod', FND_API.G_TRUE);
302:
303: -- Fetch the new DraftId from sequence
304: l_draft_id:= PO_DRAFTS_PVT.draft_id_nextval;
305:

Line 335: debug(d_module, d_position, 'Create row into PO_HEADERS_DRAFT_ALL for the new Mod', FND_API.G_TRUE);

331: d_position := 20;
332: debug(d_module, d_position, 'Row created into PO_DRAFTS');
333:
334: d_position := 30;
335: debug(d_module, d_position, 'Create row into PO_HEADERS_DRAFT_ALL for the new Mod', FND_API.G_TRUE);
336:
337: PO_HEADERS_DRAFT_PKG.sync_draft_from_txn(
338: p_po_header_id => p_po_header_id,
339: p_draft_id => l_draft_id,

Line 345: x_return_status := FND_API.G_RET_STS_SUCCESS;

341: x_record_already_exist => l_record_already_exists
342: );
343:
344: x_draft_id := l_draft_id;
345: x_return_status := FND_API.G_RET_STS_SUCCESS;
346:
347: d_position := 40;
348: IF (PO_LOG.d_proc) THEN
349: PO_LOG.proc_end(d_module,'x_draft_id',x_draft_id);

Line 360: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);

356: p_pkg_name => d_pkg_name,
357: p_procedure_name => d_api_name || '.' || d_position,
358: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
359: );
360: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
361: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
362:
363: END create_draft_from_txn;
364:

Line 361: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

357: p_procedure_name => d_api_name || '.' || d_position,
358: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
359: );
360: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
361: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
362:
363: END create_draft_from_txn;
364:
365: -------------------------------------------------------------------------------

Line 404: -- FND_API.G_RET_STS_SUCCESS if API succeeds

400: --OUT:
401: --x_mod_number
402: -- The Modification Number of the newly created Mod
403: --x_return_status
404: -- FND_API.G_RET_STS_SUCCESS if API succeeds
405: -- FND_API.G_RET_STS_ERROR if API fails
406: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
407: --End of Comments
408: -------------------------------------------------------------------------------

Line 405: -- FND_API.G_RET_STS_ERROR if API fails

401: --x_mod_number
402: -- The Modification Number of the newly created Mod
403: --x_return_status
404: -- FND_API.G_RET_STS_SUCCESS if API succeeds
405: -- FND_API.G_RET_STS_ERROR if API fails
406: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
407: --End of Comments
408: -------------------------------------------------------------------------------
409: PROCEDURE default_and_merge_mod_data(p_multi_mod_request_record IN po_multi_mod_requests%ROWTYPE,

Line 406: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

402: -- The Modification Number of the newly created Mod
403: --x_return_status
404: -- FND_API.G_RET_STS_SUCCESS if API succeeds
405: -- FND_API.G_RET_STS_ERROR if API fails
406: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
407: --End of Comments
408: -------------------------------------------------------------------------------
409: PROCEDURE default_and_merge_mod_data(p_multi_mod_request_record IN po_multi_mod_requests%ROWTYPE,
410: p_po_header_id IN NUMBER,

Line 474: debug(d_module, d_position, 'Copy Header UDA Attributes from Base document to Mod', FND_API.G_TRUE);

470: -- Do UDA related handling if doc is UDA enabled
471: IF p_is_uda_enabled = 'Y' THEN
472:
473: d_position := 20;
474: debug(d_module, d_position, 'Copy Header UDA Attributes from Base document to Mod', FND_API.G_TRUE);
475:
476: --We should not copy the document numbering usages, so adding the
477: --document numbering usage of the Base Document in the exclusion list
478:

Line 515: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

511: x_msg_count => l_msg_count,
512: x_msg_data => l_msg_data
513: );
514:
515: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
516: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DATA_UTIL.Copy_User_Attrs: '||l_msg_data, FND_API.G_TRUE);
517: RAISE FND_API.g_exc_unexpected_error;
518: END IF;
519:

Line 516: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DATA_UTIL.Copy_User_Attrs: '||l_msg_data, FND_API.G_TRUE);

512: x_msg_data => l_msg_data
513: );
514:
515: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
516: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DATA_UTIL.Copy_User_Attrs: '||l_msg_data, FND_API.G_TRUE);
517: RAISE FND_API.g_exc_unexpected_error;
518: END IF;
519:
520: d_position := 30;

Line 517: RAISE FND_API.g_exc_unexpected_error;

513: );
514:
515: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
516: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DATA_UTIL.Copy_User_Attrs: '||l_msg_data, FND_API.G_TRUE);
517: RAISE FND_API.g_exc_unexpected_error;
518: END IF;
519:
520: d_position := 30;
521: debug(d_module, d_position, 'Copy Multi-Mod Specific UDA Attributes to Mod', FND_API.G_TRUE);

Line 521: debug(d_module, d_position, 'Copy Multi-Mod Specific UDA Attributes to Mod', FND_API.G_TRUE);

517: RAISE FND_API.g_exc_unexpected_error;
518: END IF;
519:
520: d_position := 30;
521: debug(d_module, d_position, 'Copy Multi-Mod Specific UDA Attributes to Mod', FND_API.G_TRUE);
522:
523: --We should not copy the Multi-Mod Address usages. They will be merged later
524: l_ags_table := PO_TBL_VARCHAR30(l_address_ag_name);
525:

Line 558: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

554: WHERE po_header_id = p_po_header_id
555: AND draft_id = p_draft_id
556: AND c_ext_attr39 NOT IN ('MOD_ADMIN_OFFICE', 'MOD_ISSUING_OFFICE');
557:
558: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
559: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DATA_UTIL.Copy_User_Attrs: '||l_msg_data, FND_API.G_TRUE);
560: RAISE FND_API.g_exc_unexpected_error;
561: END IF;
562:

Line 559: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DATA_UTIL.Copy_User_Attrs: '||l_msg_data, FND_API.G_TRUE);

555: AND draft_id = p_draft_id
556: AND c_ext_attr39 NOT IN ('MOD_ADMIN_OFFICE', 'MOD_ISSUING_OFFICE');
557:
558: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
559: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DATA_UTIL.Copy_User_Attrs: '||l_msg_data, FND_API.G_TRUE);
560: RAISE FND_API.g_exc_unexpected_error;
561: END IF;
562:
563: d_position := 40;

Line 560: RAISE FND_API.g_exc_unexpected_error;

556: AND c_ext_attr39 NOT IN ('MOD_ADMIN_OFFICE', 'MOD_ISSUING_OFFICE');
557:
558: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
559: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DATA_UTIL.Copy_User_Attrs: '||l_msg_data, FND_API.G_TRUE);
560: RAISE FND_API.g_exc_unexpected_error;
561: END IF;
562:
563: d_position := 40;
564: debug(d_module, d_position, 'Default Document Number for the Mod', FND_API.G_TRUE);

Line 564: debug(d_module, d_position, 'Default Document Number for the Mod', FND_API.G_TRUE);

560: RAISE FND_API.g_exc_unexpected_error;
561: END IF;
562:
563: d_position := 40;
564: debug(d_module, d_position, 'Default Document Number for the Mod', FND_API.G_TRUE);
565:
566: PO_DOC_NUMBERING_PKG.DEFAULT_DOC_NUMBER_UDA(
567: p_doc_header_id => p_po_header_id,
568: p_draft_id => p_draft_id,

Line 577: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

573: x_doc_number => l_doc_number,
574: x_return_status => x_return_status
575: );
576:
577: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
578: debug(d_module, d_position, 'An exception was encountered in PO_DOC_NUMBERING_PKG.DEFAULT_DOC_NUMBER_UDA', FND_API.G_TRUE);
579: RAISE FND_API.g_exc_unexpected_error;
580: END IF;
581:

Line 578: debug(d_module, d_position, 'An exception was encountered in PO_DOC_NUMBERING_PKG.DEFAULT_DOC_NUMBER_UDA', FND_API.G_TRUE);

574: x_return_status => x_return_status
575: );
576:
577: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
578: debug(d_module, d_position, 'An exception was encountered in PO_DOC_NUMBERING_PKG.DEFAULT_DOC_NUMBER_UDA', FND_API.G_TRUE);
579: RAISE FND_API.g_exc_unexpected_error;
580: END IF;
581:
582: END IF; --IF check_uda_enabled(p_po_header_id)

Line 579: RAISE FND_API.g_exc_unexpected_error;

575: );
576:
577: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
578: debug(d_module, d_position, 'An exception was encountered in PO_DOC_NUMBERING_PKG.DEFAULT_DOC_NUMBER_UDA', FND_API.G_TRUE);
579: RAISE FND_API.g_exc_unexpected_error;
580: END IF;
581:
582: END IF; --IF check_uda_enabled(p_po_header_id)
583:

Line 652: debug(d_module, d_position, 'Update PO_DRAFTS with the Mod-specific defaults and Multi-mod fields', FND_API.G_TRUE);

648: p_doc_sub_type => p_doc_subtype);
649: --
650:
651: d_position := 60;
652: debug(d_module, d_position, 'Update PO_DRAFTS with the Mod-specific defaults and Multi-mod fields', FND_API.G_TRUE);
653:
654: UPDATE po_drafts
655: SET modification_number = l_doc_number,
656: clm_standard_form = l_standard_form,

Line 665: debug(d_module, d_position, 'Update PO_DRAFT_HEADERS_ALL with the Mod-specific defaults and Multi-mod fields', FND_API.G_TRUE);

661: agent_id = p_multi_mod_request_record.agent_id --added as part of conc mod impacts
662: WHERE draft_id = p_draft_id;
663:
664: d_position := 70;
665: debug(d_module, d_position, 'Update PO_DRAFT_HEADERS_ALL with the Mod-specific defaults and Multi-mod fields', FND_API.G_TRUE);
666:
667: UPDATE po_headers_draft_all
668: SET ame_approval_id = l_ame_approval_id,
669: ame_transaction_type = l_ame_transaction_type,

Line 683: debug(d_module, d_position, 'Copy Contract Terms to Mod', FND_API.G_TRUE);

679: WHERE po_header_id = p_po_header_id
680: AND draft_id = p_draft_id;
681:
682: d_position := 80;
683: debug(d_module, d_position, 'Copy Contract Terms to Mod', FND_API.G_TRUE);
684:
685: PO_CONTERMS_UTL_GRP.Copy_Conterms_Mod(
686: p_document_id => p_po_header_id,
687: p_draft_id => p_draft_id,

Line 692: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

688: p_to_mod => 'Y',
689: x_return_status => x_return_status
690: );
691:
692: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
693: debug(d_module, d_position, 'An exception was encountered in PO_CONTERMS_UTL_GRP.Copy_Conterms_Mod', FND_API.G_TRUE);
694: RAISE FND_API.g_exc_unexpected_error;
695: END IF;
696:

Line 693: debug(d_module, d_position, 'An exception was encountered in PO_CONTERMS_UTL_GRP.Copy_Conterms_Mod', FND_API.G_TRUE);

689: x_return_status => x_return_status
690: );
691:
692: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
693: debug(d_module, d_position, 'An exception was encountered in PO_CONTERMS_UTL_GRP.Copy_Conterms_Mod', FND_API.G_TRUE);
694: RAISE FND_API.g_exc_unexpected_error;
695: END IF;
696:
697: x_mod_number := l_doc_number;

Line 694: RAISE FND_API.g_exc_unexpected_error;

690: );
691:
692: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
693: debug(d_module, d_position, 'An exception was encountered in PO_CONTERMS_UTL_GRP.Copy_Conterms_Mod', FND_API.G_TRUE);
694: RAISE FND_API.g_exc_unexpected_error;
695: END IF;
696:
697: x_mod_number := l_doc_number;
698: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 698: x_return_status := FND_API.G_RET_STS_SUCCESS;

694: RAISE FND_API.g_exc_unexpected_error;
695: END IF;
696:
697: x_mod_number := l_doc_number;
698: x_return_status := FND_API.G_RET_STS_SUCCESS;
699:
700: d_position := 90;
701: IF (PO_LOG.d_proc) THEN
702: PO_LOG.proc_end(d_module);

Line 712: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);

708: p_pkg_name => d_pkg_name,
709: p_procedure_name => d_api_name || '.' || d_position,
710: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
711: );
712: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
713: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
714:
715: END default_and_merge_mod_data;
716:

Line 713: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

709: p_procedure_name => d_api_name || '.' || d_position,
710: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
711: );
712: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
713: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
714:
715: END default_and_merge_mod_data;
716:
717: -------------------------------------------------------------------------------

Line 747: -- FND_API.G_RET_STS_SUCCESS if API succeeds

743: -- UDA Enabled Flag
744: --p_addr_change_flag
745: -- Flag will indicate if there are any address changes in the Multi-Mod request
746: --x_return_status
747: -- FND_API.G_RET_STS_SUCCESS if API succeeds
748: -- FND_API.G_RET_STS_ERROR if API fails
749: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
750: --End of Comments
751: -------------------------------------------------------------------------------

Line 748: -- FND_API.G_RET_STS_ERROR if API fails

744: --p_addr_change_flag
745: -- Flag will indicate if there are any address changes in the Multi-Mod request
746: --x_return_status
747: -- FND_API.G_RET_STS_SUCCESS if API succeeds
748: -- FND_API.G_RET_STS_ERROR if API fails
749: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
750: --End of Comments
751: -------------------------------------------------------------------------------
752: PROCEDURE merge_multi_mod_addresses(p_uda_key_po_header_id IN NUMBER,

Line 749: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

745: -- Flag will indicate if there are any address changes in the Multi-Mod request
746: --x_return_status
747: -- FND_API.G_RET_STS_SUCCESS if API succeeds
748: -- FND_API.G_RET_STS_ERROR if API fails
749: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
750: --End of Comments
751: -------------------------------------------------------------------------------
752: PROCEDURE merge_multi_mod_addresses(p_uda_key_po_header_id IN NUMBER,
753: p_uda_key_draft_id IN NUMBER,

Line 812: debug(d_module, d_position, 'Merge the Mod-specific addresses into Headers Ext tables', FND_API.G_TRUE);

808: WHERE attr_group_type = l_addr_attr_grp_type
809: AND attr_group_name = l_addr_attr_grp_name;
810:
811: d_position := 20;
812: debug(d_module, d_position, 'Merge the Mod-specific addresses into Headers Ext tables', FND_API.G_TRUE);
813:
814: OPEN po_headers_ext_cursor(l_addr_attr_group_id);
815: FETCH po_headers_ext_cursor BULK COLLECT INTO l_old_hdr_ext_id_tbl, l_new_hdr_ext_id_tbl;
816: CLOSE po_headers_ext_cursor;

Line 1175: debug(d_module, d_position, 'Merge the Address records as Address changes exist on Multi-Mod', FND_API.G_TRUE);

1171: -- Merge the Multi-Mod Addresses only if there exists at least one address change on the Multi-Mod
1172: IF (p_addr_change_flag = 'Y') THEN
1173:
1174: d_position := 50;
1175: debug(d_module, d_position, 'Merge the Address records as Address changes exist on Multi-Mod', FND_API.G_TRUE);
1176:
1177: d_position := 60;
1178: debug(d_module, d_position, 'Merge records in Address B Table');
1179: -- Update Headers Ext Table with addresses from the Multi-Mod (stored against

Line 1477: debug(d_module, d_position, 'Execute the XPD Function for the Addresses as part of post save', FND_API.G_TRUE);

1473: END IF; --IF (p_addr_change_flag = 'Y')
1474:
1475: -- Execute the XPD Function for the Addresses as part of post save
1476: d_position := 70;
1477: debug(d_module, d_position, 'Execute the XPD Function for the Addresses as part of post save', FND_API.G_TRUE);
1478:
1479: -- Setting the draft ID here which will be used in Post DML Functions.
1480: PO_FED_FIELD_FUNCTIONS.XPD_DRAFT_ID := p_draft_id;
1481:

Line 1494: IF (x_return_status <> FND_API.g_ret_sts_success) THEN

1490: x_msg_count => l_msg_count,
1491: x_msg_data => l_msg_data
1492: );
1493:
1494: IF (x_return_status <> FND_API.g_ret_sts_success) THEN
1495: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DEFAULTING_PKG.UDA_EXECUTE_ACTIONS'||
1496: '(with p_event_type => XPD): ' || l_msg_data, FND_API.G_TRUE);
1497: RAISE FND_API.g_exc_unexpected_error;
1498: END IF;

Line 1496: '(with p_event_type => XPD): ' || l_msg_data, FND_API.G_TRUE);

1492: );
1493:
1494: IF (x_return_status <> FND_API.g_ret_sts_success) THEN
1495: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DEFAULTING_PKG.UDA_EXECUTE_ACTIONS'||
1496: '(with p_event_type => XPD): ' || l_msg_data, FND_API.G_TRUE);
1497: RAISE FND_API.g_exc_unexpected_error;
1498: END IF;
1499:
1500: d_position := 80;

Line 1497: RAISE FND_API.g_exc_unexpected_error;

1493:
1494: IF (x_return_status <> FND_API.g_ret_sts_success) THEN
1495: debug(d_module, d_position, 'An exception was encountered in PO_UDA_DEFAULTING_PKG.UDA_EXECUTE_ACTIONS'||
1496: '(with p_event_type => XPD): ' || l_msg_data, FND_API.G_TRUE);
1497: RAISE FND_API.g_exc_unexpected_error;
1498: END IF;
1499:
1500: d_position := 80;
1501: IF (PO_LOG.d_proc) THEN

Line 1512: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);

1508: p_pkg_name => d_pkg_name,
1509: p_procedure_name => d_api_name || '.' || d_position,
1510: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
1511: );
1512: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
1513: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1514: END merge_multi_mod_addresses;
1515:
1516: -------------------------------------------------------------------------------

Line 1513: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1509: p_procedure_name => d_api_name || '.' || d_position,
1510: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
1511: );
1512: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
1513: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1514: END merge_multi_mod_addresses;
1515:
1516: -------------------------------------------------------------------------------
1517: --Start of Comments

Line 1549: -- FND_API.G_RET_STS_SUCCESS if API succeeds

1545: -- XML Flag
1546: --x_edi_flag
1547: -- EDI Flag
1548: --x_return_status
1549: -- FND_API.G_RET_STS_SUCCESS if API succeeds
1550: -- FND_API.G_RET_STS_ERROR if API fails
1551: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1552: --End of Comments
1553: -------------------------------------------------------------------------------

Line 1550: -- FND_API.G_RET_STS_ERROR if API fails

1546: --x_edi_flag
1547: -- EDI Flag
1548: --x_return_status
1549: -- FND_API.G_RET_STS_SUCCESS if API succeeds
1550: -- FND_API.G_RET_STS_ERROR if API fails
1551: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1552: --End of Comments
1553: -------------------------------------------------------------------------------
1554:

Line 1551: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

1547: -- EDI Flag
1548: --x_return_status
1549: -- FND_API.G_RET_STS_SUCCESS if API succeeds
1550: -- FND_API.G_RET_STS_ERROR if API fails
1551: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1552: --End of Comments
1553: -------------------------------------------------------------------------------
1554:
1555: PROCEDURE fetch_supplier_comm_defaults(p_vendor_id IN NUMBER,

Line 1683: x_return_status := FND_API.G_RET_STS_SUCCESS;

1679: x_default_method := 'NONE';
1680: END IF;
1681: -- End Default Supplier Communication Method
1682:
1683: x_return_status := FND_API.G_RET_STS_SUCCESS;
1684:
1685: d_position := 50;
1686: IF (PO_LOG.d_proc) THEN
1687: PO_LOG.proc_end(d_module);

Line 1697: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);

1693: p_pkg_name => d_pkg_name,
1694: p_procedure_name => d_api_name || '.' || d_position,
1695: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
1696: );
1697: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
1698: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1699: END fetch_supplier_comm_defaults;
1700:
1701: -------------------------------------------------------------------------------

Line 1698: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1694: p_procedure_name => d_api_name || '.' || d_position,
1695: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
1696: );
1697: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
1698: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1699: END fetch_supplier_comm_defaults;
1700:
1701: -------------------------------------------------------------------------------
1702: --Start of Comments

Line 1734: -- FND_API.G_RET_STS_SUCCESS if API succeeds

1730: --p_org_id
1731: -- The OrgId of the new Modification
1732: --OUT:
1733: --x_return_status
1734: -- FND_API.G_RET_STS_SUCCESS if API succeeds
1735: -- FND_API.G_RET_STS_ERROR if API fails
1736: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1737: --End of Comments
1738: -------------------------------------------------------------------------------

Line 1735: -- FND_API.G_RET_STS_ERROR if API fails

1731: -- The OrgId of the new Modification
1732: --OUT:
1733: --x_return_status
1734: -- FND_API.G_RET_STS_SUCCESS if API succeeds
1735: -- FND_API.G_RET_STS_ERROR if API fails
1736: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1737: --End of Comments
1738: -------------------------------------------------------------------------------
1739: PROCEDURE merge_supplier_uda(p_multi_mod_request_type IN VARCHAR2,

Line 1736: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

1732: --OUT:
1733: --x_return_status
1734: -- FND_API.G_RET_STS_SUCCESS if API succeeds
1735: -- FND_API.G_RET_STS_ERROR if API fails
1736: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1737: --End of Comments
1738: -------------------------------------------------------------------------------
1739: PROCEDURE merge_supplier_uda(p_multi_mod_request_type IN VARCHAR2,
1740: p_po_header_id IN NUMBER,

Line 1858: debug(d_module, d_position, 'Calling ' || d_called_api || ' to fetch Supplier AG Attributes', FND_API.G_TRUE);

1854: );
1855:
1856: d_position := 40;
1857: d_called_api := 'EGO_USER_ATTRS_DATA_PUB.Get_User_Attrs_Data';
1858: debug(d_module, d_position, 'Calling ' || d_called_api || ' to fetch Supplier AG Attributes', FND_API.G_TRUE);
1859:
1860: EGO_USER_ATTRS_DATA_PUB.Get_User_Attrs_Data(
1861: p_api_version => 1.0,
1862: p_object_name => PO_UDA_DATA_UTIL.g_object_dff_tl(l_entity_code).l_object_name,

Line 1876: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1872:
1873: d_position := 50;
1874: debug(d_module, d_position, 'After Calling EGO_USER_ATTRS_DATA_PVT.get_user_attrs_data ' ||
1875: 'Return Status ' || x_return_status);
1876: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1877: IF (p_multi_mod_request_type = l_change_type_vendor_name) THEN
1878: --For Supplier Name change, we re-default the CDI Attrs using XRD
1879: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_return_status', FND_API.G_RET_STS_SUCCESS, l_external_attr_value_pairs);
1880: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_errorcode', '0', l_external_attr_value_pairs);

Line 1879: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_return_status', FND_API.G_RET_STS_SUCCESS, l_external_attr_value_pairs);

1875: 'Return Status ' || x_return_status);
1876: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1877: IF (p_multi_mod_request_type = l_change_type_vendor_name) THEN
1878: --For Supplier Name change, we re-default the CDI Attrs using XRD
1879: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_return_status', FND_API.G_RET_STS_SUCCESS, l_external_attr_value_pairs);
1880: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_errorcode', '0', l_external_attr_value_pairs);
1881: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_msg_count', '0', l_external_attr_value_pairs);
1882: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_msg_data', 'SUCCESS', l_external_attr_value_pairs);
1883:

Line 1886: debug(d_module, d_position, 'Calling ' || d_called_api || ' to refresh Supplier CDI Attributes', FND_API.G_TRUE);

1882: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_msg_data', 'SUCCESS', l_external_attr_value_pairs);
1883:
1884: d_position := 60;
1885: d_called_api := 'PO_UDA_IMPORT_PKG.execute_import_uda_function(with p_event => XRD)';
1886: debug(d_module, d_position, 'Calling ' || d_called_api || ' to refresh Supplier CDI Attributes', FND_API.G_TRUE);
1887:
1888: -- Call the XRD Function to refresh Supplier CDI Attributes
1889: PO_UDA_IMPORT_PKG.execute_import_uda_function(
1890: p_template_id => l_class_code_name_value_pairs(l_class_code_name_value_pairs.FIRST).Value,

Line 1908: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_return_status', FND_API.G_RET_STS_SUCCESS, l_external_attr_value_pairs);

1904: 'for XRD Function Return Status ' || x_return_status);
1905:
1906: ELSIF (p_multi_mod_request_type = l_change_type_vendor) THEN
1907: --For Supplier Name change, we re-default the CDI Attrs using XD and then XLE(for RemitToAddr)
1908: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_return_status', FND_API.G_RET_STS_SUCCESS, l_external_attr_value_pairs);
1909: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_errorcode', '0', l_external_attr_value_pairs);
1910: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_msg_count', '0', l_external_attr_value_pairs);
1911: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('x_msg_data', 'SUCCESS', l_external_attr_value_pairs);
1912: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('VENDOR_CONTACT_ID', p_vendor_contact_id || '', l_external_attr_value_pairs);

Line 1919: debug(d_module, d_position, 'Calling ' || d_called_api || ' to default Supplier CDI Attributes', FND_API.G_TRUE);

1915: PO_UDA_DEFAULTING_PKG.SET_EXT_ATTR_NAME_VALUE_PAIR('ORG_ID', p_org_id || '', l_external_attr_value_pairs);
1916:
1917: d_position := 80;
1918: d_called_api := 'PO_UDA_IMPORT_PKG.execute_import_uda_function(with p_event => XD)';
1919: debug(d_module, d_position, 'Calling ' || d_called_api || ' to default Supplier CDI Attributes', FND_API.G_TRUE);
1920:
1921: -- Call the XD Function to default Supplier CDI Attributes
1922: PO_UDA_IMPORT_PKG.execute_import_uda_function(
1923: p_template_id => l_class_code_name_value_pairs(l_class_code_name_value_pairs.FIRST).Value,

Line 1939: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1935: d_position := 90;
1936: debug(d_module, d_position, 'After Calling PO_UDA_IMPORT_PKG.EXECUTE_IMPORT_UDA_FUNCTION ' ||
1937: 'for XD Function Return Status ' || x_return_status);
1938:
1939: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1940:
1941: -- Update the RemitToAddr in the Supplier AG with the new value in order to re-default the RemitToAddr CDI Attributes
1942: FOR i in 1..l_attr_name_value_pairs.count LOOP
1943: IF l_attr_name_value_pairs(i).ATTR_NAME = 'REMIT_TO_ADDRS' THEN

Line 1951: debug(d_module, d_position, 'Calling ' || d_called_api || ' to default RemitToAddress dependent Attrs', FND_API.G_TRUE);

1947: END LOOP;
1948:
1949: d_position := 100;
1950: d_called_api := 'PO_UDA_IMPORT_PKG.execute_import_uda_function(with p_event => XLE)';
1951: debug(d_module, d_position, 'Calling ' || d_called_api || ' to default RemitToAddress dependent Attrs', FND_API.G_TRUE);
1952:
1953: -- Call the XLE Function to default Supplier RemitToAddress dependent Attributes
1954: PO_UDA_IMPORT_PKG.execute_import_uda_function(
1955: p_template_id => l_class_code_name_value_pairs(l_class_code_name_value_pairs.FIRST).Value,

Line 1971: END IF;-- IF x_return_status = FND_API.G_RET_STS_SUCCESS

1967: d_position := 110;
1968: debug(d_module, d_position, 'After Calling PO_UDA_IMPORT_PKG.EXECUTE_IMPORT_UDA_FUNCTION ' ||
1969: 'for XLE Function Return Status ' || x_return_status);
1970:
1971: END IF;-- IF x_return_status = FND_API.G_RET_STS_SUCCESS
1972: END IF;--IF(p_multi_mod_request_type = d_change_type_vendor_name)
1973:
1974: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1975: --Need to populate the UDA data back (Sync the new defaults with existing)

Line 1974: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

1970:
1971: END IF;-- IF x_return_status = FND_API.G_RET_STS_SUCCESS
1972: END IF;--IF(p_multi_mod_request_type = d_change_type_vendor_name)
1973:
1974: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
1975: --Need to populate the UDA data back (Sync the new defaults with existing)
1976: l_base_object_name := PO_UDA_DATA_UTIL.g_object_dff_tl(l_entity_code).l_object_name;
1977:
1978: d_position := 120;

Line 1980: debug(d_module, d_position, 'Calling ' || d_called_api || ' to populate the updated Supplier Attrs', FND_API.G_TRUE);

1976: l_base_object_name := PO_UDA_DATA_UTIL.g_object_dff_tl(l_entity_code).l_object_name;
1977:
1978: d_position := 120;
1979: d_called_api := 'EGO_USER_ATTRS_DATA_PUB.Process_User_Attrs_Data';
1980: debug(d_module, d_position, 'Calling ' || d_called_api || ' to populate the updated Supplier Attrs', FND_API.G_TRUE);
1981:
1982: EGO_USER_ATTRS_DATA_PUB.Process_User_Attrs_Data(
1983: p_api_version => 1.0,
1984: p_object_name => l_base_object_name,

Line 2000: END IF; -- IF x_return_status = FND_API.G_RET_STS_SUCCESS

1996: d_position := 130;
1997: debug(d_module, d_position, 'After Calling EGO_USER_ATTRS_DATA_PUB.Process_User_Attrs_Data ' ||
1998: 'for populating Supplier Attrs. Return Status ' || x_return_status);
1999: END IF;
2000: END IF; -- IF x_return_status = FND_API.G_RET_STS_SUCCESS
2001:
2002: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2003: debug(d_module, d_position, 'An exception was encountered in ' || d_called_api || ': ' || l_msg_data, FND_API.G_TRUE);
2004: RAISE FND_API.g_exc_unexpected_error;

Line 2002: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

1998: 'for populating Supplier Attrs. Return Status ' || x_return_status);
1999: END IF;
2000: END IF; -- IF x_return_status = FND_API.G_RET_STS_SUCCESS
2001:
2002: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2003: debug(d_module, d_position, 'An exception was encountered in ' || d_called_api || ': ' || l_msg_data, FND_API.G_TRUE);
2004: RAISE FND_API.g_exc_unexpected_error;
2005: END IF;
2006:

Line 2003: debug(d_module, d_position, 'An exception was encountered in ' || d_called_api || ': ' || l_msg_data, FND_API.G_TRUE);

1999: END IF;
2000: END IF; -- IF x_return_status = FND_API.G_RET_STS_SUCCESS
2001:
2002: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2003: debug(d_module, d_position, 'An exception was encountered in ' || d_called_api || ': ' || l_msg_data, FND_API.G_TRUE);
2004: RAISE FND_API.g_exc_unexpected_error;
2005: END IF;
2006:
2007: d_position := 140;

Line 2004: RAISE FND_API.g_exc_unexpected_error;

2000: END IF; -- IF x_return_status = FND_API.G_RET_STS_SUCCESS
2001:
2002: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2003: debug(d_module, d_position, 'An exception was encountered in ' || d_called_api || ': ' || l_msg_data, FND_API.G_TRUE);
2004: RAISE FND_API.g_exc_unexpected_error;
2005: END IF;
2006:
2007: d_position := 140;
2008: IF (PO_LOG.d_proc) THEN

Line 2019: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);

2015: p_pkg_name => d_pkg_name,
2016: p_procedure_name => d_api_name || '.' || d_position,
2017: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
2018: );
2019: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
2020: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2021: END merge_supplier_uda;
2022:
2023: -------------------------------------------------------------------------------

Line 2020: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2016: p_procedure_name => d_api_name || '.' || d_position,
2017: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
2018: );
2019: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
2020: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2021: END merge_supplier_uda;
2022:
2023: -------------------------------------------------------------------------------
2024: --Start of Comments

Line 2050: -- FND_API.G_RET_STS_SUCCESS if API succeeds

2046: --p_is_uda_enabled
2047: -- UDA Enabled Flag
2048: --OUT:
2049: --x_return_status
2050: -- FND_API.G_RET_STS_SUCCESS if API succeeds
2051: -- FND_API.G_RET_STS_ERROR if API fails
2052: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
2053: --End of Comments
2054: -------------------------------------------------------------------------------

Line 2051: -- FND_API.G_RET_STS_ERROR if API fails

2047: -- UDA Enabled Flag
2048: --OUT:
2049: --x_return_status
2050: -- FND_API.G_RET_STS_SUCCESS if API succeeds
2051: -- FND_API.G_RET_STS_ERROR if API fails
2052: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
2053: --End of Comments
2054: -------------------------------------------------------------------------------
2055: PROCEDURE merge_multi_mod_supplier(p_multi_mod_request_id IN NUMBER,

Line 2052: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

2048: --OUT:
2049: --x_return_status
2050: -- FND_API.G_RET_STS_SUCCESS if API succeeds
2051: -- FND_API.G_RET_STS_ERROR if API fails
2052: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
2053: --End of Comments
2054: -------------------------------------------------------------------------------
2055: PROCEDURE merge_multi_mod_supplier(p_multi_mod_request_id IN NUMBER,
2056: p_multi_mod_request_type IN VARCHAR2,

Line 2116: debug(d_module, d_position, 'Calling merge_supplier_uda for merging Supplier UDA Attributes', FND_API.G_TRUE);

2112: debug(d_module, d_position, 'Request Type is Supplier Name Change.');
2113:
2114: IF p_is_uda_enabled = 'Y' THEN
2115: d_position := 30;
2116: debug(d_module, d_position, 'Calling merge_supplier_uda for merging Supplier UDA Attributes', FND_API.G_TRUE);
2117:
2118: merge_supplier_uda(
2119: p_multi_mod_request_type => p_multi_mod_request_type,
2120: p_po_header_id => p_po_header_id,

Line 2224: debug(d_module, d_position, 'Calling fetch_supplier_comm_defaults API to fetch Supplier communication defaults', FND_API.G_TRUE);

2220: FROM po_vendor_sites_all
2221: WHERE vendor_site_id = l_new_vendor_site_id;
2222:
2223: d_position := 65;
2224: debug(d_module, d_position, 'Calling fetch_supplier_comm_defaults API to fetch Supplier communication defaults', FND_API.G_TRUE);
2225: -- Get Supplier Communication defaults
2226: fetch_supplier_comm_defaults(
2227: p_vendor_id => l_new_vendor_id,
2228: p_vendor_site_id => l_new_vendor_site_id,

Line 2248: debug(d_module, d_position, 'Updating the Mod with new Supplier details', FND_API.G_TRUE);

2244: debug(d_module, d_position, 'l_new_vendor_name: '||l_new_vendor_name);
2245: debug(d_module, d_position, 'l_new_vendor_site_name: '||l_new_vendor_site_name);
2246:
2247: d_position := 80;
2248: debug(d_module, d_position, 'Updating the Mod with new Supplier details', FND_API.G_TRUE);
2249:
2250: UPDATE po_headers_draft_all
2251: SET vendor_id = l_new_vendor_id,
2252: vendor_site_id = l_new_vendor_site_id,

Line 2267: debug(d_module, d_position, 'Syncing the Org Assignment Sites with the new Site Details', FND_API.G_TRUE);

2263:
2264: --Sync the Org Assignment Sites with the new Site Details for Agreements
2265: IF (l_doc_subtype in ('BLANKET', 'CONTRACT')) THEN
2266: d_position := 90;
2267: debug(d_module, d_position, 'Syncing the Org Assignment Sites with the new Site Details', FND_API.G_TRUE);
2268:
2269: INSERT INTO po_ga_org_assign_draft(
2270: draft_id,
2271: delete_flag,

Line 2314: debug(d_module, d_position, 'Calling merge_supplier_uda for merging Supplier UDA Attributes', FND_API.G_TRUE);

2310:
2311: --Merge RemitToAddress and other Supplier-related UDA Attributes
2312: IF p_is_uda_enabled = 'Y' THEN --Do the UDA related processing for the Mod if UDA Enabled
2313: d_position := 100;
2314: debug(d_module, d_position, 'Calling merge_supplier_uda for merging Supplier UDA Attributes', FND_API.G_TRUE);
2315:
2316: merge_supplier_uda(
2317: p_multi_mod_request_type => p_multi_mod_request_type,
2318: p_po_header_id => p_po_header_id,

Line 2333: x_return_status := FND_API.G_RET_STS_SUCCESS;

2329: END IF;
2330:
2331: END IF;--IF(p_multi_mod_request_type = d_change_type_vendor_name)
2332:
2333: x_return_status := FND_API.G_RET_STS_SUCCESS;
2334:
2335: d_position := 110;
2336: IF (PO_LOG.d_proc) THEN
2337: PO_LOG.proc_end(d_module);

Line 2347: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);

2343: p_pkg_name => d_pkg_name,
2344: p_procedure_name => d_api_name || '.' || d_position,
2345: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
2346: );
2347: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
2348: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2349: END merge_multi_mod_supplier;
2350:
2351: -------------------------------------------------------------------------------

Line 2348: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2344: p_procedure_name => d_api_name || '.' || d_position,
2345: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
2346: );
2347: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
2348: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2349: END merge_multi_mod_supplier;
2350:
2351: -------------------------------------------------------------------------------
2352: --Start of Comments

Line 2373: -- FND_API.G_RET_STS_SUCCESS if API succeeds

2369: --p_draft_id
2370: -- The draft Id of the newly created Modification
2371: --OUT:
2372: --x_return_status
2373: -- FND_API.G_RET_STS_SUCCESS if API succeeds
2374: -- FND_API.G_RET_STS_ERROR if API fails
2375: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
2376: --End of Comments
2377: -------------------------------------------------------------------------------

Line 2374: -- FND_API.G_RET_STS_ERROR if API fails

2370: -- The draft Id of the newly created Modification
2371: --OUT:
2372: --x_return_status
2373: -- FND_API.G_RET_STS_SUCCESS if API succeeds
2374: -- FND_API.G_RET_STS_ERROR if API fails
2375: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
2376: --End of Comments
2377: -------------------------------------------------------------------------------
2378: PROCEDURE start_mod_approval(p_multi_mod_request_id IN NUMBER,

Line 2375: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

2371: --OUT:
2372: --x_return_status
2373: -- FND_API.G_RET_STS_SUCCESS if API succeeds
2374: -- FND_API.G_RET_STS_ERROR if API fails
2375: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
2376: --End of Comments
2377: -------------------------------------------------------------------------------
2378: PROCEDURE start_mod_approval(p_multi_mod_request_id IN NUMBER,
2379: p_po_header_id IN NUMBER,

Line 2447: debug(d_module, d_position, 'Calling PO_REQAPPROVAL_INIT1.Start_WF_Process', FND_API.G_TRUE);

2443: l_communicate_price_change := l_headers_draft_rec.retro_price_apply_updates_flag;
2444: END IF;
2445:
2446: d_position := 20;
2447: debug(d_module, d_position, 'Calling PO_REQAPPROVAL_INIT1.Start_WF_Process', FND_API.G_TRUE);
2448:
2449: PO_REQAPPROVAL_INIT1.Start_WF_Process(
2450: ItemType => NULL,
2451: ItemKey => NULL,

Line 2486: debug(d_module, d_position, 'After the call to PO_REQAPPROVAL_INIT1.Start_WF_Process', FND_API.G_TRUE);

2482: p_bypass_checks_flag => 'N' --hard-coded in case of Multi-Mod
2483: );
2484:
2485: d_position := 30;
2486: debug(d_module, d_position, 'After the call to PO_REQAPPROVAL_INIT1.Start_WF_Process', FND_API.G_TRUE);
2487:
2488: x_return_status := FND_API.G_RET_STS_SUCCESS;
2489:
2490: d_position := 40;

Line 2488: x_return_status := FND_API.G_RET_STS_SUCCESS;

2484:
2485: d_position := 30;
2486: debug(d_module, d_position, 'After the call to PO_REQAPPROVAL_INIT1.Start_WF_Process', FND_API.G_TRUE);
2487:
2488: x_return_status := FND_API.G_RET_STS_SUCCESS;
2489:
2490: d_position := 40;
2491: IF (PO_LOG.d_proc) THEN
2492: PO_LOG.proc_end(d_module);

Line 2497: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2493: END IF;
2494:
2495: EXCEPTION
2496: WHEN OTHERS THEN
2497: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2498: PO_MESSAGE_S.add_exc_msg(
2499: p_pkg_name => d_pkg_name,
2500: p_procedure_name => d_api_name || '.' || d_position,
2501: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)

Line 2503: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);

2499: p_pkg_name => d_pkg_name,
2500: p_procedure_name => d_api_name || '.' || d_position,
2501: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
2502: );
2503: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
2504: END start_mod_approval;
2505:
2506:
2507: -------------------------------------------------------------------------------

Line 2537: -- FND_API.G_RET_STS_SUCCESS if API succeeds

2533: --x_mod_creation_flag
2534: -- Flag indicate whether there are any relevant changes that would trigger
2535: -- the need for Mod-creation.
2536: --x_return_status
2537: -- FND_API.G_RET_STS_SUCCESS if API succeeds
2538: -- FND_API.G_RET_STS_ERROR if API fails
2539: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs.
2540: --End of Comments
2541: -------------------------------------------------------------------------------

Line 2538: -- FND_API.G_RET_STS_ERROR if API fails

2534: -- Flag indicate whether there are any relevant changes that would trigger
2535: -- the need for Mod-creation.
2536: --x_return_status
2537: -- FND_API.G_RET_STS_SUCCESS if API succeeds
2538: -- FND_API.G_RET_STS_ERROR if API fails
2539: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs.
2540: --End of Comments
2541: -------------------------------------------------------------------------------
2542: PROCEDURE create_modification(p_multi_mod_request_id IN NUMBER,

Line 2539: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs.

2535: -- the need for Mod-creation.
2536: --x_return_status
2537: -- FND_API.G_RET_STS_SUCCESS if API succeeds
2538: -- FND_API.G_RET_STS_ERROR if API fails
2539: -- FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs.
2540: --End of Comments
2541: -------------------------------------------------------------------------------
2542: PROCEDURE create_modification(p_multi_mod_request_id IN NUMBER,
2543: p_po_header_id IN NUMBER,

Line 2595: debug(d_module, d_position, 'Entered create_modification for po_header_id: '|| p_po_header_id, FND_API.G_TRUE);

2591: PO_LOG.proc_begin(d_module,'p_addr_change_flag',p_addr_change_flag);
2592: PO_LOG.proc_begin(d_module,'p_clause_change_flag',p_clause_change_flag);
2593: END IF;
2594:
2595: debug(d_module, d_position, 'Entered create_modification for po_header_id: '|| p_po_header_id, FND_API.G_TRUE);
2596:
2597: d_position := 10;
2598: debug(d_module, d_position, 'Fetch record from po_multi_mod_requests');
2599:

Line 2654: debug(d_module, d_position, 'Create draft record for Mod', FND_API.G_TRUE);

2650: -- Clear the message stack before processing each document
2651: FND_MSG_PUB.initialize;
2652:
2653: d_position := 20;
2654: debug(d_module, d_position, 'Create draft record for Mod', FND_API.G_TRUE);
2655:
2656: create_draft_from_txn(
2657: p_po_header_id => p_po_header_id,
2658: x_draft_id => l_draft_id,

Line 2663: debug(d_module, d_position, 'Default Mod fields and merge fields from the Multi-Mod request', FND_API.G_TRUE);

2659: x_return_status => x_return_status
2660: );
2661:
2662: d_position := 30;
2663: debug(d_module, d_position, 'Default Mod fields and merge fields from the Multi-Mod request', FND_API.G_TRUE);
2664:
2665: default_and_merge_mod_data(
2666: p_multi_mod_request_record => l_multi_mod_request_record,
2667: p_po_header_id => p_po_header_id,

Line 2691: debug(d_module, d_position, 'Merge Multi-Mod Address UDA Attributes to the Mod', FND_API.G_TRUE);

2687: AND document_id = p_po_header_id;
2688:
2689: --Merge the Multi-Mod Addresses
2690: d_position := 50;
2691: debug(d_module, d_position, 'Merge Multi-Mod Address UDA Attributes to the Mod', FND_API.G_TRUE);
2692:
2693: merge_multi_mod_addresses(
2694: p_uda_key_po_header_id => l_multi_mod_request_record.uda_key_po_header_id,
2695: p_uda_key_draft_id => l_multi_mod_request_record.uda_key_draft_id,

Line 2708: debug(d_module, d_position, 'Merge Supplier Details to the Mod', FND_API.G_TRUE);

2704: --Based on the Multi-Mod Request Type, merge the Supplier Name or Supplier
2705: IF(l_multi_mod_request_record.multi_mod_request_type <> l_change_type_multi_mod) THEN
2706:
2707: d_position := 60;
2708: debug(d_module, d_position, 'Merge Supplier Details to the Mod', FND_API.G_TRUE);
2709:
2710: merge_multi_mod_supplier(
2711: p_multi_mod_request_id => l_multi_mod_request_record.multi_mod_request_id,
2712: p_multi_mod_request_type => l_multi_mod_request_record.multi_mod_request_type,

Line 2784: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2780: p_pk4_tbl => l_entity_pk4,
2781: x_return_status => x_return_status,
2782: x_results => x_results);
2783:
2784: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2785: x_mod_creation_flag := 'N';
2786: x_return_status := fnd_api.g_ret_sts_success;
2787: x_error_msg_code := 'MULTI_MOD_DOCUMENT_LOCKED';
2788: RETURN;

Line 2786: x_return_status := fnd_api.g_ret_sts_success;

2782: x_results => x_results);
2783:
2784: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2785: x_mod_creation_flag := 'N';
2786: x_return_status := fnd_api.g_ret_sts_success;
2787: x_error_msg_code := 'MULTI_MOD_DOCUMENT_LOCKED';
2788: RETURN;
2789: END IF;
2790:

Line 2796: debug(d_module, d_position, 'Calling Contracts API to merge Clauses from Multi-Mod', FND_API.G_TRUE);

2792: IF (p_clause_change_flag = 'Y') THEN
2793:
2794: --Calling the Contracts API that will merge the Mult-Mod clauses on to the Mod
2795: d_position := 70;
2796: debug(d_module, d_position, 'Calling Contracts API to merge Clauses from Multi-Mod', FND_API.G_TRUE);
2797:
2798: select conc_mods_enabled_flag into l_conc_mod_enabled from po_doc_style_headers where style_id = l_style_id;
2799:
2800: OKC_PO_MOD_PKG.upd_mulmod_clause_changes(

Line 2809: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN

2805: x_updated_yn => l_clause_updated_yn,
2806: x_return_status => x_return_status,
2807: p_locking_enabled_yn => l_conc_mod_enabled);
2808:
2809: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2810: debug(d_module, d_position, 'An exception was encountered in OKC_PO_MOD_PKG.upd_mulmod_clause_changes', FND_API.G_TRUE);
2811: --RAISE FND_API.g_exc_unexpected_error;
2812: END IF;
2813:

Line 2810: debug(d_module, d_position, 'An exception was encountered in OKC_PO_MOD_PKG.upd_mulmod_clause_changes', FND_API.G_TRUE);

2806: x_return_status => x_return_status,
2807: p_locking_enabled_yn => l_conc_mod_enabled);
2808:
2809: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2810: debug(d_module, d_position, 'An exception was encountered in OKC_PO_MOD_PKG.upd_mulmod_clause_changes', FND_API.G_TRUE);
2811: --RAISE FND_API.g_exc_unexpected_error;
2812: END IF;
2813:
2814: END IF;

Line 2811: --RAISE FND_API.g_exc_unexpected_error;

2807: p_locking_enabled_yn => l_conc_mod_enabled);
2808:
2809: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
2810: debug(d_module, d_position, 'An exception was encountered in OKC_PO_MOD_PKG.upd_mulmod_clause_changes', FND_API.G_TRUE);
2811: --RAISE FND_API.g_exc_unexpected_error;
2812: END IF;
2813:
2814: END IF;
2815:

Line 2823: debug(d_module, d_position, 'No Address or Clause changes exist for the Mod. Return', FND_API.G_TRUE);

2819: AND p_addr_change_flag = 'N'
2820: AND (p_clause_change_flag = 'N' OR l_clause_updated_yn = 'N')) THEN
2821:
2822: d_position := 80;
2823: debug(d_module, d_position, 'No Address or Clause changes exist for the Mod. Return', FND_API.G_TRUE);
2824:
2825: x_mod_creation_flag := 'N';
2826: RETURN;
2827: ELSE

Line 2840: debug(d_module, d_position, 'FPDS-NG Reporting is Enabled. Inserting defaut Car Records', FND_API.G_TRUE);

2836:
2837: IF(l_fpds_reporting = 'Y') THEN
2838:
2839: d_position := 90;
2840: debug(d_module, d_position, 'FPDS-NG Reporting is Enabled. Inserting defaut Car Records', FND_API.G_TRUE);
2841:
2842: PO_CLM_CAR_UTIL.insert_mod_default_car(
2843: p_po_header_id => p_po_header_id,
2844: p_draft_id => l_draft_id,

Line 2851: x_return_status := FND_API.G_RET_STS_SUCCESS;

2847: );
2848: END IF;
2849:
2850: x_draft_id := l_draft_id;
2851: x_return_status := FND_API.G_RET_STS_SUCCESS;
2852: debug(d_module, d_position, 'Exiting create_modification for po_header_id: '|| p_po_header_id ||
2853: ' with draft_id: '||x_draft_id, FND_API.G_TRUE);
2854:
2855: d_position := 100;

Line 2853: ' with draft_id: '||x_draft_id, FND_API.G_TRUE);

2849:
2850: x_draft_id := l_draft_id;
2851: x_return_status := FND_API.G_RET_STS_SUCCESS;
2852: debug(d_module, d_position, 'Exiting create_modification for po_header_id: '|| p_po_header_id ||
2853: ' with draft_id: '||x_draft_id, FND_API.G_TRUE);
2854:
2855: d_position := 100;
2856: IF (PO_LOG.d_proc) THEN
2857: PO_LOG.proc_end(d_module,'x_draft_id',x_draft_id);

Line 2863: x_return_status := fnd_api.g_ret_sts_SUCCESS;

2859: END IF;
2860:
2861: EXCEPTION
2862: WHEN mod_already_exists_exception THEN
2863: x_return_status := fnd_api.g_ret_sts_SUCCESS;
2864: x_mod_creation_flag := 'N';
2865:
2866: --TODO add ne messafge
2867: x_error_msg_code := 'PO_MOD_ALREADY_EXISTS';

Line 2870: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2866: --TODO add ne messafge
2867: x_error_msg_code := 'PO_MOD_ALREADY_EXISTS';
2868:
2869: WHEN OTHERS THEN
2870: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2871: PO_MESSAGE_S.add_exc_msg(
2872: p_pkg_name => d_pkg_name,
2873: p_procedure_name => d_api_name || '.' || d_position,
2874: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)

Line 2876: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);

2872: p_pkg_name => d_pkg_name,
2873: p_procedure_name => d_api_name || '.' || d_position,
2874: p_error_text => 'ERROR : ' || SUBSTRB(SQLERRM,1,200)
2875: );
2876: debug(d_module, d_position, 'ERROR : ' || SUBSTRB(SQLERRM,1,200), FND_API.G_TRUE);
2877: END create_modification;
2878:
2879:
2880: -------------------------------------------------------------------------------