We can use the pos_vendor_pub_pkg.create_vendor API for creating a Supplier in EBS Purchasing.
DECLARE
l_vendor_rec apps.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
l_vendor_rec.vendor_name :='TestSupplier' ; --Supplier Name
l_vendor_rec.match_option:='R' ;
l_vendor_rec.invoice_currency_code :='USD';
l_vendor_rec.payment_currency_code :='USD';
APPS.MO_GLOBAL.INIT ('PO');
APPS.MO_GLOBAL.SET_POLICY_CONTEXT ('S', 204);
APPS.FND_GLOBAL.APPS_INITIALIZE ( USER_ID => 1318, RESP_ID => 50578, RESP_APPL_ID => 201 );
apps.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
);
IF (l_return_status= 'S') THEN
dbms_output.put_line('Supplier Created Successfully In EBS') ;
ELSE
dbms_output.put_line('Error In Supplier Creation API : '||l_msg_data) ;
END IF;
END;
DECLARE
l_vendor_rec apps.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
l_vendor_rec.vendor_name :='TestSupplier' ; --Supplier Name
l_vendor_rec.match_option:='R' ;
l_vendor_rec.invoice_currency_code :='USD';
l_vendor_rec.payment_currency_code :='USD';
APPS.MO_GLOBAL.INIT ('PO');
APPS.MO_GLOBAL.SET_POLICY_CONTEXT ('S', 204);
APPS.FND_GLOBAL.APPS_INITIALIZE ( USER_ID => 1318, RESP_ID => 50578, RESP_APPL_ID => 201 );
apps.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
);
IF (l_return_status= 'S') THEN
dbms_output.put_line('Supplier Created Successfully In EBS') ;
ELSE
dbms_output.put_line('Error In Supplier Creation API : '||l_msg_data) ;
END IF;
END;
No comments:
Post a Comment