Hi Expert,
I tried this code in SP to block Asset Code that have already been purchased.
But instead the effect is all asset code are blocked.
Please Help.
Thank You.
---Block duplicate Asset Code if @transaction_type in ('A','U') AND @Object_type = '1470000113' begin if exists (select T0.ItemCode, Count(T0.ItemCode) FROM PRQ1 T0 where T0.DocEntry=@list_of_cols_val_tab_del GROUP BY T0.ItemCode having count(T0.ItemCode) >1 ) set @error=1 set @error_message = 'Cant duplicate item' END -------