Showing posts with label Banks. Show all posts
Showing posts with label Banks. Show all posts

Saturday, 12 July 2014

External Bank and Bank Branches

When Creating Suppliers or Customers in Oracle , we might be associating bank accounts with them. A bank account can only be created if a bank and bank branch exists , thus the below sequence needs to be followed .
  1. Check for an existing bank or Create a new bank
  2. Check for an existing branch of the bank or create a new bank branch
  3. Create the bank account for the bank and branch combination
Each bank and bank branch is created as a party in oracle.
There might be scenarios where we also create an address for the bank/ branch. When using the Oracle front end the details need to be entered from the OAF screen. In Order to achieve the same by program the below sequence needs to be followed .

  1. Create the bank/ bank branch
  2. Create a location in Oracle with the bank/branch address details using API : HZ_LOCATION_V2PUB.CREATE_LOCATION
  3. Create a party site in Oracle using the party_id (bank id/bank_brach_id) of the bank/branch created in Step 1 and location id of the address created in Step 2. Use the API : HZ_PARTY_SITE_V2PUB.CREATE_PARTY_SITE
 

Thursday, 7 November 2013

API To Update Bank Branch Details

Oracle has provided an API to update the bank branch details:

     IBY_EXT_BANKACCT_PUB.update_ext_bank_branch (
          p_api_version                => 1.0,
          p_init_msg_list              => FND_API.G_TRUE,
          p_ext_bank_branch_rec        => l_bank_branch_rec,
          x_return_status                 => l_chr_return_status,
          x_msg_count                    => l_num_count,
          x_msg_data                     => l_msg_data,
          x_response                      => x_response_rec
                    );

l_bank_branch_rec is BANK BRANCH record type variables. The mandatory parameters to be passed to the API are as below:

bank_party_id => Bank Id
branch_party_id => Branch Id
branch_name => branch_name
branch_number => branch_number
branch_type  => branch_type
alternate_branch_name => alt branch name
bch_object_version_number ,typ_object_version_number ,rfc_object_version_number ,eft_object_version_number => Bank Branch object version number derived from iby_ext_bank_branches_v.

In case of successful Update the API will return 'S'  , In case of errors use the below code snippet to display the error messages:

FOR i IN 1 .. l_num_count
           LOOP
              fnd_msg_pub.get (
                 p_msg_index       => -1,
                 p_encoded         => 'F',
                 p_data            => l_msg_data,
                 p_msg_index_out   => l_msg_index_out);

              fnd_file.put_line(fnd_file.LOG,
                 'Error in Bank Branch Updation  ' || l_msg_data);
              l_chr_val_ret_msg :=
                 l_chr_val_ret_msg || '  ' || l_msg_data;
             
END LOOP;

Thanks