Application Development and Automation 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: 
Read only

data

Former Member
0 Likes
550

Dear friends

I have field with the values like 1.000 and 17.10 , i need to cut the zeros after decimal point in case of 17.10 it should come like 17.1

give the sample code for the above

thanks in advance

karthik

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
528
write f no-zero.

or pass the values to type C variable ..

i.e,

data : var(10),

var2 type f value '13.20'.

var = var2.

write var2.

3 REPLIES 3
Read only

Former Member
0 Likes
529
write f no-zero.

or pass the values to type C variable ..

i.e,

data : var(10),

var2 type f value '13.20'.

var = var2.

write var2.

Read only

0 Likes
528

hi santhos,

the value is in internal table , after correcting the data i need to pass it to another internal table.

Read only

Former Member
0 Likes
528

If your variable is defined as string you can use:

SHIFT V_STRING RIGHT DELETING TRAILING '0'.