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: 

Deleting zeros from the report

Former Member
0 Kudos

Hi Friends,

I am done with an ALV list view report . The only problem is that if there is no quantity or values for the numeric field it should not diplay 0.000 . Instead it should be blank . Is there a way to do this ???

Thanks

1 ACCEPTED SOLUTION

LucianoBentiveg
Active Contributor
0 Kudos

Try using fieldcat-no_zero = 'X' in that column.

Regards.

6 REPLIES 6

LucianoBentiveg
Active Contributor
0 Kudos

Try using fieldcat-no_zero = 'X' in that column.

Regards.

Former Member
0 Kudos

hi

set no_zero = 'X'. in the fieldcat.

hope this helps,

priya.

0 Kudos

Hi Priya ,

Thanks your solution solved the problem in one way.Actually i have this qty field which gets its value from the DB . It's stored in the database table as 10.00 . I want to remove the decimals when i display it in the report .

Thanks

0 Kudos

Hi Hari,

YOu should transfer the value into a char type variable and then replace '.' with ''.

write v_value to v_char.

replace all occurances of '.' with '' in v_char.

Regards,

Ravi

0 Kudos

This statement did not work .Is there any other way we can get rid of the decimals and the zeros.

Eg : i have 10.000 in the DB .

I need to display only 10 on the report .

Thanks

0 Kudos

use the syntax,

trunc.

data: v_new_value type i.

v_new_value = trunc( v_value ).

Regards,

Ravi