Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Converting character value to FLTP (floating point)

0 Kudos

Hello,

The value for field ABSAT will be coming from CSV file, although this value is coming in FLTP format: 7.72E+03 (this is how value is visible in csv file and same in debugger).

when i am trying to move this value into internal table which has field type of ABSAT............i am getting some error "unicode conversion not possible".

any possible bailout...............casting ??.........if yes.....how..

need any additional info...please let me know.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI Ankit,

Copy that field to some other field which is packed decimal, this will work try.

Eg


if your field is a and other field is b,
b type p decimals 2.

b = a.


write : / b.

O/P
7,720.000.

Thanks and regard's,

Anmol Bhat

5 REPLIES 5

Former Member
0 Kudos

HI Ankit,

Copy that field to some other field which is packed decimal, this will work try.

Eg


if your field is a and other field is b,
b type p decimals 2.

b = a.


write : / b.

O/P
7,720.000.

Thanks and regard's,

Anmol Bhat

Former Member
0 Kudos

Hi,

Try to convert: c => f => p .

Like this:

data: vc(20),
      vf type f,
      vp type p decimals 3.

vc = '7.72E+03'.
vf = vc.
vp = vf.

write vp.

Best regards,

Leandro Mengue

Former Member
0 Kudos

I think you will have to parse the character value.

Rob

karol_seman
Active Participant
0 Kudos

check out function modules FLTP_CHAR_CONVERSION and CHAR_FLTP_CONVERSION

Regards,

Karol

0 Kudos

sorry for late response.

thanx for all replies.

points awarded