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.

Similar Messages

  • 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

  • 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 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

  • 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

  • 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.

  • 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

  • UPDATING SUPPLIERS in R12 using APIs

    Hi ,
    For Updating the Existing Customers/sites,we have the following APIs
    AP_PO_VENDORS_APIS_PKG.update_vendor,
    AP_PO_VENDORS_APIS_PKG.update_vendor_site
    In R12 ,API "AP_PO_VENDORS_APIS_PKG" is missing.Can anybody tell me what relpaced this API in R12?
    Thanks,
    Narasimha.

    R12 has an Open interface program
    Supplier Open Interface Import
    loaded via interface table AP_SUPPLIERS_INT.
    Supplier Sites Open Interface Import
    loaded via interface table AP_SUPPLIER_SITES_INT
    Supplier Site Contacts Open Interface Import
    loadec via table AP_SUP_SITE_CONTACT_INT

  • 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 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

  • Unable to capture user comments and responder in RESPOND API

    We are building a custom application that uses Oracle Workflow underneath. The application users and responsibilities have been integrated into Workflow. Notifications are acknowledged and responded to directly from the application using the PL/SQL Notification APIs.
    When using the wf_notification.respond API with the appropriate user and comment information filled in, we are still unable to capture the responder information as well as the reponders comments. In other words, the RESPONDER and USER_COMMENT fields in the WF_NOTIFICATION is blank. However, the response does seem to go through otherwise. Do we need to set some kind of user context outside of just setting the response attributes and calling the respond API? Following is the code....
    owf_mgr.wf_notification.setattrtext(p_nid,
                   'RESULT'          ,
                   'APPROVED');
    -- This procedure then caused the WF to advance to next step
    -- Respond to notification, depends on RESULT setattrtext above
    owf_mgr.wf_notification.respond(     p_nid, -- notification id     
         p_respond_comment,     -- response_comment
    p_responder     );     --responder role
    Any help is greatly appreciated.
    Thanks,
    Raj

    If you are on 11.5.10 or greater or standalone 2.6.4 if you pass the responder value to wf_notification.respond API it should be updated in wf_notifications.responder column. The comments is now updated in wf_comments table against the notification id and not wf_notifications.user_comment column.
    Thanks, Vijay

  • SR Log Error - |  Message  : com.sap.esi.uddi.sr.api.exceptions.SRException

    Hi,
    We are getting below errors in /nwa/logs. We have our PI (7.11) and Service Registry configured on the same server. And have out CE (7.2) system connected to this service registry. Does any one has similar experience? Please let me know if you have any solution for the same.
    SR Log Error
    |  11-Nov-11  14:10:45.568
    |  Method   : getClassificationSystems()
    |  Class    : com.sap.esi.uddi.sr.api.ws.ServicesRegistrySiImplBean
    |  ThreadID : 146
    |  Message  : com.sap.esi.uddi.sr.api.exceptions.SRException: No classification system found for ID 'QName: Namespace= http://uddi.sap.com/classification; Name=  ConfigurationFlags'
    |
    |       com.sap.esi.uddi.sr.impl.common.Utility.cs2srException(Utility.java:122)
    |       com.sap.esi.uddi.sr.impl.ejb.ServicesRegistryBean.getClassificationSystems(ServicesRegistryBean.java:242)
    |       sun.reflect.GeneratedMethodAccessor1325.invoke(Unknown Source)
    |       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    |       java.lang.reflect.Method.invoke(Method.java:585)
    |       com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
    |       com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
    |       $Proxy1087.getClassificationSystems(Unknown Source)
    |       com.sap.esi.uddi.sr.api.ws.ServicesRegistrySiImplBean.getClassificationSystems(ServicesRegistrySiImplBean.java:456)
    |       sun.reflect.GeneratedMethodAccessor1324.invoke(Unknown Source)
    |       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    |       java.lang.reflect.Method.invoke(Method.java:585)
    |       com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
    |       com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    |       com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
    |       com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
    |       com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:512)
    |       com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:486)
    |       com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:256)
    |       com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:176)
    |       com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWithLogging(ServletDispatcherImpl.java:112)
    |       com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:70)
    |       SoapServlet.doPost(SoapServlet.java:51)
    |       javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    |       javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    |       com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:140)
    |       com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:37)
    |       com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:486)
    |       com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:298)
    |       com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:396)
    |       com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:385)
    |       com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
    |       com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    |       com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:84)
    |       com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    |       com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:245)
    |       com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    |       com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
    |       com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    |       com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    |       com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    |       com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    |       com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    |       com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    |       com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    |       com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    |       com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    |       com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    |       com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    |       com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:43)
    |       com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    |       com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    |       com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
    |       com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    |       com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    |       com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:428)
    |       com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:247)
    |       com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:45)
    |       com.sap.engine.core.thread.execution.Executable.run(Executable.java:115)
    |       com.sap.engine.core.thread.execution.Executable.run(Executable.java:96)
    |       com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314)
    |

    Hi,
    Refer Error:Service Registyr Configuration PI 7.11
    and http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8071b1b8-3c5c-2e10-e7af-8cadbc49d711?QuickLink=index&overridelayout=true
    Thanks,
    Chandra

  • Is There any API in receivables payment will made against closed invoices ?

    Hi ALL,
    i have requirement as below.
    i am doing AR Invoice Data Migration for Instance 11.5.5 (as a Source Instance) to the new instance R12 (as a target instance).
    Both open and closed invoices will have to be migrated from 11.5.5 to R12 to provide the drill down facility for audit purpose.
    To meet the above requirement all the open and closed invoice will be picked up from 11.5.5 ; and imported into R12..
    Subsequently, full payment will be made in R12 against all closed invoices in 11.5.5 to close those invoices by using any APIs?
    can some one explain is there any API in receivables payment will made against closed invoices.
    Thanks,
    VSR.

    Hi,
    Can you be clear on your question: You want any API to make payment against closed invoices?
    To me, You are making things complex. We can achieve the Migration of Closed invoices using following two procedures:
    Procedure: 1
    Ask Functional Guy to create a Transaction Type 'Closed Invoices' with Open to Receivables Flag not checked. +(You can uncheck Post to GL flag also, if required depending on your migration strategy)+. Status at Transaction Type if taken as 'Closed' it will be appropriate.
    Invoices migrated using this Transaction Type shall not be shown as Outstanding but will be useful for Audit.
    Procedure: 2
    Consider the amount due Original of Closed Invoices and migrate them with the amount as Amount due remaining.
    While migrating populate Receipt Method,Payment Method and Instruments useful for Automatic Receipts.
    Once Create Automatic Receipts Program is run, it will close all these invoices. Note: We require dummy bank here which points to a Clearing account.
    Automatic Receipts program is also an API.
    In the above 2 ways, we are acheiving the Goal by using Functional knowledge rather than Technical. And I think following Functional way is better and less time consuming.
    Please discuss with your Functional consultant if required. You can succeed.
    Regards,
    Sridhar

  • Error while creating new projects using api

    Hello,
    I am having error while creating projects using standard api, PA_PROJECT_PUB.CREATE_PROJECTS. The error I am having is as follow.
    Source template ID is invalid.
    ===
    My code is as follow:
    SET SERVEROUTPUT ON SIZE 1000000
    SET VERIFY OFF
    define no=&amg_number
    DECLARE
    -- Variables used to initialize the session
    l_user_id NUMBER;
    l_responsibility_id NUMBER;
    cursor get_key_members is
    select person_id, project_role_type, rownum
    from pa_project_players
    where project_id = 1;
    -- Counter variables
    a NUMBER := 0;
    m NUMBER := 0;
    -- Variables needed for API standard parameters
    l_commit VARCHAR2(1) := 'F';
    l_init_msg_list VARCHAR2(1) := 'T';
    l_api_version_number NUMBER :=1.0;
    l_return_status VARCHAR2(1);
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(2000);
    -- Variables used specifically in error message retrieval
    l_encoded VARCHAR2(1) := 'F';
    l_data VARCHAR2(2000);
    l_msg_index NUMBER;
    l_msg_index_out NUMBER;
    -- Variables needed for Oracle Project specific parameters
    -- Input variables
    l_pm_product_code VARCHAR2(30);
    l_project_in pa_project_pub.project_in_rec_type;
    l_key_members pa_project_pub.project_role_tbl_type;
    l_class_categories pa_project_pub.class_category_tbl_type;
    l_tasks_in pa_project_pub.task_in_tbl_type;
    -- Record variables for loading table variables above
    l_key_member_rec pa_project_pub.project_role_rec_type;
    l_class_category_rec pa_project_pub.class_category_rec_type;
    l_task_rec pa_project_pub.task_in_rec_type;
    -- Output variables
    l_workflow_started VARCHAR2(100);
    l_project_out pa_project_pub.project_out_rec_type;
    l_tasks_out pa_project_pub.task_out_tbl_type;
    -- Exception to call messag handlers if API returns an error.
    API_ERROR EXCEPTION;
    BEGIN
    -- Initialize the session with my user id and Projects, Vision Serves (USA0
    -- responsibility:
    select user_id into l_user_id
    from fnd_user
    where user_name = 'SSHAH';
    select responsibility_id into l_responsibility_id
    from fnd_responsibility_tl
    where responsibility_name = 'Projects Implementation Superuser';
    pa_interface_utils_pub.set_global_info(
    p_api_version_number => l_api_version_number,
    p_responsibility_id => l_responsibility_id,
    p_user_id => l_user_id,
    p_msg_count => l_msg_count,
    p_msg_data => l_msg_data,
    p_return_status => l_return_status);
    if l_return_status != 'S' then
    raise API_ERROR;
    end if;
    -- Provide values for input variables
    -- L_PM_PRODUCT_CODE: These are stored in pa_lookups and can be defined
    -- by the user. In this case we select a pre-defined one.
    select lookup_code into l_pm_product_code
    from pa_lookups
    where lookup_type = 'PM_PRODUCT_CODE'
    and meaning = 'Conversion';
    -- L_PROJECT_IN: We have to provide values for all required elements
    -- of this record (see p 5-13, 5-14 for the definition of the record).
    -- Customers will normally select this information from some external
    -- source
    l_project_in.pm_project_reference := 'AGL-AMG Project &no';
    l_project_in.project_name := 'AGL-AMG Project &no';
    l_project_in.created_from_project_id := 1;
    l_project_in.carrying_out_organization_id := 2864; /*Cons. West*/
    l_project_in.project_status_code := 'UNAPPROVED';
    l_project_in.start_date := '01-JAN-11';
    l_project_in.completion_date := '31-DEC-11';
    l_project_in.description := 'Trying Hard';
    l_project_in.project_relationship_code := 'Primary';
    -- L_KEY_MEMBERS: To load the key member table we load individual
    -- key member records and assign them to the key member table. In
    -- the example below I am selecting all of the key member setup
    -- from an existing project with 4 key members ('EE-Proj-01'):
    for km in get_key_members loop
    -- Get the next record and load into key members record:
    l_key_member_rec.person_id := km.person_id;
    l_key_member_rec.project_role_type := km.project_role_type;
    -- Assign this record to the table (array)
    l_key_members(km.rownum) := l_key_member_rec;
    end loop;
    -- L_CLASS_CATEGORIES: commented out below should fix the error we get
    -- because the template does not have an assigment for the mandatory class
    -- 'BAS Test'
    l_class_category_rec.class_category := 'Product';
    l_class_category_rec.class_code := 'Non-classified';
    -- Assign the record to the table (array)
    l_class_categories(1) := l_class_category_rec;
    -- L_TASKS_IN: We will load in a single task and a subtask providing only
    -- the basic fields (see pp. 5-16,5-17,5-18 for the definition of
    -- the task record)
    l_task_rec.pm_task_reference := '1';
    l_task_rec.pa_task_number := '1';
    l_task_rec.task_name := 'Construction';
    l_task_rec.pm_parent_task_reference := '' ;
    l_task_rec.task_description := 'Plant function';
    -- Assign the top task to the table.
    l_taskS_in(1) := l_task_rec;
    -- Assign values for the sub task
    l_task_rec.pm_task_reference := '1.1';
    l_task_rec.pa_task_number := '1.1';
    l_task_rec.task_name := 'Brick laying';
    l_task_rec.pm_parent_task_reference := '1' ;
    l_task_rec.task_description := 'Plant building';
    -- Assign the subtask to the task table.
    l_tasks_in(2) := l_task_rec;
    -- All inputs are assigned, so call the API:
    pa_project_pub.create_project
    (p_api_version_number => l_api_version_number,
    p_commit => l_commit,
    p_init_msg_list => l_init_msg_list,
    p_msg_count => l_msg_count,
    p_msg_data => l_msg_data,
    p_return_status => l_return_status,
    p_workflow_started => l_workflow_started,
    p_pm_product_code => l_pm_product_code,
    p_project_in => l_project_in,
    p_project_out => l_project_out,
    p_key_members => l_key_members,
    p_class_categories => l_class_categories,
    p_tasks_in => l_tasks_in,
    p_tasks_out => l_tasks_out);
    -- Check the return status, if it is not success, then raise message handling
    -- exception.
    IF l_return_status != 'S' THEN
    dbms_output.put_line('Msg_count: '||to_char(l_msg_count));
    dbms_output.put_line('Error: ret status: '||l_return_status);
    RAISE API_ERROR;
    END IF;
    -- perform manual commit since p_commit was set to False.
    COMMIT;
    --HANDLE EXCEPTIONS
    EXCEPTION
    WHEN API_ERROR THEN
    FOR i IN 1..l_msg_count LOOP
    pa_interface_utils_pub.get_messages(
    p_msg_count => l_msg_count,
    p_encoded => l_encoded,
    p_msg_index => i,
    p_msg_data => l_msg_data,
    p_data => l_data,
    p_msg_index_out => l_msg_index_out);
    dbms_output.put_line('ERROR: '||to_char(l_msg_index_out)||': '||l_data);
    END LOOP;
    rollback;
    WHEN OTHERS THEN
    dbms_output.put_line('Error: '||sqlerrm);
    FOR i IN 1..l_msg_count LOOP
    pa_interface_utils_pub.get_messages(
    p_msg_count => l_msg_count,
    p_encoded => l_encoded,
    p_msg_index => i,
    p_msg_data => l_msg_data,
    p_data => l_data,
    p_msg_index_out => l_msg_index_out);
    dbms_output.put_line('ERROR: '||to_char(l_msg_index_out)||': '||l_data);
    END LOOP;
    rollback;
    END;
    ===
    Msg_count: 1
    Error: ret status: E
    ERROR: 1: Project: 'AGL-AMG Project 1123'
    Source template ID is invalid.
    PL/SQL procedure successfully completed.

    I was using a custom Application, which had a id other then 275 (which belongs to Oracle projects)

Maybe you are looking for

  • Connecting Mac mini to internet through Xfinity router

    This one took me a couple weeks to figure out, and I've seen a couple of similar posts in the forums, so I decided to post my findings here in the hope that it will help someone else. Short version of the problem: I have a Mac mini (mid-2010 server v

  • Tagging in Story Editor messing up Structure

    I have an XML file that looks like this: <?xml version="1.0" encoding="utf-8"?> <MailItem attribute1="value1" attribute2="and so on...">      <Mail_ID>12345</Mail_ID>      <CustomerName>Mr. Bray</CustomerName>      <Sale_Date>2015-02-24</Sale_Date>  

  • Unable to create my third alias

    hello all For several weeks I deleted one of my three aliases, and it's been weeks since icloud says I have to wait seven days to create a third alias on the three available. Out within seven days to have the freedom to create my third alias is long

  • ARFC - Write data to SAP

    Hi, I using aRFC to write to SAP R/3. When i execute the writing request i do not get any feedback in return. Neither can i see that SAP-database is updated. Therefore I would like track some error messages indication what went wrong. How can I obtai

  • Can't middle or right click on bookmarks to open in new tab

    I can no longer middle click a bookmark from the bookmarks menu to open in a new tab. No matter whether I left, middle or right click, it is treated as a left click and opens in my currently open tab. PS I'm doing this using Firefox 23 but the same a