cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid number exception in AMDP

matt
Active Contributor
0 Kudos

I have an AMDP method, with parameter IMPORTING VALUE(threshold) TYPE decfloat16

Within the AMDP is a complex select which uses to_bigint( :threshold ).

When I try to execute the method, I get a database error:

invalid number: [339] "SYSID"."ZCL_HANA_TABLE=>MY_METHOD#stb2#20170124144446": line 8 col 3 (at pos 177): [339] (range 3) invalid number exception: invalid number: [339] invalid number: not a valid number string 'C11C309000000000' at function to_bigint() (please check lines: 9)

I've check in the ABAP debugger and threshold contains the value 1048576.

If I replace :threshold with a number, the SQL works fine.

matt
Active Contributor
0 Kudos

If I change the parameter type to i then I don't get a problem. It looks like decfloat isn't being passed as a number. Unfortunately, i doesn't have sufficient range for my purposes!

Accepted Solutions (1)

Accepted Solutions (1)

horst_keller
Product and Topic Expert
Product and Topic Expert

See Mapping of ABAP Types to SQLScript under

http://help.sap.com/abapdocu_751/en/index.htm?file=abenamdp_hdb_sqlscript.htm

decfloat16 -> VARBINARY, length 8. Cannot be interpreted as a number in the database and no calculations can be performed

decfloat34 -> VARBINARY, length 16. Cannot be interpreted as a number in the database and no calculations can be performed

matt
Active Contributor
0 Kudos

Exactly what I was looking for - but couldn't find!

int8 would be preferred solution, but we're not at 7.5 yet. So I'm using type f.

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

I already made the mapping tables a separate topic in the next documentation release.

Answers (0)