Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

SP_TransactionNotification error

$
0
0

hii experts ,

 

begin

 

-- Return values

declare @error  int                -- Result (0 for no error)

declare @error_message nvarchar (200)         -- Error string to be displayed

declare @name varchar(50)

declare @name1 varchar(50)

declare @name2 varchar(50)

declare @ST varchar(50)

declare @CO varchar(50)

select @error = 0

select @error_message = N'Ok'

 

--------------------------------------------------------------------------------------------------------------------------------

 

--    ADD    YOUR    CODE    HERE

 

if (@object_type ='4' and @transaction_type in ('A','U'))

begin

 

if  (@list_of_cols_val_tab_del<> '')

begin

SELECT @ST =U_STANDARD FROM OITM WHERE DocEntry = @list_of_cols_val_tab_del

if(IsNull(@ST,' ')='')

                begin

                        SELECT @error=101, @error_message ='ST null ....'

                end

SELECT  @CO =U_STANDARD FROM OITM WHERE DocEntry = @list_of_cols_val_tab_del

if(IsNull(@CO,' ')='')

                begin

                        SELECT @error=102, @error_message ='co null'

                end

SELECT  top(1)  @name= dbo.UFD1.Descr FROM   dbo.UFD1 RIGHT OUTER JOIN dbo.CUFD ON dbo.UFD1.FieldID = dbo.CUFD.FieldID where  dbo.UFD1.FldValue ='2' and  dbo.CUFD.AliasID = 'STANDARD'

if(IsNull(@name,' ')='')

                begin

                        SELECT @error=103, @error_message ='name 1 error.'

                end

SELECT top(1)  @name1= dbo.UFD1.Descr FROM   dbo.UFD1 RIGHT OUTER JOIN dbo.CUFD ON dbo.UFD1.FieldID = dbo.CUFD.FieldID where  dbo.UFD1.FldValue = convert(varchar, @CO) and  dbo.CUFD.AliasID = 'CONDUCTOR'

if(IsNull(@name1,' ')='')

                begin

                        SELECT @error=104, @error_message ='name 2 error'

                end

set @name2 = @name1

update OITM set ItemName=@name2 where DocEntry = @list_of_cols_val_tab_del

select @error =N'128' + @ST,

 

@error_message =N'Please add U_Hotel' + @name +@name1 +@name2

end

 

end

 

--------------------------------------------------------------------------------------------------------------------------------

 

-- Select the return values

select @error, @error_message

 

 

 

 

this my code but when item add or update this query doesn't  execute

so plz help what can i do.....

 

regardes,

VEER


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>