Skip to Content
0
Former Member
Jun 05, 2009 at 06:01 AM

Need Help for SBO_NP_Transaction Notification_Sales Quotation.

12 Views

Dear Members,

I have inserted my code to alert me when i try to add sales quotation withthe profitcentre is not added.

But its not working for sales quotation,but others its working fine.

I have passed the object id of sales quotation also.

set ANSI_NULLS ON

set QUOTED_IDENTIFIER ON

go

ALTER proc [dbo].[SBO_SP_TransactionNotification]

@object_type nvarchar(25), -- SBO Object Type

@transaction_type nchar(1), -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose

@num_of_cols_in_key int,

@list_of_key_cols_tab_del nvarchar(255),

@list_of_cols_val_tab_del nvarchar(255)

AS

begin

-- Return values

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

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

select @error = 0

select @error_message = N'Ok'

IF (@object_type = '23' AND @transaction_type= 'A')

BEGIN

IF EXISTS (SELECT DocEntry FROM [dbo].[QUT1] WHERE (QUT1.OCRCODE IS NULL OR QUT1.OCRCODE= '') AND DocEntry = @list_of_cols_val_tab_del)

BEGIN

SELECT @error =1, @error_message = 'PROFIT CENTER cannot be blank -Enter Relevant Dimension'

END

END

select @error, @error_message

END

Please help me in this regard,

Thanks,

Venkatesh.R