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: 

URGENT REQUIREMENT

Former Member
0 Kudos

HI

HOW CAN I SUM UP A ROW IN THE ALV's

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Can you do this in program?

do the sum in internal table and keep that sum in one field.

And displar that field in ALV.

Reward pts. if usefull.

Regards,

Dhan

7 REPLIES 7

Former Member
0 Kudos

JUst add one more column in the internal table and pass the addition of all the numeric fields in this filed .

Write something like this .

loop at itab.

itab-fieldsum = itab-field1 + itab-field2 + itab-field3.

modify itab.

endloop.

0 Kudos

HI Manik Dhakate

sorry yar

i wann in the coloum wise can u help me in this please

0 Kudos

Hi.

To obtain sum for column use do_sum field which was present in fieldcatlog.

while filling field catlog for that particular field check do_sum filed as 'x'.

This do_sum field is presented in slis_fieldcat_main0 include of field catlog

PlZ reward points, if helpful.

Regards.

Former Member
0 Kudos

Hi,

Can you do this in program?

do the sum in internal table and keep that sum in one field.

And displar that field in ALV.

Reward pts. if usefull.

Regards,

Dhan

Former Member
0 Kudos

Hi,

If you want to add column then its more easy. You get a sum button in the toolbar of alv. Just select the column and click on SUM.

Regards,

Dhan

0 Kudos

HEY BUDDY

I WAS BOING IN BLOCKED ALVS AND I WANN THE SUM AT THE TIME OF OUTPUT

Former Member
0 Kudos

Hi,

use the parameter it_sort from alv function module.

ex: wa_sort-subtotal = 'x'.

similarly for grand total use it_fieldcat

i_fieldcat-do_sum

If found useful

reward mark.............