2 Replies Latest reply on Nov 4, 2015 10:55 AM by PamNL

    hi

    1058829

      below is the code which i used to submit the import standard purchase .

      i am getting an error saying :


       

      ORA-6512 "APPS.PO_PDOI_GRP"

       

       

      PROCEDURE main_pr(

          errbuff OUT VARCHAR2,

         retcode OUT VARCHAR2)

      IS

            ln_requested_by        number;

            ln_responsibility_id   number;

           ln_application_id       number;

            ln_req_id              number;

            ln_wait_interval       number := 10;

            ln_max_wait            number := 1000;

            lc_phase               varchar2 (100);

            lc_status              varchar2 (10);

            lc_dev_phase           varchar2 (15);

            lc_dev_status          varchar2 (15);

            lc_req_msg             varchar2 (240);

            lb_get_req_status      boolean;

            lc_po_num              varchar2 (20);

            ln_request_id          number;

            l_org_id               number;

      BEGIN

        do_validate;

        do_process;

       

        fnd_global.APPS_INITIALIZE(1013415,

                                 50578,

                                 201,0);

                                

        SELECT   FND_PROFILE.VALUE ('ORG_ID') INTO l_org_id FROM DUAL;

       

       

           ln_req_id :=

              fnd_request.submit_request ('PO',

                                          'POXPOPDOI',

                                          'Import Standard Purchase Orders',

                                          SYSDATE,

                                           FALSE,

                                          25,

                                            'Yes',

                                           'APPROVED',

                                           100,

                                           'No',

                                           5000,

                                            'No'

                                           );

      dbms_output.put_line('REQUEST ID:' || ln_req_id);

            fnd_file.put_line (fnd_file.LOG, 'REQUEST ID:' || ln_req_id);

       

            COMMIT;

       

       

       

       

            IF (ln_req_id > 0)

            THEN

              fnd_file.put_line (

                  fnd_file.LOG,

                  'Import Standard Purchase Program Successfully Submited'

               );

               lb_get_req_status :=

                  fnd_concurrent.wait_for_request (ln_req_id,

                                                   ln_wait_interval,

                                                   ln_max_wait,

                                                   lc_phase,

                                                   lc_status,

                                                   lc_dev_phase,

                                                   lc_dev_status,

                                                   lc_req_msg);

       

       

               IF UPPER (lc_dev_phase) = 'COMPLETE'

                  AND UPPER (lc_dev_status) = 'NORMAL'

               THEN

                  fnd_file.put_line (

                     fnd_file.LOG,

                     ' Import Standard Purchase Program Successfully Submited-COMPLETED'

                  );

               END IF;

            END IF;

         EXCEPTION

            WHEN OTHERS

            THEN

              fnd_file.put_line (

                  fnd_file.LOG,

                  'Error in Calling Standard Program --> ' || SQLERRM

               );

      END main_pr;