DBA Data[Home] [Help]

APPS.PO_DOCUMENT_UPDATE_PVT dependencies on FND_API

Line 262: -- If FND_API.G_TRUE, the API will initialize the standard API message list.

258: --IN:
259: --p_api_version
260: -- API version number expected by the caller
261: --p_init_msg_list
262: -- If FND_API.G_TRUE, the API will initialize the standard API message list.
263: --p_changes
264: -- object with the changes to make to the document
265: --p_run_submission_checks
266: -- FND_API.G_TRUE: The API will perform field-level validations as well as

Line 266: -- FND_API.G_TRUE: The API will perform field-level validations as well as

262: -- If FND_API.G_TRUE, the API will initialize the standard API message list.
263: --p_changes
264: -- object with the changes to make to the document
265: --p_run_submission_checks
266: -- FND_API.G_TRUE: The API will perform field-level validations as well as
267: -- the PO submission checks. If any of them fail, it will not apply any
268: -- changes to the document.
269: -- Therefore, the changes will only be applied if the document is approvable
270: -- with these changes.

Line 271: -- FND_API.G_FALSE: The API will only perform field-level validations.

267: -- the PO submission checks. If any of them fail, it will not apply any
268: -- changes to the document.
269: -- Therefore, the changes will only be applied if the document is approvable
270: -- with these changes.
271: -- FND_API.G_FALSE: The API will only perform field-level validations.
272: -- If any of them fail, it will not apply any changes to the document.
273: -- Therefore, it is possible for the changes to be applied even if the
274: -- document is not approvable with the changes.
275: --p_launch_approvals_flag

Line 276: -- FND_API.G_TRUE: Launch the PO Approval workflow after applying the changes

272: -- If any of them fail, it will not apply any changes to the document.
273: -- Therefore, it is possible for the changes to be applied even if the
274: -- document is not approvable with the changes.
275: --p_launch_approvals_flag
276: -- FND_API.G_TRUE: Launch the PO Approval workflow after applying the changes
277: -- to the document.
278: -- FND_API.G_FALSE: Do not launch the PO Approval workflow.
279: --p_buyer_id
280: -- Specifies the buyer to use for unreserving the document and launching

Line 278: -- FND_API.G_FALSE: Do not launch the PO Approval workflow.

274: -- document is not approvable with the changes.
275: --p_launch_approvals_flag
276: -- FND_API.G_TRUE: Launch the PO Approval workflow after applying the changes
277: -- to the document.
278: -- FND_API.G_FALSE: Do not launch the PO Approval workflow.
279: --p_buyer_id
280: -- Specifies the buyer to use for unreserving the document and launching
281: -- the PO Approval workflow; if NULL, the API will use the buyer (AGENT_ID) on
282: -- the document.

Line 291: -- Only used if p_launch_approvals_flag = FND_API.G_TRUE.

287: --p_override_date
288: -- Date that will be used to unreserve the document; only used if the
289: -- document is encumbered.
290: --p_approval_background_flag := NULL
291: -- Only used if p_launch_approvals_flag = FND_API.G_TRUE.
292: -- PO_CORE_S.G_PARAMETER_NO or NULL: Launch the PO Approval Workflow in
293: -- synchronous mode, where we issue a commit and launch the workflow.
294: -- Control does not return to the caller until the workflow completes or
295: -- reaches a wait node (ex. when it sends a notification to the approver).

Line 301: -- Only used for Blanket PAs, and if p_launch_approvals_flag = FND_API.G_TRUE.

297: -- mode, where we start the workflow in the background and return
298: -- immediately, without issuing any commits.
299: --p_mass_update_releases := NULL
300: -- (Bug 3373453)
301: -- Only used for Blanket PAs, and if p_launch_approvals_flag = FND_API.G_TRUE.
302: -- PO_CORE_S.G_PARAMETER_YES: Launch the PO Approval Workflow with a request
303: -- to retroactively update the POs/releases with the price from the Blanket.
304: -- PO_CORE_S.G_PARAMETER_NO or NULL: Launch the PO Approval Workflow without
305: -- retroactively pricing the POs/releases of the Blanket.

Line 308: -- FND_API.G_RET_STS_SUCCESS if the API succeeded and the changes are applied.

304: -- PO_CORE_S.G_PARAMETER_NO or NULL: Launch the PO Approval Workflow without
305: -- retroactively pricing the POs/releases of the Blanket.
306: --OUT:
307: --x_return_status
308: -- FND_API.G_RET_STS_SUCCESS if the API succeeded and the changes are applied.
309: -- FND_API.G_RET_STS_ERROR if one or more validations failed.
310: -- FND_API.G_RET_STS_UNEXP_ERROR if an unexpected error occurred.
311: --x_api_errors: If x_return_status is not FND_API.G_RET_STS_SUCCESS, this
312: -- PL/SQL object will contain all the error messages, including field-level

Line 309: -- FND_API.G_RET_STS_ERROR if one or more validations failed.

305: -- retroactively pricing the POs/releases of the Blanket.
306: --OUT:
307: --x_return_status
308: -- FND_API.G_RET_STS_SUCCESS if the API succeeded and the changes are applied.
309: -- FND_API.G_RET_STS_ERROR if one or more validations failed.
310: -- FND_API.G_RET_STS_UNEXP_ERROR if an unexpected error occurred.
311: --x_api_errors: If x_return_status is not FND_API.G_RET_STS_SUCCESS, this
312: -- PL/SQL object will contain all the error messages, including field-level
313: -- validation errors, submission checks errors, and unexpected errors.

Line 310: -- FND_API.G_RET_STS_UNEXP_ERROR if an unexpected error occurred.

306: --OUT:
307: --x_return_status
308: -- FND_API.G_RET_STS_SUCCESS if the API succeeded and the changes are applied.
309: -- FND_API.G_RET_STS_ERROR if one or more validations failed.
310: -- FND_API.G_RET_STS_UNEXP_ERROR if an unexpected error occurred.
311: --x_api_errors: If x_return_status is not FND_API.G_RET_STS_SUCCESS, this
312: -- PL/SQL object will contain all the error messages, including field-level
313: -- validation errors, submission checks errors, and unexpected errors.
314: --Notes:

Line 311: --x_api_errors: If x_return_status is not FND_API.G_RET_STS_SUCCESS, this

307: --x_return_status
308: -- FND_API.G_RET_STS_SUCCESS if the API succeeded and the changes are applied.
309: -- FND_API.G_RET_STS_ERROR if one or more validations failed.
310: -- FND_API.G_RET_STS_UNEXP_ERROR if an unexpected error occurred.
311: --x_api_errors: If x_return_status is not FND_API.G_RET_STS_SUCCESS, this
312: -- PL/SQL object will contain all the error messages, including field-level
313: -- validation errors, submission checks errors, and unexpected errors.
314: --Notes:
315: -- This API performs quantity/amount proration (shipments to distributions) and

Line 361: x_return_status := FND_API.G_RET_STS_SUCCESS;

357: log_changes(p_changes); -- Print the changes for statement-level logging.
358: END IF;
359:
360: SAVEPOINT PO_DOCUMENT_UPDATE_PVT_SP;
361: x_return_status := FND_API.G_RET_STS_SUCCESS;
362:
363: -- Standard API initialization:
364: IF NOT FND_API.compatible_api_call (
365: p_current_version_number => l_api_version,

Line 364: IF NOT FND_API.compatible_api_call (

360: SAVEPOINT PO_DOCUMENT_UPDATE_PVT_SP;
361: x_return_status := FND_API.G_RET_STS_SUCCESS;
362:
363: -- Standard API initialization:
364: IF NOT FND_API.compatible_api_call (
365: p_current_version_number => l_api_version,
366: p_caller_version_number => p_api_version,
367: p_api_name => l_api_name,
368: p_pkg_name => g_pkg_name ) THEN

Line 369: RAISE FND_API.g_exc_unexpected_error;

365: p_current_version_number => l_api_version,
366: p_caller_version_number => p_api_version,
367: p_api_name => l_api_name,
368: p_pkg_name => g_pkg_name ) THEN
369: RAISE FND_API.g_exc_unexpected_error;
370: END IF;
371:
372: IF (FND_API.to_boolean(p_init_msg_list)) THEN
373: FND_MSG_PUB.initialize();

Line 372: IF (FND_API.to_boolean(p_init_msg_list)) THEN

368: p_pkg_name => g_pkg_name ) THEN
369: RAISE FND_API.g_exc_unexpected_error;
370: END IF;
371:
372: IF (FND_API.to_boolean(p_init_msg_list)) THEN
373: FND_MSG_PUB.initialize();
374: END IF;
375:
376: /* BEGIN INVCONV sschinch */

Line 391: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

387: process_inputs ( p_changes,
388: x_return_status,
389: p_approval_background_flag,
390: p_mass_update_releases );
391: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
392: RAISE FND_API.G_EXC_ERROR;
393: END IF;
394:
395: -- Derive additional changes based on the requested changes.

Line 392: RAISE FND_API.G_EXC_ERROR;

388: x_return_status,
389: p_approval_background_flag,
390: p_mass_update_releases );
391: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
392: RAISE FND_API.G_EXC_ERROR;
393: END IF;
394:
395: -- Derive additional changes based on the requested changes.
396:

Line 398: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

394:
395: -- Derive additional changes based on the requested changes.
396:
397: derive_changes (p_changes, x_return_status);
398: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
399: RAISE FND_API.G_EXC_ERROR;
400: END IF;
401:
402: -- Validate all the changes.

Line 399: RAISE FND_API.G_EXC_ERROR;

395: -- Derive additional changes based on the requested changes.
396:
397: derive_changes (p_changes, x_return_status);
398: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
399: RAISE FND_API.G_EXC_ERROR;
400: END IF;
401:
402: -- Validate all the changes.
403:

Line 405: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

401:
402: -- Validate all the changes.
403:
404: validate_changes (p_changes, p_run_submission_checks, x_return_status, p_req_chg_initiator);--Bug 14549341
405: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
406: RAISE FND_API.G_EXC_ERROR;
407: END IF;
408:
409: -- Apply all the changes to the database tables.

Line 406: RAISE FND_API.G_EXC_ERROR;

402: -- Validate all the changes.
403:
404: validate_changes (p_changes, p_run_submission_checks, x_return_status, p_req_chg_initiator);--Bug 14549341
405: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
406: RAISE FND_API.G_EXC_ERROR;
407: END IF;
408:
409: -- Apply all the changes to the database tables.
410:

Line 413: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

409: -- Apply all the changes to the database tables.
410:
411: apply_changes (p_changes, p_override_date, p_buyer_id, x_return_status);
412:
413: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
414: RAISE FND_API.G_EXC_ERROR;
415: END IF;
416:
417: -- INVCONV If only secondary quantity or grade has changed on the shipment(s), don't launch the PO approval workflow

Line 414: RAISE FND_API.G_EXC_ERROR;

410:
411: apply_changes (p_changes, p_override_date, p_buyer_id, x_return_status);
412:
413: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
414: RAISE FND_API.G_EXC_ERROR;
415: END IF;
416:
417: -- INVCONV If only secondary quantity or grade has changed on the shipment(s), don't launch the PO approval workflow
418: --

Line 419: IF g_calculate_tax_status <> FND_API.G_RET_STS_SUCCESS THEN

415: END IF;
416:
417: -- INVCONV If only secondary quantity or grade has changed on the shipment(s), don't launch the PO approval workflow
418: --
419: IF g_calculate_tax_status <> FND_API.G_RET_STS_SUCCESS THEN
420: FOR i IN 1..po_tax_interface_pvt.G_TAX_ERRORS_TBL.MESSAGE_TEXT.COUNT
421: LOOP
422: add_error (
423: p_api_errors => g_api_errors,

Line 435: IF (FND_API.to_boolean(p_launch_approvals_flag)) THEN

431: --
432:
433: IF g_sec_qty_grade_only_chge_doc = 'N' THEN /* INVCONV sschinch 09/07/04*/
434: -- Launch the PO approval workflow if requested.
435: IF (FND_API.to_boolean(p_launch_approvals_flag)) THEN
436: IF g_calculate_tax_status <> FND_API.G_RET_STS_SUCCESS THEN --
437: --
438: -- Do nothing here as per new ECO Bug 4643026
439: -- Get the changes, but do not lanuch approval workflow

Line 436: IF g_calculate_tax_status <> FND_API.G_RET_STS_SUCCESS THEN --

432:
433: IF g_sec_qty_grade_only_chge_doc = 'N' THEN /* INVCONV sschinch 09/07/04*/
434: -- Launch the PO approval workflow if requested.
435: IF (FND_API.to_boolean(p_launch_approvals_flag)) THEN
436: IF g_calculate_tax_status <> FND_API.G_RET_STS_SUCCESS THEN --
437: --
438: -- Do nothing here as per new ECO Bug 4643026
439: -- Get the changes, but do not lanuch approval workflow
440: -- as the tax calculation has failed

Line 447: p_init_msg_list => FND_API.G_FALSE,

443: ELSE --
444: -- Bug 3605355 START
445: launch_po_approval_wf (
446: p_api_version => 1.0,
447: p_init_msg_list => FND_API.G_FALSE,
448: x_return_status => l_return_status,
449: p_document_id => g_document_id,
450: p_document_type => g_document_type,
451: p_document_subtype => g_document_subtype,

Line 457: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

453: p_approval_background_flag => p_approval_background_flag,
454: p_mass_update_releases => p_mass_update_releases,
455: p_retroactive_price_change => g_retroactive_price_change
456: );
457: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
458: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
459: END IF;
460: -- Bug 3605355 END
461: END IF; --

Line 458: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

454: p_mass_update_releases => p_mass_update_releases,
455: p_retroactive_price_change => g_retroactive_price_change
456: );
457: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
458: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
459: END IF;
460: -- Bug 3605355 END
461: END IF; --
462: END IF;

Line 474: WHEN FND_API.G_EXC_ERROR THEN

470: END IF;
471: log_changes(p_changes); -- Print the changes for statement-level logging.
472: END IF;
473: EXCEPTION
474: WHEN FND_API.G_EXC_ERROR THEN
475: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;
476: x_return_status := FND_API.G_RET_STS_ERROR;
477: x_api_errors := g_api_errors;
478: log_changes(p_changes); -- Print the changes for statement-level logging.

Line 476: x_return_status := FND_API.G_RET_STS_ERROR;

472: END IF;
473: EXCEPTION
474: WHEN FND_API.G_EXC_ERROR THEN
475: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;
476: x_return_status := FND_API.G_RET_STS_ERROR;
477: x_api_errors := g_api_errors;
478: log_changes(p_changes); -- Print the changes for statement-level logging.
479: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
480: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;

Line 479: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

475: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;
476: x_return_status := FND_API.G_RET_STS_ERROR;
477: x_api_errors := g_api_errors;
478: log_changes(p_changes); -- Print the changes for statement-level logging.
479: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
480: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;
481: -- Add the errors on the API message list to g_api_errors.
482: add_message_list_errors ( p_api_errors => g_api_errors,
483: x_return_status => x_return_status,

Line 485: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

481: -- Add the errors on the API message list to g_api_errors.
482: add_message_list_errors ( p_api_errors => g_api_errors,
483: x_return_status => x_return_status,
484: p_start_index => l_last_msg_list_index + 1 );
485: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
486: x_api_errors := g_api_errors;
487: log_changes(p_changes); -- Print the changes for statement-level logging.
488: WHEN OTHERS THEN
489: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;

Line 497: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

493: -- Add the errors on the API message list to g_api_errors.
494: add_message_list_errors ( p_api_errors => g_api_errors,
495: x_return_status => x_return_status,
496: p_start_index => l_last_msg_list_index + 1 );
497: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
498: x_api_errors := g_api_errors;
499: log_changes(p_changes); -- Print the changes for statement-level logging.
500: END update_document;
501:

Line 585: WHEN FND_API.g_exc_unexpected_error THEN

581: * g_opm_installed := (l_opm_install_status = 'I');
582: * g_gml_common_rcv_installed := GML_PO_FOR_PROCESS.check_po_for_proc();
583: * END INVCONV SSCHINCH 09/07/04*/
584: EXCEPTION
585: WHEN FND_API.g_exc_unexpected_error THEN
586: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
587: p_proc_name => l_proc_name,
588: p_add_to_msg_list => FALSE );
589: RAISE FND_API.g_exc_unexpected_error;

Line 589: RAISE FND_API.g_exc_unexpected_error;

585: WHEN FND_API.g_exc_unexpected_error THEN
586: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
587: p_proc_name => l_proc_name,
588: p_add_to_msg_list => FALSE );
589: RAISE FND_API.g_exc_unexpected_error;
590: WHEN OTHERS THEN
591: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
592: p_proc_name => l_proc_name );
593: RAISE FND_API.g_exc_unexpected_error;

Line 593: RAISE FND_API.g_exc_unexpected_error;

589: RAISE FND_API.g_exc_unexpected_error;
590: WHEN OTHERS THEN
591: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
592: p_proc_name => l_proc_name );
593: RAISE FND_API.g_exc_unexpected_error;
594: END init_globals;
595:
596: -------------------------------------------------------------------------------
597: --Start of Comments

Line 694: WHEN FND_API.g_exc_unexpected_error THEN

690: AND document_subtype = g_document_subtype;
691:
692:
693: EXCEPTION
694: WHEN FND_API.g_exc_unexpected_error THEN
695: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
696: p_proc_name => l_proc_name,
697: p_add_to_msg_list => FALSE );
698: RAISE FND_API.g_exc_unexpected_error;

Line 698: RAISE FND_API.g_exc_unexpected_error;

694: WHEN FND_API.g_exc_unexpected_error THEN
695: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
696: p_proc_name => l_proc_name,
697: p_add_to_msg_list => FALSE );
698: RAISE FND_API.g_exc_unexpected_error;
699: WHEN OTHERS THEN
700: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
701: p_proc_name => l_proc_name );
702: RAISE FND_API.g_exc_unexpected_error;

Line 702: RAISE FND_API.g_exc_unexpected_error;

698: RAISE FND_API.g_exc_unexpected_error;
699: WHEN OTHERS THEN
700: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
701: p_proc_name => l_proc_name );
702: RAISE FND_API.g_exc_unexpected_error;
703: END init_document_globals;
704:
705: -------------------------------------------------------------------------------
706: --Start of Comments

Line 734: x_return_status := FND_API.G_RET_STS_SUCCESS;

730: message => 'Entering ' || l_proc_name );
731: END IF;
732: END IF;
733:
734: x_return_status := FND_API.G_RET_STS_SUCCESS;
735:
736: -- Make sure that the po_header_id / po_release_id is valid.
737: IF (g_po_header_id IS NOT NULL) THEN -- PO / PA
738: BEGIN

Line 912: WHEN FND_API.g_exc_unexpected_error THEN

908: END;
909: END LOOP;
910:
911: EXCEPTION
912: WHEN FND_API.g_exc_unexpected_error THEN
913: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
914: p_proc_name => l_proc_name,
915: p_add_to_msg_list => FALSE );
916: RAISE FND_API.g_exc_unexpected_error;

Line 916: RAISE FND_API.g_exc_unexpected_error;

912: WHEN FND_API.g_exc_unexpected_error THEN
913: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
914: p_proc_name => l_proc_name,
915: p_add_to_msg_list => FALSE );
916: RAISE FND_API.g_exc_unexpected_error;
917: WHEN OTHERS THEN
918: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
919: p_proc_name => l_proc_name );
920: RAISE FND_API.g_exc_unexpected_error;

Line 920: RAISE FND_API.g_exc_unexpected_error;

916: RAISE FND_API.g_exc_unexpected_error;
917: WHEN OTHERS THEN
918: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
919: p_proc_name => l_proc_name );
920: RAISE FND_API.g_exc_unexpected_error;
921: END verify_document_ids;
922:
923: -------------------------------------------------------------------------------
924: --Start of Comments

Line 961: x_return_status := FND_API.G_RET_STS_SUCCESS;

957: message => 'Entering ' || l_proc_name );
958: END IF;
959: END IF;
960:
961: x_return_status := FND_API.G_RET_STS_SUCCESS;
962:
963: -- Verify that the passed in document IDs (ex. po_header_id,
964: -- po_line_id, etc.) are valid.
965: verify_document_ids (p_chg, x_return_status);

Line 966: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

962:
963: -- Verify that the passed in document IDs (ex. po_header_id,
964: -- po_line_id, etc.) are valid.
965: verify_document_ids (p_chg, x_return_status);
966: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
967: RETURN;
968: END IF;
969:
970: -- Next, retrieve some global variables for the document, such as

Line 1010: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

1006: PO_CORE_S.validate_yes_no_param (
1007: x_return_status => x_return_status,
1008: p_parameter_name => 'p_approval_background_flag',
1009: p_parameter_value => p_approval_background_flag );
1010: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1011: RAISE FND_API.g_exc_unexpected_error;
1012: END IF;
1013:
1014: PO_CORE_S.validate_yes_no_param (

Line 1011: RAISE FND_API.g_exc_unexpected_error;

1007: x_return_status => x_return_status,
1008: p_parameter_name => 'p_approval_background_flag',
1009: p_parameter_value => p_approval_background_flag );
1010: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1011: RAISE FND_API.g_exc_unexpected_error;
1012: END IF;
1013:
1014: PO_CORE_S.validate_yes_no_param (
1015: x_return_status => x_return_status,

Line 1018: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

1014: PO_CORE_S.validate_yes_no_param (
1015: x_return_status => x_return_status,
1016: p_parameter_name => 'p_mass_update_releases',
1017: p_parameter_value => p_mass_update_releases );
1018: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1019: RAISE FND_API.g_exc_unexpected_error;
1020: END IF;
1021:
1022: --------------------------------------------------------------------------

Line 1019: RAISE FND_API.g_exc_unexpected_error;

1015: x_return_status => x_return_status,
1016: p_parameter_name => 'p_mass_update_releases',
1017: p_parameter_value => p_mass_update_releases );
1018: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1019: RAISE FND_API.g_exc_unexpected_error;
1020: END IF;
1021:
1022: --------------------------------------------------------------------------
1023: -- Check: p_mass_update_releases can only be set to Y for Blankets.

Line 1030: RAISE FND_API.g_exc_unexpected_error;

1026: AND (g_document_type <> 'PA') THEN
1027:
1028: FND_MESSAGE.set_name('PO', 'PO_INVALID_MASS_UPDATE_REL');
1029: FND_MSG_PUB.add;
1030: RAISE FND_API.g_exc_unexpected_error;
1031: END IF;
1032:
1033: l_progress := '020';
1034:

Line 1071: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

1067: END IF;
1068:
1069: l_progress := '030';
1070:
1071: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1072: -- Add the errors on the message list to the API errors object.
1073: add_message_list_errors ( p_api_errors => g_api_errors,
1074: x_return_status => x_return_status,
1075: p_start_index => l_last_msg_list_index + 1 );

Line 1077: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

1073: add_message_list_errors ( p_api_errors => g_api_errors,
1074: x_return_status => x_return_status,
1075: p_start_index => l_last_msg_list_index + 1 );
1076: RETURN;
1077: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1078: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1079: END IF;
1080:
1081: IF (l_status_rec_type.updatable_flag(1) <> 'Y') THEN

Line 1078: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1074: x_return_status => x_return_status,
1075: p_start_index => l_last_msg_list_index + 1 );
1076: RETURN;
1077: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1078: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1079: END IF;
1080:
1081: IF (l_status_rec_type.updatable_flag(1) <> 'Y') THEN
1082: -- The document status does not allow updates.

Line 1093: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

1089: -- Perform some preprocessing on the change object, such as UOM quantity
1090: -- conversions and populating the cached fields.
1091: l_progress := '040';
1092: preprocess_changes (p_chg, x_return_status);
1093: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1094: RETURN;
1095: END IF;
1096:
1097: -- Check that the requested changes make sense.

Line 1102: WHEN FND_API.g_exc_unexpected_error THEN

1098: l_progress := '050';
1099: verify_inputs (p_chg, x_return_status);
1100:
1101: EXCEPTION
1102: WHEN FND_API.g_exc_unexpected_error THEN
1103: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1104: p_proc_name => l_proc_name,
1105: p_progress => l_progress,
1106: p_add_to_msg_list => FALSE );

Line 1107: RAISE FND_API.g_exc_unexpected_error;

1103: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1104: p_proc_name => l_proc_name,
1105: p_progress => l_progress,
1106: p_add_to_msg_list => FALSE );
1107: RAISE FND_API.g_exc_unexpected_error;
1108: WHEN OTHERS THEN
1109: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1110: p_proc_name => l_proc_name,
1111: p_progress => l_progress );

Line 1112: RAISE FND_API.g_exc_unexpected_error;

1108: WHEN OTHERS THEN
1109: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1110: p_proc_name => l_proc_name,
1111: p_progress => l_progress );
1112: RAISE FND_API.g_exc_unexpected_error;
1113: END process_inputs;
1114:
1115: -------------------------------------------------------------------------------
1116: --Start of Comments

Line 1196: WHEN FND_API.g_exc_unexpected_error THEN

1192: AND NVL(MSI.organization_id, FSP.inventory_organization_id)
1193: = FSP.inventory_organization_id; -- JOIN
1194:
1195: EXCEPTION
1196: WHEN FND_API.g_exc_unexpected_error THEN
1197: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1198: p_proc_name => 'POPULATE_LINE_CACHED_FIELDS',
1199: p_add_to_msg_list => FALSE );
1200: RAISE FND_API.g_exc_unexpected_error;

Line 1200: RAISE FND_API.g_exc_unexpected_error;

1196: WHEN FND_API.g_exc_unexpected_error THEN
1197: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1198: p_proc_name => 'POPULATE_LINE_CACHED_FIELDS',
1199: p_add_to_msg_list => FALSE );
1200: RAISE FND_API.g_exc_unexpected_error;
1201: WHEN OTHERS THEN
1202: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1203: p_proc_name => 'POPULATE_LINE_CACHED_FIELDS' );
1204: RAISE FND_API.g_exc_unexpected_error;

Line 1204: RAISE FND_API.g_exc_unexpected_error;

1200: RAISE FND_API.g_exc_unexpected_error;
1201: WHEN OTHERS THEN
1202: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1203: p_proc_name => 'POPULATE_LINE_CACHED_FIELDS' );
1204: RAISE FND_API.g_exc_unexpected_error;
1205: END populate_line_cached_fields;
1206:
1207: -------------------------------------------------------------------------------
1208: --Start of Comments

Line 1354: WHEN FND_API.g_exc_unexpected_error THEN

1350: AND NVL(MSI.organization_id, FSP.inventory_organization_id)
1351: = FSP.inventory_organization_id; -- JOIN
1352:
1353: EXCEPTION
1354: WHEN FND_API.g_exc_unexpected_error THEN
1355: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1356: p_proc_name => 'POPULATE_SHIP_CACHED_FIELDS',
1357: p_add_to_msg_list => FALSE );
1358: RAISE FND_API.g_exc_unexpected_error;

Line 1358: RAISE FND_API.g_exc_unexpected_error;

1354: WHEN FND_API.g_exc_unexpected_error THEN
1355: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1356: p_proc_name => 'POPULATE_SHIP_CACHED_FIELDS',
1357: p_add_to_msg_list => FALSE );
1358: RAISE FND_API.g_exc_unexpected_error;
1359: WHEN OTHERS THEN
1360: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1361: p_proc_name => 'POPULATE_SHIP_CACHED_FIELDS' );
1362: RAISE FND_API.g_exc_unexpected_error;

Line 1362: RAISE FND_API.g_exc_unexpected_error;

1358: RAISE FND_API.g_exc_unexpected_error;
1359: WHEN OTHERS THEN
1360: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1361: p_proc_name => 'POPULATE_SHIP_CACHED_FIELDS' );
1362: RAISE FND_API.g_exc_unexpected_error;
1363: END populate_ship_cached_fields;
1364:
1365: -------------------------------------------------------------------------------
1366: --Start of Comments

Line 1478: WHEN FND_API.g_exc_unexpected_error THEN

1474: ;
1475:
1476:
1477: EXCEPTION
1478: WHEN FND_API.g_exc_unexpected_error THEN
1479: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1480: p_proc_name => 'POPULATE_DIST_CACHED_FIELDS',
1481: p_add_to_msg_list => FALSE );
1482: RAISE FND_API.g_exc_unexpected_error;

Line 1482: RAISE FND_API.g_exc_unexpected_error;

1478: WHEN FND_API.g_exc_unexpected_error THEN
1479: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1480: p_proc_name => 'POPULATE_DIST_CACHED_FIELDS',
1481: p_add_to_msg_list => FALSE );
1482: RAISE FND_API.g_exc_unexpected_error;
1483: WHEN OTHERS THEN
1484: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1485: p_proc_name => 'POPULATE_DIST_CACHED_FIELDS' );
1486: RAISE FND_API.g_exc_unexpected_error;

Line 1486: RAISE FND_API.g_exc_unexpected_error;

1482: RAISE FND_API.g_exc_unexpected_error;
1483: WHEN OTHERS THEN
1484: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1485: p_proc_name => 'POPULATE_DIST_CACHED_FIELDS' );
1486: RAISE FND_API.g_exc_unexpected_error;
1487: END populate_dist_cached_fields;
1488:
1489: -------------------------------------------------------------------------------
1490: --Start of Comments

Line 1525: x_return_status := FND_API.G_RET_STS_SUCCESS;

1521: message => 'Entering ' || l_proc_name );
1522: END IF;
1523: END IF;
1524:
1525: x_return_status := FND_API.G_RET_STS_SUCCESS;
1526: l_progress := '010';
1527:
1528: -- Line changes
1529: FOR i IN 1..p_chg.line_changes.get_count LOOP

Line 1675: WHEN FND_API.g_exc_unexpected_error THEN

1671:
1672: l_progress := '040';
1673:
1674: EXCEPTION
1675: WHEN FND_API.g_exc_unexpected_error THEN
1676: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1677: p_proc_name => l_proc_name,
1678: p_progress => l_progress,
1679: p_add_to_msg_list => FALSE );

Line 1680: RAISE FND_API.g_exc_unexpected_error;

1676: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1677: p_proc_name => l_proc_name,
1678: p_progress => l_progress,
1679: p_add_to_msg_list => FALSE );
1680: RAISE FND_API.g_exc_unexpected_error;
1681: WHEN OTHERS THEN
1682: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1683: p_proc_name => l_proc_name,
1684: p_progress => l_progress );

Line 1685: RAISE FND_API.g_exc_unexpected_error;

1681: WHEN OTHERS THEN
1682: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1683: p_proc_name => l_proc_name,
1684: p_progress => l_progress );
1685: RAISE FND_API.g_exc_unexpected_error;
1686: END preprocess_changes;
1687:
1688: -------------------------------------------------------------------------------
1689: --Start of Comments

Line 1732: x_return_status := FND_API.G_RET_STS_SUCCESS;

1728: message => 'Entering ' || l_proc_name );
1729: END IF;
1730: END IF;
1731:
1732: x_return_status := FND_API.G_RET_STS_SUCCESS;
1733:
1734: -- Check if there are changes to fields that are not applicable for the
1735: -- requested document type or line type.
1736: l_progress := '010';

Line 1738: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

1734: -- Check if there are changes to fields that are not applicable for the
1735: -- requested document type or line type.
1736: l_progress := '010';
1737: check_type_specific_fields ( p_chg, x_return_status );
1738: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1739: return; -- Do not continue if any type-specific fields checks failed.
1740: END IF;
1741:
1742: -- Line changes

Line 1754: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

1750: -- to avoid performing derivations with nonsensical values - ex. to avoid
1751: -- rolling down negative quantities to the shipments and distributions.
1752: l_progress := '020';
1753: check_new_qty_price_amt(p_chg,G_ENTITY_TYPE_LINES,i,l_return_status);
1754: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1755: x_return_status := l_return_status;
1756: END IF;
1757:
1758: --------------------------------------------------------------------------

Line 1896: x_return_status := FND_API.G_RET_STS_ERROR;

1892: p_token_name1 => 'PQTY',
1893: p_token_value1 => p_chg.shipment_changes.c_quantity(i),
1894: p_token_name2 => 'SQTY',
1895: p_token_value2 => p_chg.line_changes.secondary_quantity(i));
1896: x_return_status := FND_API.G_RET_STS_ERROR;
1897: RETURN;
1898: END IF;
1899: END IF;
1900:

Line 1941: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

1937: -- Shipment Check: Basic checks on the new quantity, price, and amount.
1938: --------------------------------------------------------------------------
1939: l_progress := '100';
1940: check_new_qty_price_amt(p_chg,G_ENTITY_TYPE_SHIPMENTS,i,l_return_status);
1941: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1942: x_return_status := l_return_status;
1943: END IF;
1944:
1945: --------------------------------------------------------------------------

Line 2111: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

2107: --------------------------------------------------------------------------
2108: l_progress := '200';
2109: check_new_qty_price_amt(p_chg,G_ENTITY_TYPE_DISTRIBUTIONS, i,
2110: l_return_status);
2111: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2112: x_return_status := l_return_status;
2113: END IF;
2114:
2115: --------------------------------------------------------------------------

Line 2176: WHEN FND_API.g_exc_unexpected_error THEN

2172:
2173: l_progress := '500';
2174:
2175: EXCEPTION
2176: WHEN FND_API.g_exc_unexpected_error THEN
2177: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2178: p_proc_name => l_proc_name,
2179: p_progress => l_progress,
2180: p_add_to_msg_list => FALSE );

Line 2181: RAISE FND_API.g_exc_unexpected_error;

2177: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2178: p_proc_name => l_proc_name,
2179: p_progress => l_progress,
2180: p_add_to_msg_list => FALSE );
2181: RAISE FND_API.g_exc_unexpected_error;
2182: WHEN OTHERS THEN
2183: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2184: p_proc_name => l_proc_name,
2185: p_progress => l_progress );

Line 2186: RAISE FND_API.g_exc_unexpected_error;

2182: WHEN OTHERS THEN
2183: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2184: p_proc_name => l_proc_name,
2185: p_progress => l_progress );
2186: RAISE FND_API.g_exc_unexpected_error;
2187: END verify_inputs;
2188:
2189: -------------------------------------------------------------------------------
2190: --Start of Comments

Line 2219: x_return_status := FND_API.G_RET_STS_SUCCESS;

2215: END IF;
2216: END IF;
2217:
2218: l_progress := '010';
2219: x_return_status := FND_API.G_RET_STS_SUCCESS;
2220:
2221: ----------------------------------------------------------------------------
2222: -- Blanket PA checks:
2223: ----------------------------------------------------------------------------

Line 2602: WHEN FND_API.g_exc_unexpected_error THEN

2598:
2599: END LOOP; -- distribution changes
2600:
2601: EXCEPTION
2602: WHEN FND_API.g_exc_unexpected_error THEN
2603: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2604: p_proc_name => l_proc_name,
2605: p_progress => l_progress,
2606: p_add_to_msg_list => FALSE );

Line 2607: RAISE FND_API.g_exc_unexpected_error;

2603: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2604: p_proc_name => l_proc_name,
2605: p_progress => l_progress,
2606: p_add_to_msg_list => FALSE );
2607: RAISE FND_API.g_exc_unexpected_error;
2608: WHEN OTHERS THEN
2609: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2610: p_proc_name => l_proc_name,
2611: p_progress => l_progress );

Line 2612: RAISE FND_API.g_exc_unexpected_error;

2608: WHEN OTHERS THEN
2609: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2610: p_proc_name => l_proc_name,
2611: p_progress => l_progress );
2612: RAISE FND_API.g_exc_unexpected_error;
2613: END check_type_specific_fields;
2614:
2615: -------------------------------------------------------------------------------
2616: --Start of Comments

Line 2644: x_return_status := FND_API.G_RET_STS_SUCCESS;

2640: l_new_amount NUMBER;
2641: l_new_secondary_quantity NUMBER; -- sschinch 09.08.04 INVCONV
2642: l_sec_qty_column_name VARCHAR2(30); -- sschinch 09.08.04 INVCONV
2643: BEGIN
2644: x_return_status := FND_API.G_RET_STS_SUCCESS;
2645:
2646: -- Retrieve the new quantity, price, and amount, based on the entity type.
2647: IF (p_entity_type = G_ENTITY_TYPE_LINES) THEN
2648: l_new_quantity := p_chg.line_changes.quantity(i);

Line 2740: RAISE FND_API.g_exc_unexpected_error;

2736: EXCEPTION
2737: WHEN OTHERS THEN
2738: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2739: p_proc_name => 'CHECK_NEW_QTY_PRICE_AMT' );
2740: RAISE FND_API.g_exc_unexpected_error;
2741: END check_new_qty_price_amt;
2742:
2743: -------------------------------------------------------------------------------
2744: --Start of Comments

Line 2787: RAISE FND_API.g_exc_unexpected_error;

2783: EXCEPTION
2784: WHEN OTHERS THEN
2785: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2786: p_proc_name => 'IS_SPLIT_SHIPMENT_NUM_UNIQUE' );
2787: RAISE FND_API.g_exc_unexpected_error;
2788: END is_split_shipment_num_unique;
2789:
2790: -------------------------------------------------------------------------------
2791: --Start of Comments

Line 2815: RAISE FND_API.g_exc_unexpected_error;

2811: EXCEPTION
2812: WHEN OTHERS THEN
2813: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2814: p_proc_name => 'LINE_HAS_QTY_AMT_CHANGE' );
2815: RAISE FND_API.g_exc_unexpected_error;
2816: END line_has_qty_amt_change;
2817:
2818: -------------------------------------------------------------------------------
2819: --Start of Comments

Line 2844: RAISE FND_API.g_exc_unexpected_error;

2840: EXCEPTION
2841: WHEN OTHERS THEN
2842: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2843: p_proc_name => 'SHIP_HAS_QTY_AMT_CHANGE' );
2844: RAISE FND_API.g_exc_unexpected_error;
2845: END ship_has_qty_amt_change;
2846:
2847: -------------------------------------------------------------------------------
2848: --Start of Comments

Line 2872: RAISE FND_API.g_exc_unexpected_error;

2868: EXCEPTION
2869: WHEN OTHERS THEN
2870: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2871: p_proc_name => 'DIST_HAS_QTY_AMT_CHANGE' );
2872: RAISE FND_API.g_exc_unexpected_error;
2873: END dist_has_qty_amt_change;
2874:
2875: -------------------------------------------------------------------------------
2876: --Start of Comments

Line 2913: RAISE FND_API.g_exc_unexpected_error;

2909: EXCEPTION
2910: WHEN OTHERS THEN
2911: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2912: p_proc_name => 'LINE_HAS_SHIP_QTY_AMT_CHANGE' );
2913: RAISE FND_API.g_exc_unexpected_error;
2914: END line_has_ship_qty_amt_change;
2915:
2916: -------------------------------------------------------------------------------
2917: --Start of Comments

Line 2982: RAISE FND_API.g_exc_unexpected_error;

2978: EXCEPTION
2979: WHEN OTHERS THEN
2980: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2981: p_proc_name => 'SHIP_HAS_DIST_QTY_AMT_CHANGE' );
2982: RAISE FND_API.g_exc_unexpected_error;
2983: END ship_has_dist_qty_amt_change;
2984:
2985: -------------------------------------------------------------------------------
2986: --Start of Comments

Line 3089: x_return_status := FND_API.G_RET_STS_SUCCESS;

3085: END IF;
3086: END IF;
3087:
3088: l_progress := '010';
3089: x_return_status := FND_API.G_RET_STS_SUCCESS;
3090:
3091: -- Derivation #1: Derive quantity/amount rollups and rolldowns (prorations).
3092: IF (g_document_type <> 'PA') THEN
3093: derive_qty_amt_rollups ( p_chg );

Line 3152: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3148: x_price_updateable => l_price_updateable,
3149: x_retroactive_price_change => l_retro_price_change
3150: );
3151:
3152: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3153: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3154: END IF;
3155:
3156: ELSE -- Split shipment - always allow price updates.

Line 3153: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3149: x_retroactive_price_change => l_retro_price_change
3150: );
3151:
3152: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3153: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3154: END IF;
3155:
3156: ELSE -- Split shipment - always allow price updates.
3157: l_price_updateable := G_PARAMETER_YES;

Line 3283: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3279: x_price_updateable => l_price_updateable,
3280: x_retroactive_price_change => l_retro_price_change
3281: );
3282:
3283: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3284: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3285: END IF;
3286:
3287: -- If price updates are allowed, call the Pricing API to get a

Line 3284: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3280: x_retroactive_price_change => l_retro_price_change
3281: );
3282:
3283: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3284: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3285: END IF;
3286:
3287: -- If price updates are allowed, call the Pricing API to get a
3288: -- new price from the price break.

Line 3439: * IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3435: * p_entity_type => G_ENTITY_TYPE_LINES,
3436: * p_entity_id => i,
3437: * x_derived_quantity2 => l_derived_qty2,
3438: * x_return_status => l_return_status );
3439: * IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3440: * -- OPM validation error.
3441: * x_return_status := FND_API.G_RET_STS_ERROR;
3442: * ELSE
3443: * p_chg.line_changes.secondary_quantity(i) := l_derived_qty2;

Line 3441: * x_return_status := FND_API.G_RET_STS_ERROR;

3437: * x_derived_quantity2 => l_derived_qty2,
3438: * x_return_status => l_return_status );
3439: * IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3440: * -- OPM validation error.
3441: * x_return_status := FND_API.G_RET_STS_ERROR;
3442: * ELSE
3443: * p_chg.line_changes.secondary_quantity(i) := l_derived_qty2;
3444: * END IF;
3445: *

Line 3462: * IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

3458: * p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
3459: * p_entity_id => i,
3460: * x_derived_quantity2 => l_derived_qty2,
3461: * x_return_status => l_return_status );
3462: * IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3463: * -- OPM validation error.
3464: * x_return_status := FND_API.G_RET_STS_ERROR;
3465: * ELSE
3466: * p_chg.shipment_changes.secondary_quantity(i) := l_derived_qty2;

Line 3464: * x_return_status := FND_API.G_RET_STS_ERROR;

3460: * x_derived_quantity2 => l_derived_qty2,
3461: * x_return_status => l_return_status );
3462: * IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3463: * -- OPM validation error.
3464: * x_return_status := FND_API.G_RET_STS_ERROR;
3465: * ELSE
3466: * p_chg.shipment_changes.secondary_quantity(i) := l_derived_qty2;
3467: * END IF;
3468: * END IF;

Line 3527: x_return_status := FND_API.G_RET_STS_ERROR;

3523: from_unit => NULL,
3524: to_unit => NULL);
3525: END IF;
3526: IF (l_secondary_qty < 0 ) THEN
3527: x_return_status := FND_API.G_RET_STS_ERROR;
3528: RETURN;
3529: END IF;
3530: IF (l_secondary_qty > 0) THEN
3531: l_return_status := inv_convert.within_deviation(

Line 3562: x_return_status := FND_API.G_RET_STS_ERROR;

3558: ||': '||x_data);
3559: END IF;
3560: END IF;
3561:
3562: x_return_status := FND_API.G_RET_STS_ERROR;
3563: RETURN;
3564: END IF;
3565: p_chg.line_changes.secondary_quantity(i) := l_secondary_qty;
3566:

Line 3618: x_return_status := FND_API.G_RET_STS_ERROR;

3614: message => 'Line change on ' || l_po_line_id
3615: ||': '||x_data);
3616: END IF;
3617: END IF;
3618: x_return_status := FND_API.G_RET_STS_ERROR;
3619: RETURN;
3620: END IF;
3621: ELSE
3622: --Derive secondary quantity based on default conversion

Line 3711: x_return_Status := FND_API.G_RET_STS_ERROR;

3707: p_chg.shipment_changes.secondary_quantity(i) := NULL;
3708: PO_DOCUMENT_UPDATE_PVT.add_error(p_api_errors => g_api_errors,
3709: x_return_status => l_return_status,
3710: p_message_name => 'PO_SECONDARY_QTY_NOT_REQUIRED');
3711: x_return_Status := FND_API.G_RET_STS_ERROR;
3712: RETURN;
3713: END IF;
3714: /* End sschinch INVCONV */
3715:

Line 3728: x_return_status := FND_API.G_RET_STS_ERROR;

3724: p_token_name1 => 'PQTY',
3725: p_token_value1 => p_chg.shipment_changes.c_quantity(i),
3726: p_token_name2 => 'SQTY',
3727: p_token_value2 => l_new_secondary_qty);
3728: x_return_status := FND_API.G_RET_STS_ERROR;
3729: RETURN;
3730: END IF;
3731: /** If item is dual uom control and quantity is specified and secondary qty is not specified
3732: then derive the secondary quantity **/

Line 3788: x_return_status := FND_API.G_RET_STS_ERROR;

3784: END IF;
3785:
3786:
3787: END IF;
3788: x_return_status := FND_API.G_RET_STS_ERROR;
3789: RETURN;
3790: END IF;
3791: ELSIF l_new_qty IS NULL AND l_new_secondary_qty IS NOT NULL THEN
3792: -- Call API to validate deviation between database quantity and new secondary qty.

Line 3822: x_return_status := FND_API.G_RET_STS_ERROR;

3818: module => g_module_prefix||l_proc_name,
3819: message => 'Shipment Line changes : '||x_data);
3820: END IF;
3821: END IF; -- g_fnd_debug
3822: x_return_status := FND_API.G_RET_STS_ERROR;
3823: RETURN;
3824: END IF; -- l_return_status
3825: END IF;
3826: END IF; -- l_secondary_default_ind IS NOT NULL

Line 3830: WHEN FND_API.g_exc_unexpected_error THEN

3826: END IF; -- l_secondary_default_ind IS NOT NULL
3827: END LOOP ; --shipment changes
3828: /* END INVCONV */
3829: EXCEPTION
3830: WHEN FND_API.g_exc_unexpected_error THEN
3831: IF po_line_ref_csr%ISOPEN THEN
3832: CLOSE po_line_ref_csr;
3833: END IF;
3834:

Line 3843: RAISE FND_API.g_exc_unexpected_error;

3839: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
3840: p_proc_name => l_proc_name,
3841: p_progress => l_progress,
3842: p_add_to_msg_list => FALSE );
3843: RAISE FND_API.g_exc_unexpected_error;
3844: WHEN OTHERS THEN
3845: IF po_line_ref_csr%ISOPEN THEN
3846: CLOSE po_line_ref_csr;
3847: END IF;

Line 3856: RAISE FND_API.g_exc_unexpected_error;

3852:
3853: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
3854: p_proc_name => l_proc_name,
3855: p_progress => l_progress );
3856: RAISE FND_API.g_exc_unexpected_error;
3857: END derive_changes;
3858:
3859: -------------------------------------------------------------------------------
3860: --Start of Comments

Line 3908: x_return_status := FND_API.G_RET_STS_SUCCESS;

3904: message => 'Entering ' || l_proc_name );
3905: END IF;
3906: END IF;
3907:
3908: x_return_status := FND_API.G_RET_STS_SUCCESS;
3909:
3910: -- Retrieve some values from the line or shipment.
3911: IF (p_entity_type = G_ENTITY_TYPE_LINES) THEN
3912: l_new_quantity := p_chg.line_changes.quantity(i);

Line 3976: p_init_msg_list => FND_API.G_FALSE,

3972: l_last_msg_list_index := FND_MSG_PUB.count_msg();
3973:
3974: GML_ValidateDerive_GRP.secondary_qty (
3975: p_api_version => 1.0,
3976: p_init_msg_list => FND_API.G_FALSE,
3977: p_validate_ind => l_opm_validate_ind,
3978: p_item_no => l_item_number,
3979: p_unit_of_measure => l_cur_uom,
3980: p_quantity => l_new_quantity,

Line 3999: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

3995: END IF;
3996:
3997: l_progress := '020';
3998:
3999: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4000: -- The OPM API returned some validation errors.
4001: add_message_list_errors ( p_api_errors => g_api_errors,
4002: x_return_status => x_return_status,
4003: p_start_index => l_last_msg_list_index + 1,

Line 4007: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

4003: p_start_index => l_last_msg_list_index + 1,
4004: p_entity_type => p_entity_type,
4005: p_entity_id => p_entity_id );
4006: RETURN;
4007: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4008: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4009: END IF;
4010:
4011: x_derived_quantity2 := l_qty2; -- Return the Quantity2 derived by the API.

Line 4008: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

4004: p_entity_type => p_entity_type,
4005: p_entity_id => p_entity_id );
4006: RETURN;
4007: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4008: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4009: END IF;
4010:
4011: x_derived_quantity2 := l_qty2; -- Return the Quantity2 derived by the API.
4012: EXCEPTION

Line 4013: WHEN FND_API.g_exc_unexpected_error THEN

4009: END IF;
4010:
4011: x_derived_quantity2 := l_qty2; -- Return the Quantity2 derived by the API.
4012: EXCEPTION
4013: WHEN FND_API.g_exc_unexpected_error THEN
4014: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4015: p_proc_name => l_proc_name,
4016: p_progress => l_progress,
4017: p_add_to_msg_list => FALSE );

Line 4018: RAISE FND_API.g_exc_unexpected_error;

4014: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4015: p_proc_name => l_proc_name,
4016: p_progress => l_progress,
4017: p_add_to_msg_list => FALSE );
4018: RAISE FND_API.g_exc_unexpected_error;
4019: WHEN OTHERS THEN
4020: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4021: p_proc_name => l_proc_name,
4022: p_progress => l_progress );

Line 4023: RAISE FND_API.g_exc_unexpected_error;

4019: WHEN OTHERS THEN
4020: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4021: p_proc_name => l_proc_name,
4022: p_progress => l_progress );
4023: RAISE FND_API.g_exc_unexpected_error;
4024: END derive_secondary_quantity;
4025:
4026: -------------------------------------------------------------------------------
4027: --Start of Comments

Line 4093: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

4089: x_price => x_price,
4090: x_return_status => l_return_status
4091: );
4092:
4093: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4094: RAISE FND_API.g_exc_unexpected_error;
4095: END IF;
4096:
4097: EXCEPTION

Line 4094: RAISE FND_API.g_exc_unexpected_error;

4090: x_return_status => l_return_status
4091: );
4092:
4093: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4094: RAISE FND_API.g_exc_unexpected_error;
4095: END IF;
4096:
4097: EXCEPTION
4098: WHEN FND_API.g_exc_unexpected_error THEN

Line 4098: WHEN FND_API.g_exc_unexpected_error THEN

4094: RAISE FND_API.g_exc_unexpected_error;
4095: END IF;
4096:
4097: EXCEPTION
4098: WHEN FND_API.g_exc_unexpected_error THEN
4099: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4100: p_proc_name => 'GET_RELEASE_BREAK_PRICE',
4101: p_add_to_msg_list => FALSE );
4102: RAISE FND_API.g_exc_unexpected_error;

Line 4102: RAISE FND_API.g_exc_unexpected_error;

4098: WHEN FND_API.g_exc_unexpected_error THEN
4099: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4100: p_proc_name => 'GET_RELEASE_BREAK_PRICE',
4101: p_add_to_msg_list => FALSE );
4102: RAISE FND_API.g_exc_unexpected_error;
4103: WHEN OTHERS THEN
4104: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4105: p_proc_name => 'GET_RELEASE_BREAK_PRICE' );
4106: RAISE FND_API.g_exc_unexpected_error;

Line 4106: RAISE FND_API.g_exc_unexpected_error;

4102: RAISE FND_API.g_exc_unexpected_error;
4103: WHEN OTHERS THEN
4104: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4105: p_proc_name => 'GET_RELEASE_BREAK_PRICE' );
4106: RAISE FND_API.g_exc_unexpected_error;
4107: END get_release_break_price;
4108:
4109: -------------------------------------------------------------------------------
4110: --Start of Comments

Line 4249: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

4245: , x_price => x_price
4246: , x_return_status => l_return_status
4247: );
4248:
4249: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4250: RAISE FND_API.g_exc_unexpected_error;
4251: END IF;
4252:
4253: EXCEPTION

Line 4250: RAISE FND_API.g_exc_unexpected_error;

4246: , x_return_status => l_return_status
4247: );
4248:
4249: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4250: RAISE FND_API.g_exc_unexpected_error;
4251: END IF;
4252:
4253: EXCEPTION
4254: WHEN FND_API.g_exc_unexpected_error THEN

Line 4254: WHEN FND_API.g_exc_unexpected_error THEN

4250: RAISE FND_API.g_exc_unexpected_error;
4251: END IF;
4252:
4253: EXCEPTION
4254: WHEN FND_API.g_exc_unexpected_error THEN
4255: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4256: p_proc_name => 'GET_PO_BREAK_PRICE',
4257: p_add_to_msg_list => FALSE );
4258: RAISE FND_API.g_exc_unexpected_error;

Line 4258: RAISE FND_API.g_exc_unexpected_error;

4254: WHEN FND_API.g_exc_unexpected_error THEN
4255: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4256: p_proc_name => 'GET_PO_BREAK_PRICE',
4257: p_add_to_msg_list => FALSE );
4258: RAISE FND_API.g_exc_unexpected_error;
4259: WHEN OTHERS THEN
4260: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4261: p_proc_name => 'GET_PO_BREAK_PRICE' );
4262: RAISE FND_API.g_exc_unexpected_error;

Line 4262: RAISE FND_API.g_exc_unexpected_error;

4258: RAISE FND_API.g_exc_unexpected_error;
4259: WHEN OTHERS THEN
4260: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4261: p_proc_name => 'GET_PO_BREAK_PRICE' );
4262: RAISE FND_API.g_exc_unexpected_error;
4263: END get_po_break_price;
4264:
4265: -------------------------------------------------------------------------------
4266: --Start of Comments

Line 4302: WHEN FND_API.g_exc_unexpected_error THEN

4298: AND shipment_type IN ('STANDARD','PLANNED');
4299:
4300: RETURN l_line_location_id;
4301: EXCEPTION
4302: WHEN FND_API.g_exc_unexpected_error THEN
4303: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4304: p_proc_name => 'GET_MIN_SHIPMENT_ID',
4305: p_add_to_msg_list => FALSE );
4306: RAISE FND_API.g_exc_unexpected_error;

Line 4306: RAISE FND_API.g_exc_unexpected_error;

4302: WHEN FND_API.g_exc_unexpected_error THEN
4303: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4304: p_proc_name => 'GET_MIN_SHIPMENT_ID',
4305: p_add_to_msg_list => FALSE );
4306: RAISE FND_API.g_exc_unexpected_error;
4307: WHEN OTHERS THEN
4308: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4309: p_proc_name => 'GET_MIN_SHIPMENT_ID' );
4310: RAISE FND_API.g_exc_unexpected_error;

Line 4310: RAISE FND_API.g_exc_unexpected_error;

4306: RAISE FND_API.g_exc_unexpected_error;
4307: WHEN OTHERS THEN
4308: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4309: p_proc_name => 'GET_MIN_SHIPMENT_ID' );
4310: RAISE FND_API.g_exc_unexpected_error;
4311: END get_min_shipment_id;
4312:
4313: -------------------------------------------------------------------------------
4314: --Start of Comments

Line 4633: WHEN FND_API.g_exc_unexpected_error THEN

4629:
4630: END IF; -- document type is standard PO or planned PO
4631:
4632: EXCEPTION
4633: WHEN FND_API.g_exc_unexpected_error THEN
4634: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4635: p_proc_name => l_proc_name,
4636: p_progress => l_progress,
4637: p_add_to_msg_list => FALSE );

Line 4638: RAISE FND_API.g_exc_unexpected_error;

4634: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4635: p_proc_name => l_proc_name,
4636: p_progress => l_progress,
4637: p_add_to_msg_list => FALSE );
4638: RAISE FND_API.g_exc_unexpected_error;
4639: WHEN OTHERS THEN
4640: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4641: p_proc_name => l_proc_name,
4642: p_progress => l_progress );

Line 4643: RAISE FND_API.g_exc_unexpected_error;

4639: WHEN OTHERS THEN
4640: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4641: p_proc_name => l_proc_name,
4642: p_progress => l_progress );
4643: RAISE FND_API.g_exc_unexpected_error;
4644: END derive_qty_amt_rollups;
4645:
4646: -------------------------------------------------------------------------------
4647: --Start of Comments

Line 4980: WHEN FND_API.g_exc_unexpected_error THEN

4976:
4977: l_progress := '070';
4978:
4979: EXCEPTION
4980: WHEN FND_API.g_exc_unexpected_error THEN
4981: IF (po_distribution_csr%ISOPEN) THEN
4982: CLOSE po_distribution_csr;
4983: END IF;
4984:

Line 4989: RAISE FND_API.g_exc_unexpected_error;

4985: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4986: p_proc_name => l_proc_name,
4987: p_progress => l_progress,
4988: p_add_to_msg_list => FALSE );
4989: RAISE FND_API.g_exc_unexpected_error;
4990: WHEN OTHERS THEN
4991: IF (po_distribution_csr%ISOPEN) THEN
4992: CLOSE po_distribution_csr;
4993: END IF;

Line 4998: RAISE FND_API.g_exc_unexpected_error;

4994:
4995: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4996: p_proc_name => l_proc_name,
4997: p_progress => l_progress );
4998: RAISE FND_API.g_exc_unexpected_error;
4999: END derive_qty_amt_rolldowns;
5000:
5001: -------------------------------------------------------------------------------
5002: --Start of Comments

Line 5042: x_return_status := FND_API.G_RET_STS_SUCCESS;

5038: END IF;
5039: END IF;
5040:
5041: l_progress := '010';
5042: x_return_status := FND_API.G_RET_STS_SUCCESS;
5043:
5044: -- Line validations:
5045: IF (g_document_type <> 'RELEASE') THEN
5046: validate_line_changes (p_chg, l_return_status);

Line 5047: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5043:
5044: -- Line validations:
5045: IF (g_document_type <> 'RELEASE') THEN
5046: validate_line_changes (p_chg, l_return_status);
5047: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5048: x_return_status := l_return_status;
5049: END IF;
5050: END IF; -- document type is not release
5051:

Line 5056: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5052: l_progress := '020';
5053:
5054: -- Shipment validations:
5055: validate_shipment_changes (p_chg, l_return_status);
5056: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5057: x_return_status := l_return_status;
5058: END IF;
5059:
5060: l_progress := '030';

Line 5065: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5061:
5062: -- Distribution validations:
5063: IF (g_document_type <> 'PA') THEN
5064: validate_distribution_changes (p_chg, l_return_status);
5065: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5066: x_return_status := l_return_status;
5067: END IF;
5068: END IF; -- document type is not blanket
5069:

Line 5071: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5067: END IF;
5068: END IF; -- document type is not blanket
5069:
5070: -- Do not continue if one or more of the field-level validations failed.
5071: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5072: RETURN;
5073: END IF;
5074:
5075:

Line 5081: IF ( FND_API.to_boolean(p_run_submission_checks) ) THEN

5077:
5078: -- Call the PO Submission Checks if requested by the caller.
5079: IF g_sec_qty_grade_only_chge_doc = 'N' THEN --sschinch 09/08/04 INVCONV
5080:
5081: IF ( FND_API.to_boolean(p_run_submission_checks) ) THEN
5082:
5083: IF (g_fnd_debug = 'Y') THEN
5084: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_EVENT) THEN
5085: FND_LOG.string( log_level => FND_LOG.LEVEL_EVENT,

Line 5120: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN

5116:
5117:
5118: l_progress := '050';
5119:
5120: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5121: -- PO Submission Checks had a program failure.
5122: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5123: ELSIF ( l_sub_check_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5124: -- PO Submission Checks found some validation errors.

Line 5122: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5118: l_progress := '050';
5119:
5120: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5121: -- PO Submission Checks had a program failure.
5122: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5123: ELSIF ( l_sub_check_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5124: -- PO Submission Checks found some validation errors.
5125: -- Copy the errors from l_doc_check_errors into g_api_errors.
5126: FOR i IN 1..l_doc_check_errors.online_report_id.COUNT LOOP

Line 5123: ELSIF ( l_sub_check_status <> FND_API.G_RET_STS_SUCCESS ) THEN

5119:
5120: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5121: -- PO Submission Checks had a program failure.
5122: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5123: ELSIF ( l_sub_check_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5124: -- PO Submission Checks found some validation errors.
5125: -- Copy the errors from l_doc_check_errors into g_api_errors.
5126: FOR i IN 1..l_doc_check_errors.online_report_id.COUNT LOOP
5127:

Line 5141: x_return_status := FND_API.G_RET_STS_ERROR;

5137: p_message_type => l_doc_check_errors.message_type(i) );
5138:
5139: -- If the message is not a warning, set the return status to error.
5140: IF (NVL(l_doc_check_errors.message_type(i),'E') <> 'W') THEN
5141: x_return_status := FND_API.G_RET_STS_ERROR;
5142: END IF;
5143: END IF; -- l_doc_check_errors.message_name
5144: END LOOP; -- l_doc_check_errors
5145: END IF; -- l_return_status

Line 5150: WHEN FND_API.g_exc_unexpected_error THEN

5146: END IF; -- p_run_submission_checks
5147: END IF; --g_sec_qty_grade_only_chge_doc check sschinch 09/08/04 INVCONV
5148:
5149: EXCEPTION
5150: WHEN FND_API.g_exc_unexpected_error THEN
5151: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5152: p_proc_name => l_proc_name,
5153: p_progress => l_progress,
5154: p_add_to_msg_list => FALSE );

Line 5155: RAISE FND_API.g_exc_unexpected_error;

5151: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5152: p_proc_name => l_proc_name,
5153: p_progress => l_progress,
5154: p_add_to_msg_list => FALSE );
5155: RAISE FND_API.g_exc_unexpected_error;
5156: WHEN OTHERS THEN
5157: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5158: p_proc_name => l_proc_name,
5159: p_progress => l_progress );

Line 5160: RAISE FND_API.g_exc_unexpected_error;

5156: WHEN OTHERS THEN
5157: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5158: p_proc_name => l_proc_name,
5159: p_progress => l_progress );
5160: RAISE FND_API.g_exc_unexpected_error;
5161: END validate_changes;
5162:
5163: -------------------------------------------------------------------------------
5164: --Start of Comments

Line 5224: x_return_status := FND_API.G_RET_STS_SUCCESS;

5220: message => 'Entering ' || l_proc_name );
5221: END IF;
5222: END IF;
5223:
5224: x_return_status := FND_API.G_RET_STS_SUCCESS;
5225:
5226: FOR i IN 1..p_chg.line_changes.get_count LOOP
5227: l_progress := '010';
5228: l_po_line_id := p_chg.line_changes.po_line_id(i);

Line 5374: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5370: x_price_updateable => l_price_updateable,
5371: x_retroactive_price_change => l_retroactive_price_change
5372: );
5373:
5374: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5375: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5376: END IF;
5377:
5378: -- If price updates are not allowed, add the error messages to the

Line 5375: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5371: x_retroactive_price_change => l_retroactive_price_change
5372: );
5373:
5374: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5375: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5376: END IF;
5377:
5378: -- If price updates are not allowed, add the error messages to the
5379: -- API errors object.

Line 5501: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5497: p_field_value => l_po_line_id,
5498: p_end_date => NULL,
5499: x_timecard_exists => l_timecard_exists
5500: );
5501: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5503: END IF;
5504:
5505: IF (l_timecard_exists) THEN

Line 5502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5498: p_end_date => NULL,
5499: x_timecard_exists => l_timecard_exists
5500: );
5501: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5502: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5503: END IF;
5504:
5505: IF (l_timecard_exists) THEN
5506: add_error ( p_api_errors => g_api_errors,

Line 5531: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5527: x_return_status => l_return_status,
5528: p_po_line_id => l_po_line_id,
5529: x_amount => l_timecard_amount_sum
5530: );
5531: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5532: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5533: END IF;
5534:
5535: IF (l_new_amount < l_timecard_amount_sum) THEN

Line 5532: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5528: p_po_line_id => l_po_line_id,
5529: x_amount => l_timecard_amount_sum
5530: );
5531: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5532: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5533: END IF;
5534:
5535: IF (l_new_amount < l_timecard_amount_sum) THEN
5536: add_error ( p_api_errors => g_api_errors,

Line 5566: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5562: p_field_value => l_po_line_id,
5563: p_end_date => l_new_end_date,
5564: x_timecard_exists => l_timecard_exists
5565: );
5566: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5567: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5568: END IF;
5569:
5570: IF (l_timecard_exists) THEN

Line 5567: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5563: p_end_date => l_new_end_date,
5564: x_timecard_exists => l_timecard_exists
5565: );
5566: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5567: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5568: END IF;
5569:
5570: IF (l_timecard_exists) THEN
5571: add_error ( p_api_errors => g_api_errors,

Line 5598: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5594: p_field_value => l_po_line_id,
5595: p_end_date => null,
5596: x_timecard_exists => l_timecard_exists
5597: );
5598: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5599: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5600: END IF;
5601:
5602: IF (l_timecard_exists) and

Line 5599: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5595: p_end_date => null,
5596: x_timecard_exists => l_timecard_exists
5597: );
5598: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5599: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5600: END IF;
5601:
5602: IF (l_timecard_exists) and
5603: (l_new_start_date > p_chg.line_changes.c_start_date(i)) THEN

Line 5704: WHEN FND_API.g_exc_unexpected_error THEN

5700:
5701: END LOOP; -- line changes
5702:
5703: EXCEPTION
5704: WHEN FND_API.g_exc_unexpected_error THEN
5705: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5706: p_proc_name => l_proc_name,
5707: p_progress => l_progress,
5708: p_add_to_msg_list => FALSE );

Line 5709: RAISE FND_API.g_exc_unexpected_error;

5705: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5706: p_proc_name => l_proc_name,
5707: p_progress => l_progress,
5708: p_add_to_msg_list => FALSE );
5709: RAISE FND_API.g_exc_unexpected_error;
5710: WHEN OTHERS THEN
5711: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5712: p_proc_name => l_proc_name,
5713: p_progress => l_progress );

Line 5714: RAISE FND_API.g_exc_unexpected_error;

5710: WHEN OTHERS THEN
5711: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5712: p_proc_name => l_proc_name,
5713: p_progress => l_progress );
5714: RAISE FND_API.g_exc_unexpected_error;
5715: END validate_line_changes;
5716:
5717: -------------------------------------------------------------------------------
5718: --Start of Comments

Line 5795: x_return_status := FND_API.G_RET_STS_SUCCESS;

5791: message => 'Entering ' || l_proc_name );
5792: END IF;
5793: END IF;
5794:
5795: x_return_status := FND_API.G_RET_STS_SUCCESS;
5796:
5797: FOR i IN 1..p_chg.shipment_changes.get_count LOOP
5798: l_progress := '010';
5799: l_line_location_id := p_chg.shipment_changes.po_line_location_id(i);

Line 5904: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

5900: x_price_updateable => l_price_updateable,
5901: x_retroactive_price_change => l_retroactive_price_change
5902: );
5903:
5904: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5905: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5906: END IF;
5907:
5908: -- If price updates are not allowed, add the error messages to the

Line 5905: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5901: x_retroactive_price_change => l_retroactive_price_change
5902: );
5903:
5904: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5905: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5906: END IF;
5907:
5908: -- If price updates are not allowed, add the error messages to the
5909: -- API errors object.

Line 6268: WHEN FND_API.g_exc_unexpected_error THEN

6264:
6265: END LOOP; -- shipment changes
6266:
6267: EXCEPTION
6268: WHEN FND_API.g_exc_unexpected_error THEN
6269: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6270: p_proc_name => l_proc_name,
6271: p_progress => l_progress,
6272: p_add_to_msg_list => FALSE );

Line 6273: RAISE FND_API.g_exc_unexpected_error;

6269: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6270: p_proc_name => l_proc_name,
6271: p_progress => l_progress,
6272: p_add_to_msg_list => FALSE );
6273: RAISE FND_API.g_exc_unexpected_error;
6274: WHEN OTHERS THEN
6275: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6276: p_proc_name => l_proc_name,
6277: p_progress => l_progress );

Line 6278: RAISE FND_API.g_exc_unexpected_error;

6274: WHEN OTHERS THEN
6275: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6276: p_proc_name => l_proc_name,
6277: p_progress => l_progress );
6278: RAISE FND_API.g_exc_unexpected_error;
6279: END validate_shipment_changes;
6280:
6281: -------------------------------------------------------------------------------
6282: --Start of Comments

Line 6320: x_return_status := FND_API.G_RET_STS_SUCCESS;

6316: message => 'Entering ' || l_proc_name );
6317: END IF;
6318: END IF;
6319:
6320: x_return_status := FND_API.G_RET_STS_SUCCESS;
6321:
6322: FOR i IN 1..p_chg.distribution_changes.get_count LOOP
6323: l_progress := '010';
6324: l_new_qty := p_chg.distribution_changes.quantity_ordered(i);

Line 6450: WHEN FND_API.g_exc_unexpected_error THEN

6446:
6447: END LOOP; -- distribution changes
6448:
6449: EXCEPTION
6450: WHEN FND_API.g_exc_unexpected_error THEN
6451: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6452: p_proc_name => l_proc_name,
6453: p_progress => l_progress,
6454: p_add_to_msg_list => FALSE );

Line 6455: RAISE FND_API.g_exc_unexpected_error;

6451: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6452: p_proc_name => l_proc_name,
6453: p_progress => l_progress,
6454: p_add_to_msg_list => FALSE );
6455: RAISE FND_API.g_exc_unexpected_error;
6456: WHEN OTHERS THEN
6457: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6458: p_proc_name => l_proc_name,
6459: p_progress => l_progress );

Line 6460: RAISE FND_API.g_exc_unexpected_error;

6456: WHEN OTHERS THEN
6457: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6458: p_proc_name => l_proc_name,
6459: p_progress => l_progress );
6460: RAISE FND_API.g_exc_unexpected_error;
6461: END validate_distribution_changes;
6462:
6463: -- Bug 3354712 START
6464: -------------------------------------------------------------------------------

Line 6501: x_return_status := FND_API.G_RET_STS_SUCCESS;

6497: message => 'Entering ' || l_proc_name );
6498: END IF;
6499: END IF;
6500:
6501: x_return_status := FND_API.G_RET_STS_SUCCESS;
6502:
6503: -- Check whether this line/shipment is encumbered and needs to be unreserved.
6504: l_progress := '010';
6505: PO_DOCUMENT_FUNDS_PVT.is_unreservable (

Line 6513: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

6509: p_doc_level => p_doc_level,
6510: p_doc_level_id => p_doc_level_id,
6511: x_unreservable_flag => l_unreservable_flag
6512: );
6513: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6514: RAISE FND_API.g_exc_unexpected_error;
6515: END IF;
6516:
6517: IF (NVL(l_unreservable_flag, PO_DOCUMENT_FUNDS_PVT.g_parameter_NO) <>

Line 6514: RAISE FND_API.g_exc_unexpected_error;

6510: p_doc_level_id => p_doc_level_id,
6511: x_unreservable_flag => l_unreservable_flag
6512: );
6513: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6514: RAISE FND_API.g_exc_unexpected_error;
6515: END IF;
6516:
6517: IF (NVL(l_unreservable_flag, PO_DOCUMENT_FUNDS_PVT.g_parameter_NO) <>
6518: PO_DOCUMENT_FUNDS_PVT.g_parameter_YES) THEN

Line 6549: IF (l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS,

6545: ||', po_return_code: '||l_po_return_code );
6546: END IF;
6547: END IF;
6548:
6549: IF (l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS,
6550: FND_API.G_RET_STS_ERROR) ) THEN
6551: RAISE FND_API.g_exc_unexpected_error;
6552: END IF;
6553:

Line 6550: FND_API.G_RET_STS_ERROR) ) THEN

6546: END IF;
6547: END IF;
6548:
6549: IF (l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS,
6550: FND_API.G_RET_STS_ERROR) ) THEN
6551: RAISE FND_API.g_exc_unexpected_error;
6552: END IF;
6553:
6554: -- If there were errors/warnings, copy them to the API errors object.

Line 6551: RAISE FND_API.g_exc_unexpected_error;

6547: END IF;
6548:
6549: IF (l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS,
6550: FND_API.G_RET_STS_ERROR) ) THEN
6551: RAISE FND_API.g_exc_unexpected_error;
6552: END IF;
6553:
6554: -- If there were errors/warnings, copy them to the API errors object.
6555: l_progress := '030';

Line 6563: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

6559: p_online_report_id => l_online_report_id,
6560: p_report_successes => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO,
6561: x_report_object => l_enc_report_obj
6562: );
6563: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6564: RAISE FND_API.g_exc_unexpected_error;
6565: END IF;
6566:
6567: FOR j IN 1..l_enc_report_obj.error_msg.count LOOP

Line 6564: RAISE FND_API.g_exc_unexpected_error;

6560: p_report_successes => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO,
6561: x_report_object => l_enc_report_obj
6562: );
6563: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6564: RAISE FND_API.g_exc_unexpected_error;
6565: END IF;
6566:
6567: FOR j IN 1..l_enc_report_obj.error_msg.count LOOP
6568: add_error ( p_api_errors => g_api_errors,

Line 6576: x_return_status := FND_API.G_RET_STS_ERROR;

6572: p_message_type => l_enc_report_obj.msg_type(j) );
6573: END LOOP;
6574:
6575: IF (l_po_return_code <> PO_DOCUMENT_FUNDS_PVT.G_RETURN_WARNING) THEN
6576: x_return_status := FND_API.G_RET_STS_ERROR;
6577: END IF;
6578: END IF; -- l_po_return_code
6579:
6580: IF (g_fnd_debug = 'Y') THEN

Line 6588: WHEN FND_API.g_exc_unexpected_error THEN

6584: message => 'Exiting ' || l_proc_name );
6585: END IF;
6586: END IF;
6587: EXCEPTION
6588: WHEN FND_API.g_exc_unexpected_error THEN
6589: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6590: p_proc_name => l_proc_name,
6591: p_progress => l_progress,
6592: p_add_to_msg_list => FALSE );

Line 6593: RAISE FND_API.g_exc_unexpected_error;

6589: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6590: p_proc_name => l_proc_name,
6591: p_progress => l_progress,
6592: p_add_to_msg_list => FALSE );
6593: RAISE FND_API.g_exc_unexpected_error;
6594: WHEN OTHERS THEN
6595: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6596: p_proc_name => l_proc_name,
6597: p_progress => l_progress );

Line 6598: RAISE FND_API.g_exc_unexpected_error;

6594: WHEN OTHERS THEN
6595: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6596: p_proc_name => l_proc_name,
6597: p_progress => l_progress );
6598: RAISE FND_API.g_exc_unexpected_error;
6599: END unreserve_entity;
6600: -- Bug 3354712 END
6601:
6602: -------------------------------------------------------------------------------

Line 6634: x_return_status := FND_API.G_RET_STS_SUCCESS;

6630: message => 'Entering ' || l_proc_name );
6631: END IF;
6632: END IF;
6633:
6634: x_return_status := FND_API.G_RET_STS_SUCCESS;
6635:
6636: -- For POs, unreserve the lines with quantity, price, or amount changes.
6637: IF (g_document_type = 'PO') THEN
6638: l_progress := '010';

Line 6654: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

6650: p_buyer_id => p_buyer_id,
6651: x_return_status => l_return_status
6652: );
6653:
6654: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6655: x_return_status := FND_API.G_RET_STS_ERROR;
6656: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6657: RAISE FND_API.g_exc_unexpected_error;
6658: END IF;

Line 6655: x_return_status := FND_API.G_RET_STS_ERROR;

6651: x_return_status => l_return_status
6652: );
6653:
6654: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6655: x_return_status := FND_API.G_RET_STS_ERROR;
6656: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6657: RAISE FND_API.g_exc_unexpected_error;
6658: END IF;
6659: -- Bug 3354712 END

Line 6656: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

6652: );
6653:
6654: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6655: x_return_status := FND_API.G_RET_STS_ERROR;
6656: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6657: RAISE FND_API.g_exc_unexpected_error;
6658: END IF;
6659: -- Bug 3354712 END
6660:

Line 6657: RAISE FND_API.g_exc_unexpected_error;

6653:
6654: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6655: x_return_status := FND_API.G_RET_STS_ERROR;
6656: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6657: RAISE FND_API.g_exc_unexpected_error;
6658: END IF;
6659: -- Bug 3354712 END
6660:
6661: END IF; -- p_chg.line_changes.quantity

Line 6684: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

6680: p_buyer_id => p_buyer_id,
6681: x_return_status => l_return_status
6682: );
6683:
6684: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6685: x_return_status := FND_API.G_RET_STS_ERROR;
6686: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6687: RAISE FND_API.g_exc_unexpected_error;
6688: END IF;

Line 6685: x_return_status := FND_API.G_RET_STS_ERROR;

6681: x_return_status => l_return_status
6682: );
6683:
6684: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6685: x_return_status := FND_API.G_RET_STS_ERROR;
6686: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6687: RAISE FND_API.g_exc_unexpected_error;
6688: END IF;
6689:

Line 6686: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

6682: );
6683:
6684: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6685: x_return_status := FND_API.G_RET_STS_ERROR;
6686: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6687: RAISE FND_API.g_exc_unexpected_error;
6688: END IF;
6689:
6690: END IF; -- p_chg.shipment_changes.po_line_location_id

Line 6687: RAISE FND_API.g_exc_unexpected_error;

6683:
6684: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6685: x_return_status := FND_API.G_RET_STS_ERROR;
6686: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6687: RAISE FND_API.g_exc_unexpected_error;
6688: END IF;
6689:
6690: END IF; -- p_chg.shipment_changes.po_line_location_id
6691: END LOOP; -- shipment changes

Line 6704: WHEN FND_API.g_exc_unexpected_error THEN

6700: message => 'Exiting ' || l_proc_name );
6701: END IF;
6702: END IF;
6703: EXCEPTION
6704: WHEN FND_API.g_exc_unexpected_error THEN
6705: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6706: p_proc_name => l_proc_name,
6707: p_progress => l_progress,
6708: p_add_to_msg_list => FALSE );

Line 6709: RAISE FND_API.g_exc_unexpected_error;

6705: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6706: p_proc_name => l_proc_name,
6707: p_progress => l_progress,
6708: p_add_to_msg_list => FALSE );
6709: RAISE FND_API.g_exc_unexpected_error;
6710: WHEN OTHERS THEN
6711: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6712: p_proc_name => l_proc_name,
6713: p_progress => l_progress );

Line 6714: RAISE FND_API.g_exc_unexpected_error;

6710: WHEN OTHERS THEN
6711: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6712: p_proc_name => l_proc_name,
6713: p_progress => l_progress );
6714: RAISE FND_API.g_exc_unexpected_error;
6715: END unreserve;
6716:
6717: -------------------------------------------------------------------------------
6718: --Start of Comments

Line 6766: x_return_status := FND_API.G_RET_STS_SUCCESS;

6762: END IF;
6763: END IF;
6764:
6765: l_progress := '010';
6766: x_return_status := FND_API.G_RET_STS_SUCCESS;
6767:
6768: -- For POs/releases, if encumbrance is on, unreserve before making changes.
6769: -- <13503748: Edit without unreserve ER >
6770: -- For Standard PO's modify without unreserve.

Line 6784: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

6780: p_doc_type => g_document_type,
6781: p_org_id => NULL )) ) THEN
6782:
6783: unreserve ( p_chg, p_override_date, p_buyer_id, l_return_status );
6784: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6785: x_return_status := l_return_status;
6786: RETURN;
6787: END IF;
6788: END IF;

Line 7079: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

7075: || l_new_revision_num );
7076: END IF;
7077: END IF;
7078:
7079: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7080: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7081: END IF;
7082: END IF; -- g_sec_qty_grade_only_chge_doc = 'N' INVCONV
7083:

Line 7080: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7076: END IF;
7077: END IF;
7078:
7079: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7080: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7081: END IF;
7082: END IF; -- g_sec_qty_grade_only_chge_doc = 'N' INVCONV
7083:
7084: -- Update the header-level fields.

Line 7135: p_unlock_current => FND_API.G_FALSE

7131: PO_DRAFTS_PVT.lock_document
7132: ( p_po_header_id => g_po_header_id,
7133: p_role => PO_GLOBAL.g_ROLE_BUYER,
7134: p_role_user_id => FND_GLOBAL.user_id,
7135: p_unlock_current => FND_API.G_FALSE
7136: );
7137: END IF;
7138: --
7139:

Line 7181: WHEN FND_API.g_exc_unexpected_error THEN

7177: END IF;
7178: --
7179:
7180: EXCEPTION
7181: WHEN FND_API.g_exc_unexpected_error THEN
7182: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7183: p_proc_name => l_proc_name,
7184: p_progress => l_progress,
7185: p_add_to_msg_list => FALSE );

Line 7186: RAISE FND_API.g_exc_unexpected_error;

7182: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7183: p_proc_name => l_proc_name,
7184: p_progress => l_progress,
7185: p_add_to_msg_list => FALSE );
7186: RAISE FND_API.g_exc_unexpected_error;
7187: WHEN OTHERS THEN
7188: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7189: p_proc_name => l_proc_name,
7190: p_progress => l_progress );

Line 7191: RAISE FND_API.g_exc_unexpected_error;

7187: WHEN OTHERS THEN
7188: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7189: p_proc_name => l_proc_name,
7190: p_progress => l_progress );
7191: RAISE FND_API.g_exc_unexpected_error;
7192: END apply_changes;
7193:
7194: -------------------------------------------------------------------------------
7195: --Start of Comments

Line 7586: WHEN FND_API.g_exc_unexpected_error THEN

7582: -- Now create all the split distributions.
7583: create_split_distributions ( p_chg );
7584:
7585: EXCEPTION
7586: WHEN FND_API.g_exc_unexpected_error THEN
7587: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7588: p_proc_name => l_proc_name,
7589: p_add_to_msg_list => FALSE );
7590: RAISE FND_API.g_exc_unexpected_error;

Line 7590: RAISE FND_API.g_exc_unexpected_error;

7586: WHEN FND_API.g_exc_unexpected_error THEN
7587: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7588: p_proc_name => l_proc_name,
7589: p_add_to_msg_list => FALSE );
7590: RAISE FND_API.g_exc_unexpected_error;
7591: WHEN OTHERS THEN
7592: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7593: p_proc_name => l_proc_name );
7594: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 7594: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7590: RAISE FND_API.g_exc_unexpected_error;
7591: WHEN OTHERS THEN
7592: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7593: p_proc_name => l_proc_name );
7594: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7595: END create_split_shipments;
7596:
7597: -------------------------------------------------------------------------------
7598: --Start of Comments

Line 7669: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7665: FND_MESSAGE.set_name('PO', 'PO_GENERIC_ERROR');
7666: FND_MESSAGE.set_token('ERROR_TEXT',
7667: 'Could not find the new shipment for this split distribution.');
7668: FND_MSG_PUB.add;
7669: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7670: END IF;
7671:
7672:
7673: END LOOP; -- split distribution changes

Line 7961: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

7957: x_msg_data => l_msg_data,
7958: p_caller => 'CHANGE_PO',
7959: x_po_gms_interface_obj => l_gms_po_obj
7960: );
7961: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7962: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7963: END IF;
7964:
7965: l_progress := '040';

Line 7962: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7958: p_caller => 'CHANGE_PO',
7959: x_po_gms_interface_obj => l_gms_po_obj
7960: );
7961: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7962: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7963: END IF;
7964:
7965: l_progress := '040';
7966: -- Bulk update the distributions with the new award IDs.

Line 7979: WHEN FND_API.g_exc_unexpected_error THEN

7975: END IF; -- l_gms_po_obj
7976: --
7977:
7978: EXCEPTION
7979: WHEN FND_API.g_exc_unexpected_error THEN
7980: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7981: p_proc_name => l_proc_name,
7982: p_progress => l_progress,
7983: p_add_to_msg_list => FALSE );

Line 7984: RAISE FND_API.g_exc_unexpected_error;

7980: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7981: p_proc_name => l_proc_name,
7982: p_progress => l_progress,
7983: p_add_to_msg_list => FALSE );
7984: RAISE FND_API.g_exc_unexpected_error;
7985: WHEN OTHERS THEN
7986: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7987: p_proc_name => l_proc_name,
7988: p_progress => l_progress );

Line 7989: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7985: WHEN OTHERS THEN
7986: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7987: p_proc_name => l_proc_name,
7988: p_progress => l_progress );
7989: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7990: END create_split_distributions;
7991:
7992: -------------------------------------------------------------------------------
7993: --Start of Comments

Line 8097: WHEN FND_API.g_exc_unexpected_error THEN

8093:
8094: l_progress := '050';
8095:
8096: EXCEPTION
8097: WHEN FND_API.g_exc_unexpected_error THEN
8098: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8099: p_proc_name => l_proc_name,
8100: p_progress => l_progress,
8101: p_add_to_msg_list => FALSE );

Line 8102: RAISE FND_API.g_exc_unexpected_error;

8098: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8099: p_proc_name => l_proc_name,
8100: p_progress => l_progress,
8101: p_add_to_msg_list => FALSE );
8102: RAISE FND_API.g_exc_unexpected_error;
8103: WHEN OTHERS THEN
8104: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8105: p_proc_name => l_proc_name,
8106: p_progress => l_progress );

Line 8107: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8103: WHEN OTHERS THEN
8104: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8105: p_proc_name => l_proc_name,
8106: p_progress => l_progress );
8107: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8108: END delete_records;
8109:
8110: -------------------------------------------------------------------------------
8111: --Start of Comments

Line 8225: x_return_status := FND_API.G_RET_STS_SUCCESS;

8221: || ' retroactive_price: '||p_retroactive_price_change );
8222: END IF;
8223: END IF;
8224:
8225: x_return_status := FND_API.G_RET_STS_SUCCESS;
8226:
8227: -- Standard API initialization:
8228: IF NOT FND_API.compatible_api_call (
8229: p_current_version_number => l_api_version,

Line 8228: IF NOT FND_API.compatible_api_call (

8224:
8225: x_return_status := FND_API.G_RET_STS_SUCCESS;
8226:
8227: -- Standard API initialization:
8228: IF NOT FND_API.compatible_api_call (
8229: p_current_version_number => l_api_version,
8230: p_caller_version_number => p_api_version,
8231: p_api_name => l_proc_name,
8232: p_pkg_name => g_pkg_name ) THEN

Line 8233: RAISE FND_API.g_exc_unexpected_error;

8229: p_current_version_number => l_api_version,
8230: p_caller_version_number => p_api_version,
8231: p_api_name => l_proc_name,
8232: p_pkg_name => g_pkg_name ) THEN
8233: RAISE FND_API.g_exc_unexpected_error;
8234: END IF;
8235:
8236: IF (FND_API.to_boolean(p_init_msg_list)) THEN
8237: FND_MSG_PUB.initialize();

Line 8236: IF (FND_API.to_boolean(p_init_msg_list)) THEN

8232: p_pkg_name => g_pkg_name ) THEN
8233: RAISE FND_API.g_exc_unexpected_error;
8234: END IF;
8235:
8236: IF (FND_API.to_boolean(p_init_msg_list)) THEN
8237: FND_MSG_PUB.initialize();
8238: END IF;
8239:
8240: IF (p_preparer_id IS NOT NULL) THEN

Line 8306: WHEN FND_API.g_exc_unexpected_error THEN

8302: );
8303:
8304: l_progress := '030';
8305: EXCEPTION
8306: WHEN FND_API.g_exc_unexpected_error THEN
8307: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8308: p_proc_name => l_proc_name,
8309: p_progress => l_progress,
8310: p_add_to_msg_list => FALSE );

Line 8311: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8307: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8308: p_proc_name => l_proc_name,
8309: p_progress => l_progress,
8310: p_add_to_msg_list => FALSE );
8311: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8312: WHEN OTHERS THEN
8313: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8314: p_proc_name => l_proc_name,
8315: p_progress => l_progress );

Line 8316: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8312: WHEN OTHERS THEN
8313: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8314: p_proc_name => l_proc_name,
8315: p_progress => l_progress );
8316: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8317: END launch_po_approval_wf;
8318:
8319: -------------------------------------------------------------------------------
8320: -- The following procedures manage the change indexes, which allow us

Line 8376: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8372: IF g_line_changes_index.EXISTS(l_po_line_id) THEN
8373: -- Error: This is a duplicate change for the same PO_LINE_ID.
8374: FND_MESSAGE.set_name('PO', 'PO_CHNG_DUP_LINE');
8375: FND_MSG_PUB.add;
8376: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8377: END IF;
8378:
8379: -- Add this change to the index.
8380: g_line_changes_index(l_po_line_id) := i;

Line 8415: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8411: IF g_ship_changes_index.EXISTS(l_line_location_id) THEN
8412: -- Error: This is a duplicate change for the same LINE_LOCATION_ID.
8413: FND_MESSAGE.set_name('PO', 'PO_CHNG_DUP_SHIPMENT');
8414: FND_MSG_PUB.add;
8415: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8416: END IF;
8417:
8418: -- Add this to the index of shipment changes by LINE_LOCATION_ID.
8419: -- Key: LINE_LOCATION_ID

Line 8466: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8462: IF g_dist_changes_index.EXISTS(l_po_distribution_id) THEN
8463: -- Error: This is a duplicate change for the same PO_DISTRIBUTION_ID.
8464: FND_MESSAGE.set_name('PO', 'PO_CHNG_DUP_DISTRIBUTION');
8465: FND_MSG_PUB.add;
8466: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8467: END IF;
8468:
8469: -- Add this to the index of distribution changes by PO_DISTRIBUTION_ID.
8470: -- Key: PO_DISTRIBUTION_ID

Line 8809: -- This procedure always returns FND_API.G_RET_STS_ERROR.

8805: -- None.
8806: --Parameters:
8807: --OUT:
8808: --x_return_status
8809: -- This procedure always returns FND_API.G_RET_STS_ERROR.
8810: --End of Comments
8811: -------------------------------------------------------------------------------
8812: PROCEDURE add_error
8813: ( p_api_errors IN OUT NOCOPY PO_API_ERRORS_REC_TYPE,

Line 8879: x_return_status := FND_API.G_RET_STS_ERROR;

8875: l_message_text );
8876: END IF;
8877: END IF;
8878:
8879: x_return_status := FND_API.G_RET_STS_ERROR;
8880: EXCEPTION
8881: WHEN FND_API.g_exc_unexpected_error THEN
8882: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8883: p_proc_name => 'ADD_ERROR',

Line 8881: WHEN FND_API.g_exc_unexpected_error THEN

8877: END IF;
8878:
8879: x_return_status := FND_API.G_RET_STS_ERROR;
8880: EXCEPTION
8881: WHEN FND_API.g_exc_unexpected_error THEN
8882: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8883: p_proc_name => 'ADD_ERROR',
8884: p_progress => l_progress,
8885: p_add_to_msg_list => FALSE );

Line 8886: RAISE FND_API.g_exc_unexpected_error;

8882: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8883: p_proc_name => 'ADD_ERROR',
8884: p_progress => l_progress,
8885: p_add_to_msg_list => FALSE );
8886: RAISE FND_API.g_exc_unexpected_error;
8887: WHEN OTHERS THEN
8888: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8889: p_proc_name => 'ADD_ERROR',
8890: p_progress => l_progress );

Line 8891: RAISE FND_API.g_exc_unexpected_error;

8887: WHEN OTHERS THEN
8888: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8889: p_proc_name => 'ADD_ERROR',
8890: p_progress => l_progress );
8891: RAISE FND_API.g_exc_unexpected_error;
8892: END add_error;
8893:
8894: -------------------------------------------------------------------------------
8895: --Start of Comments

Line 8914: -- This procedure always returns FND_API.G_RET_STS_ERROR.

8910: -- Message list index to start from. If NULL, start from 1 - i.e. add all of
8911: -- the messages on the message list to p_api_errors.
8912: --OUT:
8913: --x_return_status
8914: -- This procedure always returns FND_API.G_RET_STS_ERROR.
8915: --End of Comments
8916: -------------------------------------------------------------------------------
8917: PROCEDURE add_message_list_errors
8918: ( p_api_errors IN OUT NOCOPY PO_API_ERRORS_REC_TYPE,

Line 8932: FND_MSG_PUB.get ( p_msg_index => i, p_encoded => FND_API.G_FALSE ),

8928: p_api_errors => p_api_errors,
8929: x_return_status => x_return_status,
8930: p_message_name => NULL,
8931: p_message_text =>
8932: FND_MSG_PUB.get ( p_msg_index => i, p_encoded => FND_API.G_FALSE ),
8933: p_entity_type => p_entity_type,
8934: p_entity_id => p_entity_id
8935: );
8936: END LOOP;

Line 8943: x_return_status := FND_API.G_RET_STS_ERROR;

8939: FOR i IN REVERSE NVL(p_start_index,1)..FND_MSG_PUB.count_msg LOOP
8940: FND_MSG_PUB.delete_msg ( p_msg_index => i );
8941: END LOOP;
8942:
8943: x_return_status := FND_API.G_RET_STS_ERROR;
8944: EXCEPTION
8945: WHEN FND_API.g_exc_unexpected_error THEN
8946: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8947: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS',

Line 8945: WHEN FND_API.g_exc_unexpected_error THEN

8941: END LOOP;
8942:
8943: x_return_status := FND_API.G_RET_STS_ERROR;
8944: EXCEPTION
8945: WHEN FND_API.g_exc_unexpected_error THEN
8946: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8947: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS',
8948: p_add_to_msg_list => FALSE );
8949: RAISE FND_API.g_exc_unexpected_error;

Line 8949: RAISE FND_API.g_exc_unexpected_error;

8945: WHEN FND_API.g_exc_unexpected_error THEN
8946: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8947: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS',
8948: p_add_to_msg_list => FALSE );
8949: RAISE FND_API.g_exc_unexpected_error;
8950: WHEN OTHERS THEN
8951: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8952: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS' );
8953: RAISE FND_API.g_exc_unexpected_error;

Line 8953: RAISE FND_API.g_exc_unexpected_error;

8949: RAISE FND_API.g_exc_unexpected_error;
8950: WHEN OTHERS THEN
8951: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8952: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS' );
8953: RAISE FND_API.g_exc_unexpected_error;
8954: END add_message_list_errors;
8955:
8956: -----------------------------------------------------------------------------
8957: --Start of Comments

Line 9185: -- Pass FND_API.G_FALSE if message list has already been initialized for

9181: --Parameters:
9182: --IN:
9183: --p_init_msg_list
9184: -- Standard API specification parameter
9185: -- Pass FND_API.G_FALSE if message list has already been initialized for
9186: -- transaction else pass FND_API.G_TRUE
9187: --p_calling_program
9188: -- Calling module.
9189: --p_entity

Line 9186: -- transaction else pass FND_API.G_TRUE

9182: --IN:
9183: --p_init_msg_list
9184: -- Standard API specification parameter
9185: -- Pass FND_API.G_FALSE if message list has already been initialized for
9186: -- transaction else pass FND_API.G_TRUE
9187: --p_calling_program
9188: -- Calling module.
9189: --p_entity
9190: -- the entity which is being deleted [HEADER/LINE/SHIPMENT/DISTRIBUTION]

Line 9211: -- FND_API.G_RET_STS_SUCCESS (='S')

9207: --OUT:
9208: --x_return_status
9209: -- Standard API specification parameter
9210: -- Can hold one of the following values:
9211: -- FND_API.G_RET_STS_SUCCESS (='S')
9212: -- FND_API.G_RET_STS_ERROR (='E')
9213: -- FND_API.G_RET_STS_UNEXP_ERROR (='U')
9214: --x_error_msg_tbl
9215: -- table of rrror messages if any.

Line 9212: -- FND_API.G_RET_STS_ERROR (='E')

9208: --x_return_status
9209: -- Standard API specification parameter
9210: -- Can hold one of the following values:
9211: -- FND_API.G_RET_STS_SUCCESS (='S')
9212: -- FND_API.G_RET_STS_ERROR (='E')
9213: -- FND_API.G_RET_STS_UNEXP_ERROR (='U')
9214: --x_error_msg_tbl
9215: -- table of rrror messages if any.
9216: --Notes:

Line 9213: -- FND_API.G_RET_STS_UNEXP_ERROR (='U')

9209: -- Standard API specification parameter
9210: -- Can hold one of the following values:
9211: -- FND_API.G_RET_STS_SUCCESS (='S')
9212: -- FND_API.G_RET_STS_ERROR (='E')
9213: -- FND_API.G_RET_STS_UNEXP_ERROR (='U')
9214: --x_error_msg_tbl
9215: -- table of rrror messages if any.
9216: --Notes:
9217: -- ONLY SUPORTS DELETION for PO/PA document types

Line 9254: IF FND_API.to_Boolean(p_init_msg_list)

9250: -- Standard start of API savepoint
9251: SAVEPOINT PO_PROCESS_DELETE_ACTION;
9252:
9253: --Initialize message list if necessary (p_init_msg_list is set to TRUE)
9254: IF FND_API.to_Boolean(p_init_msg_list)
9255: THEN
9256: FND_MSG_PUB.initialize;
9257: END IF;
9258:

Line 9260: x_return_status := FND_API.G_RET_STS_SUCCESS;

9256: FND_MSG_PUB.initialize;
9257: END IF;
9258:
9259: -- By default return status is SUCCESS if no exception occurs
9260: x_return_status := FND_API.G_RET_STS_SUCCESS;
9261:
9262: d_pos := 5;
9263: --Lock the document so that while we do validation no body else changes the
9264: --record

Line 9266: ,p_init_msg_list => FND_API.G_FALSE

9262: d_pos := 5;
9263: --Lock the document so that while we do validation no body else changes the
9264: --record
9265: PO_DOCUMENT_LOCK_GRP.lock_document( p_api_version => 1.0
9266: ,p_init_msg_list => FND_API.G_FALSE
9267: ,x_return_status => x_return_status
9268: ,p_document_type => p_doc_type
9269: ,p_document_id => p_doc_header_id);
9270:

Line 9272: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

9268: ,p_document_type => p_doc_type
9269: ,p_document_id => p_doc_header_id);
9270:
9271: d_pos := 8;
9272: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
9273: RAISE FND_API.g_exc_error;
9274: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
9275: RAISE FND_API.g_exc_unexpected_error;
9276: END IF;

Line 9273: RAISE FND_API.g_exc_error;

9269: ,p_document_id => p_doc_header_id);
9270:
9271: d_pos := 8;
9272: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
9273: RAISE FND_API.g_exc_error;
9274: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
9275: RAISE FND_API.g_exc_unexpected_error;
9276: END IF;
9277:

Line 9274: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

9270:
9271: d_pos := 8;
9272: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
9273: RAISE FND_API.g_exc_error;
9274: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
9275: RAISE FND_API.g_exc_unexpected_error;
9276: END IF;
9277:
9278: d_pos := 10;

Line 9275: RAISE FND_API.g_exc_unexpected_error;

9271: d_pos := 8;
9272: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
9273: RAISE FND_API.g_exc_error;
9274: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
9275: RAISE FND_API.g_exc_unexpected_error;
9276: END IF;
9277:
9278: d_pos := 10;
9279: --We only validate in case the call is not made form HTML

Line 9299: RAISE FND_API.g_exc_error;

9295: THEN
9296: FND_MESSAGE.set_name('PO','PO_CUSTOM_MSG');
9297: FND_MESSAGE.set_token('TRANSLATED_TOKEN', l_error_message);
9298: FND_MSG_PUB.add;
9299: RAISE FND_API.g_exc_error;
9300: END IF; --x_error_message is NULL
9301: END IF;
9302:
9303: IF p_entity = PO_CORE_S.g_doc_level_HEADER

Line 9355: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

9351: ,p_calling_program => p_calling_program
9352: ,x_return_status => x_return_status);
9353:
9354: d_pos := 80;
9355: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9356: RAISE FND_API.g_exc_unexpected_error;
9357: END IF;
9358: --
9359:

Line 9356: RAISE FND_API.g_exc_unexpected_error;

9352: ,x_return_status => x_return_status);
9353:
9354: d_pos := 80;
9355: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9356: RAISE FND_API.g_exc_unexpected_error;
9357: END IF;
9358: --
9359:
9360: IF (PO_LOG.d_proc) THEN

Line 9364: WHEN FND_API.g_exc_error THEN

9360: IF (PO_LOG.d_proc) THEN
9361: PO_LOG.proc_end(d_module);
9362: END IF;
9363: EXCEPTION
9364: WHEN FND_API.g_exc_error THEN
9365: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9366: x_return_status := FND_API.g_ret_sts_error;
9367: x_error_msg_tbl := PO_TBL_VARCHAR2000();
9368: --Copy the messages on the list to the out parameter

Line 9366: x_return_status := FND_API.g_ret_sts_error;

9362: END IF;
9363: EXCEPTION
9364: WHEN FND_API.g_exc_error THEN
9365: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9366: x_return_status := FND_API.g_ret_sts_error;
9367: x_error_msg_tbl := PO_TBL_VARCHAR2000();
9368: --Copy the messages on the list to the out parameter
9369: FOR I IN 1..FND_MSG_PUB.count_msg loop
9370: x_error_msg_tbl.extend;

Line 9376: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

9372: IF (PO_LOG.d_stmt) THEN
9373: PO_LOG.stmt(d_module,d_pos,'x_error_msg_tbl(' || I || ')', x_error_msg_tbl(I));
9374: END IF;
9375: END LOOP;
9376: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9377: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9378: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9379: IF PO_LOG.d_exc THEN
9380: PO_LOG.exc(d_module,d_pos,'Unexpected Error in' || d_module);

Line 9378: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

9374: END IF;
9375: END LOOP;
9376: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9377: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9378: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9379: IF PO_LOG.d_exc THEN
9380: PO_LOG.exc(d_module,d_pos,'Unexpected Error in' || d_module);
9381: END IF;
9382: WHEN OTHERS THEN

Line 9384: x_return_status := FND_API.g_ret_sts_unexp_error;

9380: PO_LOG.exc(d_module,d_pos,'Unexpected Error in' || d_module);
9381: END IF;
9382: WHEN OTHERS THEN
9383: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9384: x_return_status := FND_API.g_ret_sts_unexp_error;
9385: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name||':'||d_pos);
9386: IF PO_LOG.d_exc THEN
9387: PO_LOG.exc(d_module,d_pos,'Unhandled Exception in ' || SQLCODE||':'||SQLERRM);
9388: END IF;