168: --bug 4107241
169: --buyer should not be able to ack PO's which are partially acknowledged
170: --this code block replaces commented code
171:
172: l_all_ack := PO_ACKNOWLEDGE_PO_PVT.All_Shipments_Responded(1.0, FND_API.G_FALSE,
173: p_po_header_id,p_po_release_id,l_revision_num );
174:
175: if(l_all_ack = FND_API.G_TRUE) then
176: x_partial_ack := 'N';
171:
172: l_all_ack := PO_ACKNOWLEDGE_PO_PVT.All_Shipments_Responded(1.0, FND_API.G_FALSE,
173: p_po_header_id,p_po_release_id,l_revision_num );
174:
175: if(l_all_ack = FND_API.G_TRUE) then
176: x_partial_ack := 'N';
177: else
178: x_partial_ack := 'Y';
179: end if;
468:
469: l_progress := '001';
470:
471: x_return_code := 0; /* 0 implies no error */
472: x_return_status := FND_API.G_RET_STS_SUCCESS;
473: x_err_msg := '';
474: x_doc_check_rec_type := null;
475:
476: /*
474: x_doc_check_rec_type := null;
475:
476: /*
477: if (p_launch_approvals_flag = 'N') then
478: l_launch_approvals_flag := FND_API.G_FALSE;
479:
480: else
481: l_launch_approvals_flag := FND_API.G_TRUE;
482:
477: if (p_launch_approvals_flag = 'N') then
478: l_launch_approvals_flag := FND_API.G_FALSE;
479:
480: else
481: l_launch_approvals_flag := FND_API.G_TRUE;
482:
483: end if;
484: */
485:
632:
633: -- Call the PO Change API to apply these changes to the document
634: PO_DOCUMENT_UPDATE_GRP.update_document (
635: p_api_version => 1.0,
636: p_init_msg_list => FND_API.G_TRUE,
637: x_return_status => l_return_status,
638: p_changes => l_changes,
639: p_run_submission_checks => FND_API.G_TRUE,
640: p_launch_approvals_flag => FND_API.G_FALSE,
635: p_api_version => 1.0,
636: p_init_msg_list => FND_API.G_TRUE,
637: x_return_status => l_return_status,
638: p_changes => l_changes,
639: p_run_submission_checks => FND_API.G_TRUE,
640: p_launch_approvals_flag => FND_API.G_FALSE,
641: p_buyer_id => NULL,
642: p_update_source => NULL, -- default
643: p_override_date => NULL,
636: p_init_msg_list => FND_API.G_TRUE,
637: x_return_status => l_return_status,
638: p_changes => l_changes,
639: p_run_submission_checks => FND_API.G_TRUE,
640: p_launch_approvals_flag => FND_API.G_FALSE,
641: p_buyer_id => NULL,
642: p_update_source => NULL, -- default
643: p_override_date => NULL,
644: x_api_errors => l_api_errors,
648:
649: l_progress := '012';
650:
651: -- Construct a POS_ERR_TYPE object from the errors returned by the PO Change API.
652: IF ((l_return_status = FND_API.G_RET_STS_ERROR) OR (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR)) THEN
653: l_err_msg_name_tbl := po_tbl_varchar30();
654: l_err_msg_text_tbl := po_tbl_varchar2000();
655: x_pos_errors := POS_ERR_TYPE( l_err_msg_name_tbl, l_err_msg_text_tbl);
656:
675: END IF;
676:
677: l_progress := '013';
678:
679: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
680: x_return_code := 1;
681: x_return_status := FND_API.G_RET_STS_ERROR;
682: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
683: return;
677: l_progress := '013';
678:
679: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
680: x_return_code := 1;
681: x_return_status := FND_API.G_RET_STS_ERROR;
682: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
683: return;
684: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
685: raise FND_API.G_EXC_UNEXPECTED_ERROR;
680: x_return_code := 1;
681: x_return_status := FND_API.G_RET_STS_ERROR;
682: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
683: return;
684: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
685: raise FND_API.G_EXC_UNEXPECTED_ERROR;
686: END IF; -- l_return_status
687:
688: l_progress := '014';
681: x_return_status := FND_API.G_RET_STS_ERROR;
682: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
683: return;
684: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
685: raise FND_API.G_EXC_UNEXPECTED_ERROR;
686: END IF; -- l_return_status
687:
688: l_progress := '014';
689:
711: if (p_launch_approvals_flag = 'Y') then
712:
713: PO_DOCUMENT_UPDATE_GRP.launch_po_approval_wf (
714: p_api_version => 1.0,
715: p_init_msg_list => FND_API.G_TRUE,
716: x_return_status => l_return_status,
717: p_document_id => NVL(p_po_release_id, p_po_header_id),
718: p_document_type => l_document_type,
719: p_document_subtype => l_document_subtype,
723:
724: end if;
725:
726:
727: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
728: x_return_code := 1;
729: x_return_status := FND_API.G_RET_STS_ERROR;
730: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
731: return;
725:
726:
727: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
728: x_return_code := 1;
729: x_return_status := FND_API.G_RET_STS_ERROR;
730: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
731: return;
732: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
733: raise FND_API.G_EXC_UNEXPECTED_ERROR;
728: x_return_code := 1;
729: x_return_status := FND_API.G_RET_STS_ERROR;
730: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
731: return;
732: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
733: raise FND_API.G_EXC_UNEXPECTED_ERROR;
734: END IF; -- l_return_status
735:
736: l_progress := '016';
729: x_return_status := FND_API.G_RET_STS_ERROR;
730: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
731: return;
732: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
733: raise FND_API.G_EXC_UNEXPECTED_ERROR;
734: END IF; -- l_return_status
735:
736: l_progress := '016';
737:
736: l_progress := '016';
737:
738: EXCEPTION
739:
740: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
741:
742: x_return_code := 2;
743: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
744: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
739:
740: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
741:
742: x_return_code := 2;
743: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
744: x_err_msg := l_progress||':'||FND_MSG_PUB.get(FND_MSG_PUB.G_LAST,'F');
745:
746: WHEN OTHERS THEN
747:
745:
746: WHEN OTHERS THEN
747:
748: x_return_code := 2;
749: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
750: x_err_msg := l_progress||':' || ':' || sqlcode ||':'||sqlerrm(sqlcode);
751:
752: END MoveChangeToPO;
753: