1 Reply Latest reply on Sep 4, 2009 2:30 PM by Srini Chavali-Oracle

    po_actions.close_po  not working

    623951
      Hi,
      We created a procedure. And even regsiered it as concurrent request.
      But the PO is not getting closed.PO is in approved status only.
      The following is the piece of code which we are using.Can anybody let me know.
      We even tried changing the p_auto_close to N and then to Y ,but still it failed.


      create or replace PROCEDURE XX_PO_CLOSE(errbuf OUT VARCHAR2
      ,retcode OUT VARCHAR2 ) IS
      v_isclose BOOLEAN;
      v_return_code VARCHAR2 (240);
      BEGIN
      fnd_global.apps_initialize(3992,50283,201);
      v_isclose :=
      po_actions.close_po
      (48594, -----p_docid
      'PO', -----p_doctyp
      'STANDARD', --p_docsubtyp
      0, ----p_lineid
      0, -----p_shipid
      'CLOSE', ----p_action
      ' TEST ', --p_reason
      'PO', -----p_calling_mode
      'Y', ---p_conc_flag
      v_return_code, -- p_return_code
      'Y', ----p_auto_close
      SYSDATE, --p_action_date
      NULL ---p_origin_doc_id
      );
      IF v_isclose
      THEN
      DBMS_OUTPUT.put_line ('CLOSED'||v_return_code);
      ELSE
      DBMS_OUTPUT.put_line ('NOT CLOSED'||v_return_code);
      END IF;
      END;
      /

      Kindly help me out.

      Regards,
      Bala.