Sunday, 1 July 2018

API to create supplier in oracle apps r12

API to create supplier in oracle apps r12

 
In this post , I am sharing the example to create Supplier , Supplier sites and its contact in the Oracle apps through Oracle Standard API. You can refer this code to create suppliers through backend in oracle apps r12.

API to Create Supplier Headers


POS_VENDOR_PUB_PKG.CREATE_VENDOR is uses to Create the Supplier Header record.
PROCEDURE Create_Vendor(
p_vendor_rec IN AP_VENDOR_PUB_PKG.r_vendor_rec_type,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
x_vendor_id OUT NOCOPY NUMBER,
x_party_id OUT NOCOPY NUMBER
);


Example to Create Supplier header in the Oracle apps


DECLARE

_vendor_rec    ap_vendor_pub_pkg.r_vendor_rec_type;
l_return_status     VARCHAR2(10);
l_msg_count     NUMBER;
l_msg_data  VARCHAR2(1000);
l_vendor_id NUMBER;
l_party_id  NUMBER;

BEGIN

--Required
l_vendor_rec.segment1 := '10001'; --ID
l_vendor_rec.vendor_name := 'TEST_SUPPLIER'; --Supplier Name

pos_vendor_pub_pkg.create_vendor
(
p_vendor_rec => l_vendor_rec,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
x_vendor_id => l_vendor_id,
x_party_id => l_party_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_id: '||l_vendor_id);
dbms_output.put_line('party_id: '||l_party_id);

END;

API to Create Supplier Sites in Oracle apps


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;

Supplier contacts creation API in Oracle apps.


POS_VENDOR_PUB_PKG.Create_Vendor_Contact

 

3 comments:

Anonymous said...

Nice effort, very informative, this will help me to complete my task. Thanks for sharing it. Have a look at the process blogs to see more..Please contact us for Oracle R12 Financials Training in Bangalore details

in our Erptree Training Institute

Realtime Experts said...

This blog very easily understandable. Thanks for sharing such an informative post with us. This is a nice post in an interesting line of content.
Oracle apps Training in Bangalore

Realtime Experts said...

This blog very easily understandable. Thanks for sharing such an informative post with us. This is a nice post in an interesting line of content.
Oracle apps Training in Bangalore

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *