During the Payables Invoice Interface process, one of the validations involve validating the Vendor Number for which the Invoice is being created for. The Validation logic checks in the system to see if a vendor already exists for that vendor number. If Yes, then an Invoice can be created for that Supplier. Else, since that Supplier doesn’t exist, Invoices cannot be created against that supplier and the validation should result in error.
CURSOR cur_vendor_num_chk (cp_vendor_num ap_suppliers.segment1%TYPE)
WHERE segment1 = cp_vendor_num;
OPEN cur_vendor_num_chk (p_vendor_num);
FETCH cur_vendor_num_chk INTO l_vendor_id;
'Supplier exists in the system '
|| CHR (10)
|| ' Thus, Invoice Can be created for this vendor.');
'Supplier does not exist and Invoice cannot be created using this Supplier');
DBMS_OUTPUT.put_line ('Error while validation: ' || SQLERRM);