Showing posts with label Supplier API in R12. Show all posts
Showing posts with label Supplier API in R12. Show all posts

Thursday, 28 April 2011

Supplier API in R12


Supplier API in R12

The Following API’s are used in oracle apps R12  to upload supplier data :
API Header : POS_VENDOR_PUB_PKG.CREATE_VENDOR ( parameters)
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 );
SCRIPT:
DECLARE

l_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 := '00002359'; --ID
l_vendor_rec.vendor_name := 'ABC'; --Supplier Name
--Optional
l_vendor_rec.match_option:='R' ;

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;