API to Create AP Supplier Site

API - pos_vendor_pub_pkg.create_vendor_site

 

Example --


 -- API to Create Supplier Site

DECLARE
 l_vendor_site_rec      ap_vendor_pub_pkg.r_vendor_site_rec_type;
 lc_return_status         VARCHAR2(10);
 ln_msg_count            NUMBER;
 lc_msg_data               VARCHAR2(1000);
 ln_vendor_site_id     NUMBER;
 ln_party_site_id         NUMBER;
 ln_location_id            NUMBER;

BEGIN
         -- ---------------
         -- Required 
         -- ---------------
        l_vendor_site_rec.vendor_id               := 40169;
        l_vendor_site_rec.vendor_site_code  := 'Supplier_Site';
        l_vendor_site_rec.address_line1         := '05 Main Street';
        l_vendor_site_rec.city                           := 'New York';
        l_vendor_site_rec.country                    := 'US';
        l_vendor_site_rec.org_id                      := 202;
 
        -- -------------- 
        -- Optional 
        -- --------------
        l_vendor_site_rec.purchasing_site_flag  :='N';
        l_vendor_site_rec.pay_site_flag                :='N'; 
        l_vendor_site_rec.rfq_only_site_flag       :='N';
 
        pos_vendor_pub_pkg.create_vendor_site
        ( 
              -- ------------------------------
              -- Input data elements
              -- ------------------------------
              p_vendor_site_rec    => l_vendor_site_rec,
              -- ---------------------------------
              -- Output data elements
              -- ---------------------------------
              x_return_status         => lc_return_status,
              x_msg_count             => ln_msg_count,
              x_msg_data                => lc_msg_data,
              x_vendor_site_id      => ln_vendor_site_id,
              x_party_site_id         => ln_party_site_id,
              x_location_id            => ln_location_id
        );
 
        COMMIT;

 EXCEPTION
         WHEN OTHERS THEN 
                       ROLLBACK; 
                       DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;

/
SHOW ERR;

 

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Welcome to My Oracle World Puneet Rajkumar

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today