Skip to Content
author's profile photo Former Member
Former Member

URGENT REQUIREMENT

HI

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 06:25 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 06:19 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 06:27 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 06:48 AM

    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.............

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.