0 Replies Latest reply on Apr 9, 2015 7:03 AM by 986553

    API po_actions.close_po not working fine

    986553


      Hi All,

       

      We are on RDBMS 11.1.0.7.0 and Oracle Applications 11.5.10.2

      I am using po_actions.close_po in my code to close a PO distribution line.

      The code used is as below . This code is part of the the other logic written in my package

       

      APPS.FND_CLIENT_INFO.SET_ORG_CONTEXT(115);
      apps.fnd_client_info.setup_client_info(application_id    => 201,
                                                    responsibility_id => 20707,
                                                    user_id           => 97720,
                                                    security_group_id => 0);

      v_retnum := po_actions.close_po(p_docid     => cur_close_po_rec.header_id,
                                              p_doctyp    => 'PO',
                                              p_docsubtyp => 'STANDARD',
                                              p_lineid    => 0,
                                              p_shipid    => cur_close_po_rec.line_location_id,
                                              p_action    => 'CLOSE',
                                              p_reason    => 'INVOICING COMPLETED BY FSC DATED ' ||
                                                             to_char(SYSDATE,
                                                                     'DD-MON-YYYY'),
                                              --p_calling_mode => 'PO',
                                              p_calling_mode => 'AP',

                                              p_conc_flag    => 'Y',
                                              p_return_code  => v_retcode,
                                              p_auto_close   => 'Y',
                                              p_action_date  => SYSDATE);
                                      COMMIT;

       

      But this is not closing the PO Distribution Line.

      Whereas if I run this code explicitly in an anonymous block it works well.

      Please suggest where I may be going wrong.

       

      Regards,

      Shruti