PeopleSoft Validate AP Business Unit

Your rating: None Average: 1.5 (2 votes)

The select statement below is preformed by AP Voucher Build (AP_VCHRBLD) Application Engine to validate an AP Business Unit:

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
, 1
, 'BUSINESS_UNIT'
, HDR.BUSINESS_UNIT
, ' '
, ' '
FROM %TABLE(VCHR_HDR_TMP) HDR
WHERE PROCESS_INSTANCE = %Bind(PROCESS_INSTANCE)
AND BUSINESS_UNIT NOT IN (
SELECT BUSINESS_UNIT
FROM %TABLE(BUS_UNIT_TBL_AP) BUS
WHERE HDR.BUSINESS_UNIT = BUS.BUSINESS_UNIT)

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!