Skip to Content
Former Member
Oct 18, 2007 at 12:51 PM

Please help


Hi experts,

I am a newbie in ABAP and have what I think is a small problem to many of you.

I have an internal table with one year having about 2 to 3 different sums. I want to add all the sums for each year and give it out with the year.

My internal table looks like this:

yr       sum
1999    5000
2000    6000
2000    7000
2001    5000
2002    2000
1999    9000
2000    3000
2002    6000

My output structure looks like this:

yr1 sum yr2 sum yr3 sum yr4 sum

What I am trying to do is to have the following:

yr1     sum     yr2     sum      yr3   sum     yr4     sum
1999   14000   2000    16000     2001  5000    2002   8000

This is what I have done:

clear w_output.
loot at t_output into w_output.

clear w_tab
loop at lt_tab into w_tab where id = w_output-id.

modify t_output from w_output transporting yr sum.

Could some one tell me how to do this please?

Thank you




Message was edited by:

sabina2 kent