Skip to Content
0

Stored procedure SBO_SP_TransactionNotification must return a value

Aug 23, 2017 at 03:01 PM

220

avatar image
Former Member

Hello

While doing any Transactions in the system I get error Stored procedure SBO_SP_TransactionNotification must return a value\

I did transaction notification to block the user from delivering any items from any warehouse do not belong to him

kindly advice

 CREATE    PROCEDURE SBO_SP_TransactionNotification
(
	in object_type nvarchar(30), 				-- SBO Object Type
	in transaction_type nchar(1),			-- [A]dd, [U]pdate, [D]elete, [C]ancel, C[L]ose
	in num_of_cols_in_key int,
	in list_of_key_cols_tab_del nvarchar(255),
	in list_of_cols_val_tab_del nvarchar(255),
	cnt int     
)
LANGUAGE SQLSCRIPT
AS
-- Return values
error  int;				-- Result (0 for no error)
error_message nvarchar (200); 		-- Error string to be displayed
begin


error := 0;
error_message := N'Ok';


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


--	ADD	YOUR	CODE	HERE
IF :object_type = 15 AND :transaction_type = 'A' THEN
 SELECT count(*) into cnt FROM DLN1 INNER JOIN ODLN ON DLN1."DocEntry" = ODLN."DocEntry" WHERE "WhsCode" IN (02,01) AND ODLN."UserSign" = 42 AND ODLN."DocEntry" = :list_of_cols_val_tab_del; 
if :cnt>0 then


            error := -111;


            error_message := 'Enter Your WHS';


end if;
END IF;


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


-- Select the return values
select :error, :error_message FROM dummy;


end;
error.png (10.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers