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: 

How to delete trailing zeros after the decimal point in the ALV sum

Former Member
0 Kudos

Hello Expert,

In my alv output, I need to sum up one column, but in the sum result, I don't want to display zeros after the decimal point.

for example,

If the sum is 134.00, I only want to display 134 on the alv.

Does any expert have idea about it?

Thanks in advance,

best regards, Johnny

6 REPLIES 6

Former Member
0 Kudos

Hi ,

Use following

SHIFT variable RIGHT/LEFT DELETING TRAILING '0'.

For more variations ,

just write SHIFT and press f4 , it will show you the information you need.

Hope this is helpful,

Regards,

Uma Dave

0 Kudos

Hello Uma Dave,

Thanks for your reply.

You know, the sum is done by the sap system. It's important to control the output by SHIFT statement and there is no place to write the statement.

Thanks & Best regards, Johnny

former_member536879
Active Contributor
0 Kudos

Hi,

There are some functionalities in the ALV fieldcatalog strucuture for this.

Please go through that. Type Pools - SLIS.

With Regards,

Sumodh.P

0 Kudos

still ur not clear,

you can use like

fieldname = trunc( fieldname )

0 Kudos

still ur not clear,

you can use like

fieldname = trunc( fieldname )

0 Kudos

still ur not clear,

you can use like

fieldname = trunc( fieldname )