DBA Data[Home] [Help]

APPS.PO_CHG_REQUEST_PVT dependencies on FND_API

Line 182: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended

178: are active and close those notifications with proper result. This
179: procedure also initiates the PO Change Order workflow process to send
180: the notification to the buyer about the supplier acknowledgement.
181: * Returns:
182: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
183: * FND_API.G_RET_STS_ERROR if an error occurs
184: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
185: *
186: */

Line 183: * FND_API.G_RET_STS_ERROR if an error occurs

179: procedure also initiates the PO Change Order workflow process to send
180: the notification to the buyer about the supplier acknowledgement.
181: * Returns:
182: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
183: * FND_API.G_RET_STS_ERROR if an error occurs
184: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
185: *
186: */
187:

Line 184: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

180: the notification to the buyer about the supplier acknowledgement.
181: * Returns:
182: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
183: * FND_API.G_RET_STS_ERROR if an error occurs
184: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
185: *
186: */
187:
188: function startSupplierWF

Line 216: startWf := FND_API.G_TRUE;

212: /* End changes for 7172390 */
213:
214: BEGIN
215: -- Assume worflow needs to be started for every change request
216: startWf := FND_API.G_TRUE;
217: -- initialize return status
218: x_return_status := FND_API.G_RET_STS_SUCCESS;
219:
220: -- Also update approved flag on the po_line_locations to restrict receiving

Line 218: x_return_status := FND_API.G_RET_STS_SUCCESS;

214: BEGIN
215: -- Assume worflow needs to be started for every change request
216: startWf := FND_API.G_TRUE;
217: -- initialize return status
218: x_return_status := FND_API.G_RET_STS_SUCCESS;
219:
220: -- Also update approved flag on the po_line_locations to restrict receiving
221: -- call workflow if this is the final action
222:

Line 240: 1.0,FND_API.G_FALSE,p_po_header_id , p_po_release_id, p_revision_num );

236: --Retrieve the Acknowledgement Notification sent thru core po
237: l_nid := getAckNotifId(p_po_header_id,p_po_release_id, l_activity_name);
238: -- Close the notification sent thru core po
239: startWf := po_acknowledge_po_grp.all_shipments_responded (
240: 1.0,FND_API.G_FALSE,p_po_header_id , p_po_release_id, p_revision_num );
241: if l_nid is not null then
242: begin
243: /* Start changes for 7172390 */
244: if(startWf = FND_API.G_TRUE) THEN

Line 244: if(startWf = FND_API.G_TRUE) THEN

240: 1.0,FND_API.G_FALSE,p_po_header_id , p_po_release_id, p_revision_num );
241: if l_nid is not null then
242: begin
243: /* Start changes for 7172390 */
244: if(startWf = FND_API.G_TRUE) THEN
245: BEGIN
246: /* l_accepted_flag and Notif_Ack_Status will have the following values respectively.
247: 'Y' for Accepted staus.
248: 'N' for Rejected status.

Line 297: startWf := FND_API.G_TRUE;

293: raise;
294: end;
295: end if;
296: else
297: startWf := FND_API.G_TRUE;
298: end if;
299:
300: -- Call workflow
301: if(startWf = FND_API.G_TRUE) then

Line 301: if(startWf = FND_API.G_TRUE) then

297: startWf := FND_API.G_TRUE;
298: end if;
299:
300: -- Call workflow
301: if(startWf = FND_API.G_TRUE) then
302: /* Handle the change request group id for cases when supplier completes the acknowledgement after
303: asking for a change initially bug 4872348 */
304: if(p_chg_request_grp_id is null) then
305: if (p_po_release_id is not null) then

Line 328: x_return_status := FND_API.g_ret_sts_unexp_error;

324:
325: exception
326: WHEN OTHERS THEN
327: raise;
328: x_return_status := FND_API.g_ret_sts_unexp_error;
329: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
330: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
331: IF g_fnd_debug = 'Y' THEN
332: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 375: x_return_status := FND_API.G_RET_STS_SUCCESS;

371: l_supplier_displayname VARCHAR2(240);
372:
373: BEGIN
374: -- initialize return status
375: x_return_status := FND_API.G_RET_STS_SUCCESS;
376: if (p_item_key is null ) then
377: x_return_status := FND_API.g_ret_sts_unexp_error;
378: return x_return_status;
379: else

Line 377: x_return_status := FND_API.g_ret_sts_unexp_error;

373: BEGIN
374: -- initialize return status
375: x_return_status := FND_API.G_RET_STS_SUCCESS;
376: if (p_item_key is null ) then
377: x_return_status := FND_API.g_ret_sts_unexp_error;
378: return x_return_status;
379: else
380:
381: wf_engine.createProcess ( ItemType => p_item_type,

Line 425: x_return_status := FND_API.g_ret_sts_unexp_error;

421: end if;
422: exception
423: WHEN OTHERS THEN
424: raise;
425: x_return_status := FND_API.g_ret_sts_unexp_error;
426: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
427: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
428: IF g_fnd_debug = 'Y' THEN
429: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 443: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended

439: * Requires: API message list has been initialized if p_init_msg_list is false.
440: * Modifies: API message list
441: * Effects: Saves Data to the Change Request Table
442: * Returns:
443: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
444: * FND_API.G_RET_STS_ERROR if an error occurs
445: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
446: */
447:

Line 444: * FND_API.G_RET_STS_ERROR if an error occurs

440: * Modifies: API message list
441: * Effects: Saves Data to the Change Request Table
442: * Returns:
443: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
444: * FND_API.G_RET_STS_ERROR if an error occurs
445: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
446: */
447:
448: procedure save_request(

Line 445: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

441: * Effects: Saves Data to the Change Request Table
442: * Returns:
443: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
444: * FND_API.G_RET_STS_ERROR if an error occurs
445: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
446: */
447:
448: procedure save_request(
449: p_api_version IN NUMBER,

Line 476: IF fnd_api.to_boolean(P_Init_Msg_List) THEN

472: l_api_name CONSTANT VARCHAR2(30) := 'save_request';
473: l_api_version_number CONSTANT NUMBER := 1.0;
474:
475: BEGIN
476: IF fnd_api.to_boolean(P_Init_Msg_List) THEN
477: -- initialize message list
478: FND_MSG_PUB.initialize;
479: END IF;
480:

Line 483: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

479: END IF;
480:
481: -- Standard call to check for call compatibility.
482:
483: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
484: p_api_version,
485: l_api_name,
486: G_PKG_NAME)
487: THEN

Line 488: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

484: p_api_version,
485: l_api_name,
486: G_PKG_NAME)
487: THEN
488: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
489: END IF;
490:
491: -- initialize return status
492: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 492: x_return_status := FND_API.G_RET_STS_SUCCESS;

488: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
489: END IF;
490:
491: -- initialize return status
492: x_return_status := FND_API.G_RET_STS_SUCCESS;
493:
494: if (p_user_id is not null) then
495: l_user_id := p_user_id;
496: l_login_id := p_login_id;

Line 607: WHEN FND_API.g_exc_error THEN

603: end if;
604: end loop;
605:
606: EXCEPTION
607: WHEN FND_API.g_exc_error THEN
608: x_return_status := FND_API.g_ret_sts_error;
609: WHEN FND_API.g_exc_unexpected_error THEN
610: x_return_status := FND_API.g_ret_sts_unexp_error;
611: WHEN OTHERS THEN

Line 608: x_return_status := FND_API.g_ret_sts_error;

604: end loop;
605:
606: EXCEPTION
607: WHEN FND_API.g_exc_error THEN
608: x_return_status := FND_API.g_ret_sts_error;
609: WHEN FND_API.g_exc_unexpected_error THEN
610: x_return_status := FND_API.g_ret_sts_unexp_error;
611: WHEN OTHERS THEN
612: x_return_status := FND_API.g_ret_sts_unexp_error;

Line 609: WHEN FND_API.g_exc_unexpected_error THEN

605:
606: EXCEPTION
607: WHEN FND_API.g_exc_error THEN
608: x_return_status := FND_API.g_ret_sts_error;
609: WHEN FND_API.g_exc_unexpected_error THEN
610: x_return_status := FND_API.g_ret_sts_unexp_error;
611: WHEN OTHERS THEN
612: x_return_status := FND_API.g_ret_sts_unexp_error;
613:

Line 610: x_return_status := FND_API.g_ret_sts_unexp_error;

606: EXCEPTION
607: WHEN FND_API.g_exc_error THEN
608: x_return_status := FND_API.g_ret_sts_error;
609: WHEN FND_API.g_exc_unexpected_error THEN
610: x_return_status := FND_API.g_ret_sts_unexp_error;
611: WHEN OTHERS THEN
612: x_return_status := FND_API.g_ret_sts_unexp_error;
613:
614: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN

Line 612: x_return_status := FND_API.g_ret_sts_unexp_error;

608: x_return_status := FND_API.g_ret_sts_error;
609: WHEN FND_API.g_exc_unexpected_error THEN
610: x_return_status := FND_API.g_ret_sts_unexp_error;
611: WHEN OTHERS THEN
612: x_return_status := FND_API.g_ret_sts_unexp_error;
613:
614: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
615: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
616: IF g_fnd_debug = 'Y' THEN

Line 632: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended

628: * Requires: PO_HEADER_ID,PO_RELEASE_ID,REVISION_NUM,POS_CHG_REC_TBL
629: * Modifies:
630: * Effects: Processes the change Request and calls PO Doc Submission Check
631: * Returns:
632: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
633: * FND_API.G_RET_STS_ERROR if an error occurs
634: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
635: * POS_ERR_TYPE
636: */

Line 633: * FND_API.G_RET_STS_ERROR if an error occurs

629: * Modifies:
630: * Effects: Processes the change Request and calls PO Doc Submission Check
631: * Returns:
632: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
633: * FND_API.G_RET_STS_ERROR if an error occurs
634: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
635: * POS_ERR_TYPE
636: */
637:

Line 634: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

630: * Effects: Processes the change Request and calls PO Doc Submission Check
631: * Returns:
632: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
633: * FND_API.G_RET_STS_ERROR if an error occurs
634: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
635: * POS_ERR_TYPE
636: */
637:
638: procedure process_supplier_request (

Line 651: p_mpoc IN varchar2 default FND_API.G_FALSE) IS

647: p_chn_requestor_username in varchar2 default null,
648: p_user_id IN number default null,
649: p_login_id IN number default null,
650: p_last_upd_date IN date default null,
651: p_mpoc IN varchar2 default FND_API.G_FALSE) IS
652:
653: x_error_code varchar2(40);
654: no_rec_found exception;
655: v_auth_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;

Line 659: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;

655: v_auth_status PO_HEADERS_ALL.AUTHORIZATION_STATUS%TYPE;
656: x_progress varchar2(3) := '000';
657: l_api_version_number CONSTANT NUMBER := 1.0;
658: l_api_name CONSTANT VARCHAR2(30) := 'process_supplier_request';
659: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
660: l_msg_count NUMBER;
661: l_msg_data VARCHAR2(2000);
662: l_commit VARCHAR2(1) := FND_API.G_FALSE;
663: l_user_id NUMBER;

Line 662: l_commit VARCHAR2(1) := FND_API.G_FALSE;

658: l_api_name CONSTANT VARCHAR2(30) := 'process_supplier_request';
659: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
660: l_msg_count NUMBER;
661: l_msg_data VARCHAR2(2000);
662: l_commit VARCHAR2(1) := FND_API.G_FALSE;
663: l_user_id NUMBER;
664: l_login_id NUMBER;
665: l_request_group_id NUMBER :=null;
666: x_return_status varchar2(20);

Line 702: x_return_status := FND_API.G_RET_STS_SUCCESS;

698: relRec REL_CSR%ROWTYPE;
699:
700: BEGIN
701: -- initialize return status
702: x_return_status := FND_API.G_RET_STS_SUCCESS;
703: x_progress := '001';
704:
705:
706: -- Lock the PO Header Row for update of Last Update Date

Line 802: x_return_status := FND_API.g_ret_sts_unexp_error;

798:
799: if ( l_po_change_requests(1).action_type in ('CANCELLATION') AND
800: l_po_change_requests(1).request_level='HEADER' ) then
801: if (l_po_change_requests.count > 1 ) then
802: x_return_status := FND_API.g_ret_sts_unexp_error;
803:
804: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
805: IF g_fnd_debug = 'Y' THEN
806: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 833: p_Init_Msg_List => FND_API.G_FALSE,

829: return;
830: end if;
831: save_cancel_request(
832: p_api_version => 1.0 ,
833: p_Init_Msg_List => FND_API.G_FALSE,
834: x_return_status => l_return_status,
835: p_po_header_id => p_po_header_id,
836: p_po_release_id => p_po_release_id,
837: p_revision_num => p_revision_num,

Line 842: if (l_return_status <> FND_API.g_ret_sts_success) then

838: p_po_change_requests => l_po_change_requests,
839: x_request_group_id => l_request_group_id
840: );
841: x_online_report_id := 0;
842: if (l_return_status <> FND_API.g_ret_sts_success) then
843: l_err_msg_name_tbl := po_tbl_varchar30();
844: l_err_msg_text_tbl := po_tbl_varchar2000();
845: x_pos_errors := POS_ERR_TYPE( l_err_msg_name_tbl,l_err_msg_text_tbl);
846:

Line 895: 1.0,FND_API.G_FALSE,x_return_status,

891:
892: -- Process The Acknowledgements
893:
894: PO_ACKNOWLEDGE_PO_GRP.Acknowledge_shipment(
895: 1.0,FND_API.G_FALSE,x_return_status,
896: l_po_change_requests(i).document_line_location_id,
897: l_po_change_requests(i).document_header_id,
898: l_po_change_requests(i).po_release_id,
899: l_po_change_requests(i).document_revision_num,

Line 939: 1.0,FND_API.G_FALSE,x_return_status,

935:
936: callWf := true;
937: -- Process The Acknowledgements
938: PO_ACKNOWLEDGE_PO_GRP.Acknowledge_shipment(
939: 1.0,FND_API.G_FALSE,x_return_status,
940: l_po_change_requests(i).document_line_location_id,
941: l_po_change_requests(i).document_header_id,
942: l_po_change_requests(i).po_release_id,
943: l_po_change_requests(i).document_revision_num,

Line 966: x_return_status := FND_API.g_ret_sts_unexp_error;

962: set supplier_order_line_number = l_po_change_requests(i).New_Supplier_Order_Line_Number
963: where line_location_id = l_po_change_requests(i).document_line_location_id;
964: exception
965: WHEN OTHERS THEN
966: x_return_status := FND_API.g_ret_sts_unexp_error;
967: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
968: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
969: IF g_fnd_debug = 'Y' THEN
970: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 1014: p_init_msg_list => FND_API.G_FALSE,

1010: END IF;
1011: END IF;
1012: validate_change_request (
1013: p_api_version => 1.0,
1014: p_init_msg_list => FND_API.G_FALSE,
1015: x_return_status => x_return_status,
1016: x_msg_data => l_msg_data,
1017: p_po_header_id => p_po_header_id,
1018: p_po_release_id => p_po_release_id,

Line 1026: if (l_po_change_requests.count() > 0 AND x_return_status = FND_API.G_RET_STS_SUCCESS) then

1022: x_pos_errors => x_pos_errors);
1023:
1024: end if;
1025:
1026: if (l_po_change_requests.count() > 0 AND x_return_status = FND_API.G_RET_STS_SUCCESS) then
1027: IF g_fnd_debug = 'Y' THEN
1028: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) THEN
1029: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, g_module_prefix || l_api_name ||
1030: '.invoked', 'Type: ' ||

Line 1036: if(x_return_status = FND_API.G_RET_STS_SUCCESS) then

1032: END IF;
1033: END IF;
1034:
1035:
1036: if(x_return_status = FND_API.G_RET_STS_SUCCESS) then
1037:
1038: if (saveRequest) then
1039:
1040: save_request(

Line 1042: p_init_msg_list => FND_API.G_FALSE,

1038: if (saveRequest) then
1039:
1040: save_request(
1041: p_api_version => 1.0,
1042: p_init_msg_list => FND_API.G_FALSE,
1043: x_return_status => x_return_status,
1044: p_po_header_id => p_po_header_id,
1045: p_po_release_id => p_po_release_id,
1046: p_revision_num => p_revision_num,

Line 1078: FND_API.G_FALSE,

1074: acknowledgement record.
1075: */
1076: PO_ACKNOWLEDGE_PO_GRP.Set_Header_Acknowledgement (
1077: 1.0,
1078: FND_API.G_FALSE,
1079: x_return_status,
1080: p_po_header_id,
1081: p_po_release_id );
1082:

Line 1092: if (p_mpoc = FND_API.G_TRUE) then

1088: '.invoked', 'Call Workflow ' || ', request group id ' || to_char(l_request_group_id));
1089: END IF;
1090: END IF;
1091: --start multiple po change
1092: if (p_mpoc = FND_API.G_TRUE) then
1093: if(x_accp_flag = 'Y') then
1094: x_return_status := po_acknowledge_po_grp.all_shipments_responded (
1095: 1.0,FND_API.G_FALSE,p_po_header_id , p_po_release_id, p_revision_num );
1096: else

Line 1095: 1.0,FND_API.G_FALSE,p_po_header_id , p_po_release_id, p_revision_num );

1091: --start multiple po change
1092: if (p_mpoc = FND_API.G_TRUE) then
1093: if(x_accp_flag = 'Y') then
1094: x_return_status := po_acknowledge_po_grp.all_shipments_responded (
1095: 1.0,FND_API.G_FALSE,p_po_header_id , p_po_release_id, p_revision_num );
1096: else
1097: x_return_status := FND_API.G_TRUE;
1098: end if;
1099:

Line 1097: x_return_status := FND_API.G_TRUE;

1093: if(x_accp_flag = 'Y') then
1094: x_return_status := po_acknowledge_po_grp.all_shipments_responded (
1095: 1.0,FND_API.G_FALSE,p_po_header_id , p_po_release_id, p_revision_num );
1096: else
1097: x_return_status := FND_API.G_TRUE;
1098: end if;
1099:
1100: if(x_return_status = FND_API.G_TRUE) then
1101: IF g_fnd_debug = 'Y' THEN

Line 1100: if(x_return_status = FND_API.G_TRUE) then

1096: else
1097: x_return_status := FND_API.G_TRUE;
1098: end if;
1099:
1100: if(x_return_status = FND_API.G_TRUE) then
1101: IF g_fnd_debug = 'Y' THEN
1102: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) THEN
1103: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, g_module_prefix || l_api_name ||
1104: '.invoked', ' All shipments acked/changed ' );

Line 1129: end if; --if docCheck returns FND_API.G_RET_STS_SUCCESS

1125: END IF;
1126: END IF;
1127: end if;
1128:
1129: end if; --if docCheck returns FND_API.G_RET_STS_SUCCESS
1130:
1131: end if;
1132: -- Update the PO Headers/Releases even if the changes dosent require doc Check
1133: if (callDocCheck=false) then

Line 1166: x_return_status := FND_API.g_ret_sts_unexp_error;

1162: end if;
1163: end if; -- if call doc check is false
1164: EXCEPTION
1165: WHEN OTHERS THEN
1166: x_return_status := FND_API.g_ret_sts_unexp_error;
1167: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1168: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
1169: IF g_fnd_debug = 'Y' THEN
1170: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 1185: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended

1181: * Requires: PO_HEADER_ID,PO_RELEASE_ID,REVISION_NUM,REQUEST_GROUP_ID
1182: * Modifies:
1183: * Effects: Updates The PO_HEADERS_ALL, PO_RELEASES_ALL
1184: * Returns:
1185: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
1186: * FND_API.G_RET_STS_ERROR if an error occurs
1187: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1188: */
1189:

Line 1186: * FND_API.G_RET_STS_ERROR if an error occurs

1182: * Modifies:
1183: * Effects: Updates The PO_HEADERS_ALL, PO_RELEASES_ALL
1184: * Returns:
1185: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
1186: * FND_API.G_RET_STS_ERROR if an error occurs
1187: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1188: */
1189:
1190: procedure update_po_attributes

Line 1187: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

1183: * Effects: Updates The PO_HEADERS_ALL, PO_RELEASES_ALL
1184: * Returns:
1185: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
1186: * FND_API.G_RET_STS_ERROR if an error occurs
1187: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1188: */
1189:
1190: procedure update_po_attributes
1191: (p_po_header_id IN number,

Line 1206: x_return_status := FND_API.G_RET_STS_SUCCESS;

1202: l_login_id number;
1203:
1204: BEGIN
1205:
1206: x_return_status := FND_API.G_RET_STS_SUCCESS;
1207: if (p_user_id is null or p_login_id is null) then
1208: l_user_id := fnd_global.user_id;
1209: l_login_id := fnd_global.login_id;
1210: else

Line 1327: x_return_status := FND_API.g_ret_sts_unexp_error;

1323: approved_flag='Y';
1324: end if;
1325: EXCEPTION
1326: WHEN OTHERS THEN
1327: x_return_status := FND_API.g_ret_sts_unexp_error;
1328: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1329: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
1330: IF g_fnd_debug = 'Y' THEN
1331: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 1347: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended

1343: * Effects: Converts the Supplier Change Request To PO Change Request
1344: * Calls Doc Submission Check API
1345: * Also calls process_acknowledgements API to post Acknowledgements
1346: * Returns:
1347: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
1348: * FND_API.G_RET_STS_ERROR if an error occurs
1349: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1350: */
1351:

Line 1348: * FND_API.G_RET_STS_ERROR if an error occurs

1344: * Calls Doc Submission Check API
1345: * Also calls process_acknowledgements API to post Acknowledgements
1346: * Returns:
1347: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
1348: * FND_API.G_RET_STS_ERROR if an error occurs
1349: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1350: */
1351:
1352: procedure validate_change_request (

Line 1349: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

1345: * Also calls process_acknowledgements API to post Acknowledgements
1346: * Returns:
1347: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
1348: * FND_API.G_RET_STS_ERROR if an error occurs
1349: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1350: */
1351:
1352: procedure validate_change_request (
1353: p_api_version IN NUMBER,

Line 1463: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,

1459: latest_external_flag='Y' ;
1460:
1461: BEGIN
1462:
1463: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,
1464: l_api_name, g_pkg_name)
1465: THEN
1466: RAISE FND_API.g_exc_unexpected_error;
1467: END IF;

Line 1466: RAISE FND_API.g_exc_unexpected_error;

1462:
1463: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,
1464: l_api_name, g_pkg_name)
1465: THEN
1466: RAISE FND_API.g_exc_unexpected_error;
1467: END IF;
1468:
1469: x_return_status := FND_API.g_ret_sts_success;
1470: IF g_fnd_debug = 'Y' THEN

Line 1469: x_return_status := FND_API.g_ret_sts_success;

1465: THEN
1466: RAISE FND_API.g_exc_unexpected_error;
1467: END IF;
1468:
1469: x_return_status := FND_API.g_ret_sts_success;
1470: IF g_fnd_debug = 'Y' THEN
1471: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) THEN
1472: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE, g_module_prefix || l_api_name ||
1473: '.invoked', 'Type: ' ||

Line 1761: if ( l_return_status = FND_API.G_RET_STS_SUCCESS AND

1757: l_err_msg_name_tbl := po_tbl_varchar30();
1758: l_err_msg_text_tbl := po_tbl_varchar2000();
1759: x_pos_errors := POS_ERR_TYPE( l_err_msg_name_tbl,l_err_msg_text_tbl);
1760:
1761: if ( l_return_status = FND_API.G_RET_STS_SUCCESS AND
1762: l_sub_check_status = FND_API.G_RET_STS_ERROR) THEN
1763:
1764: x_sub_errors := x_doc_check_error_msg.online_report_id.count;
1765: FOR i in 1..x_sub_errors loop

Line 1762: l_sub_check_status = FND_API.G_RET_STS_ERROR) THEN

1758: l_err_msg_text_tbl := po_tbl_varchar2000();
1759: x_pos_errors := POS_ERR_TYPE( l_err_msg_name_tbl,l_err_msg_text_tbl);
1760:
1761: if ( l_return_status = FND_API.G_RET_STS_SUCCESS AND
1762: l_sub_check_status = FND_API.G_RET_STS_ERROR) THEN
1763:
1764: x_sub_errors := x_doc_check_error_msg.online_report_id.count;
1765: FOR i in 1..x_sub_errors loop
1766: if ((x_doc_check_error_msg.message_name(i) not in

Line 1788: x_return_status := FND_API.G_RET_STS_SUCCESS;

1784: -- Some other errors were reported from submission check api
1785: if (sub_error_flag = 'Y') then
1786: raise sub_check_failed;
1787: else
1788: x_return_status := FND_API.G_RET_STS_SUCCESS;
1789: end if;
1790: elsif (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
1791: --x_msg_data has stuff regarding doc sub check.
1792: l_error_index := l_error_index + 1;

Line 1790: elsif (l_return_status <> FND_API.G_RET_STS_SUCCESS) then

1786: raise sub_check_failed;
1787: else
1788: x_return_status := FND_API.G_RET_STS_SUCCESS;
1789: end if;
1790: elsif (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
1791: --x_msg_data has stuff regarding doc sub check.
1792: l_error_index := l_error_index + 1;
1793: x_pos_errors.message_name.extend;
1794: x_pos_errors.text_line.extend;

Line 1798: -- If l_return_status and l_sub_check_status = FND_API.G_RET_STS_SUCCESS

1794: x_pos_errors.text_line.extend;
1795: x_pos_errors.message_name(l_error_index) := null;
1796: x_pos_errors.text_line(l_error_index) := l_msg_data;
1797: raise sub_check_failed;
1798: -- If l_return_status and l_sub_check_status = FND_API.G_RET_STS_SUCCESS
1799: -- Then Continue no errors in doc check
1800: end if;
1801:
1802: x_progress := '007';

Line 1806: WHEN FND_API.g_exc_error THEN

1802: x_progress := '007';
1803: end if; --end rec cnt
1804:
1805: EXCEPTION
1806: WHEN FND_API.g_exc_error THEN
1807: x_return_status := FND_API.g_ret_sts_error;
1808: WHEN FND_API.g_exc_unexpected_error THEN
1809: x_return_status := FND_API.g_ret_sts_unexp_error;
1810: WHEN sub_check_failed THEN

Line 1807: x_return_status := FND_API.g_ret_sts_error;

1803: end if; --end rec cnt
1804:
1805: EXCEPTION
1806: WHEN FND_API.g_exc_error THEN
1807: x_return_status := FND_API.g_ret_sts_error;
1808: WHEN FND_API.g_exc_unexpected_error THEN
1809: x_return_status := FND_API.g_ret_sts_unexp_error;
1810: WHEN sub_check_failed THEN
1811: x_return_status := FND_API.g_ret_sts_error;

Line 1808: WHEN FND_API.g_exc_unexpected_error THEN

1804:
1805: EXCEPTION
1806: WHEN FND_API.g_exc_error THEN
1807: x_return_status := FND_API.g_ret_sts_error;
1808: WHEN FND_API.g_exc_unexpected_error THEN
1809: x_return_status := FND_API.g_ret_sts_unexp_error;
1810: WHEN sub_check_failed THEN
1811: x_return_status := FND_API.g_ret_sts_error;
1812: WHEN OTHERS THEN

Line 1809: x_return_status := FND_API.g_ret_sts_unexp_error;

1805: EXCEPTION
1806: WHEN FND_API.g_exc_error THEN
1807: x_return_status := FND_API.g_ret_sts_error;
1808: WHEN FND_API.g_exc_unexpected_error THEN
1809: x_return_status := FND_API.g_ret_sts_unexp_error;
1810: WHEN sub_check_failed THEN
1811: x_return_status := FND_API.g_ret_sts_error;
1812: WHEN OTHERS THEN
1813: x_return_status := FND_API.g_ret_sts_unexp_error;

Line 1811: x_return_status := FND_API.g_ret_sts_error;

1807: x_return_status := FND_API.g_ret_sts_error;
1808: WHEN FND_API.g_exc_unexpected_error THEN
1809: x_return_status := FND_API.g_ret_sts_unexp_error;
1810: WHEN sub_check_failed THEN
1811: x_return_status := FND_API.g_ret_sts_error;
1812: WHEN OTHERS THEN
1813: x_return_status := FND_API.g_ret_sts_unexp_error;
1814: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1815: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);

Line 1813: x_return_status := FND_API.g_ret_sts_unexp_error;

1809: x_return_status := FND_API.g_ret_sts_unexp_error;
1810: WHEN sub_check_failed THEN
1811: x_return_status := FND_API.g_ret_sts_error;
1812: WHEN OTHERS THEN
1813: x_return_status := FND_API.g_ret_sts_unexp_error;
1814: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1815: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
1816: IF g_fnd_debug = 'Y' THEN
1817: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 1849: p_init_msg_list => FND_API.G_FALSE,

1845: --l_po_change_requests := p_po_change_requests;
1846:
1847: validate_change_request (
1848: p_api_version => 1.0,
1849: p_init_msg_list => FND_API.G_FALSE,
1850: x_return_status => x_return_status,
1851: x_msg_data => l_msg_data,
1852: p_po_header_id => p_po_header_id,
1853: p_po_release_id => p_po_release_id,

Line 1871: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended

1867: * Determines id the Line Price can be changed based on
1868: * 1. ACCRUE_ON_RECEIPT_FLAG
1869: * 2. QUANTITY_BILLED
1870: * Returns:
1871: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
1872: * FND_API.G_RET_STS_ERROR if an error occurs
1873: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1874: */
1875:

Line 1872: * FND_API.G_RET_STS_ERROR if an error occurs

1868: * 1. ACCRUE_ON_RECEIPT_FLAG
1869: * 2. QUANTITY_BILLED
1870: * Returns:
1871: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
1872: * FND_API.G_RET_STS_ERROR if an error occurs
1873: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1874: */
1875:
1876: function ifLineChangable( p_po_line_id IN number)

Line 1873: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs

1869: * 2. QUANTITY_BILLED
1870: * Returns:
1871: * x_return_status - FND_API.G_RET_STS_SUCCESS if all messages are appended
1872: * FND_API.G_RET_STS_ERROR if an error occurs
1873: * FND_API.G_RET_STS_UNEXP_ERROR if unexpected error occurs
1874: */
1875:
1876: function ifLineChangable( p_po_line_id IN number)
1877: return varchar2 is

Line 1977: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1973:
1974:
1975: procedure validateCancelRequest(
1976: p_api_version IN NUMBER,
1977: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1978: x_return_status OUT NOCOPY VARCHAR2,
1979: p_po_header_id IN NUMBER,
1980: p_po_release_id IN NUMBER) IS
1981:

Line 1993: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,

1989: x_ship_count NUMBER := 0;
1990:
1991:
1992: BEGIN
1993: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,
1994: l_api_name, g_pkg_name)
1995: THEN
1996: RAISE FND_API.g_exc_unexpected_error;
1997: END IF;

Line 1996: RAISE FND_API.g_exc_unexpected_error;

1992: BEGIN
1993: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,
1994: l_api_name, g_pkg_name)
1995: THEN
1996: RAISE FND_API.g_exc_unexpected_error;
1997: END IF;
1998:
1999: x_return_status := FND_API.g_ret_sts_success;
2000:

Line 1999: x_return_status := FND_API.g_ret_sts_success;

1995: THEN
1996: RAISE FND_API.g_exc_unexpected_error;
1997: END IF;
1998:
1999: x_return_status := FND_API.g_ret_sts_success;
2000:
2001: -- Call this when logging is enabled
2002:
2003: IF g_fnd_debug = 'Y' THEN

Line 2056: p_init_msg_list => FND_API.G_TRUE,

2052: PO_MOAC_UTILS_PVT.set_org_context(x_org_id) ; --
2053:
2054: PO_Document_Control_GRP.check_control_action(
2055: p_api_version => 1.0,
2056: p_init_msg_list => FND_API.G_TRUE,
2057: x_return_status => x_return_status,
2058: p_doc_type => v_document_type,
2059: p_doc_subtype => v_document_subtype,
2060: p_doc_id => p_po_header_id,

Line 2071: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) then

2067: p_doc_shipment_num => null,
2068: p_action => 'CANCEL');
2069:
2070:
2071: IF (x_return_status = FND_API.G_RET_STS_SUCCESS) then
2072:
2073: BEGIN
2074: if (p_po_release_id is not null) then
2075: SELECT count(*)

Line 2107: x_return_status := FND_API.G_RET_STS_ERROR;

2103:
2104: end if;
2105:
2106: if (x_ship_count > 0) then
2107: x_return_status := FND_API.G_RET_STS_ERROR;
2108: else
2109: x_return_status := FND_API.G_RET_STS_SUCCESS;
2110: end if;
2111:

Line 2109: x_return_status := FND_API.G_RET_STS_SUCCESS;

2105:
2106: if (x_ship_count > 0) then
2107: x_return_status := FND_API.G_RET_STS_ERROR;
2108: else
2109: x_return_status := FND_API.G_RET_STS_SUCCESS;
2110: end if;
2111:
2112: EXCEPTION
2113: WHEN FND_API.g_exc_error THEN

Line 2113: WHEN FND_API.g_exc_error THEN

2109: x_return_status := FND_API.G_RET_STS_SUCCESS;
2110: end if;
2111:
2112: EXCEPTION
2113: WHEN FND_API.g_exc_error THEN
2114: x_return_status := FND_API.g_ret_sts_error;
2115: WHEN FND_API.g_exc_unexpected_error THEN
2116: x_return_status := FND_API.g_ret_sts_unexp_error;
2117: WHEN OTHERS THEN

Line 2114: x_return_status := FND_API.g_ret_sts_error;

2110: end if;
2111:
2112: EXCEPTION
2113: WHEN FND_API.g_exc_error THEN
2114: x_return_status := FND_API.g_ret_sts_error;
2115: WHEN FND_API.g_exc_unexpected_error THEN
2116: x_return_status := FND_API.g_ret_sts_unexp_error;
2117: WHEN OTHERS THEN
2118: x_return_status := FND_API.g_ret_sts_unexp_error;

Line 2115: WHEN FND_API.g_exc_unexpected_error THEN

2111:
2112: EXCEPTION
2113: WHEN FND_API.g_exc_error THEN
2114: x_return_status := FND_API.g_ret_sts_error;
2115: WHEN FND_API.g_exc_unexpected_error THEN
2116: x_return_status := FND_API.g_ret_sts_unexp_error;
2117: WHEN OTHERS THEN
2118: x_return_status := FND_API.g_ret_sts_unexp_error;
2119: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN

Line 2116: x_return_status := FND_API.g_ret_sts_unexp_error;

2112: EXCEPTION
2113: WHEN FND_API.g_exc_error THEN
2114: x_return_status := FND_API.g_ret_sts_error;
2115: WHEN FND_API.g_exc_unexpected_error THEN
2116: x_return_status := FND_API.g_ret_sts_unexp_error;
2117: WHEN OTHERS THEN
2118: x_return_status := FND_API.g_ret_sts_unexp_error;
2119: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2120: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);

Line 2118: x_return_status := FND_API.g_ret_sts_unexp_error;

2114: x_return_status := FND_API.g_ret_sts_error;
2115: WHEN FND_API.g_exc_unexpected_error THEN
2116: x_return_status := FND_API.g_ret_sts_unexp_error;
2117: WHEN OTHERS THEN
2118: x_return_status := FND_API.g_ret_sts_unexp_error;
2119: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2120: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
2121: IF g_fnd_debug = 'Y' THEN
2122: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 2135: WHEN FND_API.g_exc_error THEN

2131:
2132:
2133: EXCEPTION
2134:
2135: WHEN FND_API.g_exc_error THEN
2136: x_return_status := FND_API.g_ret_sts_error;
2137: WHEN FND_API.g_exc_unexpected_error THEN
2138: x_return_status := FND_API.g_ret_sts_unexp_error;
2139: WHEN OTHERS THEN

Line 2136: x_return_status := FND_API.g_ret_sts_error;

2132:
2133: EXCEPTION
2134:
2135: WHEN FND_API.g_exc_error THEN
2136: x_return_status := FND_API.g_ret_sts_error;
2137: WHEN FND_API.g_exc_unexpected_error THEN
2138: x_return_status := FND_API.g_ret_sts_unexp_error;
2139: WHEN OTHERS THEN
2140: x_return_status := FND_API.g_ret_sts_unexp_error;

Line 2137: WHEN FND_API.g_exc_unexpected_error THEN

2133: EXCEPTION
2134:
2135: WHEN FND_API.g_exc_error THEN
2136: x_return_status := FND_API.g_ret_sts_error;
2137: WHEN FND_API.g_exc_unexpected_error THEN
2138: x_return_status := FND_API.g_ret_sts_unexp_error;
2139: WHEN OTHERS THEN
2140: x_return_status := FND_API.g_ret_sts_unexp_error;
2141: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN

Line 2138: x_return_status := FND_API.g_ret_sts_unexp_error;

2134:
2135: WHEN FND_API.g_exc_error THEN
2136: x_return_status := FND_API.g_ret_sts_error;
2137: WHEN FND_API.g_exc_unexpected_error THEN
2138: x_return_status := FND_API.g_ret_sts_unexp_error;
2139: WHEN OTHERS THEN
2140: x_return_status := FND_API.g_ret_sts_unexp_error;
2141: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2142: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);

Line 2140: x_return_status := FND_API.g_ret_sts_unexp_error;

2136: x_return_status := FND_API.g_ret_sts_error;
2137: WHEN FND_API.g_exc_unexpected_error THEN
2138: x_return_status := FND_API.g_ret_sts_unexp_error;
2139: WHEN OTHERS THEN
2140: x_return_status := FND_API.g_ret_sts_unexp_error;
2141: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2142: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
2143: IF g_fnd_debug = 'Y' THEN
2144: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 2176: (1.0,FND_API.G_FALSE,pll.line_location_id,

2172: 'N',DECODE(NVL(pll.CONSIGNED_FLAG,'N'),
2173: 'Y',DECODE(NVL(pll.CLOSED_CODE,'OPEN'),'CLOSED FOR INVOICE',
2174: DECODE(
2175: PO_ACKNOWLEDGE_PO_GRP.GET_SHIPMENT_ACK_CHANGE_STATUS
2176: (1.0,FND_API.G_FALSE,pll.line_location_id,
2177: pll.po_header_id, p_po_release_id,p_revision_num),
2178: 'PENDING_CHANGE',FND_MESSAGE.GET_STRING('POS','POS_PENDING_CHANGE'),
2179: 'ACK_REQUIRED',FND_MESSAGE.GET_STRING('POS','POS_ACCP_REQUIRED'),
2180: 'PENDING_CANCEL',FND_MESSAGE.GET_STRING('POS','POS_PENDING_CANCEL'),

Line 2193: (1.0,FND_API.G_FALSE,pll.line_location_id,

2189: OR NVL(pll.CLOSED_CODE,'OPEN') = 'CLOSED FOR INVOICE'
2190: THEN
2191: DECODE(
2192: PO_ACKNOWLEDGE_PO_GRP.GET_SHIPMENT_ACK_CHANGE_STATUS
2193: (1.0,FND_API.G_FALSE,pll.line_location_id,
2194: pll.po_header_id, p_po_release_id,p_revision_num),
2195: 'PENDING_CHANGE',FND_MESSAGE.GET_STRING('POS','POS_PENDING_CHANGE'),
2196: 'ACK_REQUIRED',FND_MESSAGE.GET_STRING('POS','POS_ACCP_REQUIRED'),
2197: 'PENDING_CANCEL',FND_MESSAGE.GET_STRING('POS','POS_PENDING_CANCEL'),

Line 2207: (1.0,FND_API.G_FALSE,pll.line_location_id,

2203: )
2204: ) ,
2205: nvl(pll.closed_code,'OPEN'),
2206: PO_ACKNOWLEDGE_PO_GRP.GET_SHIPMENT_ACK_CHANGE_STATUS
2207: (1.0,FND_API.G_FALSE,pll.line_location_id,
2208: pll.po_header_id, p_po_release_id,p_revision_num),nvl(poh.acceptance_required_flag,'N'),
2209: poh.revision_num,nvl(pll.consigned_flag,'N')
2210: into x_msg_display,x_msg_code,x_ack_stat,x_accp_flag,x_revision,x_cons_flag
2211: from po_line_locations_all pll,

Line 2239: (1.0,FND_API.G_FALSE,pll.line_location_id,

2235: 'N',DECODE(NVL(pll.CONSIGNED_FLAG,'N'),
2236: 'Y',DECODE(NVL(pll.CLOSED_CODE,'OPEN'),'CLOSED FOR INVOICE',
2237: DECODE(
2238: PO_ACKNOWLEDGE_PO_GRP.GET_SHIPMENT_ACK_CHANGE_STATUS
2239: (1.0,FND_API.G_FALSE,pll.line_location_id,
2240: pll.po_header_id, p_po_release_id,p_revision_num),
2241: 'PENDING_CHANGE',FND_MESSAGE.GET_STRING('POS','POS_PENDING_CHANGE'),
2242: 'ACK_REQUIRED',FND_MESSAGE.GET_STRING('POS','POS_ACCP_REQUIRED'),
2243: 'PENDING_CANCEL',FND_MESSAGE.GET_STRING('POS','POS_PENDING_CANCEL'),

Line 2256: (1.0,FND_API.G_FALSE,pll.line_location_id,

2252: OR NVL(pll.CLOSED_CODE,'OPEN') = 'CLOSED FOR INVOICE'
2253: THEN
2254: DECODE(
2255: PO_ACKNOWLEDGE_PO_GRP.GET_SHIPMENT_ACK_CHANGE_STATUS
2256: (1.0,FND_API.G_FALSE,pll.line_location_id,
2257: pll.po_header_id, p_po_release_id,p_revision_num),
2258: 'PENDING_CHANGE',FND_MESSAGE.GET_STRING('POS','POS_PENDING_CHANGE'),
2259: 'ACK_REQUIRED',FND_MESSAGE.GET_STRING('POS','POS_ACCP_REQUIRED'),
2260: 'PENDING_CANCEL',FND_MESSAGE.GET_STRING('POS','POS_PENDING_CANCEL'),

Line 2270: (1.0,FND_API.G_FALSE,pll.line_location_id,

2266: )
2267: ) ,
2268: nvl(pll.closed_code,'OPEN'),
2269: PO_ACKNOWLEDGE_PO_GRP.GET_SHIPMENT_ACK_CHANGE_STATUS
2270: (1.0,FND_API.G_FALSE,pll.line_location_id,
2271: pll.po_header_id, p_po_release_id,p_revision_num),nvl(por.acceptance_required_flag,'N'),
2272: por.revision_num,nvl(pll.consigned_flag,'N')
2273: into x_msg_display,x_msg_code,x_ack_stat,x_accp_flag,x_revision,x_cons_flag
2274: from po_line_locations_all pll,

Line 2339: IF fnd_api.to_boolean(P_Init_Msg_List) THEN

2335: l_api_version_number CONSTANT NUMBER := 1.0;
2336: l_request_group_id NUMBER;
2337:
2338: BEGIN
2339: IF fnd_api.to_boolean(P_Init_Msg_List) THEN
2340: -- initialize message list
2341: FND_MSG_PUB.initialize;
2342: END IF;
2343:

Line 2346: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

2342: END IF;
2343:
2344: -- Standard call to check for call compatibility.
2345:
2346: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2347: p_api_version,
2348: l_api_name,
2349: G_PKG_NAME)
2350: THEN

Line 2351: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2347: p_api_version,
2348: l_api_name,
2349: G_PKG_NAME)
2350: THEN
2351: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2352: END IF;
2353:
2354: -- initialize return status
2355: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2355: x_return_status := FND_API.G_RET_STS_SUCCESS;

2351: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2352: END IF;
2353:
2354: -- initialize return status
2355: x_return_status := FND_API.G_RET_STS_SUCCESS;
2356: save_request(
2357: p_api_version => 1.0,
2358: p_init_msg_list => FND_API.G_FALSE,
2359: x_return_status => x_return_status,

Line 2358: p_init_msg_list => FND_API.G_FALSE,

2354: -- initialize return status
2355: x_return_status := FND_API.G_RET_STS_SUCCESS;
2356: save_request(
2357: p_api_version => 1.0,
2358: p_init_msg_list => FND_API.G_FALSE,
2359: x_return_status => x_return_status,
2360: p_po_header_id => p_po_header_id,
2361: p_po_release_id => p_po_release_id,
2362: p_revision_num => p_revision_num,

Line 2374: if (x_return_status = FND_API.G_RET_STS_SUCCESS ) then

2370: l_request_group_id,
2371: x_return_status);
2372:
2373: -- Start the workflow for cancel request
2374: if (x_return_status = FND_API.G_RET_STS_SUCCESS ) then
2375: x_return_status := startSupplierWF(
2376: p_po_header_id,p_po_release_id,p_revision_num,
2377: l_request_group_id,'N');
2378: end if;

Line 2381: WHEN FND_API.g_exc_error THEN

2377: l_request_group_id,'N');
2378: end if;
2379:
2380: EXCEPTION
2381: WHEN FND_API.g_exc_error THEN
2382: x_return_status := FND_API.g_ret_sts_error;
2383: WHEN FND_API.g_exc_unexpected_error THEN
2384: x_return_status := FND_API.g_ret_sts_unexp_error;
2385: WHEN OTHERS THEN

Line 2382: x_return_status := FND_API.g_ret_sts_error;

2378: end if;
2379:
2380: EXCEPTION
2381: WHEN FND_API.g_exc_error THEN
2382: x_return_status := FND_API.g_ret_sts_error;
2383: WHEN FND_API.g_exc_unexpected_error THEN
2384: x_return_status := FND_API.g_ret_sts_unexp_error;
2385: WHEN OTHERS THEN
2386: x_return_status := FND_API.g_ret_sts_unexp_error;

Line 2383: WHEN FND_API.g_exc_unexpected_error THEN

2379:
2380: EXCEPTION
2381: WHEN FND_API.g_exc_error THEN
2382: x_return_status := FND_API.g_ret_sts_error;
2383: WHEN FND_API.g_exc_unexpected_error THEN
2384: x_return_status := FND_API.g_ret_sts_unexp_error;
2385: WHEN OTHERS THEN
2386: x_return_status := FND_API.g_ret_sts_unexp_error;
2387:

Line 2384: x_return_status := FND_API.g_ret_sts_unexp_error;

2380: EXCEPTION
2381: WHEN FND_API.g_exc_error THEN
2382: x_return_status := FND_API.g_ret_sts_error;
2383: WHEN FND_API.g_exc_unexpected_error THEN
2384: x_return_status := FND_API.g_ret_sts_unexp_error;
2385: WHEN OTHERS THEN
2386: x_return_status := FND_API.g_ret_sts_unexp_error;
2387:
2388: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN

Line 2386: x_return_status := FND_API.g_ret_sts_unexp_error;

2382: x_return_status := FND_API.g_ret_sts_error;
2383: WHEN FND_API.g_exc_unexpected_error THEN
2384: x_return_status := FND_API.g_ret_sts_unexp_error;
2385: WHEN OTHERS THEN
2386: x_return_status := FND_API.g_ret_sts_unexp_error;
2387:
2388: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2389: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
2390: IF g_fnd_debug = 'Y' THEN

Line 2513: IF FND_API.to_boolean(p_init_msg_list) THEN

2509: request_status not in ('ACCEPTED', 'REJECTED');
2510:
2511: BEGIN
2512: -- Start standard API initialization
2513: IF FND_API.to_boolean(p_init_msg_list) THEN
2514: FND_MSG_PUB.initialize;
2515: END IF;
2516: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,
2517: l_api_name, g_pkg_name)

Line 2516: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,

2512: -- Start standard API initialization
2513: IF FND_API.to_boolean(p_init_msg_list) THEN
2514: FND_MSG_PUB.initialize;
2515: END IF;
2516: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,
2517: l_api_name, g_pkg_name)
2518: THEN
2519: RAISE FND_API.g_exc_unexpected_error;
2520: END IF;

Line 2519: RAISE FND_API.g_exc_unexpected_error;

2515: END IF;
2516: IF NOT FND_API.compatible_api_call(l_api_version, p_api_version,
2517: l_api_name, g_pkg_name)
2518: THEN
2519: RAISE FND_API.g_exc_unexpected_error;
2520: END IF;
2521: x_return_status := FND_API.g_ret_sts_success;
2522: -- End standard API initialization
2523:

Line 2521: x_return_status := FND_API.g_ret_sts_success;

2517: l_api_name, g_pkg_name)
2518: THEN
2519: RAISE FND_API.g_exc_unexpected_error;
2520: END IF;
2521: x_return_status := FND_API.g_ret_sts_success;
2522: -- End standard API initialization
2523:
2524: -- Get the change request group id for the change requests if any
2525: if (p_po_release_id is not null) then

Line 2727: WHEN FND_API.g_exc_error THEN

2723:
2724:
2725:
2726: EXCEPTION
2727: WHEN FND_API.g_exc_error THEN
2728: x_return_status := FND_API.g_ret_sts_error;
2729: WHEN FND_API.g_exc_unexpected_error THEN
2730: x_return_status := FND_API.g_ret_sts_unexp_error;
2731: WHEN OTHERS THEN

Line 2728: x_return_status := FND_API.g_ret_sts_error;

2724:
2725:
2726: EXCEPTION
2727: WHEN FND_API.g_exc_error THEN
2728: x_return_status := FND_API.g_ret_sts_error;
2729: WHEN FND_API.g_exc_unexpected_error THEN
2730: x_return_status := FND_API.g_ret_sts_unexp_error;
2731: WHEN OTHERS THEN
2732: x_return_status := FND_API.g_ret_sts_unexp_error;

Line 2729: WHEN FND_API.g_exc_unexpected_error THEN

2725:
2726: EXCEPTION
2727: WHEN FND_API.g_exc_error THEN
2728: x_return_status := FND_API.g_ret_sts_error;
2729: WHEN FND_API.g_exc_unexpected_error THEN
2730: x_return_status := FND_API.g_ret_sts_unexp_error;
2731: WHEN OTHERS THEN
2732: x_return_status := FND_API.g_ret_sts_unexp_error;
2733: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN

Line 2730: x_return_status := FND_API.g_ret_sts_unexp_error;

2726: EXCEPTION
2727: WHEN FND_API.g_exc_error THEN
2728: x_return_status := FND_API.g_ret_sts_error;
2729: WHEN FND_API.g_exc_unexpected_error THEN
2730: x_return_status := FND_API.g_ret_sts_unexp_error;
2731: WHEN OTHERS THEN
2732: x_return_status := FND_API.g_ret_sts_unexp_error;
2733: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2734: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);

Line 2732: x_return_status := FND_API.g_ret_sts_unexp_error;

2728: x_return_status := FND_API.g_ret_sts_error;
2729: WHEN FND_API.g_exc_unexpected_error THEN
2730: x_return_status := FND_API.g_ret_sts_unexp_error;
2731: WHEN OTHERS THEN
2732: x_return_status := FND_API.g_ret_sts_unexp_error;
2733: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2734: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
2735: IF (g_fnd_debug = 'Y') THEN
2736: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 2772: IF fnd_api.to_boolean(P_Init_Msg_List) THEN

2768: l_msg_data VARCHAR2(2000);
2769: l_ret_status VARCHAR2(20);
2770: BEGIN
2771:
2772: IF fnd_api.to_boolean(P_Init_Msg_List) THEN
2773: -- initialize message list
2774: FND_MSG_PUB.initialize;
2775: END IF;
2776:

Line 2779: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

2775: END IF;
2776:
2777: -- Standard call to check for call compatibility.
2778:
2779: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2780: p_api_version,
2781: l_api_name,
2782: G_PKG_NAME)
2783: THEN

Line 2784: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2780: p_api_version,
2781: l_api_name,
2782: G_PKG_NAME)
2783: THEN
2784: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2785: END IF;
2786:
2787: -- initialize return status
2788: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2788: x_return_status := FND_API.G_RET_STS_SUCCESS;

2784: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2785: END IF;
2786:
2787: -- initialize return status
2788: x_return_status := FND_API.G_RET_STS_SUCCESS;
2789: if (p_document_subtype in ('STANDARD','PLANNED')) then
2790: l_document_type := 'PO';
2791:
2792: elsif (p_document_subtype in ('BLANKET','CONTRACT')) then

Line 2806: p_init_msg_list => FND_API.G_FALSE,

2802: -- First Find the Item Key for this Document if it were ever generated
2803: BEGIN
2804: PO_SIGNATURE_GRP.Find_Item_Key(
2805: p_api_version => 1.0,
2806: p_init_msg_list => FND_API.G_FALSE,
2807: p_po_header_id => p_po_header_id,
2808: p_revision_num => p_revision_num ,
2809: p_document_type => l_document_type ,
2810: x_itemkey => l_item_key,

Line 2825: p_init_msg_list => FND_API.G_FALSE,

2821: BEGIN
2822:
2823: PO_SIGNATURE_GRP.Get_Item_Key(
2824: p_api_version => 1.0,
2825: p_init_msg_list => FND_API.G_FALSE,
2826: p_po_header_id => p_po_header_id,
2827: p_revision_num => p_revision_num ,
2828: p_document_type => l_document_type ,
2829: x_itemkey => l_item_key,

Line 2853: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then

2849: p_org_id ,
2850: p_Agent_Id ,
2851: p_supplier_user_id ) ;
2852:
2853: if (x_return_status = FND_API.G_RET_STS_SUCCESS) then
2854: x_notification_id := getSigNotifId(l_item_type, l_item_key);
2855: if x_notification_id is null then
2856: RAISE sig_notif_notfound;
2857: end if;

Line 2888: p_init_msg_list => FND_API.G_FALSE,

2884: -- Abort the previous process and start a new one
2885: BEGIN
2886: PO_SIGNATURE_GRP.Abort_Doc_Sign_Process(
2887: p_api_version => 1.0,
2888: p_init_msg_list => FND_API.G_FALSE,
2889: p_itemkey => l_item_key,
2890: x_result => x_result,
2891: x_return_status => l_ret_status,
2892: x_msg_count => l_msg_count,

Line 2901: p_init_msg_list => FND_API.G_FALSE,

2897: BEGIN
2898:
2899: PO_SIGNATURE_GRP.Get_Item_Key(
2900: p_api_version => 1.0,
2901: p_init_msg_list => FND_API.G_FALSE,
2902: p_po_header_id => p_po_header_id,
2903: p_revision_num => p_revision_num ,
2904: p_document_type => l_document_type ,
2905: x_itemkey => l_item_key,

Line 2940: WHEN FND_API.g_exc_error THEN

2936: end if;
2937: END IF;
2938:
2939: EXCEPTION
2940: WHEN FND_API.g_exc_error THEN
2941: x_return_status := FND_API.g_ret_sts_error;
2942: WHEN FND_API.g_exc_unexpected_error THEN
2943: x_return_status := FND_API.g_ret_sts_unexp_error;
2944: WHEN sig_notif_notfound THEN

Line 2941: x_return_status := FND_API.g_ret_sts_error;

2937: END IF;
2938:
2939: EXCEPTION
2940: WHEN FND_API.g_exc_error THEN
2941: x_return_status := FND_API.g_ret_sts_error;
2942: WHEN FND_API.g_exc_unexpected_error THEN
2943: x_return_status := FND_API.g_ret_sts_unexp_error;
2944: WHEN sig_notif_notfound THEN
2945: IF g_fnd_debug = 'Y' THEN

Line 2942: WHEN FND_API.g_exc_unexpected_error THEN

2938:
2939: EXCEPTION
2940: WHEN FND_API.g_exc_error THEN
2941: x_return_status := FND_API.g_ret_sts_error;
2942: WHEN FND_API.g_exc_unexpected_error THEN
2943: x_return_status := FND_API.g_ret_sts_unexp_error;
2944: WHEN sig_notif_notfound THEN
2945: IF g_fnd_debug = 'Y' THEN
2946: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN

Line 2943: x_return_status := FND_API.g_ret_sts_unexp_error;

2939: EXCEPTION
2940: WHEN FND_API.g_exc_error THEN
2941: x_return_status := FND_API.g_ret_sts_error;
2942: WHEN FND_API.g_exc_unexpected_error THEN
2943: x_return_status := FND_API.g_ret_sts_unexp_error;
2944: WHEN sig_notif_notfound THEN
2945: IF g_fnd_debug = 'Y' THEN
2946: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN
2947: FND_LOG.string(FND_LOG.level_unexpected, l_api_name ||

Line 2951: x_return_status := FND_API.g_ret_sts_error;

2947: FND_LOG.string(FND_LOG.level_unexpected, l_api_name ||
2948: l_item_key || '.Notification not found exception' ,sqlcode);
2949: END IF;
2950: END IF;
2951: x_return_status := FND_API.g_ret_sts_error;
2952: WHEN OTHERS THEN
2953: x_return_status := FND_API.g_ret_sts_unexp_error;
2954: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2955: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);

Line 2953: x_return_status := FND_API.g_ret_sts_unexp_error;

2949: END IF;
2950: END IF;
2951: x_return_status := FND_API.g_ret_sts_error;
2952: WHEN OTHERS THEN
2953: x_return_status := FND_API.g_ret_sts_unexp_error;
2954: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
2955: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
2956: IF g_fnd_debug = 'Y' THEN
2957: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_UNEXPECTED) THEN