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

how to find grand total

Hi experts,

I have one internal table containing 2 fields quantity and amount.In the output i want to show total quantity and total amount. How can i achive it..?

something like this

qty amt

-


1 10

2 20

3 30

-


6 60

-


reward guaranteed

thanks

Kaki

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 08:27 AM

    LOOP AT itab INTO line.

    WRITE: / line-qty, line-amt.

    AT END OF qty.

    SUM.

    ULINE.

    WRITE: / line-qty, line-amt.

    SKIP.

    ENDAT.

    AT LAST.

    SUM.

    ULINE.

    WRITE: / line-qty, line-amt.

    ENDAT.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 19, 2005 at 08:35 AM

    Hi,

    Loop at itab into wa.

    v_qty = v_qty + wa-qty.

    v_amt = v_amt + wa-amt.

    write : wa-qty, wa-amt.

    endloop.

    write : v_qty , v_amt.

    Kindly reward points if it helps.

    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.