Query to create supplier site

What is the query to create supplier site? I have to create 500 suppliers sites for a project, how do i do it? What is the query?

Oracle provides a number of APIs to create such data.
For your task, you can use the supplier api.
See sample code at http://oracleapps88.blogspot.com/2011/09/supplier-supplier-site-creation-using.html
Since you have to create only the sites, you can skip to supplier creation steps in the above website.
Sandeep Gandhi

Similar Messages

  • Creating Supplier Site and  manual invoice.

    In order to issue a manual check and keep track of which ISO cash out the check I have to create a new supplier site for 400 ISOs and create invoices manually. How should i create a new supplier site?
    How should i create invoices manually?
    How long does it take to do this?

    In order to issue a manual check and keep track of which ISO cash out the check I have to create a new supplier site for 400 ISOs and create invoices manually. How should i create a new supplier site?
    How should i create invoices manually?
    How long does it take to do this?

  • Create Supplier Site with (Accounts) Using API

    Dear All,
    I want to use the API of create/update vendor site < POS_VENDOR_PUB_PKG.CREATE_VENDOR_SITE >
    The problem i'm facing is that, i don't know a way to insert the liability account and down payment account
    the api takes the default account and assign them to all the sites.
    While we have diffrent account for each type of suppliers
    Release R12.1.3
    please advice.

    See http://java.sun.com/developer/technicalArticles/java_warehouse/single_jar/

  • How to enable Supplier Sites 'Create' option?

    I have created a supplier and address but not able to create 'Site'. My user is having Buyer, Supplier Administrator roles. Also the user is defined as 'Procurement Agent'. Seems some more setup is missing. Any suggestions?

    This may be related to:
    Unable To Create Supplier Site For A Supplier, Procurement Agent Needs An Employee Record. (Doc ID 1353689.1)
    Jani Rautiainen
    Fusion Applications Developer Relations                             
    https://blogs.oracle.com/fadevrel/

  • Creating Supplier Bank Accounts and assigning to Supplier.

    Hi Team,
    Step 1: I have created Suppliers,Sites and contacts.
    Step 2: I have created one Supplier Bank and one Supplier Bank Branch.
    In HZ_PARTIES I am able to see 3 records outof which one corresponds to Bank record and the other branch record and the other one is the relationship one.
    Step 3 : For Account creation and assigning to Supplier level I am using the following API iby_ext_bankacct_pub.create_ext_bank_acct and passing these values,
    p_in_acct_rec.bank_id := 62462; (party_id from hz_parties)
    p_in_acct_rec.branch_id := 62464; (partyd_id from hz_parties)
    p_in_acct_rec.country_code := 'DE';
    p_in_acct_rec.bank_account_name := 'AKU BÜROMÖBELMNTAGE';
    p_in_acct_rec.bank_account_num := 8707629220;
    p_in_acct_rec.acct_owner_party_id := 23267; (party_id from ap_suppliers)
    p_in_acct_rec.currency := 'GER';
    p_in_acct_rec.object_version_number := '1.0';
    p_in_acct_rec.start_date := sysdate;
    p_in_acct_rec.foreign_payment_use_flag := 'Y';
    p_in_acct_rec.payment_factor_flag := 'N';
    iby_ext_bankacct_pub.create_ext_bank_acct
    p_api_version => 1.0,
    p_init_msg_list => fnd_api.g_true,
    p_ext_bank_acct_rec => p_in_acct_rec,
    p_association_level => 'S',
    p_supplier_site_id => 1376, (getting from ap_suppliers)
    p_party_site_id => 16202,
    p_org_id => 304,
    p_org_type => 'OPERATING_UNIT',
    x_acct_id => l_account_id,
    x_return_status => v_return_status,
    x_msg_count => v_msg_count,
    x_msg_data => v_msg_data,
    x_response => x_result_rec_type
    I am passing the above values to the API.
    API is running succesfully.
    I am able to check account details in the following table IBY_EXT_BANK_ACCOUNTS
    After running the above API records are getting populated in these 3 tables IBY_EXT_BANK_ACCOUNTS, iby_account_owners, IBY_PMT_INSTR_USES_ALL
    I am using the following query to cross verify whether the account is created and assigned to Supplier or not,
    select s.vendor_name, ss.vendor_site_code,
    eb.bank_name, ebb.bank_branch_name, ebb.branch_number,
    eba.BANK_ACCOUNT_NUM, eba.BANK_ACCOUNT_NAME
    from ap.ap_suppliers s, ap.ap_supplier_sites_all ss,
    apps.iby_ext_bank_accounts eba,
    apps.iby_account_owners ao, apps.iby_ext_banks_v eb, apps.iby_ext_bank_branches_v ebb
    where s.vendor_id = ss.vendor_id
    and ao.account_owner_party_id = s.party_id
    and eba.ext_bank_account_id = ao.ext_bank_account_id
    and eb.bank_party_id = ebb.bank_party_id
    and eba.branch_id = ebb.branch_party_id
    and eba.bank_id = eb.bank_party_id;
    I am able to see the the record after running the above query.
    I want the account to be attached to the Supplier level.
    If I go to Supplier screen --> and if go to Bank details, I am unable to see the bank account attached to this supplier.

    Hi,
    Did you solved the issue? I have the same task and it works for me. Check if you specify the supplier level in the bank details. Once you specify the association level equal to 'S' you have to choose from the list item - "Supplier level". Here is my code which is same as yours i think...:
    set serveroutput on size 1000000;
    DECLARE
    l_bank_acct_rec apps.iby_ext_bankacct_pub.extbankacct_rec_type;
    out_mesg apps.iby_fndcpt_common_pub.result_rec_type;
    L_ACCT NUMBER;
    l_assign apps.iby_fndcpt_setup_pub.pmtinstrassignment_tbl_type;
    l_payee_rec apps.iby_disbursement_setup_pub.payeecontext_rec_type;
    l_return_status VARCHAR2 (30);
    l_msg_count NUMBER;
    l_msg_data VARCHAR2 (3000);
    l_msg_dummy VARCHAR2 (3000);
    l_output VARCHAR2 (3000);
    l_bank_id NUMBER;
    l_branch_id NUMBER;
    l_bank VARCHAR2 (1000);
    l_acct_owner_party_id NUMBER;
    l_supplier_site_id NUMBER;
    l_party_site_id NUMBER;
    --exec_bank_acct EXCEPTION;
    l_msg_index NUMBER := 0;
    V_RETURN_STATUS varchar2(20);
    V_MSG_COUNT number;
    v_msg_data varchar2(500);
    BEGIN
    FND_GLOBAL.APPS_INITIALIZE(1112, 50639, 200);
    l_bank_acct_rec.bank_id := 5087; --(party_id from hz_parties)
    l_bank_acct_rec.branch_id := 5087; --(partyd_id from hz_parties)
    l_bank_acct_rec.country_code := 'BG';
    l_bank_acct_rec.bank_account_name := '45623123';
    l_bank_acct_rec.bank_account_num := 123145124123;
    l_bank_acct_rec.acct_owner_party_id := 183732;-- (party_id from ap_suppliers)
    l_bank_acct_rec.currency := 'BGN';
    l_bank_acct_rec.object_version_number := '1.0';
    l_bank_acct_rec.start_date := sysdate;
    --l_bank_acct_rec.foreign_payment_use_flag := 'Y';
    --l_bank_acct_rec.payment_factor_flag := 'N';
    apps.iby_ext_bankacct_pub.create_ext_bank_acct
    (p_api_version => 1.0,
    p_init_msg_list => 'F',
    p_ext_bank_acct_rec => l_bank_acct_rec,
    p_association_level => 'S',
    p_supplier_site_id => 3020,
    p_party_site_id => 43594,
    p_org_id => 81,
    p_org_type => 'OPERATING_UNIT',
    x_acct_id => l_acct,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data,
    x_response => out_mesg
    COMMIT;
    dbms_output.put_line (l_return_status);
    IF l_return_status IN ('E') THEN
    dbms_output.put_line (l_msg_count);
    FOR i IN 1 .. l_msg_count
    LOOP
    apps.fnd_msg_pub.get( i, apps.fnd_api.g_false, l_msg_data, l_msg_index );
    l_msg_data := l_msg_data || 'Bank Account API Error ';
    DBMS_OUTPUT.PUT_LINE( 'Error :- '||l_msg_data);
    END LOOP;
    dbms_output.put_line (l_msg_data);
    end if;
    end;
    /EBS Version: 12.1.3
    DB: 11.1.0.7.0
    BR,
    Bahchevanov.

  • 특정 SUPPLIER SITE LEVEL의 DATA수정 시도시 RE-QUERY ERROR

    제품 : FIN_AP
    작성날짜 : 2004-05-19
    특정 SUPPLIER SITE LEVEL의 DATA수정 시도시 RE-QUERY ERROR
    =================================================
    Problem Description
    특정 Supplier Site level의 Data수정 시도시 아래의 Message발생
    ==============================================
    record has been updated, re-query block to see change
    ==============================================
    Solution Description
    아래의 SQL을 실행해서 "CHK_TRAIL_SPACE"라는 Procedure를
    만든 후 생성된 Procedure를 다음의 방법으로 실행하면, Input Table의
    어떤 Column에 NULL문자가 들어갔는지 확인할 수 있다.
    set serveroutput on
    execute chk_trail_space(<table_name to check>);
    i.e. (execute chk_trail_space('PO_VENDORS');)
    trailspace.sql:
    ===============================================================================
    CREATE OR REPLACE PROCEDURE CHK_TRAIL_SPACE (p_table_name in varchar)
    IS
    v_table_name varchar(30);
    v_column_name varchar(30);
    v_column_name_c char(30);
    v_space_count number;
    v_ret number; -- temp holder for above
    v_initial_space_counter number;
    dyn_cursor number;
    CURSOR TABLE1 IS
    SELECT table_name
    FROM DBA_TABLES
    WHERE table_name = p_table_name;
    CURSOR COLUMN1 IS
    SELECT column_name
    FROM DBA_TAB_COLUMNS
    WHERE table_name = v_table_name;
    BEGIN
    OPEN TABLE1;
    LOOP
    -- FOR crec1 in TABLE1 LOOP
    fetch TABLE1 into v_table_name;
    IF (TABLE1%NOTFOUND) THEN
    exit;
    END IF;
    dbms_output.put_line(v_table_name);
    dbms_output.put_line
    v_initial_space_counter := 0;
    OPEN COLUMN1;
    LOOP
    -- FOR crec2 in COLUMN1 LOOP
    fetch COLUMN1 into v_column_name;
    IF (COLUMN1%NOTFOUND) THEN
    exit;
    END IF;
    dyn_cursor := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE
    (dyn_cursor,
    'SELECT COUNT(*) ' ||
    'FROM ' || p_table_name ||
    ' WHERE ' || v_column_name || ' LIKE ''% ''',
    DBMS_SQL.NATIVE);
    DBMS_SQL.define_column (dyn_cursor, 1, v_space_count);
    v_ret := DBMS_SQL.EXECUTE(dyn_cursor);
    if DBMS_SQL.fetch_rows(dyn_cursor) > 0 then
    DBMS_SQL.column_value (dyn_cursor, 1, v_space_count);
    end if;
    DBMS_SQL.CLOSE_CURSOR(dyn_cursor);
    IF v_space_count > 0 THEN
    v_initial_space_counter := v_initial_space_counter + 1;
    END IF;
    v_column_name_c := v_column_name;
    IF v_space_count > 0 THEN
    dbms_output.put_line(' ' || v_column_name_c || to_char(v_space_count))&
    #059;
    END IF;
    end loop;
    close column1;
    end loop;
    close table1;
    END CHK_TRAIL_SPACE;
    ====================================================================
    NULL문자가 들어간 Column이 확인되면,
    update po_vendors
    set vendor_name = rtrim(vendor_name);
    위의 방법으로 수정하면 된다.
    Reference Documents
    Note :234048.1

    If I delete the purchase details/line item, the supplier site can be changed.
    The error appeared again after the new line item selected,click on "Shipment" button, and change the supplier site.
    It's not able to change it. Any reason caused by the line item shipment? how it relate?

  • INVALID_PARTY_CONTEXT while creating Bank accounts at supplier site level

    Hi All,
    I am trying to create a bank account at supplier site level using below code.
    IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_ACCT(p_api_version => 1.0,
    p_init_msg_list => fnd_api.g_true,
    p_ext_bank_acct_rec => l_ExtBankAcct_rec,
    p_association_level => 'SS',
    p_supplier_site_id => l_vendor_site_id, --Vendor_site_id from ap_supplier_sites_all table
    p_party_site_id => l_party_site_id, --party_site_id from ap_supplier_sites_all table
    p_org_id => p_org_id, , --org_id fron which the program is run
    p_org_type => 'OPERATING_UNIT',
    x_acct_id => x_acct_id,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data,
    x_response => x_response);
    when I run this code from concurrent program.
    x_return_status is NULL, x_msg_count is also NULL, X_msg_data is also NULL.
    Whereas in x_response i am getting x_response.Result_Code = INVALID_PARTY_CONTEXT
    Can you please help, why is it not able to create bank account, I have valid bank and branch for this.
    Thanks,
    Sachin

    Thanks for reply Hussain.
    I have checked all these notes, 2 our of these 2 are for AR API's.
    The first note says that it would given error if you try to create a supplier of type 'EMPLOYEE' and site is given other than 'HOME' or 'OFFICE', but I am creating supplier of type 'VENDOR' and 'EMPLOYEE'.
    This note has solution "Set supplier site = 'HOME' or 'OFFICE' type.".
    As we are not creating supplier of Type 'EMPLOYEE', i guess this solution does not hold good for us.
    Any other suggestions please?
    Thanks,
    Sachin

  • Auto Sequence create on Supplier Site  DFF

    Dear,
    We are on r12, Requirment is that we have DFF on supplier site level, now i want to generate auto squence on Segment1,
    which should be generated on every site creation through Fron-END,
    So how can i acheive This.
    Thanks

    I assume you meant attribute1 (not segment1).
    Have you considered a before-insert database trigger?
    Hope this helps,
    Sandeep Gandhi

  • Error when update supplier site in Purchase Order

    Step to re-produce:
    1. Create New Purchase Order.
    2. Add 1 line item, fill-in Type = Goods, Item No, Need-By or Promised.
    3. Click on the "Shipment" button.
    4. Change the Site of the Supplier in the PO header.
    5. Error shown: "You cannot change the supplier or site for this order. Re-query the order to proceed".
    What is causing this error? Pls help. Thanks.

    If I delete the purchase details/line item, the supplier site can be changed.
    The error appeared again after the new line item selected,click on "Shipment" button, and change the supplier site.
    It's not able to change it. Any reason caused by the line item shipment? how it relate?

  • ISSUE WITH SUPPLIER SITE OPEN INTERFACE IMPORT PROGRAM in R12

    I am facing issue while submitting supplier site open interface import program programmatically using fnd_request.
    I am uploading the interface tables with the mandatory data and running the standard Request Set for Suppliers.The program is creating the Suppliers but is unable to create the Supplier Sites.It is getting completed with no rejections as well as imported records.
    It is updating the Supplier Sites Interface table (ap_supplier_sites_int ) with status as rejected with no rejected records in ap_supplier_int_rejections table.
    I am using the following code.
    Step 1 - call set_request_set
    apps.fnd_file.put_line (apps.fnd_file.LOG, 'Calling set_request_set...');
    success := fnd_submit.set_request_set ('SQLAP', 'FNDRSSUB852');--'FNDRSSUB1703');
    IF (NOT success)
    THEN
    RAISE srs_failed;
    ELSE
    apps.fnd_file.put_line (apps.fnd_file.LOG,
    'Calling submit program first time...'
    END IF;
    -- Step 2 - call submit program for each program in the set
    success :=
    fnd_submit.submit_program ('SQLAP',
    'APXSUIMP',
    'STAGE10',
    'ALL',
    1000,
    'N',
    'N',
    'N',
    CHR (0)
    IF (NOT success)
    THEN
    RAISE submitprog_failed;
    END IF;
    apps.fnd_file.put_line (apps.fnd_file.LOG,
    'Calling submit program second time...'
    success :=
    fnd_submit.submit_program ('SQLAP',
    'APXSSIMP',
    'STAGE20',
    'ALL',
    1000,
    'N',
    'N',
    'N',
    CHR (0)
    IF (NOT success)
    THEN
    RAISE submitprog_failed;
    END IF;
    -- Step 3 - call submit_set
    apps.fnd_file.put_line (apps.fnd_file.LOG, 'Calling submit_set...');
    req_id := fnd_submit.submit_set (NULL, TRUE);
    IF (req_id = 0)
    THEN
    RAISE submitset_failed;
    END IF;
    apps.fnd_file.put_line (apps.fnd_file.LOG, 'Finished.');
    And in the interface table the record status is rejected and ther is no corresponding record in ap_supplier_int_rejections.
    but the supplier is getting created succesfully.
    ### Steps to Reproduce ###
    INSERT INTO ap_suppliers_int
    (exclusive_payment_flag,
    vendor_interface_id,
    vendor_name,
    segment1,
    vendor_type_lookup_code,-- set_of_books_id,
    status
    VALUES ('N', --'N',
    ap_suppliers_int_s.NEXTVAL,
    'TEST_REC4',
    4428813,
    'VENDOR', --2041,
    --rec_spl_site_bank_hdr.set_of_books_id,
    'NEW'
    INSERT INTO ap_supplier_sites_int
    (vendor_site_interface_id,
    vendor_interface_id,
    vendor_site_code,
    address_line1,
    city,
    state,
    zip,
    country,
    operating_unit_name,
    status --exclusive_payment_flag
    VALUES (ap_supplier_sites_int_s.NEXTVAL,
    -- VENDOR_SITES_INTERFACE_ID
    ap_suppliers_int_s.CURRVAL,
    -- VENDOR_INTERFACE_ID
    'REC_VDR_SITE4',
    -- VENDOR_SITE_CODE
    'REC_ADDR4',
    -- ADDRESS_LINE1,
    'REC_CITY4', --CITY
    'REC_STATE4', --STATE
    3442121,
    'US', -- COUNTRY,
    ' Test US Operating Unit',
    'NEW'
    );

    Hi
    I have the same issue with ap supplier sites interface program .. Did your problem got solved..I will be thankfull for any help
    Thanks

  • Trigger on AP SUPPLIER SITES ALL

    Hi All,
    I have created a trigger on po_vendor_sites_all table In R11, When a new supplier site is created, the trigger fired only once and 1 record is inserted in the custom table and when updated, one record updated in the custom table.
    In R12 same trigger is created on AP_SUPPLIER_SITES_ALL, but it is behaving like when creating a supplier site, this trigger fires 3 times and we got 3 records (1 insert, 2 /3/4 update records) in the custom table. When update, depending on the fields, 2/3/4 records update in the custom table at the same time. I found that in R12, hz_locations and hz_party_sites are other tables involved in storing supplier site data. So, please, let me know how to handle this situation. I need one record to be inserted into custom table for each update or insert on supplier_sites
    Thanks in Advance!!!
    Thanks
    Venkat Reddy
    [email protected]

    Duplicate post -- Trigger on AP SUPPLIER SITES ALL

  • Bank Account at Supplier Site Level in R12

    Hi,
    I have a requirement to create bank account at supplier site level. This is part of the conversion.
    I have been testing with the below code
    DECLARE
    l_extbank_rec iby_ext_bankacct_pub.extbankacct_rec_type;
    l_vendor_site_id NUMBER (10) := 704;
    l_party_site_id NUMBER (10) := 42458;
    p_org_id NUMBER (10) := 11665;
    l_account_id NUMBER (10);
    l_return_status VARCHAR2 (2000);
    l_msg_count NUMBER (5);
    l_msg_data VARCHAR2 (2000);
    l_response iby_fndcpt_common_pub.result_rec_type;
    BEGIN
    --l_extbank_rec.  bank_account_id   :=    ;
    l_extbank_rec.country_code := 'US';
    l_extbank_rec.branch_id := 284238;
    l_extbank_rec.bank_id := 284236;
    --l_extbank_rec.  acct_owner_party_id           :=    ;
    l_extbank_rec.bank_account_name := 'TEST_ACCT';
    l_extbank_rec.bank_account_num := 976431;
    l_extbank_rec.currency := 'USD';
    --l_extbank_rec.  iban                          :=    ;
    --l_extbank_rec.  check_digits                  :=    ;
    --l_extbank_rec.  multi_currency_allowed_flag   :=    ;
    --l_extbank_rec.  alternate_acct_name              :=    ;
    --l_extbank_rec.  short_acct_name               :=    ;
    l_extbank_rec.acct_type := 'Current';
    --l_extbank_rec.  acct_suffix                      :=    ;
    --l_extbank_rec.  description                      :=    ;
    --l_extbank_rec.  agency_location_code          :=    ;
    ----l_extbank_rec. foreign_payment_use_flag := ;
    --l_extbank_rec.  exchange_rate_agreement_num   :=    ;
    --l_extbank_rec.  exchange_rate_agreement_type  :=    ;
    --l_extbank_rec.  exchange_rate                    :=    ;
    --l_extbank_rec.  payment_factor_flag              :=    ;
    --l_extbank_rec.  status                        :=    ;
    -- l_extbank_rec.end_date := '27-AUG-2011';
    l_extbank_rec.start_date := SYSDATE;
    iby_ext_bankacct_pub.create_ext_bank_acct
    (p_api_version => 1.0,
    p_init_msg_list => fnd_api.g_true,
    p_ext_bank_acct_rec => l_extbank_rec,
    p_association_level => 'SS',
    p_supplier_site_id => l_vendor_site_id,
    p_party_site_id => l_party_site_id,
    p_org_id => p_org_id,
    p_org_type => 'OPERATING_UNIT',
    x_acct_id => l_account_id,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data,
    x_response => l_response
    COMMIT;
    DBMS_OUTPUT.put_line ('x_return_status = ' || l_return_status);
    DBMS_OUTPUT.put_line ('x_msg_count = ' || l_msg_count);
    DBMS_OUTPUT.put_line ('x_msg_data = ' || l_msg_data);
    DBMS_OUTPUT.put_line ('x_acct_id = ' || l_account_id);
    DBMS_OUTPUT.put_line ('Error = ' || SQLERRM);
    END;
    ===========================
    Result:
    x_return_status =
    x_msg_count =
    x_msg_data =
    x_acct_id =741
    Error = ORA-0000: normal, successful completion
    ===========================
    Your response is much appreciated.
    Thanks,
    Srini

    Have you initialized the environment before calling the API?
    You can do this by
    fnd_global.apps_initialize(&user_id,&responsibility_id,&application_id>);
    mo_global.init('SQLAP'); -- Required for R12

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

  • Need help finding the default payment method for supplier site in R12

    I am using the following query to find out what the default payment method is for a supplier site.
    select pv.vendor_id ,
    pvs.vendor_site_id,
    iepa.ext_payee_id,
    ieppm.payment_method_code
    from ap_supplier_sites_all pvs
    ,ap_suppliers pv
    ,iby_external_payees_all iepa
    ,iby_ext_party_pmt_mthds ieppm
    where pv.pay_group_lookup_code = 'EMPLOYEE'
    and pv.vendor_type_lookup_code = 'EMPLOYEE'
    and pv.employee_id is not null
    and pv.employee_id =92584--p_person_id
    and pv.vendor_id= pvs.vendor_id
    and pvs.vendor_site_code = 'HOME'
    and pvs.pay_group_lookup_code <> 'ATTACHMENT'
    and ((pv.end_date_active is null) or (pv.end_date_active >= sysdate))
    and ((pvs.inactive_date is null) or (pvs.inactive_date>= sysdate))
    and pvs.pay_site_flag = 'Y'
    and pvs.vendor_site_id = iepa.supplier_site_id
    and iepa.ext_payee_id = ieppm.ext_pmt_party_id
    and ieppm.primary_flag = 'Y'
    and pv.segment1 = '131678'
    The problem is that I am returning two rows.
    I have gone in to the application and changed the default payment method from 'Check' to 'Electronic' and I am able to see the change on one of the records, however I am unable to determine how I'm supposed to narrow it down to just this record. I am pulling what hair I have left out!
    Please help.
    Chris

    Here is the generic query for some one who is faing problem like us.This query will return all the payment methods for all sites of a supplier
    SELECT ieppm.payment_method_code,ieppm.inactive_date
    FROM ap_supplier_sites_all assa,
    ap_suppliers ass,
    iby_external_payees_all iepa,
    iby_ext_party_pmt_mthds ieppm
    WHERE ass.vendor_id = assa.vendor_id
    AND assa.pay_site_flag = 'Y'
    AND assa.vendor_site_id = iepa.supplier_site_id
    AND iepa.ext_payee_id = ieppm.ext_pmt_party_id
    AND ass.segment1 = '10033' -- Supplier Number
    AND( (ieppm.inactive_date IS NULL)or (ieppm.inactive_date > sysdate)) ;

  • Defaulting Bank details in AP Invoice automatically from Supplier Site

    Hi,
    I want the bank details (bank name, number in the payment schedules tab in AP invoice form) to be defaulted from the supplier site when I select the supplier and site in the AP invoice header. can anyone tell me the setup or the profile option to set to do this?
    I am using 11.5.10.2
    Thanks.
    Imran

    Hi Imran
    You need to define the supplier bank account and attach the same to the supplier site level. Ensure that the primary check box is cheked wile attaching the bank account at the site level. After this, once you create the invoice against the supplier and site, the bank account will default on the invoice. Thyere is no other set up required.
    Thanks
    Vinit

Maybe you are looking for

  • How do I transfer a video to my iPhone?

    I have created a video, exported from FCPX, and want to transfer it to my iPhone 5. I also want to transfer it to several iPads  at work. I don't want to go through iTunes, but when I plug my iPhone 5 into my Mac Pro (OS X 10.7.5) my iPhone does not

  • How to print the address of a smart form in different line?

    hi ,          I have a smartform for payment advice. It's working properly but problem is in address window. i am using sap's given  address window . City district and pincode is showing in same line i want to display it different line. initially i d

  • Error message when I open Dreamweaver files

    Hi, I have troubled of Dreamweaver CS3 and hope some one can help me. When I open a file from one of my site which is connecting to database, I got error message that I have to close the Dreamweaver. It doesn't tell much what exactly wrong at the err

  • Annoying white box on black background

    My HTML page has a black background. My SWF menu has a black background from the very first frame. When the page loads, the area size of the SWF is white over the background until the SWF starts loading. Is there any way around this? It would be nice

  • Problem with colors and bits

    So I have this problem, I made a drawing with my tablet in 32bit color in photoshop and I want to save it as a TIFF file, but when I save it the image that is the tiff file is black and white and the cuality is not good.I think there is some kind of