Hi,
Try the below SP_TN
IF @transaction_type IN ('U') AND @object_type = '18'and @error = 0
BEGIN
IF EXISTS (SELECT T0.DocNum FROM OPCH T0 INNER JOIN ocrd T1 on T1.CardCode=T0.CardCode WHERE T0.DOCENTRY = @list_of_cols_val_tab_del AND T0.NumAtCard is NULL)
BEGIN
SELECT @error = 8, @error_message = 'You can not edit the Vendor Ref No after Posting.'
END
END
Regards,
Manish