cancel
Showing results for 
Search instead for 
Did you mean: 

User Defined Table Input Error

Former Member
0 Kudos

Hi Guys

I have a UDT that i have specified as all alphanumeric types, when i try enter values into the table through SAP, by going to Tools --> user defined windows --> @table, i get the following error "cannot convert nvarchar value to int", the code and name that SAP automatically creates on UDTs are nvarchar too, what needs to be done so that i can manually enter values?? if i have to go into SQL and enter the same data by saying modify @table then the values are accepted whereas in SAP it rejects the exact same values?

What needs to be done?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

vijay_kumar1
Contributor
0 Kudos

Hi Ferreira,

Are you using 2007 A version ? if so ,please check the object_type in SBO_SP_TransactionNotification. Also, refer to SAP Note :

967470.

Regards,

Vijay kumar

Former Member
0 Kudos

hi vijay

Yes i am using 2007 A, the object type in Transaction Notification is nvarchar (20).

vijay_kumar1
Contributor
0 Kudos

Hi Euston,

Do you have any additional code added to the SBO_SP_TransactionNotification ?

If so, please post in the message.

Regards,

Vijay kumar

Former Member
0 Kudos

Hi Vijay

I have a few stored procs, here is the code, appreciate the help

if( @object_type = 17 and(@transaction_type = 'A' or @transaction_type = 'U'))

begin

set @backorder = (select top(1) T0.itemcode from rdr1 T0 inner join oitw T1 on T0.WhsCode = T1.WhsCode where

(T0.Quantity > T1.OnHand) and T0.itemcode = T1.itemcode and t0.whscode = 'W_01' and T0.docentry = @list_of_cols_val_tab_del )

if(@backorder is not null)

begin

set @error = 1

set @error_message = N'Item '@backorder' exceeds available quantity'

end

end

if (@object_type = 17 and (@transaction_type = 'A' or @transaction_type = 'U'))

begin

declare @RowTotal nvarchar(20)

set @Rowtotal = (select top(1) t0.itemcode from rdr1 t0 where t0.price <= '0' and t0.docentry = @list_of_cols_val_tab_del)

if (@Rowtotal is not null)

begin

set @error = 1

set @error_message = (N'Item '+ @Rowtotal+' has a zero price, please input price')

end

end

Former Member
0 Kudos

Hi

We had a problem with UDT. The problem was the values entered in UDT were not saved.

Then we identified that the problem was because of the SP_TransactionNotification Stored procedure.



Instead of using 

if( @object_type = 17 and(@transaction_type = 'A' or @transaction_type = 'U'))


use
if( @object_type = '17' and(@transaction_type = 'A' or @transaction_type = 'U'))

Put the value of object_type within single quotes.

Hope this should solve your problem.

vijay_kumar1
Contributor
0 Kudos

Hi Euston,

In the previous versions , @object_type is integer and in 2007 A it is changed to

nvarchar, so you should use @object_type = '17' in the if condition.

After changing the above, you should be able to add records to the UDT.

Regards,

Vijay kumar

Former Member
0 Kudos

Yes i have upgraded the system, thank you, the issue has been resolved.

Much Appreciated

Answers (2)

Answers (2)

Former Member
0 Kudos

There are 10 other fields, all alphanumeric, with varied lengths :

Client Code (ABC01), CarMake(Valid Values Specified ie Volkswagen etc), Year Start (01 etc), Year End (04 etc), Model Type (3Dr/Hatch etc), Class ( E ) , EasyTerms ( XYZ01), Engine (2.0T, 1.9TDI etc), AKA (ZXCC1010)

former_member583013
Active Contributor
0 Kudos

Did you recently Upgrade your system?

What values are you entering for Code and Name?

Former Member
0 Kudos

Check your Year Start and Year End fields. If both fields only need to input 01, 02, ......, it is better change those values to 2001, 2002.......

Thanks,

Gordon

former_member583013
Active Contributor
0 Kudos

Can you give an example of the values you are entering into this UDT. Have you defined any additional fields other than Code and Name