cancel
Showing results for 
Search instead for 
Did you mean: 

PO to show next price break quantity on item from SPP2 shows 'Invalid numeric value' error if > 1k

neilos
Active Participant
0 Kudos
129

Hi All,

I've created a UDF on marketing document rows to show the next quantity price break on each item if it exists.
This works as needed up until the next quantity price break is 1,000 or more.
How can I amend the FMS too ignore the comma in the number format?

 

SELECT T0.[Amount] FROM SPP2 T0 WHERE T0.[ItemCode] =$[$38.1.0] and  T0.[CardCode] =$[$4.1.0] and  T0.[Amount] > $[$38.11.number]

 

 Screenshot showing the Volume Discounts format of the price breaks and the PO with the error.

Any advice is appriceated. Thanks.

EDIT;
I've just realised it is the UDF that is causing this, it is set as numeric type.
Manually typing 1000 is fine, while entering 1,000 shows same error.
Do I then need to set a new UDF as Alphanumeric or can the FMS be changed to remove the comma before?

Accepted Solutions (0)

Answers (1)

Answers (1)

neilos
Active Participant
0 Kudos
SELECT replace(T0.[Amount],',','') FROM SPP2 T0 WHERE T0.[ItemCode] =$[$38.1.0] and  T0.[CardCode] =$[$4.1.0] and  T0.[Amount] > $[$38.11.number]

This sorted the issue