R12: AP: New Supplier Update API's in Oracle Payables (Doc ID 1618099.1)
SET SERVEROUTPUT ON
DECLARE
lc_return_status VARCHAR2(2000);
ln_msg_count NUMBER;
ll_msg_data LONG;
Ln_Vendor_Id NUMBER;
Ln_Vendor_site_Id NUMBER;
ln_message_int NUMBER;
Ln_Party_Id NUMBER;
lrec_vendor_rec ap_vendor_pub_pkg.r_vendor_rec_type;
BEGIN
Ln_Vendor_Id := 7474;
Lrec_Vendor_Rec.vendor_name := 'JG_SUPP_DNU';
Lrec_Vendor_Rec.vendor_name_alt := 'JG_SUPP_DoNotUse';
Lrec_Vendor_Rec.end_date_active := '1-Oct-20';
Lrec_Vendor_Rec.enabled_flag := 'N';
ap_vendor_pub_pkg.update_vendor_public( p_api_version => 1,
x_return_status => lc_return_status,
x_msg_count => ln_msg_count,
x_msg_data => ll_msg_data,
p_vendor_rec => Lrec_Vendor_Rec,
p_Vendor_Id => Ln_Vendor_Id);
IF (lc_return_status <> 'S') THEN
IF ln_msg_count >= 1 THEN
FOR v_index IN 1..ln_msg_count
LOOP
fnd_msg_pub.get (p_msg_index => v_index, p_encoded => 'F', p_data => ll_msg_data, p_msg_index_out => ln_message_int );
Ll_Msg_Data := 'UPDATE_VENDOR '||SUBSTR(Ll_Msg_Data,1,3900);
dbms_output.put_line('Ll_Msg_Data - '||Ll_Msg_Data );
END LOOP;
End If;
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('SQLERRM - '||SQLERRM );
END;
/
COMMIT;
EXIT;