DBA Data[Home] [Help]

APPS.PO_DOCUMENT_UPDATE_PVT dependencies on FND_API

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Line 354: x_return_status := FND_API.G_RET_STS_SUCCESS;

350: log_changes(p_changes); -- Print the changes for statement-level logging.
351: END IF;
352:
353: SAVEPOINT PO_DOCUMENT_UPDATE_PVT_SP;
354: x_return_status := FND_API.G_RET_STS_SUCCESS;
355:
356: -- Standard API initialization:
357: IF NOT FND_API.compatible_api_call (
358: p_current_version_number => l_api_version,

Line 357: IF NOT FND_API.compatible_api_call (

353: SAVEPOINT PO_DOCUMENT_UPDATE_PVT_SP;
354: x_return_status := FND_API.G_RET_STS_SUCCESS;
355:
356: -- Standard API initialization:
357: IF NOT FND_API.compatible_api_call (
358: p_current_version_number => l_api_version,
359: p_caller_version_number => p_api_version,
360: p_api_name => l_api_name,
361: p_pkg_name => g_pkg_name ) THEN

Line 362: RAISE FND_API.g_exc_unexpected_error;

358: p_current_version_number => l_api_version,
359: p_caller_version_number => p_api_version,
360: p_api_name => l_api_name,
361: p_pkg_name => g_pkg_name ) THEN
362: RAISE FND_API.g_exc_unexpected_error;
363: END IF;
364:
365: IF (FND_API.to_boolean(p_init_msg_list)) THEN
366: FND_MSG_PUB.initialize();

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

361: p_pkg_name => g_pkg_name ) THEN
362: RAISE FND_API.g_exc_unexpected_error;
363: END IF;
364:
365: IF (FND_API.to_boolean(p_init_msg_list)) THEN
366: FND_MSG_PUB.initialize();
367: END IF;
368:
369: /* BEGIN INVCONV sschinch */

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

380: process_inputs ( p_changes,
381: x_return_status,
382: p_approval_background_flag,
383: p_mass_update_releases );
384: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
385: RAISE FND_API.G_EXC_ERROR;
386: END IF;
387:
388: -- Derive additional changes based on the requested changes.

Line 385: RAISE FND_API.G_EXC_ERROR;

381: x_return_status,
382: p_approval_background_flag,
383: p_mass_update_releases );
384: if (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
385: RAISE FND_API.G_EXC_ERROR;
386: END IF;
387:
388: -- Derive additional changes based on the requested changes.
389:

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

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

Line 392: RAISE FND_API.G_EXC_ERROR;

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

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

394:
395: -- Validate all the changes.
396:
397: validate_changes (p_changes, p_run_submission_checks, 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: -- Apply all the changes to the database tables.

Line 399: RAISE FND_API.G_EXC_ERROR;

395: -- Validate all the changes.
396:
397: validate_changes (p_changes, p_run_submission_checks, 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: -- Apply all the changes to the database tables.
403:

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

402: -- Apply all the changes to the database tables.
403:
404: apply_changes (p_changes, p_override_date, p_buyer_id, x_return_status);
405:
406: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
407: RAISE FND_API.G_EXC_ERROR;
408: END IF;
409:
410: -- INVCONV If only secondary quantity or grade has changed on the shipment(s), don't launch the PO approval workflow

Line 407: RAISE FND_API.G_EXC_ERROR;

403:
404: apply_changes (p_changes, p_override_date, p_buyer_id, x_return_status);
405:
406: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
407: RAISE FND_API.G_EXC_ERROR;
408: END IF;
409:
410: -- INVCONV If only secondary quantity or grade has changed on the shipment(s), don't launch the PO approval workflow
411: --

Line 412: IF g_calculate_tax_status <> FND_API.G_RET_STS_SUCCESS THEN

408: END IF;
409:
410: -- INVCONV If only secondary quantity or grade has changed on the shipment(s), don't launch the PO approval workflow
411: --
412: IF g_calculate_tax_status <> FND_API.G_RET_STS_SUCCESS THEN
413: FOR i IN 1..po_tax_interface_pvt.G_TAX_ERRORS_TBL.MESSAGE_TEXT.COUNT
414: LOOP
415: add_error (
416: p_api_errors => g_api_errors,

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

424: --
425:
426: IF g_sec_qty_grade_only_chge_doc = 'N' THEN /* INVCONV sschinch 09/07/04*/
427: -- Launch the PO approval workflow if requested.
428: IF (FND_API.to_boolean(p_launch_approvals_flag)) THEN
429: IF g_calculate_tax_status <> FND_API.G_RET_STS_SUCCESS THEN --
430: --
431: -- Do nothing here as per new ECO Bug 4643026
432: -- Get the changes, but do not lanuch approval workflow

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

425:
426: IF g_sec_qty_grade_only_chge_doc = 'N' THEN /* INVCONV sschinch 09/07/04*/
427: -- Launch the PO approval workflow if requested.
428: IF (FND_API.to_boolean(p_launch_approvals_flag)) THEN
429: IF g_calculate_tax_status <> FND_API.G_RET_STS_SUCCESS THEN --
430: --
431: -- Do nothing here as per new ECO Bug 4643026
432: -- Get the changes, but do not lanuch approval workflow
433: -- as the tax calculation has failed

Line 440: p_init_msg_list => FND_API.G_FALSE,

436: ELSE --
437: -- Bug 3605355 START
438: launch_po_approval_wf (
439: p_api_version => 1.0,
440: p_init_msg_list => FND_API.G_FALSE,
441: x_return_status => l_return_status,
442: p_document_id => g_document_id,
443: p_document_type => g_document_type,
444: p_document_subtype => g_document_subtype,

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

446: p_approval_background_flag => p_approval_background_flag,
447: p_mass_update_releases => p_mass_update_releases,
448: p_retroactive_price_change => g_retroactive_price_change
449: );
450: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
451: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
452: END IF;
453: -- Bug 3605355 END
454: END IF; --

Line 451: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

447: p_mass_update_releases => p_mass_update_releases,
448: p_retroactive_price_change => g_retroactive_price_change
449: );
450: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
451: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
452: END IF;
453: -- Bug 3605355 END
454: END IF; --
455: END IF;

Line 467: WHEN FND_API.G_EXC_ERROR THEN

463: END IF;
464: log_changes(p_changes); -- Print the changes for statement-level logging.
465: END IF;
466: EXCEPTION
467: WHEN FND_API.G_EXC_ERROR THEN
468: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;
469: x_return_status := FND_API.G_RET_STS_ERROR;
470: x_api_errors := g_api_errors;
471: log_changes(p_changes); -- Print the changes for statement-level logging.

Line 469: x_return_status := FND_API.G_RET_STS_ERROR;

465: END IF;
466: EXCEPTION
467: WHEN FND_API.G_EXC_ERROR THEN
468: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;
469: x_return_status := FND_API.G_RET_STS_ERROR;
470: x_api_errors := g_api_errors;
471: log_changes(p_changes); -- Print the changes for statement-level logging.
472: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
473: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;

Line 472: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

468: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;
469: x_return_status := FND_API.G_RET_STS_ERROR;
470: x_api_errors := g_api_errors;
471: log_changes(p_changes); -- Print the changes for statement-level logging.
472: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
473: ROLLBACK TO PO_DOCUMENT_UPDATE_PVT_SP;
474: -- Add the errors on the API message list to g_api_errors.
475: add_message_list_errors ( p_api_errors => g_api_errors,
476: x_return_status => x_return_status,

Line 478: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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

Line 490: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

486: -- Add the errors on the API message list to g_api_errors.
487: add_message_list_errors ( p_api_errors => g_api_errors,
488: x_return_status => x_return_status,
489: p_start_index => l_last_msg_list_index + 1 );
490: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
491: x_api_errors := g_api_errors;
492: log_changes(p_changes); -- Print the changes for statement-level logging.
493: END update_document;
494:

Line 578: WHEN FND_API.g_exc_unexpected_error THEN

574: * g_opm_installed := (l_opm_install_status = 'I');
575: * g_gml_common_rcv_installed := GML_PO_FOR_PROCESS.check_po_for_proc();
576: * END INVCONV SSCHINCH 09/07/04*/
577: EXCEPTION
578: WHEN FND_API.g_exc_unexpected_error THEN
579: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
580: p_proc_name => l_proc_name,
581: p_add_to_msg_list => FALSE );
582: RAISE FND_API.g_exc_unexpected_error;

Line 582: RAISE FND_API.g_exc_unexpected_error;

578: WHEN FND_API.g_exc_unexpected_error THEN
579: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
580: p_proc_name => l_proc_name,
581: p_add_to_msg_list => FALSE );
582: RAISE FND_API.g_exc_unexpected_error;
583: WHEN OTHERS THEN
584: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
585: p_proc_name => l_proc_name );
586: RAISE FND_API.g_exc_unexpected_error;

Line 586: RAISE FND_API.g_exc_unexpected_error;

582: RAISE FND_API.g_exc_unexpected_error;
583: WHEN OTHERS THEN
584: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
585: p_proc_name => l_proc_name );
586: RAISE FND_API.g_exc_unexpected_error;
587: END init_globals;
588:
589: -------------------------------------------------------------------------------
590: --Start of Comments

Line 680: WHEN FND_API.g_exc_unexpected_error THEN

676: WHERE document_type_code = g_document_type
677: AND document_subtype = g_document_subtype;
678:
679: EXCEPTION
680: WHEN FND_API.g_exc_unexpected_error THEN
681: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
682: p_proc_name => l_proc_name,
683: p_add_to_msg_list => FALSE );
684: RAISE FND_API.g_exc_unexpected_error;

Line 684: RAISE FND_API.g_exc_unexpected_error;

680: WHEN FND_API.g_exc_unexpected_error THEN
681: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
682: p_proc_name => l_proc_name,
683: p_add_to_msg_list => FALSE );
684: RAISE FND_API.g_exc_unexpected_error;
685: WHEN OTHERS THEN
686: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
687: p_proc_name => l_proc_name );
688: RAISE FND_API.g_exc_unexpected_error;

Line 688: RAISE FND_API.g_exc_unexpected_error;

684: RAISE FND_API.g_exc_unexpected_error;
685: WHEN OTHERS THEN
686: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
687: p_proc_name => l_proc_name );
688: RAISE FND_API.g_exc_unexpected_error;
689: END init_document_globals;
690:
691: -------------------------------------------------------------------------------
692: --Start of Comments

Line 720: x_return_status := FND_API.G_RET_STS_SUCCESS;

716: message => 'Entering ' || l_proc_name );
717: END IF;
718: END IF;
719:
720: x_return_status := FND_API.G_RET_STS_SUCCESS;
721:
722: -- Make sure that the po_header_id / po_release_id is valid.
723: IF (g_po_header_id IS NOT NULL) THEN -- PO / PA
724: BEGIN

Line 898: WHEN FND_API.g_exc_unexpected_error THEN

894: END;
895: END LOOP;
896:
897: EXCEPTION
898: WHEN FND_API.g_exc_unexpected_error THEN
899: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
900: p_proc_name => l_proc_name,
901: p_add_to_msg_list => FALSE );
902: RAISE FND_API.g_exc_unexpected_error;

Line 902: RAISE FND_API.g_exc_unexpected_error;

898: WHEN FND_API.g_exc_unexpected_error THEN
899: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
900: p_proc_name => l_proc_name,
901: p_add_to_msg_list => FALSE );
902: RAISE FND_API.g_exc_unexpected_error;
903: WHEN OTHERS THEN
904: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
905: p_proc_name => l_proc_name );
906: RAISE FND_API.g_exc_unexpected_error;

Line 906: RAISE FND_API.g_exc_unexpected_error;

902: RAISE FND_API.g_exc_unexpected_error;
903: WHEN OTHERS THEN
904: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
905: p_proc_name => l_proc_name );
906: RAISE FND_API.g_exc_unexpected_error;
907: END verify_document_ids;
908:
909: -------------------------------------------------------------------------------
910: --Start of Comments

Line 947: x_return_status := FND_API.G_RET_STS_SUCCESS;

943: message => 'Entering ' || l_proc_name );
944: END IF;
945: END IF;
946:
947: x_return_status := FND_API.G_RET_STS_SUCCESS;
948:
949: -- Verify that the passed in document IDs (ex. po_header_id,
950: -- po_line_id, etc.) are valid.
951: verify_document_ids (p_chg, x_return_status);

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

948:
949: -- Verify that the passed in document IDs (ex. po_header_id,
950: -- po_line_id, etc.) are valid.
951: verify_document_ids (p_chg, x_return_status);
952: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
953: RETURN;
954: END IF;
955:
956: -- Next, retrieve some global variables for the document, such as

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

983: PO_CORE_S.validate_yes_no_param (
984: x_return_status => x_return_status,
985: p_parameter_name => 'p_approval_background_flag',
986: p_parameter_value => p_approval_background_flag );
987: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
988: RAISE FND_API.g_exc_unexpected_error;
989: END IF;
990:
991: PO_CORE_S.validate_yes_no_param (

Line 988: RAISE FND_API.g_exc_unexpected_error;

984: x_return_status => x_return_status,
985: p_parameter_name => 'p_approval_background_flag',
986: p_parameter_value => p_approval_background_flag );
987: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
988: RAISE FND_API.g_exc_unexpected_error;
989: END IF;
990:
991: PO_CORE_S.validate_yes_no_param (
992: x_return_status => x_return_status,

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

991: PO_CORE_S.validate_yes_no_param (
992: x_return_status => x_return_status,
993: p_parameter_name => 'p_mass_update_releases',
994: p_parameter_value => p_mass_update_releases );
995: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
996: RAISE FND_API.g_exc_unexpected_error;
997: END IF;
998:
999: --------------------------------------------------------------------------

Line 996: RAISE FND_API.g_exc_unexpected_error;

992: x_return_status => x_return_status,
993: p_parameter_name => 'p_mass_update_releases',
994: p_parameter_value => p_mass_update_releases );
995: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
996: RAISE FND_API.g_exc_unexpected_error;
997: END IF;
998:
999: --------------------------------------------------------------------------
1000: -- Check: p_mass_update_releases can only be set to Y for Blankets.

Line 1007: RAISE FND_API.g_exc_unexpected_error;

1003: AND (g_document_type <> 'PA') THEN
1004:
1005: FND_MESSAGE.set_name('PO', 'PO_INVALID_MASS_UPDATE_REL');
1006: FND_MSG_PUB.add;
1007: RAISE FND_API.g_exc_unexpected_error;
1008: END IF;
1009:
1010: l_progress := '020';
1011:

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

1044: END IF;
1045:
1046: l_progress := '030';
1047:
1048: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
1049: -- Add the errors on the message list to the API errors object.
1050: add_message_list_errors ( p_api_errors => g_api_errors,
1051: x_return_status => x_return_status,
1052: p_start_index => l_last_msg_list_index + 1 );

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

1050: add_message_list_errors ( p_api_errors => g_api_errors,
1051: x_return_status => x_return_status,
1052: p_start_index => l_last_msg_list_index + 1 );
1053: RETURN;
1054: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1055: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1056: END IF;
1057:
1058: IF (l_status_rec_type.updatable_flag(1) <> 'Y') THEN

Line 1055: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1051: x_return_status => x_return_status,
1052: p_start_index => l_last_msg_list_index + 1 );
1053: RETURN;
1054: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1055: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1056: END IF;
1057:
1058: IF (l_status_rec_type.updatable_flag(1) <> 'Y') THEN
1059: -- The document status does not allow updates.

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

1066: -- Perform some preprocessing on the change object, such as UOM quantity
1067: -- conversions and populating the cached fields.
1068: l_progress := '040';
1069: preprocess_changes (p_chg, x_return_status);
1070: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1071: RETURN;
1072: END IF;
1073:
1074: -- Check that the requested changes make sense.

Line 1079: WHEN FND_API.g_exc_unexpected_error THEN

1075: l_progress := '050';
1076: verify_inputs (p_chg, x_return_status);
1077:
1078: EXCEPTION
1079: WHEN FND_API.g_exc_unexpected_error THEN
1080: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1081: p_proc_name => l_proc_name,
1082: p_progress => l_progress,
1083: p_add_to_msg_list => FALSE );

Line 1084: RAISE FND_API.g_exc_unexpected_error;

1080: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1081: p_proc_name => l_proc_name,
1082: p_progress => l_progress,
1083: p_add_to_msg_list => FALSE );
1084: RAISE FND_API.g_exc_unexpected_error;
1085: WHEN OTHERS THEN
1086: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1087: p_proc_name => l_proc_name,
1088: p_progress => l_progress );

Line 1089: RAISE FND_API.g_exc_unexpected_error;

1085: WHEN OTHERS THEN
1086: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1087: p_proc_name => l_proc_name,
1088: p_progress => l_progress );
1089: RAISE FND_API.g_exc_unexpected_error;
1090: END process_inputs;
1091:
1092: -------------------------------------------------------------------------------
1093: --Start of Comments

Line 1173: WHEN FND_API.g_exc_unexpected_error THEN

1169: AND NVL(MSI.organization_id, FSP.inventory_organization_id)
1170: = FSP.inventory_organization_id; -- JOIN
1171:
1172: EXCEPTION
1173: WHEN FND_API.g_exc_unexpected_error THEN
1174: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1175: p_proc_name => 'POPULATE_LINE_CACHED_FIELDS',
1176: p_add_to_msg_list => FALSE );
1177: RAISE FND_API.g_exc_unexpected_error;

Line 1177: RAISE FND_API.g_exc_unexpected_error;

1173: WHEN FND_API.g_exc_unexpected_error THEN
1174: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1175: p_proc_name => 'POPULATE_LINE_CACHED_FIELDS',
1176: p_add_to_msg_list => FALSE );
1177: RAISE FND_API.g_exc_unexpected_error;
1178: WHEN OTHERS THEN
1179: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1180: p_proc_name => 'POPULATE_LINE_CACHED_FIELDS' );
1181: RAISE FND_API.g_exc_unexpected_error;

Line 1181: RAISE FND_API.g_exc_unexpected_error;

1177: RAISE FND_API.g_exc_unexpected_error;
1178: WHEN OTHERS THEN
1179: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1180: p_proc_name => 'POPULATE_LINE_CACHED_FIELDS' );
1181: RAISE FND_API.g_exc_unexpected_error;
1182: END populate_line_cached_fields;
1183:
1184: -------------------------------------------------------------------------------
1185: --Start of Comments

Line 1331: WHEN FND_API.g_exc_unexpected_error THEN

1327: AND NVL(MSI.organization_id, FSP.inventory_organization_id)
1328: = FSP.inventory_organization_id; -- JOIN
1329:
1330: EXCEPTION
1331: WHEN FND_API.g_exc_unexpected_error THEN
1332: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1333: p_proc_name => 'POPULATE_SHIP_CACHED_FIELDS',
1334: p_add_to_msg_list => FALSE );
1335: RAISE FND_API.g_exc_unexpected_error;

Line 1335: RAISE FND_API.g_exc_unexpected_error;

1331: WHEN FND_API.g_exc_unexpected_error THEN
1332: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1333: p_proc_name => 'POPULATE_SHIP_CACHED_FIELDS',
1334: p_add_to_msg_list => FALSE );
1335: RAISE FND_API.g_exc_unexpected_error;
1336: WHEN OTHERS THEN
1337: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1338: p_proc_name => 'POPULATE_SHIP_CACHED_FIELDS' );
1339: RAISE FND_API.g_exc_unexpected_error;

Line 1339: RAISE FND_API.g_exc_unexpected_error;

1335: RAISE FND_API.g_exc_unexpected_error;
1336: WHEN OTHERS THEN
1337: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1338: p_proc_name => 'POPULATE_SHIP_CACHED_FIELDS' );
1339: RAISE FND_API.g_exc_unexpected_error;
1340: END populate_ship_cached_fields;
1341:
1342: -------------------------------------------------------------------------------
1343: --Start of Comments

Line 1455: WHEN FND_API.g_exc_unexpected_error THEN

1451: ;
1452:
1453:
1454: EXCEPTION
1455: WHEN FND_API.g_exc_unexpected_error THEN
1456: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1457: p_proc_name => 'POPULATE_DIST_CACHED_FIELDS',
1458: p_add_to_msg_list => FALSE );
1459: RAISE FND_API.g_exc_unexpected_error;

Line 1459: RAISE FND_API.g_exc_unexpected_error;

1455: WHEN FND_API.g_exc_unexpected_error THEN
1456: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1457: p_proc_name => 'POPULATE_DIST_CACHED_FIELDS',
1458: p_add_to_msg_list => FALSE );
1459: RAISE FND_API.g_exc_unexpected_error;
1460: WHEN OTHERS THEN
1461: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1462: p_proc_name => 'POPULATE_DIST_CACHED_FIELDS' );
1463: RAISE FND_API.g_exc_unexpected_error;

Line 1463: RAISE FND_API.g_exc_unexpected_error;

1459: RAISE FND_API.g_exc_unexpected_error;
1460: WHEN OTHERS THEN
1461: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1462: p_proc_name => 'POPULATE_DIST_CACHED_FIELDS' );
1463: RAISE FND_API.g_exc_unexpected_error;
1464: END populate_dist_cached_fields;
1465:
1466: -------------------------------------------------------------------------------
1467: --Start of Comments

Line 1502: x_return_status := FND_API.G_RET_STS_SUCCESS;

1498: message => 'Entering ' || l_proc_name );
1499: END IF;
1500: END IF;
1501:
1502: x_return_status := FND_API.G_RET_STS_SUCCESS;
1503: l_progress := '010';
1504:
1505: -- Line changes
1506: FOR i IN 1..p_chg.line_changes.get_count LOOP

Line 1652: WHEN FND_API.g_exc_unexpected_error THEN

1648:
1649: l_progress := '040';
1650:
1651: EXCEPTION
1652: WHEN FND_API.g_exc_unexpected_error THEN
1653: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1654: p_proc_name => l_proc_name,
1655: p_progress => l_progress,
1656: p_add_to_msg_list => FALSE );

Line 1657: RAISE FND_API.g_exc_unexpected_error;

1653: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1654: p_proc_name => l_proc_name,
1655: p_progress => l_progress,
1656: p_add_to_msg_list => FALSE );
1657: RAISE FND_API.g_exc_unexpected_error;
1658: WHEN OTHERS THEN
1659: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1660: p_proc_name => l_proc_name,
1661: p_progress => l_progress );

Line 1662: RAISE FND_API.g_exc_unexpected_error;

1658: WHEN OTHERS THEN
1659: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
1660: p_proc_name => l_proc_name,
1661: p_progress => l_progress );
1662: RAISE FND_API.g_exc_unexpected_error;
1663: END preprocess_changes;
1664:
1665: -------------------------------------------------------------------------------
1666: --Start of Comments

Line 1709: x_return_status := FND_API.G_RET_STS_SUCCESS;

1705: message => 'Entering ' || l_proc_name );
1706: END IF;
1707: END IF;
1708:
1709: x_return_status := FND_API.G_RET_STS_SUCCESS;
1710:
1711: -- Check if there are changes to fields that are not applicable for the
1712: -- requested document type or line type.
1713: l_progress := '010';

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

1711: -- Check if there are changes to fields that are not applicable for the
1712: -- requested document type or line type.
1713: l_progress := '010';
1714: check_type_specific_fields ( p_chg, x_return_status );
1715: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1716: return; -- Do not continue if any type-specific fields checks failed.
1717: END IF;
1718:
1719: -- Line changes

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

1727: -- to avoid performing derivations with nonsensical values - ex. to avoid
1728: -- rolling down negative quantities to the shipments and distributions.
1729: l_progress := '020';
1730: check_new_qty_price_amt(p_chg,G_ENTITY_TYPE_LINES,i,l_return_status);
1731: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1732: x_return_status := l_return_status;
1733: END IF;
1734:
1735: --------------------------------------------------------------------------

Line 1873: x_return_status := FND_API.G_RET_STS_ERROR;

1869: p_token_name1 => 'PQTY',
1870: p_token_value1 => p_chg.shipment_changes.c_quantity(i),
1871: p_token_name2 => 'SQTY',
1872: p_token_value2 => p_chg.line_changes.secondary_quantity(i));
1873: x_return_status := FND_API.G_RET_STS_ERROR;
1874: RETURN;
1875: END IF;
1876: END IF;
1877:

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

1914: -- Shipment Check: Basic checks on the new quantity, price, and amount.
1915: --------------------------------------------------------------------------
1916: l_progress := '100';
1917: check_new_qty_price_amt(p_chg,G_ENTITY_TYPE_SHIPMENTS,i,l_return_status);
1918: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1919: x_return_status := l_return_status;
1920: END IF;
1921:
1922: --------------------------------------------------------------------------

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

2084: --------------------------------------------------------------------------
2085: l_progress := '200';
2086: check_new_qty_price_amt(p_chg,G_ENTITY_TYPE_DISTRIBUTIONS, i,
2087: l_return_status);
2088: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2089: x_return_status := l_return_status;
2090: END IF;
2091:
2092: --------------------------------------------------------------------------

Line 2153: WHEN FND_API.g_exc_unexpected_error THEN

2149:
2150: l_progress := '500';
2151:
2152: EXCEPTION
2153: WHEN FND_API.g_exc_unexpected_error THEN
2154: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2155: p_proc_name => l_proc_name,
2156: p_progress => l_progress,
2157: p_add_to_msg_list => FALSE );

Line 2158: RAISE FND_API.g_exc_unexpected_error;

2154: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2155: p_proc_name => l_proc_name,
2156: p_progress => l_progress,
2157: p_add_to_msg_list => FALSE );
2158: RAISE FND_API.g_exc_unexpected_error;
2159: WHEN OTHERS THEN
2160: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2161: p_proc_name => l_proc_name,
2162: p_progress => l_progress );

Line 2163: RAISE FND_API.g_exc_unexpected_error;

2159: WHEN OTHERS THEN
2160: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2161: p_proc_name => l_proc_name,
2162: p_progress => l_progress );
2163: RAISE FND_API.g_exc_unexpected_error;
2164: END verify_inputs;
2165:
2166: -------------------------------------------------------------------------------
2167: --Start of Comments

Line 2196: x_return_status := FND_API.G_RET_STS_SUCCESS;

2192: END IF;
2193: END IF;
2194:
2195: l_progress := '010';
2196: x_return_status := FND_API.G_RET_STS_SUCCESS;
2197:
2198: ----------------------------------------------------------------------------
2199: -- Blanket PA checks:
2200: ----------------------------------------------------------------------------

Line 2579: WHEN FND_API.g_exc_unexpected_error THEN

2575:
2576: END LOOP; -- distribution changes
2577:
2578: EXCEPTION
2579: WHEN FND_API.g_exc_unexpected_error THEN
2580: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2581: p_proc_name => l_proc_name,
2582: p_progress => l_progress,
2583: p_add_to_msg_list => FALSE );

Line 2584: RAISE FND_API.g_exc_unexpected_error;

2580: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2581: p_proc_name => l_proc_name,
2582: p_progress => l_progress,
2583: p_add_to_msg_list => FALSE );
2584: RAISE FND_API.g_exc_unexpected_error;
2585: WHEN OTHERS THEN
2586: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2587: p_proc_name => l_proc_name,
2588: p_progress => l_progress );

Line 2589: RAISE FND_API.g_exc_unexpected_error;

2585: WHEN OTHERS THEN
2586: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2587: p_proc_name => l_proc_name,
2588: p_progress => l_progress );
2589: RAISE FND_API.g_exc_unexpected_error;
2590: END check_type_specific_fields;
2591:
2592: -------------------------------------------------------------------------------
2593: --Start of Comments

Line 2621: x_return_status := FND_API.G_RET_STS_SUCCESS;

2617: l_new_amount NUMBER;
2618: l_new_secondary_quantity NUMBER; -- sschinch 09.08.04 INVCONV
2619: l_sec_qty_column_name VARCHAR2(30); -- sschinch 09.08.04 INVCONV
2620: BEGIN
2621: x_return_status := FND_API.G_RET_STS_SUCCESS;
2622:
2623: -- Retrieve the new quantity, price, and amount, based on the entity type.
2624: IF (p_entity_type = G_ENTITY_TYPE_LINES) THEN
2625: l_new_quantity := p_chg.line_changes.quantity(i);

Line 2717: RAISE FND_API.g_exc_unexpected_error;

2713: EXCEPTION
2714: WHEN OTHERS THEN
2715: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2716: p_proc_name => 'CHECK_NEW_QTY_PRICE_AMT' );
2717: RAISE FND_API.g_exc_unexpected_error;
2718: END check_new_qty_price_amt;
2719:
2720: -------------------------------------------------------------------------------
2721: --Start of Comments

Line 2764: RAISE FND_API.g_exc_unexpected_error;

2760: EXCEPTION
2761: WHEN OTHERS THEN
2762: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2763: p_proc_name => 'IS_SPLIT_SHIPMENT_NUM_UNIQUE' );
2764: RAISE FND_API.g_exc_unexpected_error;
2765: END is_split_shipment_num_unique;
2766:
2767: -------------------------------------------------------------------------------
2768: --Start of Comments

Line 2792: RAISE FND_API.g_exc_unexpected_error;

2788: EXCEPTION
2789: WHEN OTHERS THEN
2790: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2791: p_proc_name => 'LINE_HAS_QTY_AMT_CHANGE' );
2792: RAISE FND_API.g_exc_unexpected_error;
2793: END line_has_qty_amt_change;
2794:
2795: -------------------------------------------------------------------------------
2796: --Start of Comments

Line 2821: RAISE FND_API.g_exc_unexpected_error;

2817: EXCEPTION
2818: WHEN OTHERS THEN
2819: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2820: p_proc_name => 'SHIP_HAS_QTY_AMT_CHANGE' );
2821: RAISE FND_API.g_exc_unexpected_error;
2822: END ship_has_qty_amt_change;
2823:
2824: -------------------------------------------------------------------------------
2825: --Start of Comments

Line 2849: RAISE FND_API.g_exc_unexpected_error;

2845: EXCEPTION
2846: WHEN OTHERS THEN
2847: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2848: p_proc_name => 'DIST_HAS_QTY_AMT_CHANGE' );
2849: RAISE FND_API.g_exc_unexpected_error;
2850: END dist_has_qty_amt_change;
2851:
2852: -------------------------------------------------------------------------------
2853: --Start of Comments

Line 2890: RAISE FND_API.g_exc_unexpected_error;

2886: EXCEPTION
2887: WHEN OTHERS THEN
2888: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2889: p_proc_name => 'LINE_HAS_SHIP_QTY_AMT_CHANGE' );
2890: RAISE FND_API.g_exc_unexpected_error;
2891: END line_has_ship_qty_amt_change;
2892:
2893: -------------------------------------------------------------------------------
2894: --Start of Comments

Line 2959: RAISE FND_API.g_exc_unexpected_error;

2955: EXCEPTION
2956: WHEN OTHERS THEN
2957: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
2958: p_proc_name => 'SHIP_HAS_DIST_QTY_AMT_CHANGE' );
2959: RAISE FND_API.g_exc_unexpected_error;
2960: END ship_has_dist_qty_amt_change;
2961:
2962: -------------------------------------------------------------------------------
2963: --Start of Comments

Line 3066: x_return_status := FND_API.G_RET_STS_SUCCESS;

3062: END IF;
3063: END IF;
3064:
3065: l_progress := '010';
3066: x_return_status := FND_API.G_RET_STS_SUCCESS;
3067:
3068: -- Derivation #1: Derive quantity/amount rollups and rolldowns (prorations).
3069: IF (g_document_type <> 'PA') THEN
3070: derive_qty_amt_rollups ( p_chg );

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

3125: x_price_updateable => l_price_updateable,
3126: x_retroactive_price_change => l_retro_price_change
3127: );
3128:
3129: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3130: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3131: END IF;
3132:
3133: ELSE -- Split shipment - always allow price updates.

Line 3130: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3126: x_retroactive_price_change => l_retro_price_change
3127: );
3128:
3129: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3130: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3131: END IF;
3132:
3133: ELSE -- Split shipment - always allow price updates.
3134: l_price_updateable := G_PARAMETER_YES;

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

3256: x_price_updateable => l_price_updateable,
3257: x_retroactive_price_change => l_retro_price_change
3258: );
3259:
3260: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3261: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3262: END IF;
3263:
3264: -- If price updates are allowed, call the Pricing API to get a

Line 3261: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3257: x_retroactive_price_change => l_retro_price_change
3258: );
3259:
3260: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3261: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3262: END IF;
3263:
3264: -- If price updates are allowed, call the Pricing API to get a
3265: -- new price from the price break.

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

3412: * p_entity_type => G_ENTITY_TYPE_LINES,
3413: * p_entity_id => i,
3414: * x_derived_quantity2 => l_derived_qty2,
3415: * x_return_status => l_return_status );
3416: * IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3417: * -- OPM validation error.
3418: * x_return_status := FND_API.G_RET_STS_ERROR;
3419: * ELSE
3420: * p_chg.line_changes.secondary_quantity(i) := l_derived_qty2;

Line 3418: * x_return_status := FND_API.G_RET_STS_ERROR;

3414: * x_derived_quantity2 => l_derived_qty2,
3415: * x_return_status => l_return_status );
3416: * IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3417: * -- OPM validation error.
3418: * x_return_status := FND_API.G_RET_STS_ERROR;
3419: * ELSE
3420: * p_chg.line_changes.secondary_quantity(i) := l_derived_qty2;
3421: * END IF;
3422: *

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

3435: * p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
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.shipment_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.shipment_changes.secondary_quantity(i) := l_derived_qty2;
3444: * END IF;
3445: * END IF;

Line 3504: x_return_status := FND_API.G_RET_STS_ERROR;

3500: from_unit => NULL,
3501: to_unit => NULL);
3502: END IF;
3503: IF (l_secondary_qty < 0 ) THEN
3504: x_return_status := FND_API.G_RET_STS_ERROR;
3505: RETURN;
3506: END IF;
3507: IF (l_secondary_qty > 0) THEN
3508: l_return_status := inv_convert.within_deviation(

Line 3539: x_return_status := FND_API.G_RET_STS_ERROR;

3535: ||': '||x_data);
3536: END IF;
3537: END IF;
3538:
3539: x_return_status := FND_API.G_RET_STS_ERROR;
3540: RETURN;
3541: END IF;
3542: p_chg.line_changes.secondary_quantity(i) := l_secondary_qty;
3543:

Line 3596: x_return_status := FND_API.G_RET_STS_ERROR;

3592: message => 'Line change on ' || l_po_line_id
3593: ||': '||x_data);
3594: END IF;
3595: END IF;
3596: x_return_status := FND_API.G_RET_STS_ERROR;
3597: RETURN;
3598: END IF;
3599: ELSE
3600: --Derive secondary quantity based on default conversion

Line 3674: x_return_Status := FND_API.G_RET_STS_ERROR;

3670: p_chg.shipment_changes.secondary_quantity(i) := NULL;
3671: PO_DOCUMENT_UPDATE_PVT.add_error(p_api_errors => g_api_errors,
3672: x_return_status => l_return_status,
3673: p_message_name => 'PO_SECONDARY_QTY_NOT_REQUIRED');
3674: x_return_Status := FND_API.G_RET_STS_ERROR;
3675: RETURN;
3676: END IF;
3677: /* End sschinch INVCONV */
3678:

Line 3691: x_return_status := FND_API.G_RET_STS_ERROR;

3687: p_token_name1 => 'PQTY',
3688: p_token_value1 => p_chg.shipment_changes.c_quantity(i),
3689: p_token_name2 => 'SQTY',
3690: p_token_value2 => l_new_secondary_qty);
3691: x_return_status := FND_API.G_RET_STS_ERROR;
3692: RETURN;
3693: END IF;
3694: /** If item is dual uom control and quantity is specified and secondary qty is not specified
3695: then derive the secondary quantity **/

Line 3751: x_return_status := FND_API.G_RET_STS_ERROR;

3747: END IF;
3748:
3749:
3750: END IF;
3751: x_return_status := FND_API.G_RET_STS_ERROR;
3752: RETURN;
3753: END IF;
3754: ELSIF l_new_qty IS NULL AND l_new_secondary_qty IS NOT NULL THEN
3755: -- Call API to validate deviation between database quantity and new secondary qty.

Line 3785: x_return_status := FND_API.G_RET_STS_ERROR;

3781: module => g_module_prefix||l_proc_name,
3782: message => 'Shipment Line changes : '||x_data);
3783: END IF;
3784: END IF; -- g_fnd_debug
3785: x_return_status := FND_API.G_RET_STS_ERROR;
3786: RETURN;
3787: END IF; -- l_return_status
3788: END IF;
3789: END IF; -- l_secondary_default_ind IS NOT NULL

Line 3793: WHEN FND_API.g_exc_unexpected_error THEN

3789: END IF; -- l_secondary_default_ind IS NOT NULL
3790: END LOOP ; --shipment changes
3791: /* END INVCONV */
3792: EXCEPTION
3793: WHEN FND_API.g_exc_unexpected_error THEN
3794: IF po_line_ref_csr%ISOPEN THEN
3795: CLOSE po_line_ref_csr;
3796: END IF;
3797:

Line 3806: RAISE FND_API.g_exc_unexpected_error;

3802: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
3803: p_proc_name => l_proc_name,
3804: p_progress => l_progress,
3805: p_add_to_msg_list => FALSE );
3806: RAISE FND_API.g_exc_unexpected_error;
3807: WHEN OTHERS THEN
3808: IF po_line_ref_csr%ISOPEN THEN
3809: CLOSE po_line_ref_csr;
3810: END IF;

Line 3819: RAISE FND_API.g_exc_unexpected_error;

3815:
3816: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
3817: p_proc_name => l_proc_name,
3818: p_progress => l_progress );
3819: RAISE FND_API.g_exc_unexpected_error;
3820: END derive_changes;
3821:
3822: -------------------------------------------------------------------------------
3823: --Start of Comments

Line 3871: x_return_status := FND_API.G_RET_STS_SUCCESS;

3867: message => 'Entering ' || l_proc_name );
3868: END IF;
3869: END IF;
3870:
3871: x_return_status := FND_API.G_RET_STS_SUCCESS;
3872:
3873: -- Retrieve some values from the line or shipment.
3874: IF (p_entity_type = G_ENTITY_TYPE_LINES) THEN
3875: l_new_quantity := p_chg.line_changes.quantity(i);

Line 3939: p_init_msg_list => FND_API.G_FALSE,

3935: l_last_msg_list_index := FND_MSG_PUB.count_msg();
3936:
3937: GML_ValidateDerive_GRP.secondary_qty (
3938: p_api_version => 1.0,
3939: p_init_msg_list => FND_API.G_FALSE,
3940: p_validate_ind => l_opm_validate_ind,
3941: p_item_no => l_item_number,
3942: p_unit_of_measure => l_cur_uom,
3943: p_quantity => l_new_quantity,

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

3958: END IF;
3959:
3960: l_progress := '020';
3961:
3962: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3963: -- The OPM API returned some validation errors.
3964: add_message_list_errors ( p_api_errors => g_api_errors,
3965: x_return_status => x_return_status,
3966: p_start_index => l_last_msg_list_index + 1,

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

3966: p_start_index => l_last_msg_list_index + 1,
3967: p_entity_type => p_entity_type,
3968: p_entity_id => p_entity_id );
3969: RETURN;
3970: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3971: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3972: END IF;
3973:
3974: x_derived_quantity2 := l_qty2; -- Return the Quantity2 derived by the API.

Line 3971: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3967: p_entity_type => p_entity_type,
3968: p_entity_id => p_entity_id );
3969: RETURN;
3970: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3971: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3972: END IF;
3973:
3974: x_derived_quantity2 := l_qty2; -- Return the Quantity2 derived by the API.
3975: EXCEPTION

Line 3976: WHEN FND_API.g_exc_unexpected_error THEN

3972: END IF;
3973:
3974: x_derived_quantity2 := l_qty2; -- Return the Quantity2 derived by the API.
3975: EXCEPTION
3976: WHEN FND_API.g_exc_unexpected_error THEN
3977: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
3978: p_proc_name => l_proc_name,
3979: p_progress => l_progress,
3980: p_add_to_msg_list => FALSE );

Line 3981: RAISE FND_API.g_exc_unexpected_error;

3977: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
3978: p_proc_name => l_proc_name,
3979: p_progress => l_progress,
3980: p_add_to_msg_list => FALSE );
3981: RAISE FND_API.g_exc_unexpected_error;
3982: WHEN OTHERS THEN
3983: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
3984: p_proc_name => l_proc_name,
3985: p_progress => l_progress );

Line 3986: RAISE FND_API.g_exc_unexpected_error;

3982: WHEN OTHERS THEN
3983: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
3984: p_proc_name => l_proc_name,
3985: p_progress => l_progress );
3986: RAISE FND_API.g_exc_unexpected_error;
3987: END derive_secondary_quantity;
3988:
3989: -------------------------------------------------------------------------------
3990: --Start of Comments

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

4052: x_price => x_price,
4053: x_return_status => l_return_status
4054: );
4055:
4056: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4057: RAISE FND_API.g_exc_unexpected_error;
4058: END IF;
4059:
4060: EXCEPTION

Line 4057: RAISE FND_API.g_exc_unexpected_error;

4053: x_return_status => l_return_status
4054: );
4055:
4056: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4057: RAISE FND_API.g_exc_unexpected_error;
4058: END IF;
4059:
4060: EXCEPTION
4061: WHEN FND_API.g_exc_unexpected_error THEN

Line 4061: WHEN FND_API.g_exc_unexpected_error THEN

4057: RAISE FND_API.g_exc_unexpected_error;
4058: END IF;
4059:
4060: EXCEPTION
4061: WHEN FND_API.g_exc_unexpected_error THEN
4062: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4063: p_proc_name => 'GET_RELEASE_BREAK_PRICE',
4064: p_add_to_msg_list => FALSE );
4065: RAISE FND_API.g_exc_unexpected_error;

Line 4065: RAISE FND_API.g_exc_unexpected_error;

4061: WHEN FND_API.g_exc_unexpected_error THEN
4062: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4063: p_proc_name => 'GET_RELEASE_BREAK_PRICE',
4064: p_add_to_msg_list => FALSE );
4065: RAISE FND_API.g_exc_unexpected_error;
4066: WHEN OTHERS THEN
4067: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4068: p_proc_name => 'GET_RELEASE_BREAK_PRICE' );
4069: RAISE FND_API.g_exc_unexpected_error;

Line 4069: RAISE FND_API.g_exc_unexpected_error;

4065: RAISE FND_API.g_exc_unexpected_error;
4066: WHEN OTHERS THEN
4067: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4068: p_proc_name => 'GET_RELEASE_BREAK_PRICE' );
4069: RAISE FND_API.g_exc_unexpected_error;
4070: END get_release_break_price;
4071:
4072: -------------------------------------------------------------------------------
4073: --Start of Comments

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

4208: , x_price => x_price
4209: , x_return_status => l_return_status
4210: );
4211:
4212: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4213: RAISE FND_API.g_exc_unexpected_error;
4214: END IF;
4215:
4216: EXCEPTION

Line 4213: RAISE FND_API.g_exc_unexpected_error;

4209: , x_return_status => l_return_status
4210: );
4211:
4212: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4213: RAISE FND_API.g_exc_unexpected_error;
4214: END IF;
4215:
4216: EXCEPTION
4217: WHEN FND_API.g_exc_unexpected_error THEN

Line 4217: WHEN FND_API.g_exc_unexpected_error THEN

4213: RAISE FND_API.g_exc_unexpected_error;
4214: END IF;
4215:
4216: EXCEPTION
4217: WHEN FND_API.g_exc_unexpected_error THEN
4218: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4219: p_proc_name => 'GET_PO_BREAK_PRICE',
4220: p_add_to_msg_list => FALSE );
4221: RAISE FND_API.g_exc_unexpected_error;

Line 4221: RAISE FND_API.g_exc_unexpected_error;

4217: WHEN FND_API.g_exc_unexpected_error THEN
4218: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4219: p_proc_name => 'GET_PO_BREAK_PRICE',
4220: p_add_to_msg_list => FALSE );
4221: RAISE FND_API.g_exc_unexpected_error;
4222: WHEN OTHERS THEN
4223: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4224: p_proc_name => 'GET_PO_BREAK_PRICE' );
4225: RAISE FND_API.g_exc_unexpected_error;

Line 4225: RAISE FND_API.g_exc_unexpected_error;

4221: RAISE FND_API.g_exc_unexpected_error;
4222: WHEN OTHERS THEN
4223: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4224: p_proc_name => 'GET_PO_BREAK_PRICE' );
4225: RAISE FND_API.g_exc_unexpected_error;
4226: END get_po_break_price;
4227:
4228: -------------------------------------------------------------------------------
4229: --Start of Comments

Line 4265: WHEN FND_API.g_exc_unexpected_error THEN

4261: AND shipment_type IN ('STANDARD','PLANNED');
4262:
4263: RETURN l_line_location_id;
4264: EXCEPTION
4265: WHEN FND_API.g_exc_unexpected_error THEN
4266: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4267: p_proc_name => 'GET_MIN_SHIPMENT_ID',
4268: p_add_to_msg_list => FALSE );
4269: RAISE FND_API.g_exc_unexpected_error;

Line 4269: RAISE FND_API.g_exc_unexpected_error;

4265: WHEN FND_API.g_exc_unexpected_error THEN
4266: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4267: p_proc_name => 'GET_MIN_SHIPMENT_ID',
4268: p_add_to_msg_list => FALSE );
4269: RAISE FND_API.g_exc_unexpected_error;
4270: WHEN OTHERS THEN
4271: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4272: p_proc_name => 'GET_MIN_SHIPMENT_ID' );
4273: RAISE FND_API.g_exc_unexpected_error;

Line 4273: RAISE FND_API.g_exc_unexpected_error;

4269: RAISE FND_API.g_exc_unexpected_error;
4270: WHEN OTHERS THEN
4271: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4272: p_proc_name => 'GET_MIN_SHIPMENT_ID' );
4273: RAISE FND_API.g_exc_unexpected_error;
4274: END get_min_shipment_id;
4275:
4276: -------------------------------------------------------------------------------
4277: --Start of Comments

Line 4596: WHEN FND_API.g_exc_unexpected_error THEN

4592:
4593: END IF; -- document type is standard PO or planned PO
4594:
4595: EXCEPTION
4596: WHEN FND_API.g_exc_unexpected_error THEN
4597: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4598: p_proc_name => l_proc_name,
4599: p_progress => l_progress,
4600: p_add_to_msg_list => FALSE );

Line 4601: RAISE FND_API.g_exc_unexpected_error;

4597: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4598: p_proc_name => l_proc_name,
4599: p_progress => l_progress,
4600: p_add_to_msg_list => FALSE );
4601: RAISE FND_API.g_exc_unexpected_error;
4602: WHEN OTHERS THEN
4603: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4604: p_proc_name => l_proc_name,
4605: p_progress => l_progress );

Line 4606: RAISE FND_API.g_exc_unexpected_error;

4602: WHEN OTHERS THEN
4603: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4604: p_proc_name => l_proc_name,
4605: p_progress => l_progress );
4606: RAISE FND_API.g_exc_unexpected_error;
4607: END derive_qty_amt_rollups;
4608:
4609: -------------------------------------------------------------------------------
4610: --Start of Comments

Line 4943: WHEN FND_API.g_exc_unexpected_error THEN

4939:
4940: l_progress := '070';
4941:
4942: EXCEPTION
4943: WHEN FND_API.g_exc_unexpected_error THEN
4944: IF (po_distribution_csr%ISOPEN) THEN
4945: CLOSE po_distribution_csr;
4946: END IF;
4947:

Line 4952: RAISE FND_API.g_exc_unexpected_error;

4948: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4949: p_proc_name => l_proc_name,
4950: p_progress => l_progress,
4951: p_add_to_msg_list => FALSE );
4952: RAISE FND_API.g_exc_unexpected_error;
4953: WHEN OTHERS THEN
4954: IF (po_distribution_csr%ISOPEN) THEN
4955: CLOSE po_distribution_csr;
4956: END IF;

Line 4961: RAISE FND_API.g_exc_unexpected_error;

4957:
4958: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
4959: p_proc_name => l_proc_name,
4960: p_progress => l_progress );
4961: RAISE FND_API.g_exc_unexpected_error;
4962: END derive_qty_amt_rolldowns;
4963:
4964: -------------------------------------------------------------------------------
4965: --Start of Comments

Line 5004: x_return_status := FND_API.G_RET_STS_SUCCESS;

5000: END IF;
5001: END IF;
5002:
5003: l_progress := '010';
5004: x_return_status := FND_API.G_RET_STS_SUCCESS;
5005:
5006: -- Line validations:
5007: IF (g_document_type <> 'RELEASE') THEN
5008: validate_line_changes (p_chg, l_return_status);

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

5005:
5006: -- Line validations:
5007: IF (g_document_type <> 'RELEASE') THEN
5008: validate_line_changes (p_chg, l_return_status);
5009: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5010: x_return_status := l_return_status;
5011: END IF;
5012: END IF; -- document type is not release
5013:

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

5014: l_progress := '020';
5015:
5016: -- Shipment validations:
5017: validate_shipment_changes (p_chg, l_return_status);
5018: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5019: x_return_status := l_return_status;
5020: END IF;
5021:
5022: l_progress := '030';

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

5023:
5024: -- Distribution validations:
5025: IF (g_document_type <> 'PA') THEN
5026: validate_distribution_changes (p_chg, l_return_status);
5027: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5028: x_return_status := l_return_status;
5029: END IF;
5030: END IF; -- document type is not blanket
5031:

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

5029: END IF;
5030: END IF; -- document type is not blanket
5031:
5032: -- Do not continue if one or more of the field-level validations failed.
5033: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5034: RETURN;
5035: END IF;
5036:
5037:

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

5039:
5040: -- Call the PO Submission Checks if requested by the caller.
5041: IF g_sec_qty_grade_only_chge_doc = 'N' THEN --sschinch 09/08/04 INVCONV
5042:
5043: IF ( FND_API.to_boolean(p_run_submission_checks) ) THEN
5044:
5045: IF (g_fnd_debug = 'Y') THEN
5046: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_EVENT) THEN
5047: FND_LOG.string( log_level => FND_LOG.LEVEL_EVENT,

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

5077:
5078:
5079: l_progress := '050';
5080:
5081: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5082: -- PO Submission Checks had a program failure.
5083: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5084: ELSIF ( l_sub_check_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5085: -- PO Submission Checks found some validation errors.

Line 5083: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5079: l_progress := '050';
5080:
5081: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5082: -- PO Submission Checks had a program failure.
5083: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5084: ELSIF ( l_sub_check_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5085: -- PO Submission Checks found some validation errors.
5086: -- Copy the errors from l_doc_check_errors into g_api_errors.
5087: FOR i IN 1..l_doc_check_errors.online_report_id.COUNT LOOP

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

5080:
5081: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5082: -- PO Submission Checks had a program failure.
5083: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5084: ELSIF ( l_sub_check_status <> FND_API.G_RET_STS_SUCCESS ) THEN
5085: -- PO Submission Checks found some validation errors.
5086: -- Copy the errors from l_doc_check_errors into g_api_errors.
5087: FOR i IN 1..l_doc_check_errors.online_report_id.COUNT LOOP
5088:

Line 5102: x_return_status := FND_API.G_RET_STS_ERROR;

5098: p_message_type => l_doc_check_errors.message_type(i) );
5099:
5100: -- If the message is not a warning, set the return status to error.
5101: IF (NVL(l_doc_check_errors.message_type(i),'E') <> 'W') THEN
5102: x_return_status := FND_API.G_RET_STS_ERROR;
5103: END IF;
5104: END IF; -- l_doc_check_errors.message_name
5105: END LOOP; -- l_doc_check_errors
5106: END IF; -- l_return_status

Line 5111: WHEN FND_API.g_exc_unexpected_error THEN

5107: END IF; -- p_run_submission_checks
5108: END IF; --g_sec_qty_grade_only_chge_doc check sschinch 09/08/04 INVCONV
5109:
5110: EXCEPTION
5111: WHEN FND_API.g_exc_unexpected_error THEN
5112: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5113: p_proc_name => l_proc_name,
5114: p_progress => l_progress,
5115: p_add_to_msg_list => FALSE );

Line 5116: RAISE FND_API.g_exc_unexpected_error;

5112: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5113: p_proc_name => l_proc_name,
5114: p_progress => l_progress,
5115: p_add_to_msg_list => FALSE );
5116: RAISE FND_API.g_exc_unexpected_error;
5117: WHEN OTHERS THEN
5118: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5119: p_proc_name => l_proc_name,
5120: p_progress => l_progress );

Line 5121: RAISE FND_API.g_exc_unexpected_error;

5117: WHEN OTHERS THEN
5118: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5119: p_proc_name => l_proc_name,
5120: p_progress => l_progress );
5121: RAISE FND_API.g_exc_unexpected_error;
5122: END validate_changes;
5123:
5124: -------------------------------------------------------------------------------
5125: --Start of Comments

Line 5183: x_return_status := FND_API.G_RET_STS_SUCCESS;

5179: message => 'Entering ' || l_proc_name );
5180: END IF;
5181: END IF;
5182:
5183: x_return_status := FND_API.G_RET_STS_SUCCESS;
5184:
5185: FOR i IN 1..p_chg.line_changes.get_count LOOP
5186: l_progress := '010';
5187: l_po_line_id := p_chg.line_changes.po_line_id(i);

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

5325: x_price_updateable => l_price_updateable,
5326: x_retroactive_price_change => l_retroactive_price_change
5327: );
5328:
5329: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5330: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5331: END IF;
5332:
5333: -- If price updates are not allowed, add the error messages to the

Line 5330: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5326: x_retroactive_price_change => l_retroactive_price_change
5327: );
5328:
5329: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5330: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5331: END IF;
5332:
5333: -- If price updates are not allowed, add the error messages to the
5334: -- API errors object.

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

5452: p_field_value => l_po_line_id,
5453: p_end_date => NULL,
5454: x_timecard_exists => l_timecard_exists
5455: );
5456: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5457: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5458: END IF;
5459:
5460: IF (l_timecard_exists) THEN

Line 5457: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5453: p_end_date => NULL,
5454: x_timecard_exists => l_timecard_exists
5455: );
5456: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5457: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5458: END IF;
5459:
5460: IF (l_timecard_exists) THEN
5461: add_error ( p_api_errors => g_api_errors,

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

5482: x_return_status => l_return_status,
5483: p_po_line_id => l_po_line_id,
5484: x_amount => l_timecard_amount_sum
5485: );
5486: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5487: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5488: END IF;
5489:
5490: IF (l_new_amount < l_timecard_amount_sum) THEN

Line 5487: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5483: p_po_line_id => l_po_line_id,
5484: x_amount => l_timecard_amount_sum
5485: );
5486: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5487: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5488: END IF;
5489:
5490: IF (l_new_amount < l_timecard_amount_sum) THEN
5491: add_error ( p_api_errors => g_api_errors,

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

5517: p_field_value => l_po_line_id,
5518: p_end_date => l_new_end_date,
5519: x_timecard_exists => l_timecard_exists
5520: );
5521: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5522: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5523: END IF;
5524:
5525: IF (l_timecard_exists) THEN

Line 5522: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5518: p_end_date => l_new_end_date,
5519: x_timecard_exists => l_timecard_exists
5520: );
5521: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5522: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5523: END IF;
5524:
5525: IF (l_timecard_exists) THEN
5526: add_error ( p_api_errors => g_api_errors,

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

5549: p_field_value => l_po_line_id,
5550: p_end_date => null,
5551: x_timecard_exists => l_timecard_exists
5552: );
5553: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5554: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5555: END IF;
5556:
5557: IF (l_timecard_exists) and

Line 5554: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5550: p_end_date => null,
5551: x_timecard_exists => l_timecard_exists
5552: );
5553: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5554: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5555: END IF;
5556:
5557: IF (l_timecard_exists) and
5558: (l_new_start_date > p_chg.line_changes.c_start_date(i)) THEN

Line 5659: WHEN FND_API.g_exc_unexpected_error THEN

5655:
5656: END LOOP; -- line changes
5657:
5658: EXCEPTION
5659: WHEN FND_API.g_exc_unexpected_error THEN
5660: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5661: p_proc_name => l_proc_name,
5662: p_progress => l_progress,
5663: p_add_to_msg_list => FALSE );

Line 5664: RAISE FND_API.g_exc_unexpected_error;

5660: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5661: p_proc_name => l_proc_name,
5662: p_progress => l_progress,
5663: p_add_to_msg_list => FALSE );
5664: RAISE FND_API.g_exc_unexpected_error;
5665: WHEN OTHERS THEN
5666: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5667: p_proc_name => l_proc_name,
5668: p_progress => l_progress );

Line 5669: RAISE FND_API.g_exc_unexpected_error;

5665: WHEN OTHERS THEN
5666: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
5667: p_proc_name => l_proc_name,
5668: p_progress => l_progress );
5669: RAISE FND_API.g_exc_unexpected_error;
5670: END validate_line_changes;
5671:
5672: -------------------------------------------------------------------------------
5673: --Start of Comments

Line 5749: x_return_status := FND_API.G_RET_STS_SUCCESS;

5745: message => 'Entering ' || l_proc_name );
5746: END IF;
5747: END IF;
5748:
5749: x_return_status := FND_API.G_RET_STS_SUCCESS;
5750:
5751: FOR i IN 1..p_chg.shipment_changes.get_count LOOP
5752: l_progress := '010';
5753: l_line_location_id := p_chg.shipment_changes.po_line_location_id(i);

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

5850: x_price_updateable => l_price_updateable,
5851: x_retroactive_price_change => l_retroactive_price_change
5852: );
5853:
5854: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5855: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5856: END IF;
5857:
5858: -- If price updates are not allowed, add the error messages to the

Line 5855: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5851: x_retroactive_price_change => l_retroactive_price_change
5852: );
5853:
5854: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5855: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5856: END IF;
5857:
5858: -- If price updates are not allowed, add the error messages to the
5859: -- API errors object.

Line 6218: WHEN FND_API.g_exc_unexpected_error THEN

6214:
6215: END LOOP; -- shipment changes
6216:
6217: EXCEPTION
6218: WHEN FND_API.g_exc_unexpected_error THEN
6219: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6220: p_proc_name => l_proc_name,
6221: p_progress => l_progress,
6222: p_add_to_msg_list => FALSE );

Line 6223: RAISE FND_API.g_exc_unexpected_error;

6219: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6220: p_proc_name => l_proc_name,
6221: p_progress => l_progress,
6222: p_add_to_msg_list => FALSE );
6223: RAISE FND_API.g_exc_unexpected_error;
6224: WHEN OTHERS THEN
6225: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6226: p_proc_name => l_proc_name,
6227: p_progress => l_progress );

Line 6228: RAISE FND_API.g_exc_unexpected_error;

6224: WHEN OTHERS THEN
6225: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6226: p_proc_name => l_proc_name,
6227: p_progress => l_progress );
6228: RAISE FND_API.g_exc_unexpected_error;
6229: END validate_shipment_changes;
6230:
6231: -------------------------------------------------------------------------------
6232: --Start of Comments

Line 6268: x_return_status := FND_API.G_RET_STS_SUCCESS;

6264: message => 'Entering ' || l_proc_name );
6265: END IF;
6266: END IF;
6267:
6268: x_return_status := FND_API.G_RET_STS_SUCCESS;
6269:
6270: FOR i IN 1..p_chg.distribution_changes.get_count LOOP
6271: l_progress := '010';
6272: l_new_qty := p_chg.distribution_changes.quantity_ordered(i);

Line 6394: WHEN FND_API.g_exc_unexpected_error THEN

6390:
6391: END LOOP; -- distribution changes
6392:
6393: EXCEPTION
6394: WHEN FND_API.g_exc_unexpected_error THEN
6395: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6396: p_proc_name => l_proc_name,
6397: p_progress => l_progress,
6398: p_add_to_msg_list => FALSE );

Line 6399: RAISE FND_API.g_exc_unexpected_error;

6395: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6396: p_proc_name => l_proc_name,
6397: p_progress => l_progress,
6398: p_add_to_msg_list => FALSE );
6399: RAISE FND_API.g_exc_unexpected_error;
6400: WHEN OTHERS THEN
6401: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6402: p_proc_name => l_proc_name,
6403: p_progress => l_progress );

Line 6404: RAISE FND_API.g_exc_unexpected_error;

6400: WHEN OTHERS THEN
6401: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6402: p_proc_name => l_proc_name,
6403: p_progress => l_progress );
6404: RAISE FND_API.g_exc_unexpected_error;
6405: END validate_distribution_changes;
6406:
6407: -- Bug 3354712 START
6408: -------------------------------------------------------------------------------

Line 6445: x_return_status := FND_API.G_RET_STS_SUCCESS;

6441: message => 'Entering ' || l_proc_name );
6442: END IF;
6443: END IF;
6444:
6445: x_return_status := FND_API.G_RET_STS_SUCCESS;
6446:
6447: -- Check whether this line/shipment is encumbered and needs to be unreserved.
6448: l_progress := '010';
6449: PO_DOCUMENT_FUNDS_PVT.is_unreservable (

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

6453: p_doc_level => p_doc_level,
6454: p_doc_level_id => p_doc_level_id,
6455: x_unreservable_flag => l_unreservable_flag
6456: );
6457: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6458: RAISE FND_API.g_exc_unexpected_error;
6459: END IF;
6460:
6461: IF (NVL(l_unreservable_flag, PO_DOCUMENT_FUNDS_PVT.g_parameter_NO) <>

Line 6458: RAISE FND_API.g_exc_unexpected_error;

6454: p_doc_level_id => p_doc_level_id,
6455: x_unreservable_flag => l_unreservable_flag
6456: );
6457: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6458: RAISE FND_API.g_exc_unexpected_error;
6459: END IF;
6460:
6461: IF (NVL(l_unreservable_flag, PO_DOCUMENT_FUNDS_PVT.g_parameter_NO) <>
6462: PO_DOCUMENT_FUNDS_PVT.g_parameter_YES) THEN

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

6489: ||', po_return_code: '||l_po_return_code );
6490: END IF;
6491: END IF;
6492:
6493: IF (l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS,
6494: FND_API.G_RET_STS_ERROR) ) THEN
6495: RAISE FND_API.g_exc_unexpected_error;
6496: END IF;
6497:

Line 6494: FND_API.G_RET_STS_ERROR) ) THEN

6490: END IF;
6491: END IF;
6492:
6493: IF (l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS,
6494: FND_API.G_RET_STS_ERROR) ) THEN
6495: RAISE FND_API.g_exc_unexpected_error;
6496: END IF;
6497:
6498: -- If there were errors/warnings, copy them to the API errors object.

Line 6495: RAISE FND_API.g_exc_unexpected_error;

6491: END IF;
6492:
6493: IF (l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS,
6494: FND_API.G_RET_STS_ERROR) ) THEN
6495: RAISE FND_API.g_exc_unexpected_error;
6496: END IF;
6497:
6498: -- If there were errors/warnings, copy them to the API errors object.
6499: l_progress := '030';

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

6503: p_online_report_id => l_online_report_id,
6504: p_report_successes => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO,
6505: x_report_object => l_enc_report_obj
6506: );
6507: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6508: RAISE FND_API.g_exc_unexpected_error;
6509: END IF;
6510:
6511: FOR j IN 1..l_enc_report_obj.error_msg.count LOOP

Line 6508: RAISE FND_API.g_exc_unexpected_error;

6504: p_report_successes => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO,
6505: x_report_object => l_enc_report_obj
6506: );
6507: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6508: RAISE FND_API.g_exc_unexpected_error;
6509: END IF;
6510:
6511: FOR j IN 1..l_enc_report_obj.error_msg.count LOOP
6512: add_error ( p_api_errors => g_api_errors,

Line 6520: x_return_status := FND_API.G_RET_STS_ERROR;

6516: p_message_type => l_enc_report_obj.msg_type(j) );
6517: END LOOP;
6518:
6519: IF (l_po_return_code <> PO_DOCUMENT_FUNDS_PVT.G_RETURN_WARNING) THEN
6520: x_return_status := FND_API.G_RET_STS_ERROR;
6521: END IF;
6522: END IF; -- l_po_return_code
6523:
6524: IF (g_fnd_debug = 'Y') THEN

Line 6532: WHEN FND_API.g_exc_unexpected_error THEN

6528: message => 'Exiting ' || l_proc_name );
6529: END IF;
6530: END IF;
6531: EXCEPTION
6532: WHEN FND_API.g_exc_unexpected_error THEN
6533: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6534: p_proc_name => l_proc_name,
6535: p_progress => l_progress,
6536: p_add_to_msg_list => FALSE );

Line 6537: RAISE FND_API.g_exc_unexpected_error;

6533: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6534: p_proc_name => l_proc_name,
6535: p_progress => l_progress,
6536: p_add_to_msg_list => FALSE );
6537: RAISE FND_API.g_exc_unexpected_error;
6538: WHEN OTHERS THEN
6539: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6540: p_proc_name => l_proc_name,
6541: p_progress => l_progress );

Line 6542: RAISE FND_API.g_exc_unexpected_error;

6538: WHEN OTHERS THEN
6539: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6540: p_proc_name => l_proc_name,
6541: p_progress => l_progress );
6542: RAISE FND_API.g_exc_unexpected_error;
6543: END unreserve_entity;
6544: -- Bug 3354712 END
6545:
6546: -------------------------------------------------------------------------------

Line 6578: x_return_status := FND_API.G_RET_STS_SUCCESS;

6574: message => 'Entering ' || l_proc_name );
6575: END IF;
6576: END IF;
6577:
6578: x_return_status := FND_API.G_RET_STS_SUCCESS;
6579:
6580: -- For POs, unreserve the lines with quantity, price, or amount changes.
6581: IF (g_document_type = 'PO') THEN
6582: l_progress := '010';

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

6594: p_buyer_id => p_buyer_id,
6595: x_return_status => l_return_status
6596: );
6597:
6598: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6599: x_return_status := FND_API.G_RET_STS_ERROR;
6600: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6601: RAISE FND_API.g_exc_unexpected_error;
6602: END IF;

Line 6599: x_return_status := FND_API.G_RET_STS_ERROR;

6595: x_return_status => l_return_status
6596: );
6597:
6598: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6599: x_return_status := FND_API.G_RET_STS_ERROR;
6600: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6601: RAISE FND_API.g_exc_unexpected_error;
6602: END IF;
6603: -- Bug 3354712 END

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

6596: );
6597:
6598: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6599: x_return_status := FND_API.G_RET_STS_ERROR;
6600: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6601: RAISE FND_API.g_exc_unexpected_error;
6602: END IF;
6603: -- Bug 3354712 END
6604:

Line 6601: RAISE FND_API.g_exc_unexpected_error;

6597:
6598: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6599: x_return_status := FND_API.G_RET_STS_ERROR;
6600: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6601: RAISE FND_API.g_exc_unexpected_error;
6602: END IF;
6603: -- Bug 3354712 END
6604:
6605: END IF; -- p_chg.line_changes.quantity

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

6624: p_buyer_id => p_buyer_id,
6625: x_return_status => l_return_status
6626: );
6627:
6628: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6629: x_return_status := FND_API.G_RET_STS_ERROR;
6630: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6631: RAISE FND_API.g_exc_unexpected_error;
6632: END IF;

Line 6629: x_return_status := FND_API.G_RET_STS_ERROR;

6625: x_return_status => l_return_status
6626: );
6627:
6628: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6629: x_return_status := FND_API.G_RET_STS_ERROR;
6630: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6631: RAISE FND_API.g_exc_unexpected_error;
6632: END IF;
6633:

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

6626: );
6627:
6628: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6629: x_return_status := FND_API.G_RET_STS_ERROR;
6630: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6631: RAISE FND_API.g_exc_unexpected_error;
6632: END IF;
6633:
6634: END IF; -- p_chg.shipment_changes.po_line_location_id

Line 6631: RAISE FND_API.g_exc_unexpected_error;

6627:
6628: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
6629: x_return_status := FND_API.G_RET_STS_ERROR;
6630: ELSIF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6631: RAISE FND_API.g_exc_unexpected_error;
6632: END IF;
6633:
6634: END IF; -- p_chg.shipment_changes.po_line_location_id
6635: END LOOP; -- shipment changes

Line 6648: WHEN FND_API.g_exc_unexpected_error THEN

6644: message => 'Exiting ' || l_proc_name );
6645: END IF;
6646: END IF;
6647: EXCEPTION
6648: WHEN FND_API.g_exc_unexpected_error THEN
6649: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6650: p_proc_name => l_proc_name,
6651: p_progress => l_progress,
6652: p_add_to_msg_list => FALSE );

Line 6653: RAISE FND_API.g_exc_unexpected_error;

6649: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6650: p_proc_name => l_proc_name,
6651: p_progress => l_progress,
6652: p_add_to_msg_list => FALSE );
6653: RAISE FND_API.g_exc_unexpected_error;
6654: WHEN OTHERS THEN
6655: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6656: p_proc_name => l_proc_name,
6657: p_progress => l_progress );

Line 6658: RAISE FND_API.g_exc_unexpected_error;

6654: WHEN OTHERS THEN
6655: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
6656: p_proc_name => l_proc_name,
6657: p_progress => l_progress );
6658: RAISE FND_API.g_exc_unexpected_error;
6659: END unreserve;
6660:
6661: -------------------------------------------------------------------------------
6662: --Start of Comments

Line 6708: x_return_status := FND_API.G_RET_STS_SUCCESS;

6704: END IF;
6705: END IF;
6706:
6707: l_progress := '010';
6708: x_return_status := FND_API.G_RET_STS_SUCCESS;
6709:
6710: -- For POs/releases, if encumbrance is on, unreserve before making changes.
6711: IF (g_document_type <> 'PA')
6712: AND (PO_CORE_S.is_encumbrance_on (

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

6713: p_doc_type => g_document_type,
6714: p_org_id => NULL )) THEN
6715:
6716: unreserve ( p_chg, p_override_date, p_buyer_id, l_return_status );
6717: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6718: x_return_status := l_return_status;
6719: RETURN;
6720: END IF;
6721: END IF;

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

6963: || l_new_revision_num );
6964: END IF;
6965: END IF;
6966:
6967: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6968: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6969: END IF;
6970: END IF; -- g_sec_qty_grade_only_chge_doc = 'N' INVCONV
6971:

Line 6968: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

6964: END IF;
6965: END IF;
6966:
6967: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6968: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6969: END IF;
6970: END IF; -- g_sec_qty_grade_only_chge_doc = 'N' INVCONV
6971:
6972: -- Update the header-level fields.

Line 7023: p_unlock_current => FND_API.G_FALSE

7019: PO_DRAFTS_PVT.lock_document
7020: ( p_po_header_id => g_po_header_id,
7021: p_role => PO_GLOBAL.g_ROLE_BUYER,
7022: p_role_user_id => FND_GLOBAL.user_id,
7023: p_unlock_current => FND_API.G_FALSE
7024: );
7025: END IF;
7026: --
7027:

Line 7069: WHEN FND_API.g_exc_unexpected_error THEN

7065: END IF;
7066: --
7067:
7068: EXCEPTION
7069: WHEN FND_API.g_exc_unexpected_error THEN
7070: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7071: p_proc_name => l_proc_name,
7072: p_progress => l_progress,
7073: p_add_to_msg_list => FALSE );

Line 7074: RAISE FND_API.g_exc_unexpected_error;

7070: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7071: p_proc_name => l_proc_name,
7072: p_progress => l_progress,
7073: p_add_to_msg_list => FALSE );
7074: RAISE FND_API.g_exc_unexpected_error;
7075: WHEN OTHERS THEN
7076: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7077: p_proc_name => l_proc_name,
7078: p_progress => l_progress );

Line 7079: RAISE FND_API.g_exc_unexpected_error;

7075: WHEN OTHERS THEN
7076: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7077: p_proc_name => l_proc_name,
7078: p_progress => l_progress );
7079: RAISE FND_API.g_exc_unexpected_error;
7080: END apply_changes;
7081:
7082: -------------------------------------------------------------------------------
7083: --Start of Comments

Line 7474: WHEN FND_API.g_exc_unexpected_error THEN

7470: -- Now create all the split distributions.
7471: create_split_distributions ( p_chg );
7472:
7473: EXCEPTION
7474: WHEN FND_API.g_exc_unexpected_error THEN
7475: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7476: p_proc_name => l_proc_name,
7477: p_add_to_msg_list => FALSE );
7478: RAISE FND_API.g_exc_unexpected_error;

Line 7478: RAISE FND_API.g_exc_unexpected_error;

7474: WHEN FND_API.g_exc_unexpected_error THEN
7475: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7476: p_proc_name => l_proc_name,
7477: p_add_to_msg_list => FALSE );
7478: RAISE FND_API.g_exc_unexpected_error;
7479: WHEN OTHERS THEN
7480: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7481: p_proc_name => l_proc_name );
7482: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 7482: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7478: RAISE FND_API.g_exc_unexpected_error;
7479: WHEN OTHERS THEN
7480: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7481: p_proc_name => l_proc_name );
7482: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7483: END create_split_shipments;
7484:
7485: -------------------------------------------------------------------------------
7486: --Start of Comments

Line 7557: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7553: FND_MESSAGE.set_name('PO', 'PO_GENERIC_ERROR');
7554: FND_MESSAGE.set_token('ERROR_TEXT',
7555: 'Could not find the new shipment for this split distribution.');
7556: FND_MSG_PUB.add;
7557: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7558: END IF;
7559:
7560:
7561: END LOOP; -- split distribution changes

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

7845: x_msg_data => l_msg_data,
7846: p_caller => 'CHANGE_PO',
7847: x_po_gms_interface_obj => l_gms_po_obj
7848: );
7849: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7850: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7851: END IF;
7852:
7853: l_progress := '040';

Line 7850: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7846: p_caller => 'CHANGE_PO',
7847: x_po_gms_interface_obj => l_gms_po_obj
7848: );
7849: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7850: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7851: END IF;
7852:
7853: l_progress := '040';
7854: -- Bulk update the distributions with the new award IDs.

Line 7867: WHEN FND_API.g_exc_unexpected_error THEN

7863: END IF; -- l_gms_po_obj
7864: --
7865:
7866: EXCEPTION
7867: WHEN FND_API.g_exc_unexpected_error THEN
7868: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7869: p_proc_name => l_proc_name,
7870: p_progress => l_progress,
7871: p_add_to_msg_list => FALSE );

Line 7872: RAISE FND_API.g_exc_unexpected_error;

7868: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7869: p_proc_name => l_proc_name,
7870: p_progress => l_progress,
7871: p_add_to_msg_list => FALSE );
7872: RAISE FND_API.g_exc_unexpected_error;
7873: WHEN OTHERS THEN
7874: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7875: p_proc_name => l_proc_name,
7876: p_progress => l_progress );

Line 7877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7873: WHEN OTHERS THEN
7874: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7875: p_proc_name => l_proc_name,
7876: p_progress => l_progress );
7877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7878: END create_split_distributions;
7879:
7880: -------------------------------------------------------------------------------
7881: --Start of Comments

Line 7962: WHEN FND_API.g_exc_unexpected_error THEN

7958:
7959: l_progress := '040';
7960:
7961: EXCEPTION
7962: WHEN FND_API.g_exc_unexpected_error THEN
7963: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7964: p_proc_name => l_proc_name,
7965: p_progress => l_progress,
7966: p_add_to_msg_list => FALSE );

Line 7967: RAISE FND_API.g_exc_unexpected_error;

7963: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7964: p_proc_name => l_proc_name,
7965: p_progress => l_progress,
7966: p_add_to_msg_list => FALSE );
7967: RAISE FND_API.g_exc_unexpected_error;
7968: WHEN OTHERS THEN
7969: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7970: p_proc_name => l_proc_name,
7971: p_progress => l_progress );

Line 7972: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7968: WHEN OTHERS THEN
7969: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
7970: p_proc_name => l_proc_name,
7971: p_progress => l_progress );
7972: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7973: END delete_records;
7974:
7975: -------------------------------------------------------------------------------
7976: --Start of Comments

Line 8090: x_return_status := FND_API.G_RET_STS_SUCCESS;

8086: || ' retroactive_price: '||p_retroactive_price_change );
8087: END IF;
8088: END IF;
8089:
8090: x_return_status := FND_API.G_RET_STS_SUCCESS;
8091:
8092: -- Standard API initialization:
8093: IF NOT FND_API.compatible_api_call (
8094: p_current_version_number => l_api_version,

Line 8093: IF NOT FND_API.compatible_api_call (

8089:
8090: x_return_status := FND_API.G_RET_STS_SUCCESS;
8091:
8092: -- Standard API initialization:
8093: IF NOT FND_API.compatible_api_call (
8094: p_current_version_number => l_api_version,
8095: p_caller_version_number => p_api_version,
8096: p_api_name => l_proc_name,
8097: p_pkg_name => g_pkg_name ) THEN

Line 8098: RAISE FND_API.g_exc_unexpected_error;

8094: p_current_version_number => l_api_version,
8095: p_caller_version_number => p_api_version,
8096: p_api_name => l_proc_name,
8097: p_pkg_name => g_pkg_name ) THEN
8098: RAISE FND_API.g_exc_unexpected_error;
8099: END IF;
8100:
8101: IF (FND_API.to_boolean(p_init_msg_list)) THEN
8102: FND_MSG_PUB.initialize();

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

8097: p_pkg_name => g_pkg_name ) THEN
8098: RAISE FND_API.g_exc_unexpected_error;
8099: END IF;
8100:
8101: IF (FND_API.to_boolean(p_init_msg_list)) THEN
8102: FND_MSG_PUB.initialize();
8103: END IF;
8104:
8105: IF (p_preparer_id IS NOT NULL) THEN

Line 8171: WHEN FND_API.g_exc_unexpected_error THEN

8167: );
8168:
8169: l_progress := '030';
8170: EXCEPTION
8171: WHEN FND_API.g_exc_unexpected_error THEN
8172: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8173: p_proc_name => l_proc_name,
8174: p_progress => l_progress,
8175: p_add_to_msg_list => FALSE );

Line 8176: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8172: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8173: p_proc_name => l_proc_name,
8174: p_progress => l_progress,
8175: p_add_to_msg_list => FALSE );
8176: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8177: WHEN OTHERS THEN
8178: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8179: p_proc_name => l_proc_name,
8180: p_progress => l_progress );

Line 8181: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8177: WHEN OTHERS THEN
8178: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8179: p_proc_name => l_proc_name,
8180: p_progress => l_progress );
8181: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8182: END launch_po_approval_wf;
8183:
8184: -------------------------------------------------------------------------------
8185: -- The following procedures manage the change indexes, which allow us

Line 8241: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8237: IF g_line_changes_index.EXISTS(l_po_line_id) THEN
8238: -- Error: This is a duplicate change for the same PO_LINE_ID.
8239: FND_MESSAGE.set_name('PO', 'PO_CHNG_DUP_LINE');
8240: FND_MSG_PUB.add;
8241: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8242: END IF;
8243:
8244: -- Add this change to the index.
8245: g_line_changes_index(l_po_line_id) := i;

Line 8280: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8276: IF g_ship_changes_index.EXISTS(l_line_location_id) THEN
8277: -- Error: This is a duplicate change for the same LINE_LOCATION_ID.
8278: FND_MESSAGE.set_name('PO', 'PO_CHNG_DUP_SHIPMENT');
8279: FND_MSG_PUB.add;
8280: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8281: END IF;
8282:
8283: -- Add this to the index of shipment changes by LINE_LOCATION_ID.
8284: -- Key: LINE_LOCATION_ID

Line 8331: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8327: IF g_dist_changes_index.EXISTS(l_po_distribution_id) THEN
8328: -- Error: This is a duplicate change for the same PO_DISTRIBUTION_ID.
8329: FND_MESSAGE.set_name('PO', 'PO_CHNG_DUP_DISTRIBUTION');
8330: FND_MSG_PUB.add;
8331: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8332: END IF;
8333:
8334: -- Add this to the index of distribution changes by PO_DISTRIBUTION_ID.
8335: -- Key: PO_DISTRIBUTION_ID

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

8670: -- None.
8671: --Parameters:
8672: --OUT:
8673: --x_return_status
8674: -- This procedure always returns FND_API.G_RET_STS_ERROR.
8675: --End of Comments
8676: -------------------------------------------------------------------------------
8677: PROCEDURE add_error
8678: ( p_api_errors IN OUT NOCOPY PO_API_ERRORS_REC_TYPE,

Line 8744: x_return_status := FND_API.G_RET_STS_ERROR;

8740: l_message_text );
8741: END IF;
8742: END IF;
8743:
8744: x_return_status := FND_API.G_RET_STS_ERROR;
8745: EXCEPTION
8746: WHEN FND_API.g_exc_unexpected_error THEN
8747: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8748: p_proc_name => 'ADD_ERROR',

Line 8746: WHEN FND_API.g_exc_unexpected_error THEN

8742: END IF;
8743:
8744: x_return_status := FND_API.G_RET_STS_ERROR;
8745: EXCEPTION
8746: WHEN FND_API.g_exc_unexpected_error THEN
8747: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8748: p_proc_name => 'ADD_ERROR',
8749: p_progress => l_progress,
8750: p_add_to_msg_list => FALSE );

Line 8751: RAISE FND_API.g_exc_unexpected_error;

8747: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8748: p_proc_name => 'ADD_ERROR',
8749: p_progress => l_progress,
8750: p_add_to_msg_list => FALSE );
8751: RAISE FND_API.g_exc_unexpected_error;
8752: WHEN OTHERS THEN
8753: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8754: p_proc_name => 'ADD_ERROR',
8755: p_progress => l_progress );

Line 8756: RAISE FND_API.g_exc_unexpected_error;

8752: WHEN OTHERS THEN
8753: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8754: p_proc_name => 'ADD_ERROR',
8755: p_progress => l_progress );
8756: RAISE FND_API.g_exc_unexpected_error;
8757: END add_error;
8758:
8759: -------------------------------------------------------------------------------
8760: --Start of Comments

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

8775: -- Message list index to start from. If NULL, start from 1 - i.e. add all of
8776: -- the messages on the message list to p_api_errors.
8777: --OUT:
8778: --x_return_status
8779: -- This procedure always returns FND_API.G_RET_STS_ERROR.
8780: --End of Comments
8781: -------------------------------------------------------------------------------
8782: PROCEDURE add_message_list_errors
8783: ( p_api_errors IN OUT NOCOPY PO_API_ERRORS_REC_TYPE,

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

8793: p_api_errors => p_api_errors,
8794: x_return_status => x_return_status,
8795: p_message_name => NULL,
8796: p_message_text =>
8797: FND_MSG_PUB.get ( p_msg_index => i, p_encoded => FND_API.G_FALSE ),
8798: p_entity_type => p_entity_type,
8799: p_entity_id => p_entity_id
8800: );
8801: END LOOP;

Line 8808: x_return_status := FND_API.G_RET_STS_ERROR;

8804: FOR i IN REVERSE NVL(p_start_index,1)..FND_MSG_PUB.count_msg LOOP
8805: FND_MSG_PUB.delete_msg ( p_msg_index => i );
8806: END LOOP;
8807:
8808: x_return_status := FND_API.G_RET_STS_ERROR;
8809: EXCEPTION
8810: WHEN FND_API.g_exc_unexpected_error THEN
8811: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8812: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS',

Line 8810: WHEN FND_API.g_exc_unexpected_error THEN

8806: END LOOP;
8807:
8808: x_return_status := FND_API.G_RET_STS_ERROR;
8809: EXCEPTION
8810: WHEN FND_API.g_exc_unexpected_error THEN
8811: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8812: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS',
8813: p_add_to_msg_list => FALSE );
8814: RAISE FND_API.g_exc_unexpected_error;

Line 8814: RAISE FND_API.g_exc_unexpected_error;

8810: WHEN FND_API.g_exc_unexpected_error THEN
8811: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8812: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS',
8813: p_add_to_msg_list => FALSE );
8814: RAISE FND_API.g_exc_unexpected_error;
8815: WHEN OTHERS THEN
8816: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8817: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS' );
8818: RAISE FND_API.g_exc_unexpected_error;

Line 8818: RAISE FND_API.g_exc_unexpected_error;

8814: RAISE FND_API.g_exc_unexpected_error;
8815: WHEN OTHERS THEN
8816: PO_DEBUG.handle_unexp_error ( p_pkg_name => g_pkg_name,
8817: p_proc_name => 'ADD_MESSAGE_LIST_ERRORS' );
8818: RAISE FND_API.g_exc_unexpected_error;
8819: END add_message_list_errors;
8820:
8821: -----------------------------------------------------------------------------
8822: --Start of Comments

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

9046: --Parameters:
9047: --IN:
9048: --p_init_msg_list
9049: -- Standard API specification parameter
9050: -- Pass FND_API.G_FALSE if message list has already been initialized for
9051: -- transaction else pass FND_API.G_TRUE
9052: --p_calling_program
9053: -- Calling module.
9054: --p_entity

Line 9051: -- transaction else pass FND_API.G_TRUE

9047: --IN:
9048: --p_init_msg_list
9049: -- Standard API specification parameter
9050: -- Pass FND_API.G_FALSE if message list has already been initialized for
9051: -- transaction else pass FND_API.G_TRUE
9052: --p_calling_program
9053: -- Calling module.
9054: --p_entity
9055: -- the entity which is being deleted [HEADER/LINE/SHIPMENT/DISTRIBUTION]

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

9072: --OUT:
9073: --x_return_status
9074: -- Standard API specification parameter
9075: -- Can hold one of the following values:
9076: -- FND_API.G_RET_STS_SUCCESS (='S')
9077: -- FND_API.G_RET_STS_ERROR (='E')
9078: -- FND_API.G_RET_STS_UNEXP_ERROR (='U')
9079: --x_error_msg_tbl
9080: -- table of rrror messages if any.

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

9073: --x_return_status
9074: -- Standard API specification parameter
9075: -- Can hold one of the following values:
9076: -- FND_API.G_RET_STS_SUCCESS (='S')
9077: -- FND_API.G_RET_STS_ERROR (='E')
9078: -- FND_API.G_RET_STS_UNEXP_ERROR (='U')
9079: --x_error_msg_tbl
9080: -- table of rrror messages if any.
9081: --Notes:

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

9074: -- Standard API specification parameter
9075: -- Can hold one of the following values:
9076: -- FND_API.G_RET_STS_SUCCESS (='S')
9077: -- FND_API.G_RET_STS_ERROR (='E')
9078: -- FND_API.G_RET_STS_UNEXP_ERROR (='U')
9079: --x_error_msg_tbl
9080: -- table of rrror messages if any.
9081: --Notes:
9082: -- ONLY SUPORTS DELETION for PO/PA document types

Line 9119: IF FND_API.to_Boolean(p_init_msg_list)

9115: -- Standard start of API savepoint
9116: SAVEPOINT PO_PROCESS_DELETE_ACTION;
9117:
9118: --Initialize message list if necessary (p_init_msg_list is set to TRUE)
9119: IF FND_API.to_Boolean(p_init_msg_list)
9120: THEN
9121: FND_MSG_PUB.initialize;
9122: END IF;
9123:

Line 9125: x_return_status := FND_API.G_RET_STS_SUCCESS;

9121: FND_MSG_PUB.initialize;
9122: END IF;
9123:
9124: -- By default return status is SUCCESS if no exception occurs
9125: x_return_status := FND_API.G_RET_STS_SUCCESS;
9126:
9127: d_pos := 5;
9128: --Lock the document so that while we do validation no body else changes the
9129: --record

Line 9131: ,p_init_msg_list => FND_API.G_FALSE

9127: d_pos := 5;
9128: --Lock the document so that while we do validation no body else changes the
9129: --record
9130: PO_DOCUMENT_LOCK_GRP.lock_document( p_api_version => 1.0
9131: ,p_init_msg_list => FND_API.G_FALSE
9132: ,x_return_status => x_return_status
9133: ,p_document_type => p_doc_type
9134: ,p_document_id => p_doc_header_id);
9135:

Line 9137: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

9133: ,p_document_type => p_doc_type
9134: ,p_document_id => p_doc_header_id);
9135:
9136: d_pos := 8;
9137: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
9138: RAISE FND_API.g_exc_error;
9139: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
9140: RAISE FND_API.g_exc_unexpected_error;
9141: END IF;

Line 9138: RAISE FND_API.g_exc_error;

9134: ,p_document_id => p_doc_header_id);
9135:
9136: d_pos := 8;
9137: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
9138: RAISE FND_API.g_exc_error;
9139: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
9140: RAISE FND_API.g_exc_unexpected_error;
9141: END IF;
9142:

Line 9139: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

9135:
9136: d_pos := 8;
9137: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
9138: RAISE FND_API.g_exc_error;
9139: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
9140: RAISE FND_API.g_exc_unexpected_error;
9141: END IF;
9142:
9143: d_pos := 10;

Line 9140: RAISE FND_API.g_exc_unexpected_error;

9136: d_pos := 8;
9137: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
9138: RAISE FND_API.g_exc_error;
9139: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
9140: RAISE FND_API.g_exc_unexpected_error;
9141: END IF;
9142:
9143: d_pos := 10;
9144: --We only validate in case the call is not made form HTML

Line 9164: RAISE FND_API.g_exc_error;

9160: THEN
9161: FND_MESSAGE.set_name('PO','PO_CUSTOM_MSG');
9162: FND_MESSAGE.set_token('TRANSLATED_TOKEN', l_error_message);
9163: FND_MSG_PUB.add;
9164: RAISE FND_API.g_exc_error;
9165: END IF; --x_error_message is NULL
9166: END IF;
9167:
9168: IF p_entity = PO_CORE_S.g_doc_level_HEADER

Line 9220: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

9216: ,p_calling_program => p_calling_program
9217: ,x_return_status => x_return_status);
9218:
9219: d_pos := 80;
9220: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9221: RAISE FND_API.g_exc_unexpected_error;
9222: END IF;
9223: --
9224:

Line 9221: RAISE FND_API.g_exc_unexpected_error;

9217: ,x_return_status => x_return_status);
9218:
9219: d_pos := 80;
9220: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9221: RAISE FND_API.g_exc_unexpected_error;
9222: END IF;
9223: --
9224:
9225: IF (PO_LOG.d_proc) THEN

Line 9229: WHEN FND_API.g_exc_error THEN

9225: IF (PO_LOG.d_proc) THEN
9226: PO_LOG.proc_end(d_module);
9227: END IF;
9228: EXCEPTION
9229: WHEN FND_API.g_exc_error THEN
9230: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9231: x_return_status := FND_API.g_ret_sts_error;
9232: x_error_msg_tbl := PO_TBL_VARCHAR2000();
9233: --Copy the messages on the list to the out parameter

Line 9231: x_return_status := FND_API.g_ret_sts_error;

9227: END IF;
9228: EXCEPTION
9229: WHEN FND_API.g_exc_error THEN
9230: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9231: x_return_status := FND_API.g_ret_sts_error;
9232: x_error_msg_tbl := PO_TBL_VARCHAR2000();
9233: --Copy the messages on the list to the out parameter
9234: FOR I IN 1..FND_MSG_PUB.count_msg loop
9235: x_error_msg_tbl.extend;

Line 9241: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

9237: IF (PO_LOG.d_stmt) THEN
9238: PO_LOG.stmt(d_module,d_pos,'x_error_msg_tbl(' || I || ')', x_error_msg_tbl(I));
9239: END IF;
9240: END LOOP;
9241: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9242: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9243: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9244: IF PO_LOG.d_exc THEN
9245: PO_LOG.exc(d_module,d_pos,'Unexpected Error in' || d_module);

Line 9243: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

9239: END IF;
9240: END LOOP;
9241: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9242: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9243: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9244: IF PO_LOG.d_exc THEN
9245: PO_LOG.exc(d_module,d_pos,'Unexpected Error in' || d_module);
9246: END IF;
9247: WHEN OTHERS THEN

Line 9249: x_return_status := FND_API.g_ret_sts_unexp_error;

9245: PO_LOG.exc(d_module,d_pos,'Unexpected Error in' || d_module);
9246: END IF;
9247: WHEN OTHERS THEN
9248: ROLLBACK TO PO_PROCESS_DELETE_ACTION;
9249: x_return_status := FND_API.g_ret_sts_unexp_error;
9250: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name||':'||d_pos);
9251: IF PO_LOG.d_exc THEN
9252: PO_LOG.exc(d_module,d_pos,'Unhandled Exception in ' || SQLCODE||':'||SQLERRM);
9253: END IF;