Tuesday Feb 05, 2013

Oracle External Bank Payment APIs

Here I will be sharing all APIs related to Oracle External Bank Payment.

Item Type

Author

1

2

API to Create External Bank

API to Create External Bank Branch

Puneet Rajkumar

Puneet Rajkumar

Monday Feb 04, 2013

API to Create External Bank Branch

API - IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_BRANCH

Example --

 

 -- API to Create External Bank Branch

 

DECLARE
     p_api_version    NUMBER                   := 1.0;
     p_init_msg_list  VARCHAR2(1)          := 'F';
     v_bank_id           NUMBER                   := 530705; 
     x_return_status  VARCHAR2(2000);
     x_msg_count      NUMBER(5);
     x_msg_data        VARCHAR2(2000);
     x_branch_id        NUMBER;
     p_count               NUMBER;

     x_response         iby_fndcpt_common_pub.result_rec_type;
     p_ext_bank_branch_rec iby_ext_bankacct_pub.extbankbranch_rec_type;

BEGIN
      dbms_output.put_line ('BEFORE BANK BRANCH API');
  
      p_ext_bank_branch_rec.bch_object_version_number  := 1.0;
      p_ext_bank_branch_rec.branch_name        := 'TEST BANK BRANCH';
      p_ext_bank_branch_rec.branch_type          := 'ABA';
      p_ext_bank_branch_rec.bank_party_id      := v_bank_id;
 
     IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_BRANCH
     (    -- -----------------------------
          -- Input data elements
          -- -----------------------------
          p_api_version                  => p_api_version,
          p_init_msg_list                => p_init_msg_list,
          p_ext_bank_branch_rec  => p_ext_bank_branch_rec,
          -- --------------------------------
          -- Output data elements 
          -- --------------------------------
          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
      );

     dbms_output.put_line ('x_branch_id = ' || x_branch_id);

     IF (x_msg_count = 1) 
     THEN
              dbms_output.put_line ('x_msg_data ' || x_msg_data);

     ELSIF (x_msg_count > 1)
     THEN
               LOOP 
                     p_count := p_count + 1; 
                     x_msg_data := fnd_msg_pub.get (fnd_msg_pub.g_next, fnd_api.g_false);

                    IF (x_msg_data IS NULL)
                    THEN
                             EXIT;
                    END IF;

                   dbms_output.put_line ('Message' || p_count || ' ---' || x_msg_data);
               END LOOP; 
     END IF; 
  

     COMMIT;

EXCEPTION
             WHEN OTHERS THEN
                           ROLLBACK;

                           dbms_output.put_line(SQLERRM);
END;
/

SHOW ERR;

 

Saturday Feb 02, 2013

API to Create Bank

API - IBY_EXT_BANKACCT_PUB.create_ext_bank

Example --

 

 -- API to Create Bank


 

DECLARE
   lc_output                VARCHAR2(3000);
   lc_msg_dummy     VARCHAR2(3000);
   lc_return_status     VARCHAR2(3000);
   lc_msg_data           VARCHAR2(3000);

   ln_bank_id             NUMBER;
   ln_msg_count        NUMBER;
   lr_extbank_rec       apps.iby_ext_bankacct_pub.extbank_rec_type;
   lr_response_rec     apps.iby_fndcpt_common_pub.result_rec_type;


BEGIN
   lc_return_status    := '';
   ln_msg_count       := '';
   lc_msg_data          := '';
 
   lr_extbank_rec.bank_name       := 'Test Supp Bank';
   lr_extbank_rec.bank_number   := 'TSB0000001';
   lr_extbank_rec.country_code    := 'IN';

   apps.fnd_msg_pub.delete_msg(NULL);
   apps.fnd_msg_pub.initialize();

   IBY_EXT_BANKACCT_PUB.create_ext_bank
   (     
  -- ------------------------------
           -- Input data elements
           -- ------------------------------
           p_api_version       => 1.0,
           p_init_msg_list     => FND_API.G_TRUE,
           p_ext_bank_rec     => lr_extbank_rec,
           -- --------------------------------
           -- Output data elements
           -- --------------------------------
           x_bank_id            => ln_bank_id,
           x_return_status   => lc_return_status,
           x_msg_count       => ln_msg_count,
           x_msg_data         => lc_msg_data,
           x_response          => lr_response_rec
     );

     lc_output := ' ';

     IF (lc_return_status <> 'S')
     THEN
               FOR i IN 1 .. ln_msg_count
               LOOP
                            apps.fnd_msg_pub.get
                            (       i,
                                    apps.fnd_api.g_false,
                                    lc_msg_data,
                                    lc_msg_dummy
                             );
   
                            lc_output := lc_output ||
                                                  (TO_CHAR (i) ||
                                                                       ': '  ||
                                                   SUBSTR (lc_msg_data, 1, 250));
             END LOOP;

             apps.fnd_file.put_line
            (apps.fnd_file.output, 'Error Occured while Creating Bank: ');

       END IF;
 
     COMMIT;

EXCEPTION
          WHEN OTHERS THEN
                        ROLLBACK;

                        dbms_output.put_line(SQLERRM);
END;
/

 

SHOW ERR;

About

Welcome to My Oracle World Puneet Rajkumar

Search

Categories
Archives
« February 2013 »
SunMonTueWedThuFriSat
     
1
3
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  
       
Today