PeopleSoft Validate Vendor ID

Your rating: None Average: 2 (1 vote)

The select statement below is preformed by AP Voucher Build (AP_VCHRBLD) Application Engine to validate a Vendor ID:

INSERT INTO %TABLE(VCHR_HDR_QV_ER) (PROCESS_INSTANCE
, BUSINESS_UNIT
, VOUCHER_ID
, MESSAGE_SET_NBR
, MESSAGE_NBR
, FIELDNAME
, MESSAGE_PARM1
, MESSAGE_PARM2
, MESSAGE_PARM3)
SELECT %Bind(PROCESS_INSTANCE)
, HDR.BUSINESS_UNIT
, HDR.VOUCHER_ID
, 7220
, 2
, 'VENDOR_ID'
, HDR.VENDOR_SETID
, HDR.VENDOR_ID
, ' '
FROM %TABLE(VCHR_HDR_TMP) HDR
WHERE HDR.PROCESS_INSTANCE = %Bind(PROCESS_INSTANCE)
AND VENDOR_ID NOT IN (
SELECT VENDOR_ID
FROM %TABLE(VENDOR) VND
WHERE HDR.VENDOR_ID = VND.VENDOR_ID
AND HDR.VENDOR_SETID = VND.SETID
AND VND.VENDOR_STATUS = 'A' )

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!