Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2878

Type cast error for char to int in HANA model

$
0
0

Dear Experts,

 

I am facing an issue while trying to convert a string to int and then casting it back to string.

 

My requirement is - User is providing an input parameter based on column of datatype VARCHAR. So here FiscalMonth = 2016-M05.

Now I am taking left 4 char of this to return 2016 as string. To calculate previous year I converted this to Int and substracted 1. and finally I casted

this to string and storing in calculated variable of data type VARCHAR.

 

Its showing me following error

conversion.PNG

 

I searched this issue on SCN but many of the posts are referring this to typecast using CE function/ I am trying to create a variable on graphical calculation model and need this to dynamically calculate previous year so that I can compare this previous year with transactional date's year (taken 4 chars of year from string of date)

 

Could you please guide me for its root cause fix.

 

 

Thanks & Regards,

Jiten


Viewing all articles
Browse latest Browse all 2878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>