Even I also Faced same kind of Error..
data var_sum type n LENGTH 3.
select sum( col ) from ztable INTO var_sum
where (filter condition).
Here in above query i try to store the sum of col into a variable of type numc.due to this i got the error.
Solution in my case :
data var_sum type i.
It may help to someone.