Hi Try this
If @object_type = '22' and @transaction_type in ('A','U')
Begin
IF EXISTS (SELECT T0.[DocNum] FROM OPOR T0 WHERE t0.Trnspcode=-1 and
T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
set @Error = 18
set @error_message = 'Please Select the Shipping type in Logistic'
END
End