Skip to Content
0
Former Member
Dec 10, 2013 at 10:27 AM

Help with Transaction Notification

108 Views

Hi All,

I have created two udf's: one at header level and one at row level.

In case if the values in the two udf's is 'Main', then the addition of inventory transfer is to be blocked.

IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'67')

BEGIN

if exists (SELECT T1.DocEntry FROM OWTR T0 inner join WTR1 T1 on T0.docentry = T1.Docentry

WHERE T0.Filler =@list_of_cols_val_tab_del and T0.U_WhsType ='Main'

and T1.U_WhsTyp = 'Main' )

begin

SET @error = 7

SET @error_message = N'Main Warehouse to Main Warehouse Transfer of Stock is not Permitted!! '

end

END

This does not work but I would like it to work on the logic provided.

Any suggestions?

Thanks,

Joseph