8 Replies Latest reply on Oct 17, 2011 4:18 PM by user5803804

    Inactivate supplier in R12

    394099
      Hi,

      I need to inactivate supplier record in R12 instance. What is the best possible soution to inactive supplier in R12 instance? Can I update end_date_active date in AP_SUPPLIER table? Anybody has came across similar requirment?

      Thanks,
      Anand
        • 1. Re: Inactivate supplier in R12
          Stick
          are you doing one or many?
          Why wouldn't it just be done in the form itself?
          • 2. Re: Inactivate supplier in R12
            Hussein Sawwan-Oracle
            Hi,

            Please note that updating Oracle EBS tables from the backend is not supported unless you are instructed to do so by Oracle support.

            Regards,
            Hussein
            • 3. Re: Inactivate supplier in R12
              394099
              I have bulk vendors to be updated more than 1000's. Please Let me know best possible solution.

              Thanks,
              Anand
              • 4. Re: Inactivate supplier in R12
                Hussein Sawwan-Oracle
                Hi,

                According to (Note: 415065.1 - Requirement To Update Vendor Sites Via An API) there is no API available to update the inactive dates of vendors/sites. You could browse [Oracle Integration Repository|http://irep.oracle.com/] website and see if it helps (In R12, Oracle Integration Repository is shipped as part of the E-Business Suite as a responsibility) and see if such an API exists or not.

                Regards,
                Hussein
                • 5. Re: Inactivate supplier in R12
                  394099
                  Hi ,

                  Thanks for your reply.

                  I dont see any APIs available to inactive vendors. Can i use ap_vendor_pub_pkg.update_vendor pkg to update end_date_active and make vendor status as INACTIVE?

                  Thanks,
                  Anand
                  • 6. Re: Inactivate supplier in R12
                    Hussein Sawwan-Oracle
                    Hi,

                    Please see (Note: 601851.1 - R12 Supplier: Other FAQs) -- 3. Can AP_VENDOR_PUB_PKG be used as an API?

                    Please see the docs/links referenced in the same document, if none of it helps then I would suggest you log a SR.

                    Regards,
                    Hussein
                    • 7. Re: Inactivate supplier in R12
                      361710
                      Hi,

                      Using API AP_VENDOR_PUB_PKG.Update_Vendor to set the end_date_active will update the "Inactive Date".
                      Here is a sample script:
                      DECLARE
                        --
                        lv_return_status  varchar2(1);
                        lv_msg_count      number;
                        lv_msg_data       varchar2(2000);
                        --
                        lv_vendor_id      ap_suppliers.vendor_id%type;
                        lv_vendor_rec     AP_VENDOR_PUB_PKG.r_vendor_rec_type;
                        --
                      BEGIN
                        --
                        fnd_global.apps_initialize(&USER_ID,&RESP_ID,&RESP_APPL_ID);
                        mo_global.init('S');
                        --
                        lv_vendor_id:= &VENDOR_ID;
                        lv_vendor_rec.END_DATE_ACTIVE:= SYSDATE; --FND_API.G_MISS_DATE;
                        --
                        AP_VENDOR_PUB_PKG.Update_Vendor
                          ( p_api_version      => 1.0
                          , p_init_msg_list    => fnd_api.g_true
                          , p_commit           => fnd_api.g_false
                          , p_validation_level => fnd_api.g_valid_level_full
                          , x_return_status    => lv_return_status
                          , x_msg_count        => lv_msg_count
                          , x_msg_data         => lv_msg_data
                          , p_vendor_rec       => lv_vendor_rec
                          , p_vendor_id        => lv_vendor_id
                          );
                        --
                        dbms_output.put_line(lv_return_status||'-'||lv_msg_count||'-'||lv_msg_data);
                        --
                      END;
                      • 8. Re: Inactivate supplier in R12
                        user5803804
                        This was helpful for me. But same API fails when you try to change vendor_type, employee_id. Anybody else tried to update update these columns using API?

                        Thanks.