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

urgent please

Hi

can anyone tell me how to do this ,my output list display is as shown below

ACCOUNT AMMOUNT

54100160 100

54100160 200

54100160 300

54100160 400

54100160 50

54100160 20

54100170 10

54100170 12

54100170 13

54100170 14

54100170 15

54100170 21

54100180 22

54100180 23

54100180 20

54100180 20

54100180 20

54100180 20

54100180 20

and it want it to display it in this format

ACCOUNT AMMOUNT

54100160 1,050.00

54100170 85

54100180 145

Thanks & Regards

Lalith

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2008 at 10:39 AM

    Beofre writing the out put

    use collect for the internal table u have with account number then it adds all the numeric fields having the same acc no

    loop at itab into fs_temp.

    collect fs_temp to itab_new.

    endloop.

    loop at itab_new.

    write: /

    endloop.

    hope this solves u r problem..

    plzz reward if it usefull......

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2008 at 10:39 AM

    Hi,

    when u r appending the data into table use collect instead of append then ur problem is solved.

    Plzzz reward points if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2008 at 10:40 AM

    Loop at your Internal table and Use the Collect Statement.

    Hope this helps

    Vinodh Balakrishnan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2008 at 10:40 AM

    Use COLLECT ..

    Use COLLECT ..

    "define another itab2 of TYPE itab
    LOOP AT itab.
    COLLECT itab INTO itab2.
    ENDLOOP.
    

    alternatively..

    SELECT <fld1> <fld2> INTO CORRESPONDING FIELDS OF <itab> FROM <dbtab>
    WHERE <cond>.
    
    COLLECT itab.
    ENDSELECT.
    
    

    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.