Thursday, July 05, 2012

APP-PO-14144: PO_ACTIONS-065: Subroutine CLOSE_AUTO() returned error

This error is returned by Oracle Concurrent program "Invoice Validation" when "Invoice Validation" is run in multiple threads and invoices of same Purchase Order are processed by two or more instances of "Invoice Validation" at the exactly same time.
Owing to this error invoice validation of that particular invoice fails.

Step to resolve this issue->

Run "Invoice Validation" with same parameters as original instance of "Invoice Validation". it will select invoice(s) that failed validation and validate it.

For further information on this issue, you may refer to metalink note Invoice Validation Fails on APP-PO-14144: PO_ACTIONS-065: Subroutine CLOSE_AUTO() returned error [ID 1376008.1]I think this is another instance when invoice validation might fail. I have not encountered this error.

1 comment:

  1. Invoice validation calls a procedure PO_DOCUMENT_ACTION_PVT.do_action
    Following code of this procedure tries to get lock on PO tables and it tries 1000 times. Since PO_LOCKS.lock_headers executes very fast, all 1000 tries happen in few seconds and lock is still not available. In my development instance, I put a line “dbms_lock.sleep(1); “ in exception handling and it resolves the issue for us.

    If development has written code that tries to get lock 1000 times. Then code should wait for some time between successive attempts or provide an option to customer to control the wait between two attempts to get lock on po tables.


    FOR i IN 1..1000
    LOOP

    BEGIN

    d_progress := 16;

    /*Bug8512125 We pass the calling mode from here which will execute a different set of cursors if the mode is RCV*/

    PO_LOCKS.lock_headers(
    p_doc_type => p_action_ctl_rec.document_type
    , p_doc_level => PO_CORE_S.g_doc_level_HEADER
    , p_doc_level_id_tbl => l_doc_id_tbl
    , p_calling_mode => p_action_ctl_rec.calling_mode
    );

    l_locked_doc := TRUE;

    EXIT;

    EXCEPTION
    WHEN resource_busy_exc THEN
    NULL;
    END;

    END LOOP; -- for i in 1..1000

    ReplyDelete