Skip to Content
0
Former Member
May 08, 2012 at 05:40 AM

Stored procedure for UDF Update

46 Views

Hi Tam,

pls help me a stored procedure for blocking a UDF in Purchase Invoice

when first we create the purchase invoice user select the UDF field and post the document..

My requirement is further update to the field to be blocked..

i am using SP is

IF @object_type = N'18' and @transaction_type IN (N'U')

Begin

Declare @INV1 as Nvarchar(200)

Select @INV1=U_assignedfor From OPCh Where DocEntry=@list_of_cols_val_tab_del

Declare @INV2 as Nvarchar(200)

Select @INV2=U_assignedfor from PCH1 T1 Inner Join OPCH T0 ON T0.Docentry=T1.Docentry where T1.DocEntry=1

if @INV2 NOT IN (@INV1)

Begin

Set @error =207

Set @error_message =(CONVERT(nvarchar(20), @INV2))+(CONVERT(nvarchar(20), @INV1))

End

End

But in this SP @inv1 and @inv2 Take the same value

Yours AjiAlukkal