3346: END IF;
3347: --write the error message in the online report
3348: FND_MESSAGE.set_name('PO', 'PO_AP_TAX_ENGINE_FAILED_WARN');
3349: l_exc_message_text := FND_MESSAGE.get;
3350: PO_ENCUMBRANCE_POSTPROCESSING.create_exception_report(
3351: p_message_text => l_exc_message_text,
3352: p_user_id => l_user_id,
3353: x_online_report_id => x_online_report_id
3354: );
3601: ELSE
3602:
3603: l_progress := '070';
3604:
3605: PO_ENCUMBRANCE_POSTPROCESSING.insert_packet(
3606: p_status_code => l_gl_packet_status
3607: , p_user_id => l_user_id
3608: , p_set_of_books_id => l_set_of_books_id
3609: , p_currency_code => l_currency_code_func
3620:
3621: SAVEPOINT EXECUTE_GL_CALL_SP; /* Bug 3218669 */
3622:
3623: BEGIN
3624: PO_ENCUMBRANCE_POSTPROCESSING.execute_gl_call(
3625: p_set_of_books_id => l_set_of_books_id
3626: , p_packet_id => l_packet_id
3627: , p_gl_mode => l_gl_call_mode
3628: , p_partial_resv_flag => l_partial_flag
3654: -- copy_detailed_gl_results also fills in messages for the
3655: -- prevent_encumbrance rows, so call this whether or not
3656: -- a packet was created.
3657:
3658: PO_ENCUMBRANCE_POSTPROCESSING.copy_detailed_gl_results(
3659: p_packet_id => l_packet_id
3660: , p_gl_return_code => l_gl_return_code
3661: );
3662:
3676:
3677: --bug 3537764: for Req Split, p_action is REQ_SPLIT,
3678: --but l_action is ADJUST. use p_action for the parameter
3679: --here since update is different for Req Split vs.Adjust
3680: PO_ENCUMBRANCE_POSTPROCESSING.update_document_encumbrance(
3681: p_doc_type => p_doc_type
3682: , p_doc_subtype => p_doc_subtype
3683: , p_action => p_action
3684: , p_gl_return_code => l_gl_return_code
3742:
3743: IF l_gl_return_code IN ('S', 'A', 'P') THEN
3744: --Added this IF Condition to Avoid Inserting Action History Record, for Funds Check Failed cases. -- Bug 4661095
3745:
3746: PO_ENCUMBRANCE_POSTPROCESSING.create_enc_action_history(
3747: p_doc_type => p_doc_type
3748: , p_doc_id_tbl => l_doc_id_tbl
3749: , p_employee_id => p_employee_id
3750: , p_action => p_action
3761: ) THEN
3762:
3763: l_progress := '870';
3764:
3765: PO_ENCUMBRANCE_POSTPROCESSING.set_status_requires_reapproval(
3766: p_document_type => p_doc_type
3767: , p_action => p_action
3768: , p_cbc_flag => l_cbc_flag
3769: );
3781: END IF; -- if l_period_exception_flag is 'Y'
3782:
3783: l_progress := '900';
3784:
3785: PO_ENCUMBRANCE_POSTPROCESSING.create_detailed_report(
3786: p_gl_return_code => l_gl_return_code
3787: , p_user_id => l_user_id
3788: , x_online_report_id => x_online_report_id
3789: , x_po_return_code => x_po_return_code
3791: );
3792:
3793: l_progress := '910';
3794: --
3795: PO_ENCUMBRANCE_POSTPROCESSING.populate_bc_report_id(x_online_report_id);
3796: --
3797: IF x_po_return_code IN (g_return_SUCCESS, g_return_WARNING) THEN
3798: x_return_status := FND_API.g_ret_sts_success;
3799: ELSIF x_po_return_code IN (g_return_PARTIAL, g_return_FAILURE) THEN
3892: END IF;
3893:
3894: -- 2. Create the online report.
3895:
3896: PO_ENCUMBRANCE_POSTPROCESSING.create_exception_report(
3897: p_message_text => l_exc_message_text
3898: , p_user_id => l_user_id
3899: , x_online_report_id => x_online_report_id
3900: );
3916: ROLLBACK TO EXECUTE_GL_CALL_SP;
3917: --bug#5523323. The rollback in the previous transaction is sufficient
3918: --to remove all unnecessar records / events in case of an unexpected
3919: --failure. The following statement is unnecessary now.
3920: -- PO_ENCUMBRANCE_POSTPROCESSING.delete_packet_autonomous(
3921: -- p_packet_id => l_packet_id);
3922: END IF;
3923:
3924: END do_action;