Skip to Content

Block a batch if not QA approved

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers