Hi,
Try this:
IF @transaction_type IN ('A')AND @object_type in ('202')
BEGIN
If exists (SELECT T0.DocEntry FROM owor T0
where T0.[Type] = 'P' and T0.[UserSign] = '1'and t0.DocEntry =@list_of_cols_val_tab_del )
Begin
SET @error = '202'
SET @error_message = N'Not allowed to special production orde'
End
END
Thanks & Regards,
Nagarajan