6 Replies Latest reply: Jan 6, 2013 6:46 AM by Muhammad Faizan Kareem RSS

    Is there an API to updated DFFs on Supplier Sites?

    nalvareal
      I am looking for a Public API to update a DFF on various supplier sites. Any help is appreciated. Thanks!
        • 1. Re: Is there an API to updated DFFs on Supplier Sites?
          gareth.roberts
          DFFs logic is defined by you, so feel free to update them directly as you require ... of course make sure you follow the logic implemented by DFF setup!

          Regards,
          Gareth
          • 2. Re: Is there an API to updated DFFs on Supplier Sites?
            Sanjay Desai EBS
            Hi All,

            same issue i have also.

            How to update the existing vendor information thru interface/API ?

            regards
            Sanjay
            • 3. Re: Is there an API to updated DFFs on Supplier Sites?
              676522
              Please refer to this API AP_SUPPLIER_SITES_INT which might be helpful

              RGV
              • 4. Re: Is there an API to updated DFFs on Supplier Sites?
                689739
                Try "AP_VENDOR_SITES_PKG.Update_Row" API.
                • 5. Re: Is there an API to updated DFFs on Supplier Sites?
                  SumitSharma
                  I think there is absolutely no problem in updating the DFF values directly even on standard tables. They would never create the inconsistencies that are feared for normal columns. Just ensure that they follow the valuesets assigned to the various segments defined in the current system.

                  Regards
                  Sumit
                  • 6. Re: Is there an API to updated DFFs on Supplier Sites?
                    Muhammad Faizan Kareem
                    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_site_id ap_supplier_sites_all.vendor_site_id%type;
                    lv_vendor_rec AP_VENDOR_PUB_PKG.r_vendor_rec_type;
                    lv_vendor_site AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
                    l_user_id number;
                    l_resp_id number;
                    l_respid_id number;


                    Cursor cur_vendor is
                    select sup.vendor_id,
                    sit.vendor_site_id,
                    sit.vendor_site_code
                    from ap.ap_suppliers sup,
                    ap.ap_supplier_sites_all sit
                    where sup.vendor_id = sit.vendor_id
                    and sup.vendor_id = 15;

                    BEGIN

                    SELECT fnd_profile.value ('USER_ID') INTO l_user_id FROM dual;
                    SELECT fnd_profile.value ('RESP_ID') INTO l_resp_id FROM dual;
                    SELECT fnd_profile.value ('RESP_APPL_ID') INTO l_respid_id FROM dual;
                    fnd_global.apps_initialize(l_user_id,l_resp_id, l_respid_id );

                    For c_vendor in cur_vendor Loop

                    lv_vendor_id:= c_vendor.vendor_id;--156001;--&VENDOR_ID;
                    lv_vendor_rec.MATCH_OPTION:= 'P'; --FND_API.G_MISS_DATE; 
                    lv_vendor_site.vendor_id := c_vendor.vendor_id;--156001;
                    lv_vendor_site.MATCH_OPTION := 'P';
                    lv_vendor_site.VENDOR_SITE_CODE := c_vendor.vendor_site_code;--'ABU DHABI';
                    lv_vendor_site_id :=c_vendor.vendor_site_id;-- 3341;

                    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

                    );

                    --update vendor site
                    ap_vendor_sites_pkg.update_row(p_vendor_site_rec => lv_vendor_site,
                    p_last_update_date => sysdate,
                    p_last_updated_by => -1,
                    p_last_update_login => -1,
                    p_request_id =>null,
                    p_program_application_id =>200,
                    p_program_id =>null,
                    p_program_update_date =>null,
                    p_vendor_site_id =>lv_vendor_site_id);

                    End Loop;

                    commit;
                    dbms_output.put_line(lv_return_status||'-'||lv_msg_count||'-'||lv_msg_data);
                    Exception when others then
                    dbms_output.put_line('Error:'||sqlerrm);

                    END;