AP_VENDOR_PUB_PKG.Update_Vendor_Site

I want to use this API to update account_pay_code_combination_id and prepay_code_combination_id.But I don't know how to use this parameter:p_vendor_site_rec.
Please show me how.Thank you

Hello,
To update vendor site information using API, you need to have the following:
In Declare section:
site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
In Body
--assign values for the fields you want to update
site_rec.accts_pay_code_combination_id :=<your ccid>;
site_rec.prepay_code_combination_id := <your ccid>;
Then call the update function
ap_vendor_pub_pkg.update_vendor_site(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 => L_returnStatus
,x_msg_count => L_msgCount
,x_msg_data => L_msgData
,p_vendor_site_rec => site_rec
,p_vendor_site_id => l_siteId);
Hope this answers your question
Vikram

Similar Messages

  • Ap_vendor_pub_pkg.update_vendor_site API is not updating a field

    Hello
    I want to update the Calculate Tax field on the supplier site level.
    I am using the ap_vendor_pub_pkg.update_vendor_site API to update the ap_supplier_sites_all.auto_tax_calc_flag field. But the API does not update the field. I want to change the value of the auto_tax_calc_flag from 'L' or 'N' to 'Y'
    I am running the API as a concurrent request. Thus the org_id should be set when you use the relevant responsibility
    Below is my code. Am I missing a parameter? The API does complete successfully. The ap_supplier_sites_all table does show as updated when you look at the last_update_date field. But the auto_tax_calc_flag value does not change
    Any ideas why the api is not updating
    create or replace procedure apps3_mtnaol.mtn_update_supp_sites(errbuf in out varchar2, retcode in out number) is
    v_error_message varchar2(3000);
    l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
    l_return_status varchar2(1000);
    l_msg_count number;
    l_msg_data varchar2(2000);
    l_msg_dummy varchar2(3000);
    l_output varchar2(3000);
    l_vendor_name varchar2(3000);
    l_vendor_number varchar2(3000);
    l_vendor_site_code varchar2(3000);
    v_vendor_site_code varchar2(3000);
    v_vendor_site_id number;
    v_party_site_id number;
    l_remmitance_email varchar2(2000);
    v_party_id number;
    v_party_site_name varchar2(3000);
    v_ext_payee_rec iby_disbursement_setup_pub.external_payee_rec_type;
    cursor c_1
    is
    select segment1
    ,vendor_name
    ,vendor_id
    --,vendor_site_id --vendor_site_id from org_id 22970
    ,vendor_site_code
    ,vendor_type_lookup_code
    ,org_id
    ,party_id
    ,party_site_id
    from mtn_supplier_site_22970
    where 1 = 1
    and segment1 = '661699';
    begin
    for rec in c_1 loop
    select assa.vendor_site_id -- get vendor_site_id from org_id 5001
    ,assa.party_site_id
    into v_vendor_site_id
    ,v_party_site_id
    from ap_supplier_sites_all assa
    where 1=1
    and org_id = 5001
    and assa.vendor_id = rec.vendor_id
    and vendor_site_code = rec.vendor_site_code;
    select party_id
    ,party_site_name
    into v_party_id
    ,v_party_site_name
    from hz_party_sites
    where 1=1
    and party_site_id = v_party_site_id;
    fnd_msg_pub.delete_msg(null);
    fnd_msg_pub.initialize();
    l_return_status := '';
    l_msg_count := '';
    l_msg_data := '';
    l_vendor_site_rec.vendor_site_code := rec.vendor_site_code;
    l_vendor_site_rec.auto_tax_calc_flag := 'Y'; --calculate_tax field that needs to be set to Yes
    l_vendor_site_rec.org_id := 5001;
    l_vendor_site_rec.vendor_id := rec.vendor_id;
    l_vendor_site_rec.party_site_id := v_party_site_id;
    l_vendor_site_rec.party_site_name := v_party_site_name;
    v_ext_payee_rec.payee_party_id := v_party_id;
    v_ext_payee_rec.supplier_site_id := v_vendor_site_id;
    v_ext_payee_rec.payee_party_site_id := v_party_site_id;
    v_ext_payee_rec.payer_org_id := 5001;
    ap_vendor_pub_pkg.update_vendor_site(p_api_version => 1.0,
    p_init_msg_list => fnd_api.g_true,
    p_commit => fnd_api.g_true,
    p_validation_level => fnd_api.g_valid_level_full,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data,
    p_vendor_site_rec => l_vendor_site_rec,
    p_vendor_site_id => v_vendor_site_id
    l_output := '';
    if l_return_status <> 'S' then
    for i in 1..l_msg_count loop
    fnd_msg_pub.get(i, fnd_api.g_false, l_msg_data, l_msg_dummy);
    l_output := l_output || (to_char(i) ||': '|| substr(l_msg_data,1,250));
    fnd_file.put_line(fnd_file.output, 'Unsuccessful Update:'||l_return_status||': '||l_msg_count||', '||l_output);
    fnd_file.put_line(fnd_file.output, 'Vendor Number: ' ||l_vendor_number);
    fnd_file.put_line(fnd_file.output, 'Vendor Name: ' ||l_vendor_name);
    fnd_file.put_line(fnd_file.output, 'Vendor Site Code: ' ||l_vendor_site_code);
    fnd_file.put_line(fnd_file.output, 'Calculate Tax: ' ||l_vendor_site_rec.auto_tax_calc_flag);
    end loop;
    else
    fnd_file.put_line(fnd_file.output, 'Successful Update:' ||l_return_status||': '||l_msg_count||', '||l_output);
    fnd_file.put_line(fnd_file.output, 'Vendor Number: ' ||l_vendor_number);
    fnd_file.put_line(fnd_file.output, 'Vendor Name: ' ||l_vendor_name);
    fnd_file.put_line(fnd_file.output, 'Vendor Site Code: ' ||l_vendor_site_code);
    fnd_file.put_line(fnd_file.output, 'Calculate Tax: ' ||l_vendor_site_rec.auto_tax_calc_flag);
    end if;
    commit;
    end loop;
    exception when others then v_error_message:= 'Other error: ' || SQLERRM;
    fnd_file.put_line(fnd_file.output, 'Error Message: '||v_error_message);
    fnd_file.put_line(fnd_file.log,'***************************************************************************');
    fnd_file.put_line(fnd_file.log, 'Other error: ' || SQLERRM);
    fnd_file.put_line(fnd_file.log,'***************************************************************************');
    end;
    /

    Yes the API works outside my code.
    I have used this exact same API to successfully update other fields on the ap_supplier_sites_all table like hold_unmatched_invoices_flag, match_option, pay_group_lookup_code, pay_date_basis_lookup_code, and always_take_disc_flag fields

  • AP_VENDOR_PUB_PKG.Update_Vendor_Site updating inactive date doesn't work

    Hi all-
    So I used this API
    AP_VENDOR_PUB_PKG.Update_Vendor_Site
    to update the inactive date. It worked fine...but when I attempt to reactivate the date (by passing null inactive date) it keeps the same old date.
    How can I reactivate a site??

    Hi!
    The solution is to set the inactive_date to FND_API.G_MISS_DATE
    It works fine for me... here is sample test script:
    DECLARE
    lv_return_status varchar2(1);
    lv_msg_count number;
    lv_msg_data varchar2(2000);
    lv_vendor_site_id ap_supplier_sites.vendor_site_id%type;
    lv_vendor_site_rec AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
    BEGIN
    fnd_global.apps_initialize(&USER_ID,&RESP_ID,&RESP_APPL_ID);
    mo_global.init('S');
    lv_vendor_site_id:= &VENDOR_SITE_ID;
    lv_vendor_site_rec.inactive_date:= FND_API.G_MISS_DATE;
    AP_VENDOR_PUB_PKG.Update_Vendor_Site
    ( 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_site_rec => lv_vendor_site_rec
    , p_vendor_site_id => lv_vendor_site_id
    dbms_output.put_line(lv_return_status||'-'||lv_msg_count||'-'||lv_msg_data);
    END;

  • R12 API for Payment Method Update at supplier site

    Hi
    I am using api AP_VENDOR_PUB_PKG.Update_Vendor_Site to update the Payment Method at Supplier Site level. The below code executes with no error but dont update the payment method. The requirement is to update the payment method to SEPA
    Code :
    DECLARE
    v_error_reason VARCHAR2 (2000) := NULL;
    v_msg_data VARCHAR2 (1000) := NULL;
    v_msg_count NUMBER := NULL;
    v_return_status VARCHAR2 (100) := NULL;
    v_vensite_rec_type      AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
    ext_payee_rec           IBY_DISBURSEMENT_SETUP_PUB.EXTERNAL_PAYEE_REC_TYPE;
    BEGIN
    DBMS_OUTPUT.put_line ('BEFORE apps initialization');
    --Fnd_Global.apps_initialize(-1,20639,200);
    fnd_global.apps_initialize(730908,141200,401);
    --DBMS_OUTPUT.put_line ('AFTER apps initialization');
    v_error_reason := NULL;
    v_return_status := NULL;
    v_msg_count := NULL;
    v_msg_data := NULL;
    --ext_payee_rec.default_pmt_method := 'SEPA';
    v_vensite_rec_type.org_id := 2796;
    v_vensite_rec_type.vendor_site_code := '0653-01NEUSS';
    v_vensite_rec_type.ext_payee_rec.default_pmt_method := 'SEPA';
    --v_vensite_rec_type.ext_payee_rec.default_pmt_method:= 'CHECK';
    DBMS_OUTPUT.put_line ('BEFORE remittance API');
    AP_VENDOR_PUB_PKG.Update_Vendor_Site
    ( p_api_version => 1.0,
    p_init_msg_list => FND_API.G_FALSE,
    p_commit => FND_API.G_FALSE,
    p_validation_level => FND_API.G_VALID_LEVEL_FULL,
    x_return_status =>v_return_status ,
    x_msg_count => v_msg_count,
    x_msg_data => v_msg_data,
    p_vendor_site_rec =>v_vensite_rec_type,
    p_vendor_site_id => '393130'
    commit;
    DBMS_OUTPUT.put_line ('AFTER pymt mtd API');
    DBMS_OUTPUT.put_line (v_return_status);
    DBMS_OUTPUT.put_line (v_msg_count);
    DBMS_OUTPUT.put_line (v_msg_data);
    IF v_return_status = fnd_api.g_ret_sts_success THEN
         IF v_msg_count >= 1 THEN
    FOR i IN 1 .. v_msg_count
    LOOP
    IF v_error_reason IS NULL THEN
    v_error_reason := SUBSTR (fnd_msg_pub.get (p_encoded => fnd_api.g_false), 1, 255);
    ELSE
    v_error_reason := v_error_reason|| ' ,'|| SUBSTR (fnd_msg_pub.get (p_encoded => fnd_api.g_false), 1, 255);
    END IF;
    DBMS_OUTPUT.put_line ('VENDOR_remittance email UPDATE API ERROR-' || v_error_reason);
    END LOOP;
    END IF;
    ROLLBACK;
    ELSE
    DBMS_OUTPUT.put_line ('The updateion is sucessful');
    COMMIT;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.put_line (SQLERRM || '-' || SQLCODE);
    END;
    the fnd_api.g_ret_sts_success returns value as 'U' . Means it did not completed successfully
    Do I need to user following API ?
    IBY_DISBURSEMENT_SETUP_PUB.Update_External_Payee instead of above API?
    Thanks for help
    Best Regards
    Nikhilesh
    Edited by: user10238025 on Apr 26, 2013 5:38 AM

    Hi Irfan,
    thanks for reply.
    we are on application version 12.1.1 .
    But i have one doubt here, if we update directly ap_supplier_sites_all table, it won't impact on TCA tables know?
    Thanks.
    Edited by: user627525 on Jul 27, 2010 12:16 AM

  • Unable to update the VAT_CODE column through supplier sites API

    Hi,
    I'm unable to update the vat code column of the ap_supplier_sites_all table using the ap_vendor_pub_pkg.update_vendor_site API.Oracle application instance 12.1.3 and OS linux.Please find the code below.I'm able to update other feilds,but not the vat_code.Please help on this.
    Thanks,
    Abhilash
    CREATE OR REPLACE PACKAGE BODY APPS.xx_wo172304_test
    AS
    PROCEDURE xx_vat_wo172304 (
    errbuf OUT VARCHAR2
    , retcode OUT VARCHAR2
    IS
    CURSOR cur_vat
    IS
    SELECT site.*
    FROM apps.ap_suppliers supp, apps.ap_supplier_sites_all site
    WHERE site.vat_code IN
    ('CZ OEUS 20', 'CZ OEUZ 20', 'CZ OJCD 20', 'CZ OT20', 'CZ-20-EDC', 'OEUS20', 'OEUZ20', 'OPP20E'
    , 'OS20', 'OT20')
    AND supp.vendor_id = site.vendor_id
    AND site.org_id IN (608, 1508, 2396, 2397)
    AND site.vendor_site_id =68154;
    l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
    l_vat_code ap_supplier_sites_all.VAT_CODE%TYPE;
    l_vendor_site_id ap_supplier_sites_all.vendor_site_id%TYPE;
    x_return_status VARCHAR2 (100) := NULL;
    x_msg_data VARCHAR2 (1000) := NULL;
    x_msg_count NUMBER := NULL;
    l_error_reason VARCHAR2 (2000) := NULL;
    l_user_id           number := FND_GLOBAL.USER_ID;
    l_last_update_login           number := FND_GLOBAL.LOGIN_ID;
    l_program_application_id           number := FND_GLOBAL.prog_appl_id;
    l_program_id           number := FND_GLOBAL.conc_program_id;
    l_request_id           number := FND_GLOBAL.conc_request_id;
    BEGIN
    -- mo_global.init ('SQLAP');
    FOR rec_vat IN cur_vat LOOP
    IF rec_vat.org_id = 608 THEN
    IF rec_vat.vat_code = 'OEUS20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUS21';
    ELSIF rec_vat.vat_code = 'OEUZ20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUZ21';
    ELSIF rec_vat.vat_code = 'OPP20E' THEN
    l_vendor_site_rec.vat_code := 'CZ OPP21E';
    ELSIF rec_vat.vat_code = 'OS20' THEN
    l_vendor_site_rec.vat_code := 'CZ OS21';
    ELSIF rec_vat.vat_code = 'OT20' THEN
    l_vendor_site_rec.vat_code := 'CZ OS21';
    END IF;
    ELSIF rec_vat.org_id = 1508 THEN
    IF rec_vat.vat_code = 'CZ OJCD 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OJCD21';
    ELSIF rec_vat.vat_code = 'CZ OEUS 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUS21';
    ELSIF rec_vat.vat_code = 'CZ OEUZ 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUZ21';
    ELSIF rec_vat.vat_code = 'CZ OT20' THEN
    l_vendor_site_rec.vat_code := 'CZ OT21';
    END IF;
    ELSIF rec_vat.org_id = 2396 THEN
    IF rec_vat.vat_code = 'CZ OEUZ 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUZ 21';
    ELSIF rec_vat.vat_code = 'CZ OJCD 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OJCD 21';
    ELSIF rec_vat.vat_code = 'CZ OT20' THEN
    l_vendor_site_rec.vat_code := 'CZ OT21';
    ELSIF rec_vat.vat_code = 'CZ-20-EDC' THEN
    l_vendor_site_rec.vat_code := 'CZ-21-EDC';
    END IF;
    ELSIF rec_vat.org_id = 2397 THEN
    IF rec_vat.vat_code = 'CZ OEUS 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUS 21';
    ELSIF rec_vat.vat_code = 'CZ OEUZ 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUZ 21';
    ELSIF rec_vat.vat_code = 'CZ OJCD 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OJCD 21';
    ELSIF rec_vat.vat_code = 'CZ OT20' THEN
    l_vendor_site_rec.vat_code := 'CZ OT21';
    ELSIF rec_vat.vat_code = 'CZ-20-EDC' THEN
    l_vendor_site_rec.vat_code := 'CZ-21-EDC';
    END IF;
    END IF;
    l_vendor_site_id := rec_vat.vendor_site_id;
    l_vendor_site_rec.org_id := rec_vat.org_id;
    l_vendor_site_rec.vendor_id := rec_vat.vendor_id;
    --l_vendor_site_rec.vendor_site_code:='318581-MOR. KRU';
    l_vendor_site_rec.rfq_only_site_flag := 'Y';
    -- l_vendor_site_rec.last_update_date := SYSDATE;
    l_vendor_site_rec.last_updated_by := 1134;   MARTIN.ROUNDS
    -- DBMS_OUTPUT.put_line ('VAT CODE:' || l_vendor_site_rec.vat_code);
    --DBMS_OUTPUT.put_line ('Vendor Site Id:' || l_vendor_site_id);
    fnd_file.put_line (fnd_file.LOG
    , 'VAT CODE:' || l_vendor_site_rec.vat_code
    fnd_file.put_line (fnd_file.LOG
    , 'Vendor ID:' || rec_vat.vendor_id
    fnd_file.put_line (fnd_file.LOG
    , 'Vendor Site Id:' || l_vendor_site_id
    fnd_file.put_line (fnd_file.LOG
    , 'RFQ ONLY SITE FLAG:' || l_vendor_site_rec.rfq_only_site_flag
    ap_vendor_pub_pkg.update_vendor_site (p_api_version => 1
    , x_return_status => x_return_status
    , x_msg_count => x_msg_count
    , x_msg_data => x_msg_data
    , p_vendor_site_rec => l_vendor_site_rec
    , p_vendor_site_id => l_vendor_site_id
    ); --p_calling_prog     IN  VARCHAR2 DEFAULT 'NOT ISETUP'
    -- pos_vendor_pub_pkg.update_vendor_site (p_vendor_site_rec => l_vendor_site_rec
    -- , x_return_status => x_return_status
    -- , x_msg_count => x_msg_count
    -- , x_msg_data => x_msg_data
    --     ap_vendor_sites_pkg.update_row(
    --          p_vendor_site_rec => l_vendor_site_rec,
    --          p_last_update_date => sysdate,
    --          p_last_updated_by => l_user_id,
    --          p_last_update_login => l_last_update_login,
    --          p_request_id => l_request_id ,
    --          p_program_application_id => l_program_application_id,
    --          p_program_id => l_program_id,
    --          p_program_update_date => sysdate,
    --          p_vendor_site_id => l_vendor_site_id);
    fnd_file.put_line (fnd_file.LOG
    , 'Return Status:' || x_return_status
    IF x_return_status <> fnd_api.g_ret_sts_success THEN
    IF x_msg_count >= 1 THEN
    FOR i IN 1 .. x_msg_count LOOP
    IF l_error_reason IS NULL THEN
    l_error_reason :=
    l_error_reason
    || ','
    || SUBSTR (fnd_msg_pub.get (p_encoded => fnd_api.g_false)
    , 1
    , 255
    || SQLERRM;
    ELSE
    l_error_reason :=
    l_error_reason
    || ','
    || SUBSTR (fnd_msg_pub.get (p_encoded => fnd_api.g_false)
    , 1
    , 255
    || SQLERRM;
    END IF;
    --DBMS_OUTPUT.put_line ('Supplier Site API Error-' || l_error_reason);
    fnd_file.put_line (fnd_file.LOG
    , 'Supplier Site API Error-' || l_error_reason
    END LOOP;
    END IF;
    ELSIF x_return_status='S' THEN
    --DBMS_OUTPUT.put_line ('Supplier Site API Success-' || l_error_reason);
    fnd_file.put_line (fnd_file.LOG
    , 'Supplier Site API Success-' || l_error_reason
    END IF;
    END LOOP;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    --DBMS_OUTPUT.put_line ('Error-' || SQLERRM);
    fnd_file.put_line (fnd_file.LOG
    , 'Error-' || SQLERRM
    END xx_vat_wo172304;
    END xx_wo172304_test;

    Hi,
    I'm unable to update the vat code column of the ap_supplier_sites_all table using the ap_vendor_pub_pkg.update_vendor_site API.Oracle application instance 12.1.3 and OS linux.Please find the code below.I'm able to update other feilds,but not the vat_code.Please help on this.
    Thanks,
    Abhilash
    CREATE OR REPLACE PACKAGE BODY APPS.xx_wo172304_test
    AS
    PROCEDURE xx_vat_wo172304 (
    errbuf OUT VARCHAR2
    , retcode OUT VARCHAR2
    IS
    CURSOR cur_vat
    IS
    SELECT site.*
    FROM apps.ap_suppliers supp, apps.ap_supplier_sites_all site
    WHERE site.vat_code IN
    ('CZ OEUS 20', 'CZ OEUZ 20', 'CZ OJCD 20', 'CZ OT20', 'CZ-20-EDC', 'OEUS20', 'OEUZ20', 'OPP20E'
    , 'OS20', 'OT20')
    AND supp.vendor_id = site.vendor_id
    AND site.org_id IN (608, 1508, 2396, 2397)
    AND site.vendor_site_id =68154;
    l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
    l_vat_code ap_supplier_sites_all.VAT_CODE%TYPE;
    l_vendor_site_id ap_supplier_sites_all.vendor_site_id%TYPE;
    x_return_status VARCHAR2 (100) := NULL;
    x_msg_data VARCHAR2 (1000) := NULL;
    x_msg_count NUMBER := NULL;
    l_error_reason VARCHAR2 (2000) := NULL;
    l_user_id           number := FND_GLOBAL.USER_ID;
    l_last_update_login           number := FND_GLOBAL.LOGIN_ID;
    l_program_application_id           number := FND_GLOBAL.prog_appl_id;
    l_program_id           number := FND_GLOBAL.conc_program_id;
    l_request_id           number := FND_GLOBAL.conc_request_id;
    BEGIN
    -- mo_global.init ('SQLAP');
    FOR rec_vat IN cur_vat LOOP
    IF rec_vat.org_id = 608 THEN
    IF rec_vat.vat_code = 'OEUS20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUS21';
    ELSIF rec_vat.vat_code = 'OEUZ20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUZ21';
    ELSIF rec_vat.vat_code = 'OPP20E' THEN
    l_vendor_site_rec.vat_code := 'CZ OPP21E';
    ELSIF rec_vat.vat_code = 'OS20' THEN
    l_vendor_site_rec.vat_code := 'CZ OS21';
    ELSIF rec_vat.vat_code = 'OT20' THEN
    l_vendor_site_rec.vat_code := 'CZ OS21';
    END IF;
    ELSIF rec_vat.org_id = 1508 THEN
    IF rec_vat.vat_code = 'CZ OJCD 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OJCD21';
    ELSIF rec_vat.vat_code = 'CZ OEUS 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUS21';
    ELSIF rec_vat.vat_code = 'CZ OEUZ 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUZ21';
    ELSIF rec_vat.vat_code = 'CZ OT20' THEN
    l_vendor_site_rec.vat_code := 'CZ OT21';
    END IF;
    ELSIF rec_vat.org_id = 2396 THEN
    IF rec_vat.vat_code = 'CZ OEUZ 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUZ 21';
    ELSIF rec_vat.vat_code = 'CZ OJCD 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OJCD 21';
    ELSIF rec_vat.vat_code = 'CZ OT20' THEN
    l_vendor_site_rec.vat_code := 'CZ OT21';
    ELSIF rec_vat.vat_code = 'CZ-20-EDC' THEN
    l_vendor_site_rec.vat_code := 'CZ-21-EDC';
    END IF;
    ELSIF rec_vat.org_id = 2397 THEN
    IF rec_vat.vat_code = 'CZ OEUS 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUS 21';
    ELSIF rec_vat.vat_code = 'CZ OEUZ 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OEUZ 21';
    ELSIF rec_vat.vat_code = 'CZ OJCD 20' THEN
    l_vendor_site_rec.vat_code := 'CZ OJCD 21';
    ELSIF rec_vat.vat_code = 'CZ OT20' THEN
    l_vendor_site_rec.vat_code := 'CZ OT21';
    ELSIF rec_vat.vat_code = 'CZ-20-EDC' THEN
    l_vendor_site_rec.vat_code := 'CZ-21-EDC';
    END IF;
    END IF;
    l_vendor_site_id := rec_vat.vendor_site_id;
    l_vendor_site_rec.org_id := rec_vat.org_id;
    l_vendor_site_rec.vendor_id := rec_vat.vendor_id;
    --l_vendor_site_rec.vendor_site_code:='318581-MOR. KRU';
    l_vendor_site_rec.rfq_only_site_flag := 'Y';
    -- l_vendor_site_rec.last_update_date := SYSDATE;
    l_vendor_site_rec.last_updated_by := 1134;   MARTIN.ROUNDS
    -- DBMS_OUTPUT.put_line ('VAT CODE:' || l_vendor_site_rec.vat_code);
    --DBMS_OUTPUT.put_line ('Vendor Site Id:' || l_vendor_site_id);
    fnd_file.put_line (fnd_file.LOG
    , 'VAT CODE:' || l_vendor_site_rec.vat_code
    fnd_file.put_line (fnd_file.LOG
    , 'Vendor ID:' || rec_vat.vendor_id
    fnd_file.put_line (fnd_file.LOG
    , 'Vendor Site Id:' || l_vendor_site_id
    fnd_file.put_line (fnd_file.LOG
    , 'RFQ ONLY SITE FLAG:' || l_vendor_site_rec.rfq_only_site_flag
    ap_vendor_pub_pkg.update_vendor_site (p_api_version => 1
    , x_return_status => x_return_status
    , x_msg_count => x_msg_count
    , x_msg_data => x_msg_data
    , p_vendor_site_rec => l_vendor_site_rec
    , p_vendor_site_id => l_vendor_site_id
    ); --p_calling_prog     IN  VARCHAR2 DEFAULT 'NOT ISETUP'
    -- pos_vendor_pub_pkg.update_vendor_site (p_vendor_site_rec => l_vendor_site_rec
    -- , x_return_status => x_return_status
    -- , x_msg_count => x_msg_count
    -- , x_msg_data => x_msg_data
    --     ap_vendor_sites_pkg.update_row(
    --          p_vendor_site_rec => l_vendor_site_rec,
    --          p_last_update_date => sysdate,
    --          p_last_updated_by => l_user_id,
    --          p_last_update_login => l_last_update_login,
    --          p_request_id => l_request_id ,
    --          p_program_application_id => l_program_application_id,
    --          p_program_id => l_program_id,
    --          p_program_update_date => sysdate,
    --          p_vendor_site_id => l_vendor_site_id);
    fnd_file.put_line (fnd_file.LOG
    , 'Return Status:' || x_return_status
    IF x_return_status <> fnd_api.g_ret_sts_success THEN
    IF x_msg_count >= 1 THEN
    FOR i IN 1 .. x_msg_count LOOP
    IF l_error_reason IS NULL THEN
    l_error_reason :=
    l_error_reason
    || ','
    || SUBSTR (fnd_msg_pub.get (p_encoded => fnd_api.g_false)
    , 1
    , 255
    || SQLERRM;
    ELSE
    l_error_reason :=
    l_error_reason
    || ','
    || SUBSTR (fnd_msg_pub.get (p_encoded => fnd_api.g_false)
    , 1
    , 255
    || SQLERRM;
    END IF;
    --DBMS_OUTPUT.put_line ('Supplier Site API Error-' || l_error_reason);
    fnd_file.put_line (fnd_file.LOG
    , 'Supplier Site API Error-' || l_error_reason
    END LOOP;
    END IF;
    ELSIF x_return_status='S' THEN
    --DBMS_OUTPUT.put_line ('Supplier Site API Success-' || l_error_reason);
    fnd_file.put_line (fnd_file.LOG
    , 'Supplier Site API Success-' || l_error_reason
    END IF;
    END LOOP;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    --DBMS_OUTPUT.put_line ('Error-' || SQLERRM);
    fnd_file.put_line (fnd_file.LOG
    , 'Error-' || SQLERRM
    END xx_vat_wo172304;
    END xx_wo172304_test;

  • How to set default payment method for Supplier using API

    Hi All,
    I am doing data conversion and loading suppliers using ap_vendor_pub_pkg.create_vendor api. But, I cannot see any payment_method_lookup_code column in the RECORD type AP_VENDOR_PUB_PKG.r_vendor_rec_type.
    how do I assign a default payment method to a vendor ?
    Thanks
    Shankar

    Seems like an ER with Oracle Support.
    Bug 11895105: ADDING PAYMENT_METHOD_LOOKUP_CODE FOR AP_VENDOR_PUB_PKG.UPDATE_VENDOR_SITE
    Currently system doesnt allow you to update the PAYMENT_METHOD_LOOKUP_CODE in AP_VENDOR_PUB_PKG.Update_Vendor_Site.Because above column does not define in l_vendor_site_rec regardless other procedure.

  • Which API to update supplier site VAT registration number?

    I am using the AP_VENDOR_PUB_PKG.Create_Vendor_SITE API call to populate the VAT_REGISTRATION_NUM field, whcih then appears as the "Default Reporting Registration Number" under the Tax Details page of the supplier screens.
    Unfortunately the call to AP_VENDOR_PUB_PKG.Update_Vendor_Site does not seem to update the value in this field even though I am passing a new VAT_REGISTRATION_NUM value into the API. Does anybody know of any other API I could use to update this field?

    Hi,
    I'm also facing similar kind of problem when I'm trying to update VAT_CODE through this API,it's not updating.Colud you please share how you had fixed this if so.
    Thanks,
    Abhilash

  • R12 SUPPLIER SITE UPDATE API

    Hi Gurus,
    Currently I'm developing Supplier Site Update Program, I need to update Supplier Site level liability account information.
    I found an API (AP_VENDOR_PUB_PKG.Update_Vendor_Site), please confirm is this right API to update vendor sites? As I aware, In R12 Supplier moved to TCA, will this API takes care of TCA table update? If not, any other API should be called to update Supplier related records in TCA table?
    Any sample code will help a much
    Thanks

    Yes. See AP_VENDOR_PUB_PKG.Update_Vendor_Site updating inactive date doesn't work for sample code.
    Hope this helps
    Sandeep Gandhi
    Independent Techno-functional Consultant

  • Good Aternoon

    Hi,
    I got the requirement i.e is updation of vendor site.
    in supplier sites the colum pay_on_code is showing null or receipt.
    now i want to update this column as Receipt' if i pass any vendor name.
    i wrote one script.
    DECLARE
    lv_return_status varchar2(1);
    lv_msg_count number;
    lv_msg_data varchar2(2000);
    lv_vendor_site_id ap_supplier_sites_ALL.vendor_site_id%type;
    lv_pay_on_code ap_supplier_sites_ALL.PAY_ON_CODE%type;
    lv_vendor_site_rec AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
    --lv_calling_prog:= 'NOT ISETUP';
    BEGIN
    fnd_global.apps_initialize(1090,20456,160);
    mo_global.init('S');
    lv_vendor_site_rec.PAY_ON_CODE:='RECEIPT';
    select apss.vendor_site_id into lv_vendor_site_id from ap_supplier_sites_all apss,
    ap_suppliers aps
    where aps.vendor_id=apss.VENDOR_ID
    and apss.vendor_site_id='2968'
    and aps.VENDOR_NAME like 'QUANTUM ENGINEERS AND FABRICATORS PVT. LTD%';
    --lv_pay_on_code:='RECEIPT';
    dbms_output.put_line(lv_vendor_site_id||'lv_vendor_site_id');
    dbms_output.put_line(lv_return_status||'-'||lv_msg_count||'-'||lv_msg_data);
    AP_VENDOR_PUB_PKG.Update_Vendor_Site
    ( 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_site_rec => lv_vendor_site_rec
    , p_vendor_site_id => lv_vendor_site_id
    --p_calling_prog=>lv_calling_prog
    dbms_output.put_line(lv_return_status||'-'||lv_msg_count||'-'||lv_msg_data);
    commit;
    END;
    it is successfully compiled but not updated
    Can any one help on this.
    Regards
    Ram

    radgid wrote:
    E.g. in the first SELECT INTO statement you can get either NO_DATA_FOUND or TOO_MANY_ROWS exceptions - I would use explicit cursor insteadFor the very same reason I would NOT use explicit cursor. Because if I did use explicit cursor for single row fetching, I would have to code the logic for those two exceptions myself.
    Assuming of course, that one row is expected.
    Regards
    Peter

  • AP_VENDOR_PUB_PKG PACKAGE BODY issue...

    Hi there
    AP_VENDOR_PUB_PKG PACKAGE BODY become invalid can any one let me how to valid this package body because due to this we are facing problem in creating supplier.
    Regards,
    Mohsin

    Hi Helios
    Thanks for reply...please find below application & object info.
    Application: R12(12.1.2)
    Database: 11.1.0.7
    STATUS OBJECT_NAME OBJECT_TYPE
    INVALID FV_FACTS_TRANSACTIONS PACKAGE BODY
    INVALID FV_FACTS_TBAL_TRANSACTIONS PACKAGE BODY
    INVALID FV_BUDGET_DISTRIBUTION_HDR_V VIEW
    INVALID FII_AP_INV_ON_HOLD_F_C PACKAGE BODY
    INVALID FII_AP_HOLD_DATA_F_C PACKAGE BODY
    INVALID FII_AP_INV_PAYMTS_F_C PACKAGE BODY
    INVALID FII_AP_INV_LINES_F_C PACKAGE BODY
    INVALID FII_AP_SCH_PAYMTS_F_C PACKAGE BODY
    INVALID FII_AR_TRX_DIST_F_C PACKAGE BODY
    INVALID FII_PA_COST_F_C PACKAGE BODY
    INVALID FII_PA_REVENUE_F_C PACKAGE BODY
    STATUS OBJECT_NAME OBJECT_TYPE
    INVALID FII_PA_UOM_CONV_F_C PACKAGE BODY
    INVALID FII_PA_BUDGET_F_C PACKAGE BODY
    INVALID EDW_HR_ASG_CHNG_M_C PACKAGE BODY
    INVALID EDW_HR_AGE_BAND_M_C PACKAGE BODY
    INVALID EDW_HR_ASSGNMNT_M_C PACKAGE BODY
    INVALID EDW_HR_GRADE_M_C PACKAGE BODY
    INVALID EDW_HR_JOBS_M_C PACKAGE BODY
    INVALID EDW_HR_SERVICE_M_C PACKAGE BODY
    INVALID EDW_HR_MVMNT_TYP_M_C PACKAGE BODY
    INVALID EDW_HR_PERSON_M_C PACKAGE BODY
    INVALID EDW_HR_POSITION_M_C PACKAGE BODY
    STATUS OBJECT_NAME OBJECT_TYPE
    INVALID EDW_HR_REC_ACT_M_C PACKAGE BODY
    INVALID EDW_ORGANIZATION_M_C PACKAGE BODY
    INVALID EDW_HR_PRSN_TYP_M_C PACKAGE BODY
    INVALID EDW_HR_RQN_VCNCY_M_C PACKAGE BODY
    INVALID EDW_HR_REASON_M_C PACKAGE BODY
    INVALID HR_EDW_WRK_CMPSTN_F_C PACKAGE BODY
    INVALID EDW_MRP_DM_CLS_M_C PACKAGE BODY
    INVALID EDW_MRP_FORECAST_M_C PACKAGE BODY
    INVALID EDW_MRP_PLAN_M_C PACKAGE BODY
    INVALID ISC_EDW_BOOK_SUM1_F_C PACKAGE BODY
    INVALID EDW_MTL_INVENTORY_LOC_M_C PACKAGE BODY
    STATUS OBJECT_NAME OBJECT_TYPE
    INVALID OPI_EDW_COGS_F_C PACKAGE BODY
    INVALID OPI_EDW_OPM_JOB_RSRC_F_C PACKAGE BODY
    INVALID OPI_EDW_OPM_JOB_DETAIL_F_C PACKAGE BODY
    INVALID OPI_EDW_OPMCOGS_F_C PACKAGE BODY
    INVALID OPI_EDW_OPMINV_DAILY_STAT_F_C PACKAGE BODY
    INVALID EDW_OPI_OPRN_M_C PACKAGE BODY
    INVALID EDW_OPI_ACTV_M_C PACKAGE BODY
    INVALID EDW_OPI_LOT_M_C PACKAGE BODY
    INVALID EDW_OPI_PRDL_M_C PACKAGE BODY
    INVALID OPI_EDW_UOM_CONV_F_C PACKAGE BODY
    INVALID EDW_POA_SPLRITEM_M_C PACKAGE BODY
    STATUS OBJECT_NAME OBJECT_TYPE
    INVALID EDW_POA_LN_TYPE_M_C PACKAGE BODY
    INVALID QP_BUILD_SOURCING_PVT_TMP PACKAGE BODY
    INVALID FV_FACTS_TBAL_TRX PACKAGE BODY
    INVALID FV_FACTS_TRX_REGISTER PACKAGE BODY
    INVALID ITG_SYNCSUPPLIERINBOUND_PVT PACKAGE BODY
    INVALID AP_VENDOR_PUB_PKG PACKAGE BODY
    INVALID FV_SLA_PROCESSING_PKG PACKAGE BODY
    INVALID PSA_AP_BC_PVT PACKAGE BODY
    INVALID XLA_00201_AAD_S_000004_BC_PKG PACKAGE BODY
    INVALID FV_SLA_UTL_PROCESSING_PKG PACKAGE BODY
    INVALID XX_GET_PR_PO_INFO FUNCTION
    STATUS OBJECT_NAME OBJECT_TYPE
    INVALID AP_VENDOR_PUB_PKG_BK PACKAGE BODY
    56 rows selected.
    yes i have validated apps schema with adadmin utility as well
    Regards,
    Mohsin
    Edited by: 920138 on Apr 26, 2012 4:13 AM

  • API AP_PO_VENDORS_API_PKG.update_vendor_site

    Hello,
    The API AP_PO_VENDORS_API_PKG.update_vendor_site doesn't update all the fields (address for example). This is a known prblem. Does anybody know if this has been fixed in R12 ?
    Thanks in advance

    You can customize the AP_PO_VENDORS_APIS_PKG APIs to add more parameters
    and use it in your custom program.
    Another way is to directly update using ap_vendor_sites_pkg.update_row. This API is called from AP_PO_VENDORS_APIS_PKG, but it updates all fields.

  • Ora-01403, AP_VENDOR_PUB_PKG

    while create new vendor site . the error occurred as ‘validate_vendor_site ORA-01403’.ORACLE support said that's bug @ebs 12.1.1. but we can't apply the patch regarding of 'R12 Ora-01403 Error When Entering A New Uo For A Supplier [ID 843661.1].mht'

    user9222525 wrote:
    while create new vendor site . the error occurred as ‘validate_vendor_site ORA-01403’.ORACLE support said that's bug @ebs 12.1.1.Please see these docs.
    Payment Workbench Error: ORA-01403 No Data Found (APXPAWKB.FMB) [ID 1303129.1]
    ORA-01403: AP_VENDOR_PUB_PKG Procedure Validate_vendor [ID 553228.1]
    When Entering Operating Unit (OU) for Supplier Gets Error ORA-01403 [ID 813205.1]
    R12 Ora-01403 Error When Entering A New Uo For A Supplier [ID 843661.1]
    CANNOT CREATE SUPPLIER SITE (ADDRESS) [ID 1069032.1]
    but we can't apply the patch regarding of 'R12 Ora-01403 Error When Entering A New Uo For A Supplier [ID 843661.1].mht'What is the reason?
    Thanks,
    Hussein

  • R12 update_vendor_site return status

    I am trying to update an existing supplier site and making this call :
    pos_vendor_pub_pkg.update_vendor_site(
    p_vendor_site_rec => vendor_site_rec,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data);
    The return status is : "U" and the return message is "FND". I assume that successfull update should return me status "S" with no messages.
    Seems like "FND" stands for found ( which is normal in case of Update ) What does status "U" mean? Was the site successfully updated?
    thanks in advance.

    This API does not exist in R12.
    I have read in the API definition that it does not update TCA info. I assume this is why the update does not work in R12.
    Does anyone know how to update a vendor site or contact in R12???
    Thanks

  • Error while creating a new site for a supplier associated with an Employee

    Hi
    We create suppliers for all the employee when we get daily HR feed and create a default site OFFICE for all of them,
    Now when from the front end we try creating a new supplier site HOME.
    It gives an error
    Address and Site Creation - Unable to create address and sites because of the following error when trying to create the site in operating unit [WorldPay US OU]: [oracle.apps.fnd.framework.OAException: Address and Site Creation - Unable to create address and sites because of the following error when trying to create the site in operating unit [WorldPay US OU]: [ MATCH_OPTION is invalid Match option is invalid Invalid Payee context values. Org parameters exist only with party site and supplier site.]. Either resolve this issue and try again or deselect the operating unit with the error and continue. Note: any new address requires at least one site in order to be created.]. Either resolve this issue and try again or deselect the operating unit with the error and continue. Note: any new address requires at least one site in order to be created.
    could someone please help me with this
    Thanks
    Edited by: user592830 on Mar 21, 2012 10:27 AM

    Please see these docs.
    R12: Unable To Create A New Supplier Site. ORA-1403 Error Arises In AP_VENDOR_PUB_PKG After Patch:8889211 [ID 1053597.1]
    R12: Unable to Create Non-Employee Supplier Sites after Creating Employee Suppliers due to error Supplier Site Code is Invalid [ID 1266374.1]
    Cannot Create Supplier Site (Address) [ID 1069032.1]
    ORA-01403 When Assigning Operating Unit during Supplier Address and Site Creation [ID 1070431.1
    Unable To Create Ap Supplier Site [ID 1095616.1]
    Creating Supplier Address Gets "ACCTS_PAY_CCID Is Invalid" [ID 763636.1]
    Supplier Site Creation Error, Immediately After Creation Of Employee As Supplier [ID 1215016.1]
    R12 Supplier Site Creation Error: You must specify a valid, enabled currency. Invoice Currency is invalid [ID 1324182.1]
    When Adding a Site, Get Error Message: This Site name already exists for this supplier. Re-enter. Supplier Site Info Is Duplicate [ID 1324498.1]
    Address And Site Creation Terms_date_basis Is Invalid Terms Data Basis Is Invalid [ID 1359979.1]
    Thanks,
    Hussein

  • Avoid inserting on hz_parties?

    Hi friends,
    [Apps R12]
    Is there any way to avoid interting record for a vendor in hz_parties while running "Supplier Open Interface Import" ?
    Thanks.
    Jose

    Hi Pravin,
    It's not an specific requirement... but the problem I see is that in R12, it's inserting in hz_parties when you create an employee and .. if you want to insert the employee as a Supplier.. the "Supplier Open Interface Import" also inserts there.. so.. we have more than one record per employee...
    I've traced the request... and I've seen that first it calls in the BEFORE_REPORT of APXSUIMP.rdf to AP_VENDOR_PUB_PKG.Import_Vendors.... and through this.. it finishes inserting on hz_parties with hz_parties_pkg.insert_row....
    So.. Any "standard" way to avoid this.. or it would imply necessary to modify standard code?
    Thanks,
    Jose.

Maybe you are looking for