Skip to Content
0

Block a batch if not QA approved

Dec 15, 2017 at 04:12 PM

34

avatar image

Hi all.

I have a UDF placed on the OBTN table for QA approval status. I want to prevent the adding of an Invoice if the batch does not have this UDF marked as "Released". I have created a simple Transaction Notification but for some reason I keep getting a "[Microsoft][ODBC Driver Manager] Function sequence error '' (RDR1) (WLS1)".

The TN is:

IF :object_type = '13' AND :transaction_type='A' THEN DECLARE item nvarchar(20); DECLARE batch nvarchar(42); DECLARE approved nvarchar( 50); SELECT T0."ItemCode", T0."DistNumber", T0."U_BatchStatus" INTO item, batch, approved from OBTN t0 left join INV1 t2 on t0."ItemCode" = t2."ItemCode" AND t2."DocEntry" = CAST(:list_of_cols_val_tab_del AS integer); IF :Approved <> 'Released' THEN SELECT -1 INTO error FROM DUMMY; SELECT 'Error' || :batch || ' for item ' || :item || ' has not been released' INTO error_message FROM DUMMY; END IF; END IF;

Running SAP B1 9.2 PL03 on a hosted HANA environment.

Thanks, Alan.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers