Skip to Content

SBO_SP_TransactionNotification weird error

Nov 30, 2017 at 07:01 PM


avatar image
Former Member


I'm trying to add a condition in this SP to perform a specific task, but it always return a strange error in SAP B1. (version 9.2 PL06)

Here's the SP code:

IF @object_type = '4' AND @transaction_type IN ('A', 'U') BEGIN
	Declare @ManufCode NVARCHAR(30),
			@Cout NUMERIC(10,2)

SET @Cout = (SELECT T0.U_COUTAUTRE FROM OITM T0 WHERE T0.DocEntry = @list_of_cols_val_tab_del)


This should be straighforward. Get the value of a UDF in the OITM table when Adding or Updating an Item in the Inventory module.

But in B1, it always returns the error message: "Conversion failed when converting the NVARCHAR value 'XXXXX' to data type INT"

XXXX is the value in the Mfr Catalog No (SuppCatNum)

I can't see what I'm missing here.

Any help would be really appreciate,

thanks for your time

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Danilo Kasparian Nov 30, 2017 at 08:18 PM

Your @list_of_cols_val_tab_del is the itemCode, the PK of OITM table so you need to use itemcode instead of docentry as follow

IF@object_type ='4'AND@transaction_type IN('A','U')BEGIN
	Declare @ManufCode NVARCHAR(30),@Cout NUMERIC(10,2)SET@Cout =(SELECT T0.U_COUTAUTRE FROM OITM T0 WHERE T0.ItemCode = @list_of_cols_val_tab_del)END
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I didn't knew the @list_of_cols_val_tab_del refered to the PK the the target table. All examples I could find used DocEntry. Thanks a lot for your help, it works now!