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: 

Convert Type F to Type C without Exponent Value

Former Member
0 Kudos

I need to convert Type F to Type C without Exponenet Value. I want <fs_valu> to contain the value '60' not ' 6.0000000000000000E+00'.

lv_field = 'SAFTY'.

<fs_matloc>-SAFTY = ' 6.0000000000000000E+01'

I am using the code below but I don't know how to write the code to get rid of the exponenet.

IF field_int-type = 'F'.

ASSIGN COMPONENT lv_field OF STRUCTURE <fs_matloc>

TO <fs_valu>

TYPE ????

Any help would be much appreciated.

Thanks.

Ryan

3 REPLIES 3

Former Member
0 Kudos

Hi

Try to use MOVE statament, I believe you need to move it to decimal field and so to char field

Max

Former Member
0 Kudos

Hello,

Check this:


  DATA: CHAR1(30).
          WRITE: G_R_OBJECTS-ATFLV TO CHAR1 EXPONENT 0 DECIMALS 3.
          CONDENSE CHAR1 NO-GAPS.

Regards,

Vasanth

Former Member
0 Kudos

Hi Boater,

use the Function module FLTP_CHAR_CONVERSION which served ur purpose..reward if useful