Overview:-

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

 

API:-

DECLARE
l_vendor_rec AP_VENDOR_PUB_PKG.r_vendor_rec_type;
l_return_status VARCHAR2(30);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
l_vendor_id NUMBER;
l_party_id NUMBER;

BEGIN

—-Required field for API pos_vendor_pub_pkg
l_vendor_rec.segment1 := ‘99345’;
l_vendor_rec.vendor_name := ‘Test’;
—-Optional field for API pos_vendor_pub_pkg
l_vendor_rec.match_option := ‘R’;
l_vendor_rec.start_date_active := sysdate – 1;

—-API call
pos_vendor_pub_pkg.Create_Vendor(
p_vendor_rec => l_vendor_rec,–out parameter
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;
–output statement
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);

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

Recent Posts

Start typing and press Enter to search