Wednesday, June 9, 2010

R12 Supplier Bank API's

Your Ad Here



In order to load Supplier external bank, branches and bank accounts, one needs to use the Oracle Supplied Package IBY_EXT_BANKACCT_PUB.

Below API's are used to create Bank and Branch

IBY_EXT_BANKACCT_PUB.create_ext_bank:

It is used to create the External Bank, please note that the Bank name and Home Country Name are mandatory for creating an External Bank. Once you create the Bank, Bank Party ID gets created and you can check it from IBY_EXT_BANKS_V view.

IBY_EXT_BANKACCT_PUB.create_ext_bank
(p_api_version => 1.0
,p_init_msg_list => FND_API.G_TRUE
,p_ext_bank_rec => x_bank_rec
,x_bank_id => x_bank_id
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
,x_response => x_response_rec
);

IBY_EXT_BANKACCT_PUB.create_ext_bank_branch

It is used to create a Bank Branch, so that an account could be created in the same branch. Once a Bank Branch is created, a record gets inserted into IBY_EXT_BANK_BRANCHES_V view.

IBY_EXT_BANKACCT_PUB.create_ext_bank_branch
(p_api_version => 1.0
,p_init_msg_list => FND_API.G_TRUE
,p_ext_bank_branch_rec => x_bank_branch_rec
,x_branch_id => x_branch_id
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
,x_response => x_response_rec
);


After the bank and branches are created, the table iby.iby_temp_ext_bank_accounts can be populated to create the bank accounts and associate to the supplier or supplier site

Note: Table must be populated prior to running the supplier interface


Below API's are used internally by oracle to create payee and associate bank account to supplier or supplier site.

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 => x_bank_acct_rec
,x_acct_id => x_acct_id
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
,x_response => x_response_rec
);


IBY_DISBURSEMENT_SETUP_PUB.Create_External_Payee
(p_api_version => 1.0,
p_init_msg_list => FND_API.G_TRUE,
p_ext_payee_tab => v_external_payee_tab_type,
x_return_status => v_return_status,
x_msg_count => v_msg_count,
x_msg_data => v_msg_data,
x_ext_payee_id_tab => x_ext_payee_id_tab,
x_ext_payee_status_tab => x_ext_payee_status_tab);

IBY_DISBURSEMENT_SETUP_PUB.Set_Payee_Instr_Assignment
(p_api_version => 1.0
,p_init_msg_list => FND_API.G_TRUE
,p_payee => x_rec
,p_assignment_attribs => x_assign
,x_assign_id => x_assign_id
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
,x_response => x_response_rec);
Your Ad Here

4 comments:

  1. Nice post.. !!! Apt info for a developer!! Googled a lot but dint got needed info.. Thanks.

    ReplyDelete
  2. Very well explained. Thanks a lot this is really help full. I also want to share how can we achieve the Supplier and Bank accounts conversion using the interface tables instead of the APIs, Please correct me if I am wrong.

    NOTE: Assumed banks already got converted

    Import data into the tables

    AP_SUPPLIERS_INT
    AP_SUPPLIER_SITES_INT
    AP_SUP_SITE_CINTACT_INT
    IBY_TEMP_EXT_BANK_ACCTS

    declare

    cursor c1 to
    select vendor, party, bank_account information
    from HZ_PARTIES
    AP_SUPPLIERS,
    AP_SUPPLIER_SITES,
    IBY_EXT_BANK_ACCOUNTS

    begin

    -- submit 'SUPPLIER IMPORT'
    -- submit 'SUPPLIER SITES IMPORT'
    -- submit 'SUPPLIER SITE CONTACT IMPORT'

    For c1_rec IN c1
    Loop

    -- submit ' IBY_DISBURSEMENT_SETUP_PUB.Set_Payee_Instr_Assignment'

    END LOOP

    Is this the right process or am I missing anything?? Or do we also need to create payee
    using IBY_DISBURSEMENT_SETUP_PUB.Create_External_Payee before we call the assignment


    Thanks.

    ReplyDelete
  3. Thank you sooo much.. Your post is the only one that really help me.

    ReplyDelete
  4. Your blog is quite helpful. You might like my blog www.oraclemaniac.com also. I'd love to get your comments.

    ReplyDelete