cancel
Showing results for 
Search instead for 
Did you mean: 

HANA invalid number: not a valid number string '' a function __typecast__() PARAMETER MULTIPLE VALUE

0 Kudos

Recently started having trouble with this parameter to a view that is being called by other views. I get this error:

invalid number: not a valid number string '' a function __typecast__()

With some effort, I have narrowed down the problem to the P_TARIFTYP parameter. In the base table as well as the parameter definition it is NVARCHAR(10). Below is the filter criteria on the node producing the error. This node is a projection that calls the HANA table ZDBERCHZ_SLT (no other nodes upstream).

(in("STGRQNT",'$$P_STGRQNT$$') or '$$P_STGRQNT$$'='*')
and (in("BELZART",'$$P_BELZART$$') or '$$P_BELZART$$'='*')
and (in("STGRAMT",'$$P_STGRAMT$$') or '$$P_STGRAMT$$'='*')
and (in("ZONENNR",'$$P_ZONENNR$$') or '$$P_ZONENNR$$'='*')
and (in( "BELZART",'$$P_BELZART$$') or '$$P_BELZART$$'='*')
and "MANDT"='400'
and (in("TARIFTYP",'$$P_TARIFTYP$$') or '$$P_TARIFTYP$$'='*')

If I remove the line that references the TARIFTYP column/parameter, the node runs. If I change the P_TARIFTYP parameter to not accept multiple values, the node runs.

If I leave it as the default value * the datatype conversion error in the subject of this post is produced. If I set the value as TE-R-RS, I get the calc view instantiation error upon moving a measure to the values axis in the data previewer.

I'm really at a loss trying to figure this one out. I have tried deleting and re-adding both the column in the node and the parameter in the view, thinking that this must be an XML problem in the view definition.

Please help, I don't know where else to look!

Accepted Solutions (1)

Accepted Solutions (1)

KonradZaleski
Active Contributor
0 Kudos

I see two issues in your filter expression:
1. For multiple value input parameters you should not use quotes (''), so filter should look as follows:

in("STGRQNT",$$P_STGRQNT$$)

2. Equal symbol is not valid for multiple value input parameter so you should use in operator

in($$P_STGRQNT$$,'*')

So summarizing you should apply filters in following way:

( in("STGRQNT",$$P_STGRQNT$$) or in($$P_STGRQNT$$,'*') )

Answers (0)