API to create supplier site in oracle apps r12
In this post I am sharing the code to create Suppliers sites in Oracle apps r12. You can refer this post to create the Supplier sites in Oracle.
API to create supplier site in oracle apps r12
POS_VENDOR_PUB_PKG.CREATE_VENDOR_SITE is uses to Create Supplier Sites in Oracle apps.
PROCEDURE Create_Vendor_Site(
p_vendor_site_rec IN AP_VENDOR_PUB_PKG.r_vendor_site_rec_type,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
x_vendor_site_id OUT NOCOPY NUMBER,
x_party_site_id OUT NOCOPY NUMBER,
x_location_id OUT NOCOPY NUMBER
);
Example to Create Supplier site in Oracle apps.
DECLARE
l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
l_return_status VARCHAR2(10);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
l_vendor_site_id NUMBER;
l_party_site_id NUMBER;
l_location_id NUMBER;
BEGIN
--Required
l_vendor_site_rec.vendor_id :='10001';
l_vendor_site_rec.vendor_site_code := 'TEST_SITE';
l_vendor_site_rec.address_line1 := 'TEST1';
l_vendor_site_rec.country := 'IN';
l_vendor_site_rec.org_id := '83';
l_vendor_site_rec.purchasing_site_flag:='Y';
l_vendor_site_rec.pay_site_flag :='Y';
l_vendor_site_rec.rfq_only_site_flag :='N';
pos_vendor_pub_pkg.create_vendor_site
(
p_vendor_site_rec => l_vendor_site_rec,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_vendor_site_id => l_vendor_site_id,
x_party_site_id => l_party_site_id,
x_location_id => l_location_id
);
COMMIT;
dbms_output.put_line('return_status: '||l_return_status);
dbms_output.put_line('msg_data: '||l_msg_data);
dbms_output.put_line('vendor_site_id: '||l_vendor_site_id);
dbms_output.put_line('party_site_id: '||l_party_site_id);
END;
l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
l_return_status VARCHAR2(10);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
l_vendor_site_id NUMBER;
l_party_site_id NUMBER;
l_location_id NUMBER;
BEGIN
--Required
l_vendor_site_rec.vendor_id :='10001';
l_vendor_site_rec.vendor_site_code := 'TEST_SITE';
l_vendor_site_rec.address_line1 := 'TEST1';
l_vendor_site_rec.country := 'IN';
l_vendor_site_rec.org_id := '83';
l_vendor_site_rec.purchasing_site_flag:='Y';
l_vendor_site_rec.pay_site_flag :='Y';
l_vendor_site_rec.rfq_only_site_flag :='N';
pos_vendor_pub_pkg.create_vendor_site
(
p_vendor_site_rec => l_vendor_site_rec,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_vendor_site_id => l_vendor_site_id,
x_party_site_id => l_party_site_id,
x_location_id => l_location_id
);
COMMIT;
dbms_output.put_line('return_status: '||l_return_status);
dbms_output.put_line('msg_data: '||l_msg_data);
dbms_output.put_line('vendor_site_id: '||l_vendor_site_id);
dbms_output.put_line('party_site_id: '||l_party_site_id);
END;
0 comments:
Post a Comment