7 Replies Latest reply on Jan 3, 2015 6:21 AM by Sanjay Desai EBS

    Unable to close po  using PO_ACTIONS.CLOSE_PO api.

    1064616

      Unable to close po  using PO_ACTIONS.CLOSE_PO api.

       

      DECLARE

        lv_result      BOOLEAN;

        lv_return_code VARCHAR2(100);

      -- lv_header_id   NUMBER := p_header_id;

      BEGIN

         FND_global.apps_initialize (user_id => 74131 ,resp_id => 54926 ,resp_appl_id =>201 );

            lv_result := PO_ACTIONS.CLOSE_PO(P_DOCID         => 528555 ,

                                             P_DOCTYP        => 'PO',

                                             P_DOCSUBTYP     => 'STANDARD',

                                             P_LINEID        => NULL,

                                             P_SHIPID        => NULL,

                                             P_ACTION        => 'CLOSE',

                                             P_REASON        => 'Intercompany PO Closing',

                                             P_CALLING_MODE  => 'PO',

                                             P_CONC_FLAG     => 'N',

                                             P_RETURN_CODE   => lv_return_code,

                                             P_AUTO_CLOSE    => 'Y',

                                             P_ACTION_DATE   => SYSDATE,

                                             P_ORIGIN_DOC_ID => NULL);

                commit;

            IF lv_result = TRUE THEN

              DBMS_OUTPUT.PUT_LINE('Successfully closed PO#');

            ELSE

              DBMS_OUTPUT.PUT_LINE('Cannot close PO#');

            END IF;

          END;

       

      Please suggest on this.