Hi,
Try to add your user code:-
IF @transaction_type in ('A','U') AND (@OBJECT_TYPE='22')
BEGIN
If exists (SELECT T0.[Docentry] FROM OPOR T0
where T0.DocEntry = @list_of_cols_val_tab_del and T0.[U_Deliver] is null and T0.UserSign2 in ('1'))
Begin
SET @error = 10
SET @error_message = 'Please add UDF value'
End
End